Skip to content

feat: add styled error pages, fix type errors, add svelte-check CI#65

Merged
rubenhensen merged 4 commits into
mainfrom
feat/styled-error-pages
Apr 3, 2026
Merged

feat: add styled error pages, fix type errors, add svelte-check CI#65
rubenhensen merged 4 commits into
mainfrom
feat/styled-error-pages

Conversation

@rubenhensen

@rubenhensen rubenhensen commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #42

  • Custom error page (src/routes/+error.svelte): Card-based layout showing HTTP status code, contextual title/message (404 vs server errors), and a home link. Styled with design tokens, supports dark mode.
  • i18n translations: Added error section to both en.json and nl.json with Dutch and English messages.
  • Fixed all 14 pre-existing type errors and 2 warnings found by svelte-check:
    • vite.config.ts: Removed unused path import/__dirname, simplified server.fs.allow to relative '..', cast esbuild polyfill plugins with as any to fix type mismatch
    • FileInput.svelte: Replaced non-existent Dropzone.autoDiscover with Dropzone.discover = () => []
    • +page.svelte: Renamed Error import to ErrorPanel to avoid shadowing the built-in Error constructor
    • debug/before-send/+page.svelte, debug/done/+page.svelte, debug/upload/+page.svelte: Added missing serverError: false to EncryptState objects
    • download/+page.svelte: Cast selectedLang to 'nl' | 'en' to match YiviCore language option type
    • Decrypt.svelte: Added @type {any} JSDoc to session result.url destructured parameter to fix SessionMappings type mismatch
    • Chip.svelte: Changed const isInteractive to $derived to fix state_referenced_locally warning
    • EncryptionProgress.svelte: Changed const to to $derived to fix state_referenced_locally warning
  • CI: Added svelte-check job to .github/workflows/ci.yml — runs on every push/PR, fails on warnings or errors (Node 24, actions/setup-node@v6)
  • Added Svelte MCP server config (.mcp.json) for development tooling

Test plan

  • Visit a non-existent route (e.g. /nonexistent) and verify the styled 404 page appears
  • Toggle dark mode and verify the error page respects the theme
  • Switch language to Dutch and verify translated error messages
  • Verify npx svelte-check --threshold warning passes with 0 errors and 0 warnings
  • Verify npm run build succeeds
  • Verify the new CI svelte-check job passes on the PR

@rubenhensen rubenhensen merged commit 784166f into main Apr 3, 2026
4 checks passed
@rubenhensen rubenhensen deleted the feat/styled-error-pages branch April 3, 2026 13:35
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.

Add styled HTTP error pages (404, etc.)

1 participant