fix(build): unbreak production build — /hilfe/transkription prerender unreachable behind /login [SUPERSEDED by #486] #485

Closed
marcel wants to merge 2 commits from fix/issue-472-prerender-entries into main
Owner

Closes #472

Problem

npm run build exits non-zero because /hilfe/transkription is declared prerender = true but the SvelteKit prerender crawler is intercepted by hooks.server.ts before it can reach the route. The build logs:

Error: The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:
  - /hilfe/transkription

Fix

Option A from the issue — add an explicit prerender.entries declaration in svelte.config.js so SvelteKit renders the route directly without needing to crawl to it:

kit: {
    adapter: adapter(),
    prerender: { entries: ['/hilfe/transkription'] }
}

Also removes the misleading comment in +page.ts that claimed hooks.server.ts guards prerendered static files. It does not — the auth hook only runs for SSR requests; prerendered HTML is served as a static file by the reverse proxy.

CI gate

Adds npm run build after the test step in the unit-tests CI job. Without this gate, the fix has no regression protection — a future prerender = true route that becomes unreachable behind auth would fail silently again.

Test plan

  • 1835 frontend unit tests pass (npm test)
  • Build step added to CI — will validate prerender on every PR from now on
  • CI run on this PR confirms npm run build exits 0 and /hilfe/transkription.html is produced

🤖 Generated with Claude Code

Closes #472 ## Problem `npm run build` exits non-zero because `/hilfe/transkription` is declared `prerender = true` but the SvelteKit prerender crawler is intercepted by `hooks.server.ts` before it can reach the route. The build logs: ``` Error: The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app: - /hilfe/transkription ``` ## Fix **Option A** from the issue — add an explicit `prerender.entries` declaration in `svelte.config.js` so SvelteKit renders the route directly without needing to crawl to it: ```js kit: { adapter: adapter(), prerender: { entries: ['/hilfe/transkription'] } } ``` Also removes the misleading comment in `+page.ts` that claimed `hooks.server.ts` guards prerendered static files. It does not — the auth hook only runs for SSR requests; prerendered HTML is served as a static file by the reverse proxy. ## CI gate Adds `npm run build` after the test step in the `unit-tests` CI job. Without this gate, the fix has no regression protection — a future `prerender = true` route that becomes unreachable behind auth would fail silently again. ## Test plan - [x] 1835 frontend unit tests pass (`npm test`) - [x] Build step added to CI — will validate prerender on every PR from now on - [ ] CI run on this PR confirms `npm run build` exits 0 and `/hilfe/transkription.html` is produced 🤖 Generated with [Claude Code](https://claude.com/claude-code)
marcel added 17 commits 2026-05-09 08:53:16 +02:00
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(dashboard): wire ReaderHeaderBar, grid content row, delete ReaderStatsStrip (#483)
Some checks failed
CI / Unit & Component Tests (push) Failing after 4m46s
CI / OCR Service Tests (push) Successful in 52s
CI / Backend Unit Tests (push) Failing after 3m32s
CI / Unit & Component Tests (pull_request) Failing after 4m0s
CI / OCR Service Tests (pull_request) Successful in 43s
CI / Backend Unit Tests (pull_request) Failing after 3m32s
43d36c898c
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
style(dashboard): widen stat columns from px-3 to px-5 in ReaderHeaderBar
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / OCR Service Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Failing after 4m13s
CI / OCR Service Tests (pull_request) Successful in 40s
CI / Backend Unit Tests (pull_request) Failing after 3m20s
1c515a3145
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(dashboard): add dark:text-brand-mint to ReaderHeaderBar greeting and stat numbers
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / OCR Service Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Failing after 4m2s
CI / OCR Service Tests (pull_request) Successful in 34s
CI / Backend Unit Tests (pull_request) Failing after 3m24s
a98ca0e5d3
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(dashboard): use bg-surface instead of bg-white in ReaderHeaderBar for dark mode
Some checks failed
CI / Unit & Component Tests (push) Has been cancelled
CI / OCR Service Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / Unit & Component Tests (pull_request) Failing after 4m8s
CI / OCR Service Tests (pull_request) Successful in 34s
CI / Backend Unit Tests (pull_request) Failing after 3m17s
86d75d91be
bg-white is hardcoded #fff and only flips via the Tailwind dark: media-query variant.
bg-surface uses a CSS variable (--c-surface) that responds to both the media query
and the [data-theme='dark'] attribute, matching how all other cards on the page work.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(dashboard): replace text-brand-navy dark:text-brand-mint with text-ink
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 4m7s
CI / OCR Service Tests (pull_request) Successful in 35s
CI / Backend Unit Tests (pull_request) Failing after 3m18s
CI / Unit & Component Tests (push) Failing after 4m2s
CI / OCR Service Tests (push) Successful in 37s
CI / Backend Unit Tests (push) Failing after 3m25s
cc20583ae6
text-ink uses --c-ink which is #012851 in light and #f0efe9 in dark, responding
to both @media and [data-theme='dark'] via CSS variable — no extra token needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
refactor(dashboard): align ReaderPersonChips cards with /persons overview style
Some checks failed
CI / OCR Service Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
CI / Unit & Component Tests (push) Has started running
CI / Unit & Component Tests (pull_request) Failing after 4m10s
CI / OCR Service Tests (pull_request) Successful in 35s
CI / Backend Unit Tests (pull_request) Failing after 3m33s
2283f733cc
- rounded, px-4 py-6, shadow-sm, gap-4 — matches overview card sizing
- hover: left accent border + shadow-md (matches overview hover)
- avatar: h-12 w-12, font-bold (djb2 palette colors kept)
- name: font-bold, group-hover:underline
- doc count: neutral bg-muted chip instead of mint pill

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
style(dashboard): increase doc row padding py-1.5 → py-3 in ReaderRecentDocs
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 3m57s
CI / OCR Service Tests (pull_request) Successful in 32s
CI / Backend Unit Tests (pull_request) Failing after 3m18s
CI / Unit & Component Tests (push) Failing after 3m58s
CI / OCR Service Tests (push) Successful in 32s
CI / Backend Unit Tests (push) Failing after 3m18s
d464bca9f3
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
refactor(dashboard): replace new CSS tokens with existing equivalents
Some checks failed
CI / Unit & Component Tests (pull_request) Failing after 4m0s
CI / OCR Service Tests (pull_request) Successful in 32s
CI / Backend Unit Tests (pull_request) Failing after 3m21s
CI / Unit & Component Tests (push) Has been cancelled
CI / OCR Service Tests (push) Has been cancelled
CI / Backend Unit Tests (push) Has been cancelled
7c2c4741ab
mint-soft → accent-bg, line-soft → line-2, link-quiet → ink-2,
ink-4 removed (was never applied to any element).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The SvelteKit prerender crawler cannot reach this route because
hooks.server.ts redirects all non-public paths to /login before the
crawler follows links. Explicitly listing the route in kit.prerender.entries
tells SvelteKit to render it directly without crawling.

Also removes a misleading comment that claimed the auth hook guards
prerendered static files — it does not. Prerendered HTML is served as a
static file by the reverse proxy; hooks.server.ts only runs for SSR requests.

Closes #472

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ci: add npm run build step to unit-tests job
Some checks failed
CI / Unit & Component Tests (push) Failing after 5m20s
CI / OCR Service Tests (push) Successful in 51s
CI / Backend Unit Tests (push) Failing after 3m28s
CI / Unit & Component Tests (pull_request) Failing after 4m20s
CI / OCR Service Tests (pull_request) Successful in 52s
CI / Backend Unit Tests (pull_request) Failing after 3m17s
1ec4815e24
The prerender fix only prevents regression if the build is actually run in
CI. Without this gate, a future prerendered route that becomes unreachable
behind auth would fail silently until someone runs the build manually.

Fits after the test step in the existing unit-tests job — no new job needed
since node_modules is already cached for the Playwright container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
marcel changed title from fix(build): unbreak production build — /hilfe/transkription prerender unreachable behind /login to fix(build): unbreak production build — /hilfe/transkription prerender unreachable behind /login [SUPERSEDED by #486] 2026-05-09 08:54:48 +02:00
marcel closed this pull request 2026-05-09 08:54:49 +02:00
Some checks failed
CI / Unit & Component Tests (push) Failing after 5m20s
CI / OCR Service Tests (push) Successful in 51s
CI / Backend Unit Tests (push) Failing after 3m28s
CI / Unit & Component Tests (pull_request) Failing after 4m20s
CI / OCR Service Tests (pull_request) Successful in 52s
CI / Backend Unit Tests (pull_request) Failing after 3m17s

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marcel/familienarchiv#485