Skip to content

Attach threads, PRs, skills, and quotes as typed composer chips (#1526) - #1601

Merged
currentbits merged 1 commit into
mainfrom
coder/typed-context-chips-threads-prs-skills-t-2d2286
Oct 11, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/typed-context-chips-threads-prs-skills-t-2d2286

Conversation

@currentbits

Copy link
Copy Markdown
Owner

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 @path text. First slice of #1526.

Changes

  • Mixed @ list: snippets, then threads / PRs / skills, then files. Files still insert @path; the others become ContextChips persisted next to review comments.
  • Send expands chips (quote wrap + optional note; thread / PR / skill via a loader). A failed expand is a one-line “Could not load …” note and does not block send.
  • Several quote chips per draft replace the single reply chip that was lost on restart.

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 onto origin/main.
  • Not tested: live Electron window (App does not yet pass contextChipLoader, live PR/skill lists, or Terminal Add to prompt).

Notes for reviewers

  • This is the first slice of Typed context chips: @threads, @PRs, @skills, terminal selections, several quotes with comments #1526. Live PR/skill mention sources, skills.read IPC, 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.
  • Quote chips reuse data-reply-chip so the existing cite tests keep passing. ReplyChip is no longer what ⌘⇧C writes.
  • Quote wrap is copied from wrapReplyContext instead of imported, so the two can drift.

cursor-grok-4.6 via Cursor

Made with Cursor

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T19:21:51.973643Z 5b2e3e8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@currentbits
currentbits merged commit 9c1f138 into main Oct 11, 2026
5 of 6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread src/App.tsx
onSuggestCommitMessage={suggestCommitMessage}
onListFiles={listFiles}
promptSnippets={settings?.promptSnippets}
mentionThreads={threads.map((t) => ({ id: t.id, title: t.title }))}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +1204 to +1205
const stashCurrent = async () => {
const text = await composeOutgoing(readDraft());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +44 to +47
onClick={() => {
if (gone) return;
onReveal?.(chip);
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant