Repository navigation
🎛️ fix: Smooth, Compact Code Workspace, Checkout and Approval Selectors - #16789
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. |
2e0c042 to
40a006b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e0c0421a9
ℹ️ 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".
| workspace.mode === 'attached' && workspaceId === selected?.workspaceId | ||
| } | ||
| onSelect={selectWorkspace} | ||
| checkout={selected?.checkout} | ||
| allowCheckoutSelection={!workspace.locked} | ||
| /> |
There was a problem hiding this comment.
Restore checkout editing for multi-environment chats
When an unlocked chat has two or more workspace environments, these rows no longer receive checkout or allowCheckoutSelection, while the replacement GitContext checkout menu is rendered only when onlyEnvironment is non-null. Such users therefore cannot choose Auto, isolated, or source for any environment; worse, a saved isolated checkout that becomes unsupported cannot be changed to source, potentially leaving the chat unable to submit. Retain per-environment checkout controls or provide a selector for each environment.
AGENTS.md reference: AGENTS.md:L49-L52
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in f5148ea. Chats with several machines now get Auto, Isolated worktree and Registered checkout under each machine's selected workspace in the workspace menu, so a stale isolated choice can be switched; the rail chip still serves the single-machine case. Verified on a61609d by scenario multi-machine-checkout-in-workspace-menu (desktop light, dark, mobile) and the unit spec 'offers checkout per environment in the menu'.
Tailwind v4 scale utilities set the scale property, which transition-[opacity,transform] never animated, so the workspace, machine and approval menus snapped in size and then ran a 200ms fade that Ariakit also waits out before unmounting. Transition opacity and scale over 150ms to match the shared popover, and honor reduced motion in the approval menu.
The Inline/Prompt toggle now uses the shared Radio at a new sm size, which the skills mode control also adopts instead of overriding its spacing. The variable and expand actions stay right-aligned when the editor label is visually hidden, and MCP rows in the tools list no longer show a tool count.
Workspace rows are single lines with the repository and ref beside the name, and the approval, workspace and machine menus share one surface that rises in from its chip on the theme motion steps. The checkout chip becomes a menu offering Auto, Isolated worktree and Registered checkout, so the worker's automatic policy can be restored after an override; the normal workspace menu no longer repeats that choice. Approval and checkout descriptions are shortened.
A collapsed live card that already folds tool calls in with the reasoning names the mix in its header, so the streaming thought preview now gives way to the cursor there and only shows while the card is still just thinking (#16680).
Radix focused the first focusable element, the Handoffs and Subagents info trigger, which opened its hover card as soon as the dialog appeared. Focus the dialog content instead, as the API keys dialog already does.
The temporary chat tint replaced the composer's opaque surface, so the context rail tucked beneath it showed through as a band; the tint now layers over the surface. Projects in the sidebar get the same small gap that separates a project from its first chat.
The checkout chip only opened on workspaces that advertise git worktrees, so a source-only workspace lost the registered checkout choice the workspace menu used to offer. The chip is now editable whenever overrides are allowed and the chat is unlocked, offering Auto and Registered checkout, with Isolated still gated on worker support.
A workspace without repository metadata now shows its id as the secondary text when it differs from the name, so two workspaces that share a name are not indistinguishable.
The checkout menu could stay open after generation disabled the composer, and its items still wrote a new checkout. The items now follow the disabled state and the handler refuses the write.
Rows keep the id as secondary text only when a sibling has the same name, including siblings with identical repository and ref, so unique workspaces stay one compact line.
Hiding the chip tooltip with TooltipAnchor's disabled prop also set aria-disabled on the open menu button, which dimmed the checkout chip while its menu was open and told assistive technology the control was unavailable. Suppress only the hover tooltip instead.
The compact workspace rows no longer render instruction summaries, so the key had no reference left.
The rail's checkout chip only serves a chat with a single machine, so chats spanning several machines had lost every checkout control. The workspace menu again offers Auto, Isolated worktree and Registered checkout under each machine's selected workspace in that case.
…rios Mock-profile scenarios for the compact code workspace and checkout menus (with stubbed worker responses), the agent builder instructions header, item dialog focus, MCP rows, temporary composer surface, project spacing, and the thought peek after a tool call, using a new E2E_TOOL_THEN_THINK_REPLY fake-model trigger.
a61609d to
fb794a7
Compare
Summary
The code composer selectors (workspace, machine and approval mode) felt laggy on open and close: their transition listed
transform, but Tailwind v4 scale utilities set the separatescaleproperty, so the menus snapped in size and then ran a slow fade that Ariakit also waited out before unmounting. The three menus now share one surface that fades, scales and rises from its chip on the theme motion steps.The workspace menu is redesigned to be compact: one line per workspace with the repository and ref beside the name (and the id only when two workspaces share a name), the machine's owners inline in its heading, and shorter copy. The per-row repository instructions summary (file, size, truncation) is intentionally dropped from the menu to keep it compact. Checkout mode moves out of that menu into the composer chip, which becomes a small menu offering Auto, Isolated worktree and Registered checkout, so an override can be returned to the worker's automatic policy; workspaces without worktree support still offer Registered checkout, and picks are ignored while the composer is disabled. An open chip no longer reads as disabled while its menu is showing. Approval mode descriptions are shortened.
Smaller fixes ride along: the temporary chat tint no longer replaces the composer's opaque surface (the context rail showed through as a band), the Handoffs and Subagents dialog no longer opens its info card on open (the same focus fix as the API keys dialog), the agent builder's Inline/Prompt toggle matches the skills control through a new
smsize on the sharedRadio, the editor actions stay right-aligned, MCP rows drop the tool count, projects in the sidebar get the same gap as a project and its first chat, and the live activity card only shows the streaming thought preview while it is still just thinking. Related to #16680.Type of change
Testing
Tested environments/configuration:
Automated tests:
npx jest src/components/Chat/Input/__tests__ src/components/SidePanel/Agents(984 passed),ActivityPhaseGroupandContentParts.integration(122 passed),ItemDialogsuites (56 passed),ChatFormandProjectsSectionrelated suites (99 passed),Radio(11 passed).CodeWorkspaceMenu.spec.tsxfor the checkout menu, including choosing Auto after an explicit checkout; added tests for the dialog focus and for the thought preview after a tool call.tsc --noEmitinclientandpackages/client, ESLint on every touched file.Screenshots / recordings
Agent builder header, light:
Agent builder header, dark:
Handoffs dialog right after opening:
Projects in the sidebar:
The composer code views below need a paired worker, so they render the real app against stubbed worker responses (Playwright route mocks of the agent, environment and workspace status), identical on both revisions.
Approval mode menu:
Workspace menu (the old menu flips below the chip because it no longer fits above):
Checkout control (before: checkbox with tooltip; after: menu with Auto restorable):
Temporary chat composer under the context rail:
Agent builder MCP row:
Risk / compatibility
Checkout choices are stored exactly as before; Auto clears the field, which is the state a selection has before any override.
Radiogains an optionalsizeprop whose default keeps today's sizing. Approval and checkout English copy changed; other locales are regenerated.Checklist