add pair with agent link#9738
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant User as User
participant ChatPanel as ChatPanel
participant PWAC as PairWithAgentCallout
participant ImperativeModal as useImperativeModal
participant PWAModal as PairWithAgentModal
participant isWasm as isWasm()
User->>ChatPanel: Opens new chat thread
ChatPanel->>ChatPanel: Detects isNewThread
alt new chat thread
ChatPanel->>ChatPanel: Renders chat input + files pills
ChatPanel->>PWAC: Renders PairWithAgentCallout
PWAC->>isWasm: Check if running in Wasm
alt not Wasm
isWasm-->>PWAC: false
PWAC-->>User: Shows "Work on this notebook with your own agent" link with SparklesIcon
else Wasm
isWasm-->>PWAC: true
PWAC->>PWAC: Returns null (hidden)
end
User->>PWAC: Clicks "Work on this notebook with your own agent"
PWAC->>ChatPanel: Calls onPairWithAgent callback
ChatPanel->>ImperativeModal: openModal(<PairWithAgentModal />)
ImperativeModal->>PWAModal: Opens modal dialog
Note over PWAModal: Shows agent pairing options with "Learn more" link (sr-only for accessibility)
User->>PWAModal: Interacts with modal
PWAModal->>ImperativeModal: onClose
ImperativeModal->>ChatPanel: closeModal
end
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an entry point in the chat sidebar to open the existing “Pair with Agent” flow, and improves the accessibility of the modal’s “Learn more” link text for screen readers.
Changes:
- Adds a “Work on this notebook with your own agent” callout in the chat panel for new threads (hidden in WASM) that opens
PairWithAgentModal. - Uses
useImperativeModal()in the chat panel to presentPairWithAgentModal. - Improves
PairWithAgentModallink accessibility by adding screen-reader-only descriptive text to “Learn more”.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| frontend/src/components/editor/actions/pair-with-agent-modal.tsx | Adds sr-only text so the “Learn more” link has clearer screen-reader context. |
| frontend/src/components/chat/chat-panel.tsx | Adds a new-thread callout button that opens the Pair With Agent modal via the imperative modal system. |
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
Adds a link that opens up the "Pair with Agent" modal for new chats in the chat sidebar.
📋 Pre-Review Checklist
✅ Merge Checklist