Conversation
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: 65a2f2e5c2
ℹ️ 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".
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR introduces project- and environment-wide terminal drawer pinning and changes how existing drawer actions, session routing, shortcuts, and shell launches select their owning thread and working directory. The cross-cutting stateful runtime behavior is broader than a small additive change and warrants human review. You can add or adjust custom eligibility rules. Learn more. |
65a2f2e to
3d3be82
Compare
The terminal drawer and its shells were strictly per thread, so mod+j on another thread always showed a different set of terminals. Add a pin button to the drawer toolbar. Pinning a thread's drawer pins it to the project: every thread in that project then resolves its drawer to the pinned thread, so the same shells, tabs, splits, and height follow the user between threads. Sessions stay keyed by their owning thread, so no server or contract change is needed; the pin is client-local UI state next to the drawer layout. Unpinning from any thread hands each thread its own drawer back, and deleting the pinned thread drops the pin. New shells in a pinned drawer launch from the pinned thread's worktree or project root; links open in the viewed thread's preview. Right-panel terminals and the mobile terminal are unaffected. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
3d3be82 to
84a95d8
Compare
Review follow-ups: a pin to a thread that was deleted while archived, or moved to another project, now reads as unpinned and is cleared on delete; links from a long-lived pinned surface open in the thread currently in front; project scripts launched into a pinned drawer default to the drawer thread's worktree instead of the viewed thread's. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
The pin button now cycles off → this project → every project → off. An environment-wide pin points every thread in the environment at one drawer and shadows project pins until it is removed. Pins are stored under a pin key that names a project or an environment, so cleanup on thread deletion covers both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1ae5ee6. Configure here.
With an all-projects pin the drawer thread can belong to another project, but new shells and scripts still took the viewed project's root and T3CODE_PROJECT_ROOT. Resolve the drawer thread's own project for cwd and runtime env instead. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51afc80bf8
ℹ️ 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".
Drafts are not in the server shell index, so a drawer pinned from a not-yet-sent thread fell back to the viewed thread's project and worktree for new shells and scripts. Resolve the drawer thread's location from the shell index or the composer draft store, whichever knows it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |

What Changed
Adds a pin button to the terminal drawer toolbar. It cycles through three states:
mod+j(terminal.toggle) on any thread in that project opens the pinned drawer, so its shells, tabs, splits, and height follow you from thread to thread.A third click unpins. Every thread gets its own drawer back and the shells stay with the thread that owned them. Deleting the pinned thread also unpins it.
Implementation: sessions stay keyed by their owning thread on the server, so there is no server or contract change. The pin is client-local UI state next to the drawer layout (
terminalUiStateStore: a thread key under a pin key naming a project or an environment). One hook (useTerminalDrawerPin) resolves which thread's drawerterminal.toggletargets and why, and the chat view, command palette, both sidebars, and the chat route read it, so theterminalOpenkeybinding context stays consistent. New shells opened in a pinned drawer launch from the pinned thread's own worktree or project root; links clicked in it open in the preview of the thread you are viewing. Right-panel terminal tabs and the mobile terminal are unaffected.Docs:
docs/user/terminal.mdgains drawer and pin sections (existing history section kept), plus a short internals note indocs/internals/terminal-runtime.mdand a glossary row.Why
Terminals were strictly per thread, so a dev server or a shell you keep coming back to was only reachable from the thread that opened it. Users working across several threads in one project want one terminal that
mod+jalways shows. A pin on the drawer itself keeps this discoverable and reversible without a new setting.Related: Ideas discussion #6848 asks for exactly this for terminal (and browser) tabs. This PR covers the terminal half.
UI Changes
One new pin button at the end of the drawer toolbar, in both the single-terminal header and the multi-terminal sidebar header. Screenshots are cropped to the drawer.
The same drawer, with its shell from a t3code thread, shown from a thread in a different project while pinned for all projects:
Verification
apps/web:tsgo --noEmit;vp test run --project unitforlib/terminalDrawer.test.ts,terminalUiStateStore.test.ts,components/ThreadTerminalDrawer.test.ts,components/ChatView.logic.test.tsvp lintandvp fmton the changed files (remaining lint warnings are pre-existing upstream)Checklist
Written by Claude Fable 5.1 in Claude Code.
🤖 Generated with Claude Code
Note
Medium Risk
Touches terminal session routing, CWD/worktree selection, and ID allocation across many UI entry points; mistakes could show the wrong shell or reuse terminal IDs, though changes stay client-local with no server contract changes.
Overview
Adds pinned terminal drawers: a toolbar pin cycles off → project → environment → off, storing the chosen thread in persisted
terminalUiStateStorepin keys.useTerminalDrawerPin/resolveTerminalDrawerdecide which thread owns the bottom drawer (environment pin beats project pin); shortcuts and “terminal open” context inChatView, sidebars, command palette, and_chatread that resolved ref instead of the route thread alone.ChatViewroutes open/split/close/script runs and terminal UI state to the pinned drawer’s thread while keeping preview links on the thread you’re viewing viapreviewThreadRef. New shells use the pinned thread’s project root/worktree; terminal ID allocation merges the viewed thread’s sessions so panel tabs don’t collide with server-known IDs.ThreadTerminalDrawerexposes the pin control and passes preview routing intoTerminalViewport.Pins drop when pinned terminal state is cleared or the thread is removed; deleting an archived thread also
clearTerminalUiState. Right-panel and mobile terminals stay unpinned. User and internals docs updated; unit tests cover pin resolution and store behavior.Reviewed by Cursor Bugbot for commit da08865. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add project and environment pinning for terminal drawer in
ChatViewresolveTerminalDrawerin terminalDrawer.ts selects the pinned thread's drawer before the viewed thread's own drawer; invalid pins (deleted or moved threads) fall back to the viewed threaduseThreadActionsnow also clears its local terminal UI state (layout, suppression, pin references)Macroscope summarized da08865.