From 067a71a50432fa98901668744b84fdac375e46d3 Mon Sep 17 00:00:00 2001 From: GCWing Date: Thu, 2 Apr 2026 10:05:24 +0800 Subject: [PATCH] feat(web-ui): workspace menu grouping, active row styling, font size panel - Reorder assistant workspace context menu: group reset/delete after reveal with dividers. - Use accent-tinted background for active workspace rows in the list. - Font preference: custom level as a level button; show stepper only when custom is selected; wrap-friendly layout and aria-pressed. --- .../sections/workspaces/WorkspaceItem.tsx | 52 ++++---- .../workspaces/WorkspaceListSection.scss | 30 ++++- .../components/FontPreferencePanel.scss | 114 +++++------------- .../components/FontPreferencePanel.tsx | 104 +++++++++------- 4 files changed, 141 insertions(+), 159 deletions(-) diff --git a/src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceItem.tsx b/src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceItem.tsx index 0957acb0..882e87a2 100644 --- a/src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceItem.tsx +++ b/src/web-ui/src/app/components/NavPanel/sections/workspaces/WorkspaceItem.tsx @@ -471,28 +471,7 @@ const WorkspaceItem: React.FC = ({ {t('nav.workspaces.actions.newSession')} - {isDefaultAssistantWorkspace && ( - - )} - {isNamedAssistantWorkspace && ( - - )} +
+ {(isDefaultAssistantWorkspace || isNamedAssistantWorkspace) ? ( + <> +
+ {isDefaultAssistantWorkspace ? ( + + ) : null} + {isNamedAssistantWorkspace ? ( + + ) : null} + + ) : null}
, document.body )} @@ -649,6 +655,7 @@ const WorkspaceItem: React.FC = ({ {t('nav.workspaces.actions.initAgents')} +
{isLinkedWorktree ? ( +
))} -
- -
- - {t('appearance.fontSize.levels.custom')} - -
+
- void handleLevelClick('custom')} - aria-readonly={!uiCustomActive} - aria-invalid={!!customError} - /> - + onClick={() => void handleLevelClick('custom')} + aria-pressed={level === 'custom'} + > + + {t('appearance.fontSize.levels.custom')} + + + {level === 'custom' && ( +
+
+ + void handleLevelClick('custom')} + aria-invalid={!!customError} + /> + +
+ px +
+ )}
- px
{customError && (