Support batching tasks/notes to assistant with Ctrl+click staging - #25
Merged
Conversation
The robot button that hands a task to the assistant now lives on note rows
too, and both buttons support gathering several items before switching over.
- Ctrl/Cmd+click a robot button stages the task/note without opening the
assistant, so multiple tasks and/or notes can be queued, then delivered
together when the user comes over. A plain click still pins and switches.
- Pins accumulate in a localStorage queue (assistantPinQueue) instead of a
single key. The bridge drains it only while the assistant iframe is
visible, so background staging never delivers early, and posts one
`simpler-pin` batch of {kind, id} refs.
- Backend on_pin_refs injects each item's context block (task + linked note,
or full note content) and seeds the composer with all refs. The legacy
single-task path is kept for older bridge builds.
- The Assistant nav tab shows a small count badge of staged items, kept in
sync via a storage event when the bridge clears the queue.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJMPjXGqtmikQgaHFHv9Vi
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
Extended the "Work on this with the assistant" feature to support staging multiple tasks and notes before opening the assistant, rather than immediately switching tabs. Users can now Ctrl/Cmd+click robot buttons on board cards and note rows to stage items into a queue, then open the assistant once to process them all together.
Key Changes
assistantPinnedTasklocalStorage key withassistantPinQueuearray supporting multiple items of kind'task'or'note'stayparameter; plain clicks pin and switch tabs, Ctrl/Cmd+clicks stage without navigatingassistantVisible()check in the bridge to only drain the queue when the assistant iframe is actually on-screen, preventing early delivery of background-staged itemson_window_messagehandler to support newsimpler-pinmessage type with array of refs, while maintaining backward compatibility with legacysimpler-pin-taskon_pin_refs()function: Processes batches of task/note references, injecting context for each and seeding the composer with all refs at onceImplementation Details
#idfor tasks (matching starters) andnote #idfor notes (for clarity in mixed batches)https://claude.ai/code/session_01YJMPjXGqtmikQgaHFHv9Vi