Command palette keeps "Show linked pull requests" disabled after a PR is linked
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
What happened
Link a pull request to an open thread. The sidebar badge shows it; the command palette entry "Show linked pull requests" stays disabled until the thread detail reloads (switch thread, reconnect).
Diagnosis
The client merges the live thread shell over the loaded thread detail in mergeEnvironmentThread (packages/client-runtime/src/state/threadDetail.ts). It copies every shared field except pullRequests, so the merged thread keeps the list from the first detail load. The palette reads activeThread.pullRequests from that merged value (apps/web/src/components/CommandPalette.tsx). The shell already carries the current list (packages/contracts/src/orchestration.ts, EnvironmentThreadShell.pullRequests).
- Merge omits the field: https://github.com/pingdotgg/t3code/blob/56a9bf2bd7d3dcdae722a5de84578909dc11aeda/packages/client-runtime/src/state/threadDetail.ts#L44-L68
- Shell carries it: https://github.com/pingdotgg/t3code/blob/56a9bf2bd7d3dcdae722a5de84578909dc11aeda/packages/contracts/src/orchestration.ts#L785
- Palette reads the merged value: https://github.com/pingdotgg/t3code/blob/56a9bf2bd7d3dcdae722a5de84578909dc11aeda/apps/web/src/components/CommandPalette.tsx#L1814
Steps to reproduce
- Open a thread.
- Link a pull request from the thread's pull request panel.
- Open the command palette.
Expected: "Show linked pull requests" enabled, listing the PR.
Actual: disabled until the thread detail reloads.
Environment
Web client, any OS. Reproduced from source on main at 56a9bf2bd.
Evidence
A one-line fix with a regression test is ready: pullRequests: shell.pullRequests in the merge, the same pattern as the sibling fields.
Related issues
None found. Introduced by the combination of #10839 (field added to the shell) and #11348 (palette disabled on an empty merged list).
Filed by Claude Fable 5.1 in T3 Code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/client-runtime/src/state/threadDetail.ts at mergeEnvironmentThread and compare its fields with EnvironmentThreadShell.pullRequests in packages/contracts/src/orchestration.ts. Check how apps/web/src/components/CommandPalette.tsx reads activeThread.pullRequests, then add the regression test described in the issue. Done means the palette enables “Show linked pull requests” immediately after a PR is linked, without reloading the thread.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 90/100