From 485ad623d4ce7e48ca38741a9de28b89fbebe11c Mon Sep 17 00:00:00 2001 From: Xin Wang Date: Fri, 7 Aug 2026 00:25:58 +0800 Subject: [PATCH] feat(frontend): improve history detail and model list UX Open model resources via row click, restyle history detail with session/analysis panels and mock playback, and theme scrollbars globally with navy light/dark tokens. Co-authored-by: Cursor --- frontend/src/app/globals.css | 72 +-- frontend/src/components/layout/Sidebar.tsx | 2 +- .../components/pages/ComponentsModelsPage.tsx | 23 +- frontend/src/components/pages/HistoryPage.tsx | 419 +++++++++++++----- 4 files changed, 361 insertions(+), 155 deletions(-) diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 1be79c7..901d18c 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -180,7 +180,44 @@ @layer base { * { @apply border-border outline-ring/50; + /* Theme-aware scrollbars (light/dark navy tokens) */ + scrollbar-width: thin; + scrollbar-color: color-mix( + in srgb, + var(--muted-soft) 48%, + transparent + ) + transparent; } + + *::-webkit-scrollbar { + width: 10px; + height: 10px; + } + + *::-webkit-scrollbar-track { + background: transparent; + } + + *::-webkit-scrollbar-thumb { + background-color: color-mix( + in srgb, + var(--muted-soft) 42%, + transparent + ); + border: 3px solid transparent; + border-radius: 999px; + background-clip: content-box; + } + + *::-webkit-scrollbar-thumb:hover { + background-color: color-mix( + in srgb, + var(--muted-soft) 64%, + transparent + ); + } + body { @apply bg-background text-foreground; letter-spacing: 0.01em; @@ -261,42 +298,9 @@ } } + /* Explicit opt-in alias; base layer already styles all scrollbars. */ .scrollbar-subtle { scrollbar-width: thin; - scrollbar-color: color-mix( - in srgb, - var(--muted-soft) 48%, - transparent - ) - transparent; - } - - .scrollbar-subtle::-webkit-scrollbar { - width: 10px; - height: 10px; - } - - .scrollbar-subtle::-webkit-scrollbar-track { - background: transparent; - } - - .scrollbar-subtle::-webkit-scrollbar-thumb { - background-color: color-mix( - in srgb, - var(--muted-soft) 42%, - transparent - ); - border: 3px solid transparent; - border-radius: 999px; - background-clip: content-box; - } - - .scrollbar-subtle::-webkit-scrollbar-thumb:hover { - background-color: color-mix( - in srgb, - var(--muted-soft) 64%, - transparent - ); } /* 手机通话页「开始通话」引导光晕:柔和向外扩散的涟漪环 */ diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx index 232fbfb..bada330 100644 --- a/frontend/src/components/layout/Sidebar.tsx +++ b/frontend/src/components/layout/Sidebar.tsx @@ -98,7 +98,7 @@ export function Sidebar({ collapsed, onToggle }: SidebarProps) { -