feat: bookmark sessions, double-click to Logs, and Ask progress feedback#67
Open
castellotti wants to merge 4 commits into
Open
feat: bookmark sessions, double-click to Logs, and Ask progress feedback#67castellotti wants to merge 4 commits into
castellotti wants to merge 4 commits into
Conversation
- Add bookmark button to Dashboard session cards and Logs header;
clicking opens an inline name input, then snapshots the session to
SQLite and creates a named bookmark via the existing bookmarks API.
- Double-clicking a session name in the Dashboard navigates directly
to the Logs view for that session (new navigateToLogsForSession
store action, no specific event selected).
- Investigation Ask a Question now shows the submitted question
immediately with a live elapsed-time counter and phase indicators
("Connecting..." → "Waiting for response...") before the answer
arrives, so users can see progress in real time.
- Blank/empty LLM responses are detected and replaced with an
explanatory message; HTTP errors and network failures surface the
actual status code or error message instead of a generic string.
- Move AskPhase type to module scope (was inside component body) - Move startPendingTimer/clearPendingTimer useCallbacks before early returns — placing hooks after early returns violates the rules of hooks and can cause inconsistent hook call order - Add useEffect cleanup to cancel the tick interval on unmount, preventing setState calls on unmounted components - Remove dead 'error' phase from AskPhase and its unreachable render branch (catch blocks clear pendingAsk immediately; errors surface through addInvestigationQuestion instead) - Reset showBookmarkInput/bookmarkName in Header when activeSessionId changes, preventing stale session name from being submitted - Guard bookmark button in Header with bookmarks.some() check — hides it when the session is already bookmarked - Guard onBookmark prop in DashboardView with bookmarkedSessionIds set — passes undefined (hides button) when already bookmarked - Chain snapshot and bookmark fetches: only create the bookmark if the save-current snapshot succeeded, preventing orphaned bookmarks when session recording is disabled or the snapshot otherwise fails
- Extract shared saveAndBookmarkSession utility (bookmarks-api.ts) used by both DashboardView and Header, removing duplicated fetch sequences - Add submitBookmark callback in SessionCard to deduplicate Enter/click confirm paths - Replace Header .some() bookmark check with memoized Set for O(1) lookup - Use getSessionName in Header bookmark button instead of hand-rolled logic - Fix broken handleOpenInLogs reference in DashboardView (now uses navigateToLogsForSession directly) - Simplify onBookmark inline expression in DashboardView - Reduce pending-ask timer interval from 100ms to 200ms
- Remove trivial handleBookmark wrapper in DashboardView; pass saveAndBookmarkSession directly as the onBookmark prop - navigateToLogsForSession: only set returnToDashboard when coming from dashboard, not unconditionally - InvestigationPanel: move clearPendingTimer/setPendingAsk into finally block so they always run, even if response.json() throws - Render pendingAsk card before existing Q&A entries so it's always visible at the top of the list - bookmarks-api: check bookmarkRes.ok and return false if second fetch fails (previously always returned true) - Replace 🔖 emoji and inline style mutation in SessionCard bookmark button with SVG icon and Tailwind hover class, matching Header style - Add comment explaining the 800ms connecting→waiting phase threshold
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
navigateToLogsForSessionstore action).Files changed
stores/sessionStore.tsnavigateToLogsForSessionactioncomponents/dashboard/SessionCard.tsxcomponents/dashboard/DashboardView.tsxhandleOpenInLogsandhandleBookmarkinto SessionCardcomponents/layout/Header.tsxcomponents/layout/InvestigationPanel.tsxTest plan
pnpm -r typecheck && pnpm build)