Skip to content

fix(web): attach command palette threads outside the sidebar - #37054

Merged
Yash-Singh1 merged 2 commits into
mainfrom
t3/fix-command-menu-thread-drop
Nov 15, 2026
Merged

Yash-Singh1 merged 2 commits into
mainfrom
t3/fix-command-menu-thread-drop

Conversation

@Yash-Singh1

Copy link
Copy Markdown
Collaborator

Problem

Dragging a Cmd+K search result into the composer silently does nothing unless that thread is in the current sidebar cache. The palette drag support added in #33990 reused a drop handler that required a cached thread shell, but search results can exist without one.

Change

Carry the search result title in the drag payload and use it to create the thread reference without a sidebar lookup requirement. Sidebar drags retain their cached-title fallback. Cross-environment transcript imports keep their existing behavior. This fixes web and desktop; mobile has no command-palette drag path.

Scope

Small fix for an obvious, user-reported regression; no separate issue needed.

Verification

  • Confirmed the missing-shell regression test fails with the previous lookup and passes with the fix.
  • All 10 focused unit and browser tests pass, covering title resolution, palette pointer dragging, and composer drop subscriptions.
  • vp run check:changed passes, including formatting, lint, knip, affected typechecks, tests, and React Compiler checks.
  • Full-app manual verification and before/after captures were not performed.

Model: GPT 6.1 Sol. Harness: Codex in T3 Code.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 15, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 0ab4a33

Macroscope's review found this PR approvable — Command-palette drags now retain the thread title so threads absent from the sidebar can be attached to the composer. Existing reference sanitization and cross-environment handling remain unchanged, keeping the impact limited to the explicit drag-and-drop action.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Dropped-thread drag references now carry an optional title. ChatComposer uses that title when creating context records and falls back to the sidebar title when needed. Tests cover title precedence and missing-title behavior.

Changes: Dropped thread context

Layer / File(s) Summary
Preserve and resolve dropped-thread titles
apps/web/src/components/CommandPalette.drag.ts, apps/web/src/components/CommandPalette.browser.test.tsx, apps/web/src/components/chat/threadContextDrag.ts, apps/web/src/components/chat/threadContextDrop.logic.ts, apps/web/src/components/chat/threadContextDrop.logic.test.ts, apps/web/src/components/chat/ChatComposer.tsx
Drop references can include a title. The drag path passes that title through, and ChatComposer uses it to create context records. If the reference has no title, the sidebar title is used; if neither title is available, no record is created. Tests cover these cases.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 0ab4a

Command palette search results can now be dragged into the composer even when their threads are not in the sidebar cache. The change is small and covered by focused tests, and no actionable merge risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: command palette search results can now be dragged into the composer even when their thread is not in the sidebar cache. It follows the conventional commit format and m…
Description check Passed The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The problem is stated clearly, the change explains the title-carrying drag payloa…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: command palette search results can now be dragged into the composer even when their thread is not in the sidebar cache. It follows the conventional commit format and matches the stated problem and change in the PR description and the raw summary.

Full details: Description check

Explanation

The description follows the template. It has Problem, Change, Scope, and Verification sections, and each is filled in. The problem is stated clearly, the change explains the title-carrying drag payload and the fallback behavior, the scope explains why no issue is linked, and the verification lists focused tests and checks. It also notes what was not verified and names the model and harness. The Scope section gives a reason for no issue, which the template allows for small fixes of obvious bugs. The Verification section gives observed results for the changed behavior.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 11c425b and 0ab4a33.

Files selected for processing: 6

  • apps/web/src/components/CommandPalette.browser.test.tsx
  • apps/web/src/components/CommandPalette.drag.ts
  • apps/web/src/components/chat/ChatComposer.tsx
  • apps/web/src/components/chat/threadContextDrag.ts
  • apps/web/src/components/chat/threadContextDrop.logic.test.ts
  • apps/web/src/components/chat/threadContextDrop.logic.ts

Included review availability: This review used your included allowance. 9 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@Yash-Singh1
Yash-Singh1 merged commit ab319a5 into main Nov 15, 2026
37 checks passed
@Yash-Singh1
Yash-Singh1 deleted the t3/fix-command-menu-thread-drop branch November 15, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant