feat(dashboard): add session management and fix loading performance#3
Merged
Conversation
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
72c9760 to
9d42a44
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Store layer (
openproof-store):list_session_summaries()uses SQLitejson_array_length()-- avoids deserializing transcript/proof JSONdelete_session()/delete_sessions()-- removes DB rows + workspace dirsrename_session()-- updates titleDashboard server (
openproof-dashboard):lib.rs(516 lines) intolib.rs+routes.rs+manage.rs+tex.rsDELETE /api/session,PATCH /api/session,POST /api/sessions/bulk-delete,GET /api/session-summariesstatus()andsessions()now use lightweight summariesDashboard frontend:
SessionSidebarcomponent with manage mode (checkboxes, inline rename, bulk delete)graph.jsfromapp.jsto stay under 500 lines/api/session-summaries(lightweight) every 2s; status polling reduced to 10sTest plan
cargo test --workspacepassescargo clippy -p openproof-store -p openproof-dashboard -- -D warningsclean