feat(annotations): non-modal, draggable, multi-thread reading companion#7
Merged
Conversation
Rework the annotation Ask-AI thread panel from a single anchored modal into a "reading companion": non-modal floating panels you can drag, multiple open at once, plus an optional right-side dock the document reflows around. - per-panel state (was module globals) so threads stream in parallel - non-modal: no backdrop, document stays readable; opening a 2nd keeps the 1st - draggable by header; cascade + bring-to-front; single shared drag controller - right-side Threads dock with document reflow + live count; dock<->float toggle Verified live: 2 parallel panels, drag, dock reflow, pop-out, cleanup. Build clean; smoke 22/22. Co-Authored-By: Claude Opus 4.8 <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.
What
Reworks the annotation "Ask AI" thread panel from a single anchored modal into a reading companion — so you can keep reading and ask in parallel, exactly as requested.
Before: the panel was modal (blocked the text behind it), one-at-a-time (opening a second closed the first), and couldn't be moved.
Changes
1. Non-modal + draggable
2. Multiple threads in parallel
3. Right-side Threads dock
Verified live (browser preview)
Quality
documentlistener (not per-panel) to avoid listener accumulation.no-useless-assignmentwarnings untouched).Honest limitation
Parallel threads share the globally-selected AI model — switching a panel's model switches the active model — because the local inference backend runs one model at a time. The UI supports independent threads; true per-thread concurrent models would need backend work.
🤖 Generated with Claude Code