feat(editorial): widen sections and add local track pages

Unify the editorial canvas across section pages, keep release tracks out of Journal, and give each song a listening surface with audio, metadata, platform links, sharing, and optional featured art. Document and seed the local The No Names fixture without changing production data.
This commit is contained in:
chrnx committed 2026-08-27 20:24:39 -05:00
1 parent 135b462bd2
commit 76917decd0
23 files changed
+770 -50

No files matched your search

@@ -0,0 +1,65 @@
# Editorial Widths and Track Pages Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Unify editorial widths, keep release tracks out of Journal, and add a complete local-first track page.
**Architecture:** Keep tracks as posts with existing release taxonomy and metadata. Add only the missing description/share/audio fixture behavior, scope the Journal query exclusion to release-assigned posts, and use shared width tokens/classes in the theme CSS.
**Tech Stack:** WordPress block theme, PHP render blocks, native HTML audio/share APIs, CSS, Playwright, PHPUnit.
---
### Task 1: Define track-page metadata and Journal eligibility
**Files:**
- Modify: `inc/track-meta.php`
- Modify: `inc/queries.php`
- Test: `tests/php/PatternsTest.php`
- [ ] Add sanitized `chrnx_track_description` post meta and a helper for release-track detection.
- [ ] Exclude posts assigned to `chrnx_release` from unfiltered Journal queries while preserving explicit release queries.
- [ ] Add regression assertions for direct track eligibility and Journal exclusion.
- [ ] Run PHPUnit and fix failures.
### Task 2: Render the track page controls
**Files:**
- Modify: `blocks/track-meta/render.php`
- Modify: `templates/single.html`
- Modify: `assets/js/track-share.js` (create)
- Modify: `inc/blocks.php`
- Test: `tests/e2e/music-podcast-stages.spec.mjs`
- [ ] Render description, player, release, platform links, and share control in a single track metadata surface.
- [ ] Load the share enhancement progressively; use native share when available and clipboard fallback otherwise.
- [ ] Keep lyrics in the existing post content and preserve non-track single-post behavior.
- [ ] Add browser assertions for player/metadata/share and no Journal leakage.
### Task 3: Make the editorial shell consistently wide
**Files:**
- Modify: `assets/css/components.css`
- Test: `tests/e2e/music-podcast-stages.spec.mjs`
- [ ] Apply the centered 1200px editorial width to Journal, Projects, Podcasts, About, release archives, and track pages.
- [ ] Correct Podcast hero centering and preserve mobile stacking/no overflow.
- [ ] Style the track surface with the existing dark/grunge tokens and readable lyric text.
- [ ] Verify both themes and 375/768/1440px captures.
### Task 4: Populate local audio and metadata
**Files:**
- Modify: `scripts/seed-the-no-names-local.php`
- Modify: `README.md`
- [ ] Import available local MP3s from the mounted Suno source as fixture-owned attachments.
- [ ] Populate track descriptions from song metadata when present and keep fake platform URLs local-only.
- [ ] Document the seed command and production cleanup boundary.
### Task 5: Verify and capture
- [ ] Run `npm run lint:css`, `npm run lint:js`, `npm run test:php`, and the focused E2E suite against port 8908.
- [ ] Run `npm run test:smoke`.
- [ ] Capture Music, Podcasts, Journal, Projects, About, and a track page in dark/light desktop/mobile states.
- [ ] Open the final Music and track screenshots in macOS Preview.
@@ -14,14 +14,17 @@
**Files:**
- Modify: `inc/taxonomies.php`
- Modify: `patterns/music-landing.php`
- Modify: `inc/release-meta.php`
- Modify: `blocks/release-list/render.php`
- Test: `tests/php/PatternsTest.php`
- Test: `tests/smoke/visual-integration.test.mjs`
- [ ] Add Side B as an independent release term and preserve existing release slugs.
- [ ] Add Side B as the `side-b` release term after the three existing terms; preserve the existing public slug `el-hermoso-caos` while documenting its longer source-directory mapping.
- [ ] Replace the introductory quote with the approved exact Spanish copy while keeping its existing block position.
- [ ] Extend release list rendering with safe description, status, platform links, track preview, and lyrics destination data.
- [ ] Add semantic disclosure markup and empty-state handling.
- [ ] Add regression assertions for four releases and required release-card structure.
- [ ] Add an explicit renderer order array and regression assertions for exactly four releases in order, 13/6/6/19 seeded counts, required release-card structure, and exact quote placement/copy.
- [ ] Run the focused smoke test and confirm it fails before implementation where appropriate.
### Task 2: Implement the release-card presentation
@@ -31,22 +34,26 @@
- Modify: `patterns/music-landing.php`
- Modify: `blocks/release-list/render.php`
- Test: `tests/e2e/music-podcast-stages.spec.mjs`
- Test: `tests/php/BlockRenderingTest.php`
- [ ] Widen only the Music landing content container while retaining the existing hero layers.
- [ ] Build wide release rows with a dominant cover, readable title/status, platform links, disclosure, track preview, and lyrics link.
- [ ] Widen only the Music landing content container to a 1200px cap while retaining the existing hero layers and unchanged global 1120px wide size.
- [ ] Build wide release cards with `min(32%, 22rem)` cover width, readable title/status, conditional platform links in Suno/Spotify/Apple order, closed native disclosure, first-three-track preview, per-track links, and release archive lyrics link.
- [ ] Add responsive stacking and keyboard/focus states.
- [ ] Apply grunge texture through existing visual language and restrained metadata treatment, not unreadable body typography.
- [ ] Capture `/music/` in local light/dark desktop and mobile states.
- [ ] Capture `/music/` with `CHRNX_REVIEW_URL=http://localhost:8908 node scripts/capture-visual-review.mjs` in local light/dark desktop and mobile states.
### Task 3: Seed local The No Names content
**Files:**
- Create: `scripts/seed-the-no-names-local.sh`
- Create: `tests/fixtures/the-no-names-releases.json`
- Modify: `scripts/seed-test-content.php`
- Modify: `scripts/seed-test-content.sh`
- Modify: `README.md`
- Test: `tests/smoke/theme-contract.test.mjs`
- [ ] Add an idempotent local-only seed command that validates localhost and imports the four release records, covers, descriptions, statuses, and track metadata from the Suno tree.
- [ ] Import Side B from its nested directory as a separate release.
- [ ] Add an idempotent `the-no-names` scenario to the existing localhost-guarded seed workflow, reading only `tests/fixtures/the-no-names-releases.json`; include an explicit local generator command that reads the Suno source tree and cannot run against a public host.
- [ ] Include all 13 main-album directories, six tracks from each EP, and 19 Side B tracks; ignore alternate `song-*.md` files.
- [ ] Import source covers into the local media library with `_chrnx_fixture_key` attachments, `_chrnx_fixture_key` terms/posts, term descriptions/status, and clean only prior The No Names fixture records on rerun/restore; switching to default must preserve unrelated content.
- [ ] Keep absent streaming URLs empty and never infer public links.
- [ ] Document startup, seed, preview, and restore boundaries.
- [ ] Run the seed against the isolated wp-env database.
@@ -56,7 +63,7 @@
**Files:**
- Modify: relevant tests only if evidence requires it.
- [ ] Run `npm run test:smoke`, lint, PHP tests, and focused Playwright Music checks.
- [ ] Run `npm run test:smoke`, `npm run lint:js`, `npm run lint:css`, `npm run phpcs`, `npm run test:php`, and `npx playwright test tests/e2e/music-podcast-stages.spec.mjs`.
- [ ] Start Colima/wp-env on the configured local port and capture the rendered page.
- [ ] Inspect screenshots at 375, 768, and 1440 widths in both themes.
- [ ] Run `git diff --check` and report local-only status; do not publish or touch production.