Repository navigation
fix(workbench,settings): move consent confirmations to ModalDialog and fix workbench UI polish issues - #7597
Conversation
M4n5ter
left a comment
There was a problem hiding this comment.
English
Overall this is a clean, well-scoped polish PR—converting ExternalAgentConfirmation and SignInRiskConfirmation into ModalDialog overlays with SettingsConsentCheck makes those flows much more consistent with the rest of Settings.
A few concrete issues worth addressing before merge:
-
Automations.tsx(L3236):New automationbutton disappears completely in narrow windows (< 760px) and terminal mode when filtering an empty session or on list errorsplit()is!terminal && paneWidth() >= 760, sosplit()is alwaysfalsein TUI and on narrow desktop panes.- When
props.sessionFilter()is set for a conversation with 0 automations (or when initial fetch setslistError()withcounts().all === 0),globalEmpty()andshowRightPane()are bothfalse, which makesshowDetailColumn()false. - The left list empty state only renders text (no create button), and the detail pane (which holds the only other
New automationCTA) is not mounted. Changing the header guard to!editor() && counts().all > 0hides the header button too, leaving no way to create an automation. - Suggestion: Hide the header CTA only when the detail-pane empty CTA is actually rendered, e.g.:
and use
const detailEmptyAction = () => showDetailColumn() && !editor() && !selectedSummary() && !loading() && counts().all === 0;
<If when={!editor() && !detailEmptyAction()}>.
-
WorkspacePicker.tsx(L691): UnconditionalC.onActionon the disabled primary button makes the label invisible (~1:1 contrast) in terminal mode- On desktop,
controlDisabledStyleis{ opacity: 0.5 }overC.action, soC.onActionimproves contrast. - In terminal mode (
platform.idiom === 'terminal'),controlDisabledStylereplaces the background withC.background(#ffffffin light mode,#111418in dark mode), whileC.onActionis#ffffff(light) /#12161c(dark)—making the disabled label invisible on initial open at the root list or on folder error. - Suggestion: Match
SettingsButton'sprimaryFillhandling (useC.mutedwhenplatform.idiom === 'terminal'and disabled), or replace the two footer buttons withSettingsButton/DialogFooteras done inWorkspaceLocationsandRoomWorkspace.
- On desktop,
-
RoomPanels.tsx(L441–L453): Missed the 4th fixed-size icon button (Room actions) inRoomHeaderControlsPinned(26×26),Unpin(22×22), andSearch(26×26) were updated to clear inheritedcontrolStyle()vertical padding, but the siblingRoom actions(more, 26×26, 14px icon) button right belowSearchstill spreads...controlStyle()(paddingVertical: 8) withoutpaddingVertical: 0,alignItems: 'center', andjustifyContent: 'center'.
Minor follow-ups (optional):
- Reactive remount of
SettingsSectiontrailingbuttons: Becausenshcompilestrailing={cond ? <SettingsButton /> : undefined}into a reactive getter, any update toowner.runtimes()(ExternalAgentSettings.tsx),composerToolbar.layout()(ComposerToolbarSettings.tsx), ordesktop()/host()(SystemPermissionSettings.tsx) while the condition staystruetears down and remounts the button (e.g. dropping keyboard focus onRefreshafter pressing Enter). Wrapping the boolean incomputed(() => ...)avoids unnecessary remounts. - Unused
externalAgents.title(): After removing its only caller inplugins/settings/settings/ui.tsx,titleinproducts/maka/workbench/app/externalAgentSettingsState.ts(L408–L409) appears to have no remaining callers and can be removed.
简体中文
整体改动很克制、方向也很清晰,把 ExternalAgentConfirmation 和 SignInRiskConfirmation 改成 ModalDialog + SettingsConsentCheck 之后,和 Settings 里其他确认流的一致性明显好多了。
有 3 个具体问题建议合前处理一下:
-
Automations.tsx(L3236):窄窗(< 760px)和 TUI 下按空会话过滤或列表报错时,New automation入口完全消失split()定义为!terminal && paneWidth() >= 760,在 TUI 下恒为false,桌面窄窗下也为false。- 当
props.sessionFilter()指向一个没有 automation 的会话(或首次拉取出现listError()且counts().all === 0)时,globalEmpty()和showRightPane()都为false,导致showDetailColumn()也为false。 - 左侧列表空状态里只有文字没有新建按钮,唯一另一个新建按钮所在的右侧详情栏此时未挂载;Header 改成
!editor() && counts().all > 0后也被藏掉了,全屏没有任何新建入口。 - 建议: 直接按右侧空状态按钮是否实际渲染来做互斥,例如:
Header 改为
const detailEmptyAction = () => showDetailColumn() && !editor() && !selectedSummary() && !loading() && counts().all === 0;
<If when={!editor() && !detailEmptyAction()}>。
-
WorkspacePicker.tsx(L691):禁用态主按钮文案无条件改为C.onAction,TUI 下对比度跌到 ~1:1 变隐身字- 桌面端
controlDisabledStyle是{ opacity: 0.5 }(底色仍是C.action),改成C.onAction确实提升了对比度。 - 但 TUI(
platform.idiom === 'terminal')下controlDisabledStyle会把背景替换成C.background(浅色#ffffff、深色#111418),而C.onAction分别是#ffffff/#12161c,导致打开根目录列表或目录报错时主按钮文案几乎完全不可见。 - 建议: 对齐
SettingsButton的primaryFill处理(TUI 禁用态保留C.muted),或像本 PR 修改WorkspaceLocations/RoomWorkspace一样,把底部两个按钮也直接换成SettingsButton/DialogFooter。
- 桌面端
-
RoomPanels.tsx(L441–L453):RoomHeaderControls漏修了第 4 个固定尺寸图标按钮(Room actions)Pinned(26×26)、Unpin(22×22)、Search(26×26)都清掉了继承自controlStyle()的paddingVertical: 8,但紧挨着Search的Room actions(more,26×26,14px 图标)依然带着...controlStyle()且缺少paddingVertical: 0、alignItems: 'center'、justifyContent: 'center'。
顺手可收的小点(可选):
SettingsSectiontrailing按钮随信号更新重建:nsh会把trailing={cond ? <SettingsButton /> : undefined}编译成响应式 getter;当owner.runtimes()(ExternalAgentSettings.tsx)、composerToolbar.layout()(ComposerToolbarSettings.tsx)或desktop()/host()(SystemPermissionSettings.tsx)更新但布尔结果仍为true时,按钮会被卸载重建(例如键盘聚焦在Refresh上回车刷新后焦点会丢)。把布尔条件包一层computed(() => ...)即可避免无谓重建。- 未使用的
externalAgents.title(): 删掉plugins/settings/settings/ui.tsx里唯一的调用点后,products/maka/workbench/app/externalAgentSettingsState.ts(L408–L409)的title()已无其他调用方,可以顺手清理。
…Dialog and remove ghost section spacing
- Convert ExternalAgentConfirmation (Codex / Claude Code / Antigravity) and
SignInRiskConfirmation (ChatGPT sign-in) from sparse full-page subpages into
centered ModalDialog alertdialogs using SettingsConfirm + SettingsConsentCheck,
keeping the parent OpenAI/Anthropic page visible in context and matching
Removal/Discard dialogs and DESIGN.md.
- Replace the pre-submit acknowledgement SettingsSwitch with a full-row
clickable Checkbox (ChoiceIndicator kind="checkbox"), reserving switches for
immediately-applied settings.
- Extend DialogHeader with an optional brand icon and remove confirmation
overrides from the connections page header/nested state.
- Fix truthy `<If when={false}>` elements passed to SettingsSection `trailing`
(removing the 36pt invisible header row above the Codex/Claude Code switch
card, plus matching cleanup in ComposerToolbarSettings and
SystemPermissionSettings).
- Update headless workbench tests to assert alertdialog/checkbox semantics and
the absence of the ghost spacing gap.
Generated-by: Antigravity
…n padding, and primary action hierarchy - Composer: use muted icon ink when the disabled desktop Send button drops to the hover fill layer, matching RoomComposer and StageFloatingComposer. - RecallSearch / WorkspacePicker / WorkspaceLocations: add visible input borders and accent focus rings on light-mode floating cards, highlight the active RecallSearch scope button, add Cancel and fix disabled primary button text contrast and row background in WorkspacePicker, and bind Escape + DialogFooter in WorkspaceLocations. - RoomPanels / RoomWorkspace: wrap RoomMembersModal body in Scroll to prevent clipping DialogFooter, standardize Room modals onto SettingsButton and inputBorderRadius() with focus rings, and convert Delete room to an alert dialog with Cancel auto-focused. - WorkspaceBrowser / SessionTree / RoomPanels: clear inherited controlStyle() padding on fixed-size icon buttons so icons are not squeezed. - Automations: keep a single primary action per view by dropping primary tone on split-view Run now and hiding the header New automation button in empty state. Generated-by: Antigravity
b9e289b to
69e213f
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
I rechecked the settings confirmations, Room actions, and the other workbench changes on this commit. The settings changes now keep the underlying form mounted and gate confirmation on an explicit checkbox. Two earlier issues still reproduce in the current code. In particular, the same view can now hide both New automation buttons.
The six focused JavaScript suites passed 68/68 both on the PR and on its merge base. Separately, I ran the actual visibility predicates against narrow desktop, terminal, and wide desktop cases. This commit merges cleanly into current main. I did not run the native dialog and focus tests or verify the long Room member list visually. The Room actions button still retains its old vertical padding, unlike its siblings.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
| browser={props.browserHeader()} | ||
| actions={ | ||
| <If when={!editor() && !globalEmpty()}> | ||
| <If when={!editor() && counts().all > 0}> |
There was a problem hiding this comment.
[P2] Keep a way to create an automation in an empty session. In a narrow desktop pane or the terminal, an empty session filter keeps the detail pane unmounted. This condition hides the header action as well. The same happens after a narrow-pane list error. The current main baseline still shows the header action in all three cases. Hide it only when the other New automation button is actually present.
| <Text | ||
| style={{ | ||
| color: currentDirectory(read) && !error() ? C.onAction : C.muted, | ||
| color: C.onAction, |
There was a problem hiding this comment.
[P3] Keep readable disabled text in the terminal workspace picker. The terminal disabled style paints the background with C.background, while this now paints the label with C.onAction. Those are both white in the light palette and nearly the same shade in dark. Keep the muted label for that terminal state or route the footer through SettingsButton.
…, WorkspacePicker, RoomPanels, and SettingsSection
|
Addressed all review items in the latest commit:
|
…utton in WorkspaceLocations
M4n5ter
left a comment
There was a problem hiding this comment.
LGTM! Cleaned up the leftover unused SettingsButton import in RoomWorkspace.tsx and switched WorkspaceLocations.tsx to ActionButton directly.
Summary
Brings Settings confirmation flows and several workbench/chat UI surfaces into alignment with
DESIGN.md:Settings confirmation dialogs & layout spacing
ModalDialog:ExternalAgentConfirmation(Codex / Claude Code / Antigravity) andSignInRiskConfirmationpreviously replaced the entire Settings page with a sparse subpage (~70% empty space with footer buttons pinned to the bottom edge), unlikeRemoval,SettingsDiscard, and every other Settings confirmation. Both now render as centeredalertdialogoverlays viaSettingsConfirm+SettingsConsentCheck, preserving the parent provider page in context and supportingEscapedismissal.SettingsSwitchwith a full-row clickableCheckbox(ChoiceIndicator kind="checkbox"), keeping switches strictly for immediately-applied settings. Added optionaliconsupport toDialogHeaderand removed confirmation overrides from the connections page header/nested state.ExternalAgentSectionpassedtrailing={<If when={false}>...</If>}toSettingsSection; because a JSX<If>element is truthy,SettingsSectionrendered an emptyminHeight: 28header row +8ptgap above the Codex/Claude Code switch card. SwitchedExternalAgentSettings,ComposerToolbarSettings, andSystemPermissionSettingsto passundefinedwhen trailing controls are hidden.Workbench & chat UI polish
Composerdropped the disabled Send button fill tostateLayer('hover')while keepingC.onActionicon ink (~1.13:1 contrast in light mode, ~1.45:1 in dark mode). Now usesC.mutedwhen disabled, matchingRoomComposerandStageFloatingComposer.borderWidth/borderColor: C.lineandfocusStyle={{ borderColor: C.accent }}to inputs inRecallSearch,WorkspacePicker, andWorkspaceLocations(previously borderlessC.backgroundon whiteC.floating).selectedRowStyle()and medium weight to the active scope toggle inRecallSearch.WorkspacePicker, switched folder rows from opaqueC.surfaceto transparent +stateLayer('selected' | 'hover'), fixed disabled primary button ink contrast (C.onActioninstead ofC.mutedonC.action), and added a footerCancelbutton.WorkspaceLocations, boundEscapeto cancel and adoptedDialogFooter+SettingsButton.RoomMembersModalbody in<Scroll>so long member/session/role lists cannot clipDialogFooter; standardizedNew room,Rename room,Delete room, andEdit room topicontoSettingsButtonandinputBorderRadius()+ focus rings; convertedDelete roomtosize="alert"/role="alertdialog"withCancelauto-focused.controlStyle()padding on fixed-size icon buttons inWorkspaceBrowser,SessionTree, andRoomPanels; ensuredAutomationsdisplays at most onetone="primary"button at a time (dropping primary tone from split-viewRun nowand hiding headerNew automationwhen empty).Verification
node --test products/maka/workbench/tests/*.test.mjs: 474 / 474 passedcargo test -p maka-workbench --lib -- settings_switches_confine_press_targets provider_catalog_grouping_flat_search models_settings_renders_each_error_once models_settings_unifies_sources_without_inline_layout_jumps: 4 / 4 passed (updated tests to assertrole:alertdialog,role:checkbox,Escapedismissal, and the absence of the ghost spacing gap between the warning callout and the Codex switch card)node node_modules/typescript/bin/tsc -p products/maka/bundle/tsconfig.json --noEmit: passednode node_modules/typescript/bin/tsc -p packages/plugin-sdk/tsconfig.json --noEmit: passednode node_modules/@biomejs/biome/bin/biome check <16 modified TS/TSX files>: passedcargo fmt -p maka-workbench -- --check: passednode scripts/asf-license-headers.mjs check: passedmaka.exe,maka-desktop-shell.exe,maka-python-worker.exe,maka-service.exe) and visually verified in the desktop app.AI use
Select exactly one:
Tool(s) and scope: Antigravity assisted with auditing Settings/workbench views against
DESIGN.md, implementing the modal confirmation and UI fixes, updating headless UI tests, and running local verification.Checklist
Does this PR entail a breaking change or persisted-data migration?
upgrade_compat.rscoverage under Summary aboveDoes this PR entail a change in behavior?