feat(dashboard): two-session AI compare from sessions.html (#421)#433
Open
jonathaneoliver wants to merge 1 commit into
Open
feat(dashboard): two-session AI compare from sessions.html (#421)#433jonathaneoliver wants to merge 1 commit into
jonathaneoliver wants to merge 1 commit into
Conversation
Multi-select checkboxes on the picker rows + a floating "Compare 2
sessions" button that opens a modal posting {sessions:[a,b]} to
/api/session_chat. The forwarder injects "Compare sessions: [...]"
into the system preamble (#416, #418), and the prompt's compare-
mode hints drive the LLM to output Similarities / Differences /
Hypotheses sections.
content/dashboard/llm-compare-modal.js
- Own checkbox class .llmchat-compare-cb (separate from the
live testing UI's .session-checkbox to avoid interfering
with failure-mode group operations).
- Cap at 2: third checkbox click no-ops with the cap message
surfaced on the FAB.
- MutationObserver re-injects checkboxes after picker re-
renders (sort, filter, etc.); duplicate checkbox elements
stay in sync via the shared selected Set.
- z-index:3 so clicks reach the checkbox, not the row's
stretched-link overlay.
- Floating FAB bottom-right, just above the 💬 toggle's
offset, with a count badge.
- Modal reuses the .llm-modal-* CSS namespace defined in
llm-analyze-modal.js.
- Esc + backdrop close, focus returns to trigger.
content/dashboard/sessions.html
+1 script tag.
No backend changes — sessions array support landed in #416, the
prompt's compare-mode shape landed in #418.
What needs your hands-on browser verification:
- Multi-select two sessions of the same content (one with
stalls, one without). Click Compare. Confirm the LLM output
has Similarities / Differences / Hypotheses sections.
- Multi-select different content. Compare still works; output
notes the content difference upfront.
- Try selecting a 3rd session — checkbox should bounce back
unchecked + FAB shows the cap message.
- Sort or filter the picker after selecting; checkboxes stay
checked because the selection set is independent of DOM.
Part of epic #412.
Closes #421.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
{sessions:[a,b]}to/api/session_chat. The forwarder + prompt already handle the rest from forwarder: /analytics/api/session_chat endpoint (SSE streaming, cancellable) #416/prompts: initial session_chat.md (schema + tool docs + citation rules) #418.Closes #421.What's new
content/dashboard/llm-compare-modal.js— own.llmchat-compare-cbcheckbox class (separate from the live testing UI's.session-checkbox), cap at 2 (3rd click no-ops with FAB cap message), MutationObserver re-injects checkboxes through picker re-renders + keeps duplicates in sync via sharedselectedSet. Floating FAB bottom-right above the 💬 toggle's offset, count badge, modal reuses the.llm-modal-*CSS already defined inllm-analyze-modal.js. Esc + backdrop both close; focus returns to trigger.content/dashboard/sessions.html— +1 script tag.No backend changes —
sessionsarray support landed in #416, the prompt's compare-mode shape (Similarities / Differences / Hypotheses) landed in #418.What needs your hands-on browser verification
bottom:84pxto clear the 56px toggle. Visual check.🤖 Generated with Claude Code