Skip to content

fix(spa): 404 for missing assets; persist selected project - #354

Merged
ajianaz merged 2 commits into
developfrom
fix/310-311-spa
Oct 13, 2026
Merged

ajianaz merged 2 commits into
developfrom
fix/310-311-spa

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What

  • spa.rs: asset-like paths (final segment has an extension, or under _app/) that are not embedded now return 404. Extension-less client routes still fall back to index.html.
  • web: selected project persists across Issues/Transactions/Release Health/Rules via localStorage (lib/project-selection.ts). Resolution order: valid ?project=, stored value, first project.
  • trapfalld/build.rs: emits a cargo warning when web/build/_app is missing (a fresh clone only tracks a placeholder index.html, so the dashboard is blank without npm run build). Relates to bug(ui): dashboard renders blank on fresh clone — web/build assets not in git but embedded at compile time #307 (not closed here).

Why

Missing JS/CSS returned index.html with 200, hiding build problems and confusing browsers. Project choice was lost when navigating between pages.

Testing

  • Rust tests written first (failed with 200 vs 404), now pass; cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace all pass.
  • web: npm ci, npm run check (0 errors), npm test (new project-selection.test.ts), npm run build all pass.

Closes #310
Closes #311

🤖 Generated with Claude Code

ajianaz and others added 2 commits October 13, 2026 08:37
- spa: asset-like paths (file extension or /_app/) that are not embedded return 404 instead of index.html (#310)
- web: remember selected project in localStorage across issues/transactions/release-health/rules (#311)
- trapfalld: build.rs warns when web/build/_app is missing (#307)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ajianaz
ajianaz merged commit 5812be6 into develop Oct 13, 2026
16 checks passed
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.

chore(ui): project selection does not persist across pages fix(spa): missing static assets return index.html with 200 instead of 404

1 participant