diff --git a/frontend/src/App.sidebar-collapse.test.ts b/frontend/src/App.sidebar-collapse.test.ts index 671b21fb..f2825dba 100644 --- a/frontend/src/App.sidebar-collapse.test.ts +++ b/frontend/src/App.sidebar-collapse.test.ts @@ -7,6 +7,16 @@ const sidebarSource = readFileSync(new URL('./components/Sidebar.tsx', import.me const connectionRailSource = readFileSync(new URL('./components/sidebar/SidebarConnectionRail.tsx', import.meta.url), 'utf8'); describe('app sidebar tree panel collapse', () => { + it('uses the v2 themed sidebar surface for the custom titlebar', () => { + const titlebarStart = appSource.indexOf('{/* Custom Title Bar */}'); + const titlebarEnd = appSource.indexOf('{showLinuxCJKFontBanner && (', titlebarStart); + const titlebarSource = appSource.slice(titlebarStart, titlebarEnd); + + expect(titlebarStart).toBeGreaterThan(-1); + expect(titlebarEnd).toBeGreaterThan(titlebarStart); + expect(titlebarSource).toContain("background: isV2Ui ? 'var(--gn-bg-panel-2)' : bgMain,"); + }); + it('collapses v2 to the scaled fixed rail while preserving the saved expanded width', () => { expect(appSource).toContain('const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false);'); expect(appSource).toContain('const sidebarCollapsedWidth = isV2Ui ? 38 * effectiveUiScale * effectiveSidebarRailScale : 0;'); diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index ec5b4795..fd06521b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -7514,7 +7514,7 @@ function App() { display: 'flex', alignItems: 'center', justifyContent: 'space-between', - background: bgMain, + background: isV2Ui ? 'var(--gn-bg-panel-2)' : bgMain, borderBottom: 'none', userSelect: 'none', WebkitAppRegion: isWebRuntime ? 'no-drag' : 'drag', diff --git a/frontend/src/components/TabManager.adaptive-width.test.ts b/frontend/src/components/TabManager.adaptive-width.test.ts index 0995326d..8f739e36 100644 --- a/frontend/src/components/TabManager.adaptive-width.test.ts +++ b/frontend/src/components/TabManager.adaptive-width.test.ts @@ -52,12 +52,12 @@ describe('v2 workbench adaptive tab width', () => { ); }); - it('rounds all four corners of every v2 workbench tab', () => { + it('rounds all four corners without drawing an accent bar above the active tab', () => { expect(themeSource).toMatch( /\.gn-v2-main-tabs \.ant-tabs-tab \{[^}]*border-radius: 8px !important;/s, ); - expect(themeSource).toMatch( - /\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active \{[^}]*box-shadow: inset 0 2px 0 var\(--gn-accent\) !important;/s, + expect(themeSource).not.toMatch( + /\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active \{[^}]*box-shadow:/s, ); expect(themeSource).toMatch( /\.gn-v2-main-tabs \.ant-tabs-tab\.ant-tabs-tab-active::after \{[^}]*display: none;/s, diff --git a/frontend/src/v2-theme.css b/frontend/src/v2-theme.css index f9dae85b..392a4af3 100644 --- a/frontend/src/v2-theme.css +++ b/frontend/src/v2-theme.css @@ -3713,10 +3713,6 @@ body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab { border-radius: 8px !important; } -body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab.ant-tabs-tab-active { - box-shadow: inset 0 2px 0 var(--gn-accent) !important; -} - body[data-ui-version="v2"] .gn-v2-main-tabs .ant-tabs-tab.ant-tabs-tab-active::after { display: none; }