From 7faba8b03efea99e38e0ddd560c57515a9720fc5 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Tue, 6 Oct 2026 09:59:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=9B=EF=B8=8F=20fix:=20Smooth,=20Compac?= =?UTF-8?q?t=20Code=20Workspace,=20Checkout=20and=20Approval=20Selectors?= =?UTF-8?q?=20(#16789)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/Chat/Input/ChatForm.tsx | 5 +- .../Chat/Input/CodeApprovalMenu.tsx | 31 +- .../Chat/Input/CodeWorkspaceMenu.tsx | 416 ++++++++++-------- .../__tests__/CodeWorkspaceMenu.spec.tsx | 255 ++++++++--- client/src/components/Chat/Input/chip.ts | 22 + .../Messages/Content/ActivityPhaseGroup.tsx | 7 +- .../__tests__/ActivityPhaseGroup.test.tsx | 15 + .../Conversations/ProjectsSection.tsx | 2 +- .../SidePanel/Agents/Instructions.tsx | 49 +-- .../Agents/Tools/ItemDialog/ItemDialog.tsx | 19 +- .../ItemDialog/__tests__/ItemDialog.spec.tsx | 28 +- .../SidePanel/Agents/Tools/SkillsSection.tsx | 2 +- .../SidePanel/Agents/Tools/ToolRow.tsx | 1 - .../Agents/__tests__/Instructions.spec.tsx | 24 +- client/src/components/Variables/Editor.tsx | 3 +- client/src/locales/en/translation.json | 17 +- e2e/setup/fake-model.js | 49 +++ .../scenarios/agent-builder-header.spec.ts | 105 +++++ .../scenarios/code-workspace-composer.spec.ts | 291 ++++++++++++ .../mock/scenarios/codeWorkspaceMocks.ts | 338 ++++++++++++++ .../scenarios/project-rows-spaced.spec.ts | 80 ++++ .../mock/scenarios/thought-peek-tools.spec.ts | 81 ++++ eslint-suppressions.json | 13 - packages/client/src/components/Radio.tsx | 10 +- 24 files changed, 1521 insertions(+), 342 deletions(-) create mode 100644 e2e/specs/mock/scenarios/agent-builder-header.spec.ts create mode 100644 e2e/specs/mock/scenarios/code-workspace-composer.spec.ts create mode 100644 e2e/specs/mock/scenarios/codeWorkspaceMocks.ts create mode 100644 e2e/specs/mock/scenarios/project-rows-spaced.spec.ts create mode 100644 e2e/specs/mock/scenarios/thought-peek-tools.spec.ts diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsx index 3e6acabdb3..42c232efd2 100644 --- a/client/src/components/Chat/Input/ChatForm.tsx +++ b/client/src/components/Chat/Input/ChatForm.tsx @@ -860,7 +860,10 @@ const ChatForm = memo(function ChatForm({ a warning rather than a quiet mode hint. The contrast modes take it opaque, because that is the only way it clears the 3:1 non-text floor there. */ - isTemporary && 'border-series-6/50 bg-series-6/10 high-contrast:border-series-6', + /** The tint layers over the opaque chat surface instead of replacing it, so the + * context rail tucked under the composer never shows through. */ + isTemporary && + 'border-series-6/50 from-series-6/10 to-series-6/10 high-contrast:border-series-6 bg-linear-to-b', )} > diff --git a/client/src/components/Chat/Input/CodeApprovalMenu.tsx b/client/src/components/Chat/Input/CodeApprovalMenu.tsx index e28e8c3fd1..73f88bde4e 100644 --- a/client/src/components/Chat/Input/CodeApprovalMenu.tsx +++ b/client/src/components/Chat/Input/CodeApprovalMenu.tsx @@ -7,9 +7,9 @@ import type { TConversation, CodeApprovalMode, CodeEnvironmentMode } from 'libre import type { LucideIcon } from 'lucide-react'; import type { SetterOrUpdater } from 'recoil'; import type { TranslationKeys } from '~/hooks'; +import { chipClasses, chipMenuClasses, chipMenuItemClasses, chipMenuHeadingClasses } from './chip'; import { useCodeApprovalModePreference } from '~/hooks/Agents/codeApprovalPreference'; import { useCodeApprovalMode, useLocalize } from '~/hooks'; -import { chipClasses } from './chip'; import { cn } from '~/utils'; /** The modes answer one question — what may happen to the workspace without the @@ -100,7 +100,9 @@ export default function CodeApprovalMenu({ - + {/* Names the menu without adding an `h1` to the page outline. */} - } - className="text-text-secondary px-2.5 pt-2 pb-1 text-xs font-semibold" - > + } className={chipMenuHeadingClasses}> {localize('com_ui_code_approval_mode')} {modes.map((mode) => { @@ -158,12 +146,7 @@ export default function CodeApprovalMenu({ checked={isSelected} hideOnClick={true} onChange={() => selectMode(mode)} - className={cn( - 'group flex w-full cursor-pointer items-start gap-2.5 rounded-lg px-2.5 py-1.5', - 'duration-theme-fast outline-hidden transition-colors', - 'hover:bg-surface-hover data-[active-item]:bg-surface-hover', - isSelected && 'bg-surface-active-alt', - )} + className={cn(chipMenuItemClasses(isSelected), 'items-start')} >