Skip to content

feat(dashboard): add session management and fix loading performance#3

Merged
markm39 merged 1 commit into
masterfrom
feat/session-management
Mar 28, 2026
Merged

feat(dashboard): add session management and fix loading performance#3
markm39 merged 1 commit into
masterfrom
feat/session-management

Conversation

@markm39

@markm39 markm39 commented Mar 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add session management UI to the dashboard (delete, rename, bulk delete)
  • Fix slow loading caused by full JSON blob deserialization on every 2s poll cycle
  • Split oversized files to comply with 500-line limit

Changes

Store layer (openproof-store):

  • list_session_summaries() uses SQLite json_array_length() -- avoids deserializing transcript/proof JSON
  • delete_session() / delete_sessions() -- removes DB rows + workspace dirs
  • rename_session() -- updates title

Dashboard server (openproof-dashboard):

  • Split lib.rs (516 lines) into lib.rs + routes.rs + manage.rs + tex.rs
  • New endpoints: DELETE /api/session, PATCH /api/session, POST /api/sessions/bulk-delete, GET /api/session-summaries
  • status() and sessions() now use lightweight summaries

Dashboard frontend:

  • New SessionSidebar component with manage mode (checkboxes, inline rename, bulk delete)
  • Extracted graph.js from app.js to stay under 500 lines
  • Sidebar polls /api/session-summaries (lightweight) every 2s; status polling reduced to 10s

Test plan

  • cargo test --workspace passes
  • cargo clippy -p openproof-store -p openproof-dashboard -- -D warnings clean
  • Open dashboard, verify sessions load in sidebar
  • Toggle "Manage" mode, verify checkboxes and action buttons appear
  • Select sessions and bulk delete, verify they disappear
  • Rename a session via inline edit (pencil icon), verify title updates
  • Delete the currently-viewed session, verify auto-selection to next session
  • Verify normal (non-manage) mode looks identical to before

Add delete, rename, and bulk delete operations to the dashboard sidebar.
Sessions can now be managed via a "Manage" toggle that reveals checkboxes,
inline rename, and delete controls. Fix slow dashboard loading by replacing
full JSON blob deserialization with SQLite json_array_length() queries for
the session list polling endpoint.

Store layer:
- list_session_summaries() uses SQL json functions to avoid deserializing
  transcript/proof/cloud blobs
- delete_session() cleans up sessions, verification_runs, attempt_logs,
  sync_queue rows, and workspace directories
- delete_sessions() bulk deletes in a single transaction
- rename_session() updates title and timestamp

Dashboard server:
- Split lib.rs (516 lines) into lib.rs + routes.rs + manage.rs + tex.rs
- New endpoints: DELETE /api/session, PATCH /api/session,
  POST /api/sessions/bulk-delete, GET /api/session-summaries
- status() and sessions() handlers now use lightweight summaries

Dashboard frontend:
- Extract graph components to graph.js (was pushing app.js over 500 lines)
- New SessionSidebar component in sessions.js with manage mode
- Sidebar polls /api/session-summaries (lightweight) every 2s
- Status polling (lean health, auth) reduced to every 10s
@markm39 markm39 force-pushed the feat/session-management branch from 72c9760 to 9d42a44 Compare March 28, 2026 03:47
@markm39 markm39 merged commit 1ce6c45 into master Mar 28, 2026
3 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.

1 participant