Skip to content

feat(dashboard): persist UI state + centralize data in ~/.velith/cache#2

Merged
epicsagas merged 1 commit into
mainfrom
worktree-orbit-dashboard-persist-centralize
Jun 9, 2026
Merged

feat(dashboard): persist UI state + centralize data in ~/.velith/cache#2
epicsagas merged 1 commit into
mainfrom
worktree-orbit-dashboard-persist-centralize

Conversation

@epicsagas

Copy link
Copy Markdown
Owner

Summary

Dashboard state persistence and data centralization refactor.

Changes

  • State persistence: Save selected project path and active view to localStorage. Restore on app load with URL-priority override.
  • Centralized cache: scan-project.js writes to ~/.velith/cache/status.json on every scan. Both server.mjs and vite.config.ts read from cache first, falling back to per-project reads.
  • Security fixes: Path traversal prevention in download handler (path.resolve + startsWith check), filename sanitization in upload handler (path.basename).
  • Reliability: fs.watch retry limit (max 20), cache write error handling with try-catch.

Files changed

File Change
skills/book-status/scripts/scan-project.js +13 cache write
dashboard/server.mjs +38 cache-first reads, path traversal fix
dashboard/vite.config.ts +26 cache-first reads, path traversal fix
dashboard/src/App.svelte +30 localStorage persistence
.claude-plugin/plugin.json version 0.1.6 → 0.2.0

Spec coverage

  • R1 (Persistent UI State): Fully met — all 4 sub-requirements
  • R3 (Centralized Data Store): Partially met — cache aggregation works, covers still from project dirs
  • R4 (Startup Experience): Partially met — persistence and refresh work, no loading skeleton

Audit

  • Security: PASS (path traversal fixed)
  • Code quality: PASS
  • Build: PASS (npm run build + syntax check)

- Add localStorage persistence for selected project and active view
- scan-project.js writes to ~/.velith/cache/status.json on every scan
- server.mjs and vite.config.ts read from cache first, fallback to per-project
- Fix path traversal in download handler and upload filename (security)
- Add fs.watch retry limit and cache write error handling
- Bump version 0.1.6 → 0.2.0
@epicsagas epicsagas merged commit 4932333 into main Jun 9, 2026
@epicsagas epicsagas deleted the worktree-orbit-dashboard-persist-centralize branch June 10, 2026 04:01
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.

1 participant