Skip to content

add pair with agent link#9738

Merged
Light2Dark merged 1 commit into
mainfrom
sham/add-pair-agent-chat-panel
Jun 1, 2026
Merged

add pair with agent link#9738
Light2Dark merged 1 commit into
mainfrom
sham/add-pair-agent-chat-panel

Conversation

@Light2Dark
Copy link
Copy Markdown
Collaborator

📝 Summary

image

Adds a link that opens up the "Pair with Agent" modal for new chats in the chat sidebar.

📋 Pre-Review Checklist

  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • Video or media evidence is provided for any visual changes (optional).

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Tests have been added for the changes made.

Copilot AI review requested due to automatic review settings June 1, 2026 05:27
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Jun 1, 2026 5:28am

Request Review

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Loading

Re-trigger cubic

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 present PairWithAgentModal.
  • Improves PairWithAgentModal link 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.

@Light2Dark Light2Dark added the enhancement New feature or request label Jun 1, 2026
@Light2Dark Light2Dark requested a review from manzt June 1, 2026 13:45
Copy link
Copy Markdown
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great idea!

@Light2Dark Light2Dark merged commit 0bb1651 into main Jun 1, 2026
33 of 34 checks passed
@Light2Dark Light2Dark deleted the sham/add-pair-agent-chat-panel branch June 1, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants