Skip to content

🎛️ fix: Smooth, Compact Code Workspace, Checkout and Approval Selectors - #16789

Merged
berry-13 merged 14 commits into
devfrom
berry-13/fix-workspace
Oct 6, 2026
Merged

berry-13 merged 14 commits into
devfrom
berry-13/fix-workspace

Conversation

@berry-13

@berry-13 berry-13 commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

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 separate scale property, 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 sm size on the shared Radio, 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

  • Bug fix
  • Feature

Testing

Tested environments/configuration:

  • Chromium via Playwright against a local dev server, light and dark mode, for the agent builder, Handoffs dialog, sidebar and temporary composer.
  • The composer workspace, checkout and approval menus need a paired code worker; they are covered by their component specs and captured against stubbed worker responses on both revisions.

Automated tests:

  • npx jest src/components/Chat/Input/__tests__ src/components/SidePanel/Agents (984 passed), ActivityPhaseGroup and ContentParts.integration (122 passed), ItemDialog suites (56 passed), ChatForm and ProjectsSection related suites (99 passed), Radio (11 passed).
  • Updated CodeWorkspaceMenu.spec.tsx for 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 --noEmit in client and packages/client, ESLint on every touched file.

Screenshots / recordings

Agent builder header, light:

Before After
Before After

Agent builder header, dark:

Before After
Before After

Handoffs dialog right after opening:

Before After
Before After

Projects in the sidebar:

Before After
Before After

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:

Before After
Before After

Workspace menu (the old menu flips below the chip because it no longer fits above):

Before After
Before After

Checkout control (before: checkbox with tooltip; after: menu with Auto restorable):

Before After
Before After

Temporary chat composer under the context rail:

Before After
Before After

Agent builder MCP row:

Before After
Before After

Risk / compatibility

Checkout choices are stored exactly as before; Auto clears the field, which is the state a selection has before any override. Radio gains an optional size prop whose default keeps today's sizing. Approval and checkout English copy changed; other locales are regenerated.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors

Copilot AI balanced review requested due to automatic review settings October 5, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Chat Frontend codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 5, 2026
@berry-13
berry-13 marked this pull request as ready for review October 5, 2026 20:48
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 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-05T22:40:57.388985Z fb794a7 New commits
🔒 Security Review ✅ Completed 2026-10-05T20:51:25.891637Z 2e0c042 Draft marked ready
ℹ️ 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.

@berry-13
berry-13 force-pushed the berry-13/fix-workspace branch from 2e0c042 to 40a006b Compare October 5, 2026 20:52

@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: 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".

Comment on lines 1006 to 1009
workspace.mode === 'attached' && workspaceId === selected?.workspaceId
}
onSelect={selectWorkspace}
checkout={selected?.checkout}
allowCheckoutSelection={!workspace.locked}
/>

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.
@berry-13
berry-13 force-pushed the berry-13/fix-workspace branch from a61609d to fb794a7 Compare October 5, 2026 22:37
@berry-13
berry-13 merged commit 7faba8b into dev Oct 6, 2026
43 checks passed
@berry-13
berry-13 deleted the berry-13/fix-workspace branch October 6, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Chat Frontend codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants