fix: correct entry layout, light mode and editor parity

The single/page/404 templates set contentSize to 70ch, which resolves
against each child's own font size: the display-size h1 asked for
~2660px and broke full bleed while the body stayed narrow. They now
inherit the 720px from theme.json.

Also drops the About facets that duplicated the portrait, adds the
missing prefers-color-scheme branch for the character stage copy
surface (dark text on a dark panel in System light), loads
components.css in the editor, and replaces the unstyled index
fallback with the journal stream.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 19:41:09 -05:00
1 parent b0e44423a1
commit a3ba692669
13 files changed
+221 -92

No files matched your search

+20 -21
View File
@@ -237,7 +237,7 @@ test( 'lower home sections keep the layered Music stage contained in both themes
const result = await page.locator( '.chrnx-home' ).evaluate( ( home, order ) => {
const selectors = [
'.chrnx-home-projects',
'.chrnx-home-projects > .chrnx-character-stage',
'.chrnx-home-music > .chrnx-character-stage',
'.chrnx-latest-podcast',
'.chrnx-home-about-preview',
@@ -372,7 +372,7 @@ test( 'lower home sections keep the layered Music stage contained in both themes
} ),
] );
expect( result.collageLazy ).toBe( 'lazy' );
expect( result.collageFallback ).toContain( 'the-no-names-collage.jpeg' );
expect( result.collageFallback ).toContain( 'the-no-names-collage-768.webp' );
expect( result.collageContained ).toBeTruthy();
expect( result.collageTreated ).toBeTruthy();
expect( result.copyPosition ).not.toBe( 'static' );
@@ -540,7 +540,7 @@ test( 'explicit themes use an atmospheric canvas and a compact home introduction
for ( const theme of [ 'Dark', 'Light' ] ) {
await page.setViewportSize( { width: 1440, height: 900 } );
await page.goto( '/' );
await page.getByRole( 'radio', { name: theme, exact: true } ).check();
await page.getByRole( 'button', { name: theme, exact: true } ).click();
await expect( page.locator( 'html' ) ).toHaveAttribute( 'data-theme', theme.toLowerCase() );
const desktop = await page.evaluate( () => {
@@ -649,9 +649,9 @@ test( 'topic, music, podcast, and about surfaces use real content and approved a
page,
} ) => {
for ( const [ path, heading, asset ] of [
[ '/topic/code/', 'Code', 'alter-ego-code.png' ],
[ '/topic/research/', 'Research', 'alter-ego-research.png' ],
[ '/topic/gaming/', 'Gaming', 'alter-ego-gaming-half-body.png' ],
[ '/topic/code/', 'Code', 'alter-ego-code-768.webp' ],
[ '/topic/research/', 'Research', 'alter-ego-research-768.webp' ],
[ '/topic/gaming/', 'Gaming', 'alter-ego-gaming-half-body-768.webp' ],
] ) {
await page.goto( path );
await expect( page.getByRole( 'heading', { level: 1, name: heading } ) ).toBeVisible();
@@ -705,12 +705,12 @@ test( 'topic, music, podcast, and about surfaces use real content and approved a
await expect( page.getByRole( 'heading', { level: 1, name: 'Music' } ) ).toBeVisible();
await expect( page.getByText( 'Grunge mexicano para cerebros que no se callan.' ) ).toBeVisible();
await expect(
page.locator( 'picture img[src*="the-no-names-musician-cutout.png"]' ),
page.locator( 'picture img[src*="the-no-names-musician-cutout-768.webp"]' ),
).toBeVisible();
await page.goto( '/podcasts/' );
await expect( page.getByRole( 'heading', { level: 1, name: 'Podcasts' } ) ).toBeVisible();
await expect( page.locator( 'picture img[src*="alter-ego-podcasts.png"]' ) ).toBeVisible();
await expect( page.locator( 'picture img[src*="alter-ego-podcasts-768.webp"]' ) ).toBeVisible();
await expect( page.locator( 'iframe, audio' ) ).toHaveCount( 0 );
await page.goto( '/about/' );
@@ -722,8 +722,8 @@ test( 'topic, music, podcast, and about surfaces use real content and approved a
await expect( page.locator( '.chrnx-about .chrnx-character-stage__art > picture' ) ).toHaveCount(
1,
);
await expect( page.locator( '.chrnx-about__portraits > picture' ) ).toHaveCount( 2 );
await expect( page.locator( '.chrnx-about picture' ) ).toHaveCount( 3 );
// One backdrop in the atmosphere layer plus the portrait in the art layer.
await expect( page.locator( '.chrnx-about picture' ) ).toHaveCount( 2 );
} );
test( 'long, incomplete, empty, and missing states stay usable', async ( { page } ) => {
@@ -888,7 +888,7 @@ test( 'reduced motion removes card transitions while theme preference remains us
);
expect( duration ).toBeLessThanOrEqual( 0.001 );
await expect( page.locator( '.chrnx-home-music h2' ) ).toHaveCSS( 'color', 'rgb(230, 237, 243)' );
await page.getByRole( 'radio', { name: 'Dark', exact: true } ).check();
await page.getByRole( 'button', { name: 'Dark', exact: true } ).click();
await expect( page.locator( 'html' ) ).toHaveAttribute( 'data-theme', 'dark' );
} );
@@ -970,8 +970,10 @@ test( 'character stage geometry, layering, effects, loading, and inspection capt
}
expect( geometry.contentArtIntersect ).toBeFalsy();
expect( geometry.followingIntersections ).toBe( 0 );
// 'about' is absent: its stage is now the last thing on the page, so
// there is no following surface left to check for overlap.
if (
[ 'home-projects', 'home-music', 'projects', 'music', 'podcasts', 'about' ].includes(
[ 'home-projects', 'home-music', 'projects', 'music', 'podcasts' ].includes(
surface.name,
)
) {
@@ -991,7 +993,8 @@ test( 'character stage geometry, layering, effects, loading, and inspection capt
const sourceName = new URL( image.src ).pathname
.split( '/' )
.pop()
.replace( /\.png$/, '' );
// The src is a generated derivative now: strip -<width>.<ext>.
.replace( /-\d+\.(?:png|jpe?g|webp|avif)$/, '' );
const [ naturalWidth, naturalHeight, x0, y0, x1, y1 ] = boundsByAsset[ sourceName ];
const imageRect = image.getBoundingClientRect();
const stageRect = element.getBoundingClientRect();
@@ -1057,10 +1060,6 @@ test( 'character stage geometry, layering, effects, loading, and inspection capt
expect( collageContract.hiddenAncestor ).toBeFalsy();
expect( collageContract.alt ).toBe( 'The No Names collage' );
}
if ( surface.name === 'about' ) {
expect( geometry.facetsOpacity ).toBeLessThan( 1 );
expect( geometry.facetsZ ).toBeLessThan( geometry.pictureZ );
}
await expectNoHorizontalOverflow( page );
if ( initial.top >= viewport.height ) {
@@ -1310,8 +1309,8 @@ const musicPodcastLandingCases = [
path: '/music/',
root: '.chrnx-music-landing',
copy: 'The No Names es una banda activa',
atmosphere: 'img[src*="the-no-names-collage.jpeg"]',
art: 'img[src*="the-no-names-musician-cutout.png"]',
atmosphere: 'img[src*="the-no-names-collage-768.webp"]',
art: 'img[src*="the-no-names-musician-cutout-768.webp"]',
latestMedia: null,
supporting: 'text=El proceso usa generative AI',
},
@@ -1320,8 +1319,8 @@ const musicPodcastLandingCases = [
path: '/podcasts/',
root: '.chrnx-podcast-landing',
copy: 'Conversations about the work behind software, research, music, and games.',
atmosphere: 'img[src*="podcast-frequency-grunge.png"]',
art: 'img[src*="alter-ego-podcasts.png"]',
atmosphere: 'img[src*="podcast-frequency-grunge-1536.webp"]',
art: 'img[src*="alter-ego-podcasts-768.webp"]',
latestMedia:
'.chrnx-latest-podcast .chrnx-podcast-card__image, .chrnx-latest-podcast .chrnx-podcast-card__fallback',
supporting: '.chrnx-latest-podcast',