Compare commits

...

2 Commits

Author SHA1 Message Date
Marcel
1ec4815e24 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
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>
2026-05-09 08:52:20 +02:00
Marcel
a7bbf2424f fix(build): add prerender entry for /hilfe/transkription
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>
2026-05-09 08:51:45 +02:00
3 changed files with 8 additions and 3 deletions

View File

@@ -40,6 +40,10 @@ jobs:
run: npm test
working-directory: frontend
- name: Build frontend
run: npm run build
working-directory: frontend
- name: Upload screenshots
if: always()
uses: actions/upload-artifact@v4

View File

@@ -1,3 +1 @@
// Safe: handleAuth in hooks.server.ts redirects unauthenticated requests
// before prerendered HTML is visible.
export const prerender = true;

View File

@@ -6,7 +6,10 @@ const config = {
// Consult https://svelte.dev/docs/kit/integrations
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: { adapter: adapter() }
kit: {
adapter: adapter(),
prerender: { entries: ['/hilfe/transkription'] }
}
};
export default config;