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

+42 -11
View File
@@ -53,7 +53,7 @@ test( 'local visual fixtures define stable pages and representative editorial st
[ 'home', 'journal', 'projects', 'music', 'podcasts', 'about', 'subscribe' ],
);
assert.ok( pages.every( ( page ) => page.fixtureKey && page.status === 'publish' ) );
assert.equal( posts.length, 12 );
assert.equal( posts.length, 18 );
assert.ok( posts.some( ( post ) => post.title.length > 100 ) );
assert.ok( posts.some( ( post ) => post.content.includes( 'wp:code' ) ) );
assert.ok( posts.some( ( post ) => post.fixtureState === 'missing-media' ) );
@@ -73,7 +73,16 @@ test( 'local visual fixtures define stable pages and representative editorial st
assert.ok( hasState( incompletePodcast, 'missing-excerpt' ) );
assert.ok( posts.some( ( post ) => post.fixtureKey !== incompletePodcast.fixtureKey && hasState( post, 'missing-topic' ) && !( 'topic' in post ) ) );
assert.ok( posts.some( ( post ) => post.fixtureKey !== incompletePodcast.fixtureKey && hasState( post, 'missing-language' ) && !( 'language' in post ) ) );
for ( const topic of [ 'code', 'research', 'gaming', 'literature', 'music', 'podcasts', 'life' ] ) {
assert.ok( posts.some( ( post ) => post.topic === 'projects' && post.projectFeatured === true ) );
assert.ok( posts.some( ( post ) => post.topic === 'projects' && ! ( 'projectFeatured' in post ) ) );
// Tracks must carry a release and an order for the album tracklist to mean anything.
const tracks = posts.filter( ( post ) => 'release' in post );
assert.ok( tracks.length >= 3 );
assert.ok( tracks.every( ( post ) => post.topic === 'music' && Number.isInteger( post.trackNumber ) ) );
assert.ok( new Set( tracks.map( ( post ) => post.release ) ).size >= 2 );
// No invented listening data: fixtures never ship platform URLs or audio.
assert.ok( ! posts.some( ( post ) => Object.keys( post ).some( ( key ) => key.startsWith( 'trackUrl' ) ) ) );
for ( const topic of [ 'code', 'research', 'gaming', 'literature', 'music', 'podcasts', 'life', 'projects' ] ) {
assert.ok( posts.some( ( post ) => post.topic === topic ), `missing ${ topic } fixture` );
}
} );
@@ -131,10 +140,10 @@ test( 'media and review documentation matches the current inventory and cleanup
const readme = read( 'README.md' );
const plan = read( 'docs/superpowers/plans/2026-08-13-music-podcast-grunge-stages.md' );
assert.match( readme, /52 generated files: 42 binary derivatives and 10 manifests/ );
assert.match( readme, /nine portrait families at 384 px and 768 px/ );
assert.match( readme, /Podcast\s+background family at 384 px, 768 px, and 1536 px/ );
for ( const budget of [ '160 KiB', '260 KiB', '400 KiB', '340 KiB', '620 KiB', '2.75 MiB' ] ) {
assert.match( readme, /76 generated files: 62 binary derivatives and 14 manifests/ );
assert.match( readme, /eleven portrait families at 384 px and 768 px/ );
assert.match( readme, /three\s+landscape background families \(Podcast, About, and Projects\) at 384 px, 768 px,\s+and 1536 px/ );
for ( const budget of [ '160 KiB', '260 KiB', '400 KiB', '340 KiB', '620 KiB', '3 MiB' ] ) {
assert.ok( readme.includes( budget ), `README missing ${ budget } budget` );
}
assert.doesNotMatch( readme, /all 40 outputs|2\.1 MiB/ );
@@ -460,7 +469,7 @@ test( 'all approved responsive media rebuild byte-identically within payload bou
assert.deepEqual( readdirSync( external ), [ 'sentinel' ] );
execFileSync( './scripts/build-responsive-images.sh', [ output ], { cwd: new URL( '../..', import.meta.url ) } );
const names = readdirSync( output ).sort();
assert.equal( names.length, 52 );
assert.equal( names.length, 76 );
for ( const name of [
'alter-ego-gaming-half-body-384.avif',
'alter-ego-gaming-half-body-384.webp',
@@ -479,6 +488,18 @@ test( 'all approved responsive media rebuild byte-identically within payload bou
'podcast-frequency-grunge-1536.avif',
'podcast-frequency-grunge-1536.webp',
'podcast-frequency-grunge.json',
'about-grunge-1536.avif',
'about-grunge-1536.webp',
'about-grunge.json',
'projects-grunge-1536.avif',
'projects-grunge-1536.webp',
'projects-grunge.json',
'placeholder-post-384.avif',
'placeholder-post-768.webp',
'placeholder-post.json',
'placeholder-release-384.avif',
'placeholder-release-768.webp',
'placeholder-release.json',
] ) {
assert.ok( names.includes( name ), `missing ${ name }` );
}
@@ -490,6 +511,16 @@ test( 'all approved responsive media rebuild byte-identically within payload bou
widths: [ 384, 768, 1536 ],
},
);
for ( const backdrop of [ 'about-grunge', 'projects-grunge' ] ) {
assert.deepEqual(
JSON.parse( readFileSync( join( output, `${ backdrop }.json` ), 'utf8' ) ),
{
source: `${ backdrop }.png`,
formats: [ 'avif', 'webp' ],
widths: [ 384, 768, 1536 ],
},
);
}
let total = 0;
let collageTotal = 0;
let gamingHalfBodyTotal = 0;
@@ -533,7 +564,7 @@ test( 'all approved responsive media rebuild byte-identically within payload bou
podcastTotal <= 620 * 1024,
`podcast-frequency-grunge family exceeds 620 KiB: ${ podcastTotal } total bytes`,
);
assert.ok( total <= 2.75 * 1024 * 1024, `generated binary payload exceeds 2.75 MiB: ${ total } total bytes` );
assert.ok( total <= 3 * 1024 * 1024, `generated binary payload exceeds 3 MiB: ${ total } total bytes` );
} finally {
rmSync( output, { recursive: true, force: true } );
rmSync( external, { recursive: true, force: true } );
@@ -653,7 +684,7 @@ printf 'partial-build-%s\n' "$count" > "$output"
}
} );
test( 'responsive promotion failure restores all 52 prior files', () => {
test( 'responsive promotion failure restores all 76 prior files', () => {
const output = mkdtempSync( join( tmpdir(), 'chrnx-promotion-output-' ) );
const fakeBin = mkdtempSync( join( tmpdir(), 'chrnx-promotion-bin-' ) );
const external = mkdtempSync( join( tmpdir(), 'chrnx-promotion-external-' ) );
@@ -666,7 +697,7 @@ test( 'responsive promotion failure restores all 52 prior files', () => {
try {
execFileSync( './scripts/build-responsive-images.sh', [ output ], { cwd: projectRoot } );
const published = new Map( readdirSync( output ).map( ( name ) => [ name, sha256( join( output, name ) ) ] ) );
assert.equal( published.size, 52 );
assert.equal( published.size, 76 );
writeFileSync( sentinel, 'external-sentinel' );
const sentinelHash = sha256( sentinel );
const realMv = execFileSync( '/bin/sh', [ '-c', 'command -v mv' ], { encoding: 'utf8' } ).trim();
@@ -794,7 +825,7 @@ test( 'character-led openings share the exact stage class contract', () => {
const musicLanding = read( 'patterns/music-landing.php' );
assert.match( musicLanding, /chrnx_get_topic_portrait_markup\( 'music-collage', __\( 'The No Names collage', 'chrnx' \), 'chrnx-character-stage__collage' \)/ );
assert.doesNotMatch( musicLanding, /<img\s+src=/ );
assert.match( read( 'patterns/about.php' ), /chrnx-character-facets/ );
assert.doesNotMatch( read( 'patterns/about.php' ), /chrnx-character-facets/ );
assert.match( read( 'blocks/topic-hero/render.php' ), /chrnx-topic-hero__fallback/ );
} );