Repository navigation
Attach threads, PRs, skills, and quotes as typed composer chips (#1526) - #1601
Conversation
Co-authored-by: Cursor <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b2e3e8e71
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onSuggestCommitMessage={suggestCommitMessage} | ||
| onListFiles={listFiles} | ||
| promptSnippets={settings?.promptSnippets} | ||
| mentionThreads={threads.map((t) => ({ id: t.id, title: t.title }))} |
There was a problem hiding this comment.
Supply a loader before exposing thread mentions
When a user selects any of these newly exposed thread rows in the desktop app, ThreadView forwards the list but neither it nor App supplies contextChipLoader (the only repository occurrences are the Composer definition and use). Consequently formatContextChipsPrompt sends Could not load <title>: unavailable instead of the thread digest and then clears the chip after the successful send, so this user-facing attachment never provides thread context. Wire a threads.peek/digest loader through before exposing these rows.
Useful? React with 👍 / 👎.
| const stashCurrent = async () => { | ||
| const text = await composeOutgoing(readDraft()); |
There was a problem hiding this comment.
Clear context chips when stashing
When the stash shortcut is used with a context chip, composeOutgoing expands that chip into the stashed text, but the successful stash path clears comments, cards, and attachments without calling clearContextChips(). The supposedly stashed chip therefore remains active and sendable in the current draft; restoring the stash later also duplicates its expanded context because the original chip is still present.
Useful? React with 👍 / 👎.
| onClick={() => { | ||
| if (gone) return; | ||
| onReveal?.(chip); | ||
| }} |
There was a problem hiding this comment.
Stop chip action clicks from revealing the source
For an available quote, this wrapper handles every bubbled click as a source reveal. The note-edit and remove buttons do not stop propagation, so clicking “Add a note,” an existing note, or × also jumps the transcript to the quoted message; the label button invokes the callback twice for the same reason. Stop propagation in the child actions or restrict reveal handling to the source control.
Useful? React with 👍 / 👎.
The composer
@menu now lists threads, PRs, and skills next to files and snippets. Picking one of those inserts a typed chip that survives restart and expands into the outgoing prompt. Cite (⌘⇧C) and Reply append quote chips — several per draft, with an optional note. Files stay@pathtext. First slice of #1526.Changes
@list: snippets, then threads / PRs / skills, then files. Files still insert@path; the others becomeContextChips persisted next to review comments.Verification
node --import=./test/support/disable-grok-mcp.mjs --import=./test/support/render.mjs --experimental-strip-types --test --test-timeout=20000 test/contextChips.test.ts test/composerMention.test.tsx test/composerDurability.test.tsx test/composerPowerUps.test.tsx— 45/45 pass after rebase ontoorigin/main.contextChipLoader, live PR/skill lists, or Terminal Add to prompt).Notes for reviewers
skills.readIPC, send-time loaders in App, and Terminal Add to prompt are not in this PR. Thread mentions are wired; PR/skill props exist so tests can inject lists.data-reply-chipso the existing cite tests keep passing.ReplyChipis no longer what ⌘⇧C writes.wrapReplyContextinstead of imported, so the two can drift.cursor-grok-4.6 via Cursor
Made with Cursor