You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name the routes after the pages, not after their position in the app (#258)
`/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>
Copy file name to clipboardExpand all lines: PRD.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,16 +18,16 @@ Four tabs (`src/app/navigation.tsx`), identical in both hosts:
18
18
19
19
| Tab | Route | Purpose |
20
20
|---|---|---|
21
-
| Image Generator |`/home-page`| Configure and run the LDR → HDR calibration pipeline |
22
-
| Settings |`/settings-page`| Output folder, and the versions of everything bundled |
21
+
| Image Generator |`/pipeline`| Configure and run the LDR → HDR calibration pipeline |
22
+
| Settings |`/settings`| Output folder, and the versions of everything bundled |
23
23
| Runs |`/runs`| History of previous pipeline runs and their outcomes |
24
-
| Image Viewer |`/image-viewer`, `/image-viewer/view`| Load and inspect a generated `.hdr` file |
24
+
| Image Viewer |`/viewer`, `/viewer/view`| Load and inspect a generated `.hdr` file |
25
25
26
-
`/` redirects to `/home-page`, so the site root resolves in a browser.
26
+
`/` redirects to `/pipeline`, so the site root resolves in a browser.
27
27
28
28
## 3. Feature: Image Generator (Home Page)
29
29
30
-
`src/app/home-page/page.tsx`
30
+
`src/app/pipeline/page.tsx`
31
31
32
32
-**Image set input** — drag-and-drop or file-picker selection of an LDR bracket (JPEG, TIFF, or camera raw). Multiple named image sets can be staged; each set is validated to contain at least 2 images, and every staged set is run. On the desktop a set is a directory; in a browser, `webkitdirectory` reports a relative path, so nested folders still become separate sets and a plain multi-file selection becomes one.
33
33
-**Camera response function** — upload of a `.rsp` file describing the camera's tone response, required for JPEG-derived input.
@@ -48,7 +48,7 @@ Four tabs (`src/app/navigation.tsx`), identical in both hosts:
48
48
49
49
## 4. Feature: Calibration Pipeline
50
50
51
-
`src/lib/pipeline/*`, driven from `src/app/home-page/run-wasm-pipeline.ts`
51
+
`src/lib/pipeline/*`, driven from `src/app/pipeline/run-wasm-pipeline.ts`
52
52
53
53
The pipeline is TypeScript orchestrating WebAssembly. It runs **in a Web Worker**, not on the page: Emscripten's `callMain` is synchronous and blocks its thread for the whole of a tool, so an inline pipeline froze the tab for the length of an hdrgen merge. The worker reads no files itself — the page stages the bytes and transfers them in, because only the page knows how to reach a file (Tauri's filesystem on the desktop, the virtual filesystem in a browser), and keeping that out of the worker is what lets one worker serve both hosts.
54
54
@@ -79,7 +79,7 @@ The two former Rust commands have TypeScript equivalents: raw conversion rides o
79
79
80
80
## 5. Feature: Image Viewer
81
81
82
-
`src/app/image-viewer/*`
82
+
`src/app/viewer/*`
83
83
84
84
-**File intake** — drag-and-drop or file picker for a single `.hdr` file (extension-validated); state is passed to the viewer route via a serialized URL query string (`viewer-url.ts`).
85
85
-**Rendering** — a `three.js` (WebGL) canvas renders the HDR pixel data as a texture, with pan/zoom (`react-zoom-pan-pinch`).
@@ -96,7 +96,7 @@ The viewer works on every platform with no additional software. It requires WebG
96
96
97
97
## 6. Feature: Settings
98
98
99
-
`src/app/settings-page/page.tsx`
99
+
`src/app/settings/page.tsx`
100
100
101
101
- Output folder, on the desktop. It is hidden in a browser, because a browser downloads and the browser chooses where — an output path there would be a control that does nothing (`canWriteToChosenDirectory()`).
102
102
- There are no tool paths to configure: every tool ships with the app.
0 commit comments