From 40877bc120f85cf07d19857e3b9c11206ac78dca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BF=AE=E9=9B=A8?=
<47820304+PeterGuy326@users.noreply.github.com>
Date: Wed, 16 Sep 2026 00:46:04 +0800
Subject: [PATCH 1/2] fix(web): improve control contrast and centered labels
---
CHANGELOG.md | 5 +++
web/src/components/explorer/ContextMenu.tsx | 6 +--
web/src/components/explorer/FileGrid.tsx | 4 +-
web/src/components/layout/TopBar.tsx | 2 +-
.../memory/CreateRelationDialog.tsx | 8 ++--
.../components/memory/ForgetMemoryDialog.tsx | 8 ++--
web/src/components/memory/MemoryFilters.tsx | 10 ++---
web/src/components/ui/Badge.tsx | 4 +-
web/src/components/ui/Button.tsx | 6 +--
web/src/components/ui/Card.tsx | 2 +-
web/src/components/ui/ConfirmDialog.test.tsx | 38 +++++++++++++++++++
web/src/components/ui/ConfirmDialog.tsx | 19 +++++-----
web/src/pages/CheckpointDetailPage.tsx | 8 ++--
web/src/pages/FileDetailPage.tsx | 2 +-
web/src/pages/MemoriesPage.tsx | 6 +--
web/src/pages/PermissionsPage.tsx | 12 +++---
web/src/pages/ProvidersPage.tsx | 4 +-
web/src/pages/SearchPage.tsx | 4 +-
web/src/pages/TaskDetailPage.tsx | 8 ++--
web/src/pages/TasksPage.tsx | 6 +--
web/src/pages/TransferPage.tsx | 22 +++++------
web/src/styles/globals.css | 10 ++---
22 files changed, 120 insertions(+), 74 deletions(-)
create mode 100644 web/src/components/ui/ConfirmDialog.test.tsx
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7bdac57..70d5206 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -75,6 +75,11 @@ The project publishes 0.x prerelease versions; a stable release line is not yet
### Fixed
+- Improve web caption and status contrast in both themes, including tinted danger
+ buttons, and center action labels, context menus, badges, dialog prompts, and
+ overview/detail headings. Restore localized cancel/confirm labels when a
+ confirmation dialog caller omits custom action text.
+
- A configured URL that carries credentials in a shape `url.Parse` does not
report as userinfo no longer reaches output. `admin:pw@host` parses as
`Scheme="admin"` with the credential in `Opaque` and `User` unset, so an
diff --git a/web/src/components/explorer/ContextMenu.tsx b/web/src/components/explorer/ContextMenu.tsx
index d12b0d3..8913d84 100644
--- a/web/src/components/explorer/ContextMenu.tsx
+++ b/web/src/components/explorer/ContextMenu.tsx
@@ -102,7 +102,7 @@ function ContextMenuView({ state, onClose }: { state: ContextMenuState; onClose:
requestAnimationFrame(() => item.onSelect());
}}
className={cn(
- 'flex w-full items-center gap-2 px-2.5 py-1.5 text-sm rounded-sm mx-1 my-0.5',
+ 'grid w-[calc(100%-0.5rem)] grid-cols-[1fr_auto_1fr] items-center gap-2 px-2.5 py-1.5 text-center text-sm rounded-sm mx-1 my-0.5',
'transition-colors',
item.disabled
? 'text-fg-subtle cursor-not-allowed'
@@ -111,9 +111,9 @@ function ContextMenuView({ state, onClose }: { state: ContextMenuState; onClose:
: 'text-fg-muted hover:bg-bg-inset hover:text-fg',
)}
>
- {item.label}
+ {item.label}
{item.shortcut && (
- {item.shortcut}
+ {item.shortcut}
)}
diff --git a/web/src/components/explorer/FileGrid.tsx b/web/src/components/explorer/FileGrid.tsx
index 458aa1c..677a046 100644
--- a/web/src/components/explorer/FileGrid.tsx
+++ b/web/src/components/explorer/FileGrid.tsx
@@ -73,6 +73,7 @@ export function FileGrid(props: FileGridProps) {
{renaming ? (
}
{renaming ? (
-
+
) : (
{file.name}
diff --git a/web/src/components/layout/TopBar.tsx b/web/src/components/layout/TopBar.tsx
index 97bd25b..9f5f646 100644
--- a/web/src/components/layout/TopBar.tsx
+++ b/web/src/components/layout/TopBar.tsx
@@ -186,7 +186,7 @@ export function TopBar({ children }: { children?: React.ReactNode }) {