Skip to content

Name the routes after the pages, not after their position in the app - #258

Merged
adulbrich merged 1 commit into
mainfrom
rename-routes
Aug 5, 2026
Merged

Name the routes after the pages, not after their position in the app#258
adulbrich merged 1 commit into
mainfrom
rename-routes

Conversation

@adulbrich

Copy link
Copy Markdown
Collaborator

/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.

Before After
/home-page /pipeline
/settings-page /settings
/runs /runs (unchanged)
/image-viewer, /image-viewer/view /viewer, /viewer/view

/pipeline is 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, since typedRoutes is off. Three references live outside anything that would have failed:

  • .github/workflows/ci-web.yml asserts test -f out/home-page.html after a build. Nothing local runs it, so a stale path stays green here and breaks only in CI.
  • biome.jsonc keys two lint overrides by file path, one working around a Biome crash on fs-circular-mas-selection.tsx and one preserving bare import specifiers in viewer/page.tsx. Stale paths would have silently stopped applying.
  • src-tauri/tauri.conf.json sets the window's opening URL, which no test in the repo exercises.

Also updated: both Playwright webServer.url readiness targets, PRD.md, DEPLOYMENT.md, and every @/app/... import specifier. Historical docs/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 remaining orchestrator.ts:532 warning was confirmed pre-existing against a stashed baseline.
  • next build — emits exactly /pipeline, /runs, /settings, /viewer, /viewer/view. out/ has the new .html files and no home-page.html / settings-page.html / image-viewer*. The CI smoke check was replayed verbatim against the fresh build.
  • Playwright web e2e — 21 of 22 passed. The failure is a 67 MB OPFS write dying with UnknownError: out of memory on WebKit. Rebuilding unmodified main reproduces 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 on tauri.conf.json. It needs a full Rust build to re-prove a one-string substitution that resolves through the same mechanism as before, against a pipeline.html confirmed 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.
  • The "Image Generator" nav label, and the (Home Page) in PRD.md's section 3 heading, are copy rather than paths. Renaming them is a separate call.

🤖 Generated with Claude Code

`/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>
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lumilab Ready Ready Preview Aug 5, 2026 1:04pm

@adulbrich
adulbrich merged commit bc097c9 into main Aug 5, 2026
12 checks passed
@adulbrich
adulbrich deleted the rename-routes branch August 5, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant