Name the routes after the pages, not after their position in the app - #258
Merged
Conversation
`/home-page` and `/settings-page` described where a page sat rather than what it did, and `-page` on a route is a suffix that never earns its keep. The generator route becomes `/pipeline`, which is the word the code already uses everywhere around it (`src/lib/pipeline`, `(pipeline-configuration)`, `pipeline-config-store.ts`, `run-wasm-pipeline.ts`). `/image-viewer` loses the `image-` it shared with nothing else and becomes `/viewer`. /home-page -> /pipeline /settings-page -> /settings /image-viewer -> /viewer (and /image-viewer/view -> /viewer/view) In the App Router a directory is both the URL and the import path, so each rename moves two namespaces at once. The build catches a stale import; it does not catch a stale route string, since `typedRoutes` is off. Three references live outside anything that would have failed: - `.github/workflows/ci-web.yml` asserts `out/<route>.html` after a build, so a stale path stays green locally and breaks only in CI. - `biome.jsonc` keys two lint overrides by file path -- one working around a Biome crash, one preserving bare import specifiers. Stale paths would have stopped applying without a word. - `src-tauri/tauri.conf.json` sets the window's opening URL, which no test in the repo exercises. `id="image-viewer-input"` keeps its name: it is a DOM id the desktop e2e spec selects on, not a route. The "Image Generator" nav label is likewise untouched, being copy rather than a path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/home-pageand/settings-pagedescribed where a page sat rather than what it did, and-pageon a route is a suffix that never earns its keep./home-page/pipeline/settings-page/settings/runs/runs(unchanged)/image-viewer,/image-viewer/view/viewer,/viewer/view/pipelineis the word the code already uses everywhere around it:src/lib/pipeline, the(pipeline-configuration)route group,pipeline-config-store.ts,run-wasm-pipeline.ts.Directories moved with
git mv, so history follows the files.The references a green build would not have caught
In the App Router a directory is both the URL and the import path, so each rename moves two namespaces at once. A stale import fails
tsc; a stale route string is just a string, sincetypedRoutesis off. Three references live outside anything that would have failed:.github/workflows/ci-web.ymlassertstest -f out/home-page.htmlafter a build. Nothing local runs it, so a stale path stays green here and breaks only in CI.biome.jsonckeys two lint overrides by file path, one working around a Biome crash onfs-circular-mas-selection.tsxand one preserving bare import specifiers inviewer/page.tsx. Stale paths would have silently stopped applying.src-tauri/tauri.conf.jsonsets the window's opening URL, which no test in the repo exercises.Also updated: both Playwright
webServer.urlreadiness targets,PRD.md,DEPLOYMENT.md, and every@/app/...import specifier. Historicaldocs/superpowers/plans/*were left as written, being dated records.Verification
tsc --noEmit— clean.jest— 59 suites, 400 tests passed.ultracite check— clean. Three errors the rename introduced were auto-fixed: renaming../image-viewer/to../viewer/changed the alphabetical import order in two files, and shortening a route array let it reflow onto one line. The remainingorchestrator.ts:532warning was confirmed pre-existing against a stashed baseline.next build— emits exactly/pipeline,/runs,/settings,/viewer,/viewer/view.out/has the new.htmlfiles and nohome-page.html/settings-page.html/image-viewer*. The CI smoke check was replayed verbatim against the fresh build.UnknownError: out of memoryon WebKit. Rebuilding unmodifiedmainreproduces it identically, so it is a pre-existing host-memory issue rather than a regression.Not run: the desktop suite (
npm run test:e2e:desktop), which is the only executable check ontauri.conf.json. It needs a full Rust build to re-prove a one-string substitution that resolves through the same mechanism as before, against apipeline.htmlconfirmed present. The Tauri window URL is therefore verified by artifact presence, not by launching the app.Deliberate non-changes
id="image-viewer-input"keeps its name. It is a DOM id the desktop e2e spec selects on, not a route.(Home Page)in PRD.md's section 3 heading, are copy rather than paths. Renaming them is a separate call.🤖 Generated with Claude Code