From eead66df7df2ec6c145b47bd13fe2141c5b146c7 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Wed, 25 Nov 2026 17:50:42 +0800 Subject: [PATCH] fix(agents): align session composer and asset pills with Islands style (#5863) Co-authored-by: Cursor --- src/features/agents/Composer.module.css | 27 +++++++---- src/features/agents/ConfigPickers.tsx | 8 ++-- src/features/agents/ReferenceChip.module.css | 1 - src/features/agents/Session.module.css | 4 +- src/features/agents/SessionAssets.module.css | 48 +++++++++++++------- src/features/agents/SessionAssets.tsx | 6 +-- src/features/agents/SessionPicker.module.css | 1 - src/features/agents/SubmitButton.module.css | 7 +++ 8 files changed, 65 insertions(+), 37 deletions(-) diff --git a/src/features/agents/Composer.module.css b/src/features/agents/Composer.module.css index ae0784e534..4f0b26c8d7 100644 --- a/src/features/agents/Composer.module.css +++ b/src/features/agents/Composer.module.css @@ -1,17 +1,20 @@ -/* A framed text area (IDEA text field frame), with the pickers in its bottom row. */ +/* A framed text area (IDEA Islands surface), with compact pickers in its bottom row. */ .composer { container: agent-composer / inline-size; min-width: 0; position: relative; display: flex; flex-direction: column; - border-radius: var(--radius-control); - background: var(--bg-field, var(--bg-button)); - box-shadow: inset 0 0 0 1px var(--border-button); + border-radius: var(--radius-toolbar-button); + background: var(--bg-elev); + box-shadow: inset 0 0 0 1px var(--border-popup); cursor: text; - transition: box-shadow var(--dur-fast) var(--ease); + transition: + background var(--dur-fast) var(--ease), + box-shadow var(--dur-fast) var(--ease); } .composer:focus-within { + background: var(--bg-field, var(--bg-button)); box-shadow: inset 0 0 0 1px var(--focus-ring), 0 0 0 1px var(--focus-ring); @@ -47,8 +50,8 @@ must land in the editable text, or they focus the bare scroller and no caret appears. A host sets --composer-min-height rather than overriding the rule, so stylesheet order can't undo it. */ .field :global(.cm-content) { - min-height: var(--composer-min-height, 44px); - padding: var(--space-2) var(--space-2) var(--space-0-5); + min-height: var(--composer-min-height, 38px); + padding: 9px 12px 4px; caret-color: var(--fg-strong); white-space: pre-wrap; overflow-wrap: anywhere; @@ -100,6 +103,7 @@ min-width: 0; overflow: hidden; gap: var(--space-0-5); + font-size: var(--fs-small); } .toolbar > button { flex: 0 1 auto; @@ -197,14 +201,17 @@ .chip { display: inline-flex; align-items: center; - gap: var(--space-1-5); + gap: var(--space-1); height: var(--h-control); min-width: 0; padding: 0 4px 0 6px; - border-radius: var(--radius-control); + border-radius: var(--radius-toolbar-button); color: var(--fg-secondary); + font-size: var(--fs-small); white-space: nowrap; - transition: background var(--dur-fast) var(--ease); + transition: + background var(--dur-fast) var(--ease), + color var(--dur-fast) var(--ease); } .chip.chipLoading, .chip.chipLoading:hover { diff --git a/src/features/agents/ConfigPickers.tsx b/src/features/agents/ConfigPickers.tsx index 1cab7a7e87..22e0eb1f14 100644 --- a/src/features/agents/ConfigPickers.tsx +++ b/src/features/agents/ConfigPickers.tsx @@ -517,7 +517,7 @@ function ModelPicker({ onClick={() => toggle("models")} > {modelName} - + {!unavailable && modelRefresh?.loadingSettings ? ( @@ -538,7 +538,7 @@ function ModelPicker({ onClick={() => toggle("settings")} > {summary} - + ) )} @@ -753,14 +753,14 @@ function ModePicker({ title={summary} onClick={() => setOpen((v) => !v)} > - + {current?.name ?? tx("Default")} {on && ( {tx(toggle.chipLabel)} )} - + {issuePillLabel} - {issueCount > 1 && } + toggle("references")} > - + {refPillLabel} @@ -564,7 +564,7 @@ export function SessionAssets({ task, entries, head, onFocusComposer }: SessionA aria-expanded={activeCategory === "artifacts"} onClick={() => toggle("artifacts")} > - + {artifactPillLabel} diff --git a/src/features/agents/SessionPicker.module.css b/src/features/agents/SessionPicker.module.css index e02b11b3fd..6663140e9c 100644 --- a/src/features/agents/SessionPicker.module.css +++ b/src/features/agents/SessionPicker.module.css @@ -72,7 +72,6 @@ color: var(--link); font: inherit; font-size: var(--fs-small); - cursor: pointer; } .resetBtn:hover { diff --git a/src/features/agents/SubmitButton.module.css b/src/features/agents/SubmitButton.module.css index be25744070..2059cae844 100644 --- a/src/features/agents/SubmitButton.module.css +++ b/src/features/agents/SubmitButton.module.css @@ -1,4 +1,11 @@ .submit { + --button-radius: var(--radius-toolbar-button); width: var(--h-control); padding: 0; } + +.submit:disabled { + background: var(--bg-toolbar-hover); + color: var(--fg-faint); + box-shadow: none; +}