diff --git a/frontend/src/App.css b/frontend/src/App.css index e48ea26..6d59d91 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -685,3 +685,9 @@ body[data-theme='dark'] .gonavi-query-editor-column-token { body[data-theme='dark'] .gonavi-query-editor-db-token { color: #c4b5fd; } + +/* Legacy sidebar resize bounds — mirror v2 .gn-v2-app-sider so Ant Design inline width locks do not collapse drag range. */ +body[data-ui-version="legacy"] .ant-layout-sider { + min-width: 232px !important; + max-width: 420px !important; +} diff --git a/frontend/src/App.tool-center.test.ts b/frontend/src/App.tool-center.test.ts index 86ee99f..573f19a 100644 --- a/frontend/src/App.tool-center.test.ts +++ b/frontend/src/App.tool-center.test.ts @@ -6,6 +6,10 @@ const appSource = readFileSync( fileURLToPath(new globalThis.URL('./App.tsx', import.meta.url)), 'utf8', ); +const appCss = readFileSync( + fileURLToPath(new globalThis.URL('./App.css', import.meta.url)), + 'utf8', +); const linuxCJKFontBannerSource = readFileSync( fileURLToPath(new globalThis.URL('./components/LinuxCJKFontBanner.tsx', import.meta.url)), 'utf8', @@ -116,6 +120,10 @@ describe('tool center menu entries', () => { expect(appSource).toContain('ghostRef.current.style.left = `${startGuideLeft + (newWidth - startWidth)}px`;'); }); + it('keeps legacy sidebar resize bounds aligned with the v2 sider CSS limits', () => { + expect(appCss).toMatch(/body\[data-ui-version="legacy"\]\s+\.ant-layout-sider\s*\{[^}]*min-width:\s*232px\s*!important;[^}]*max-width:\s*420px\s*!important;/s); + }); + it('keeps connection modal warm-mounted while leaving the other heavyweight modals conditional', () => { expect(appSource).toContain('const [isConnectionModalMounted, setIsConnectionModalMounted] = useState(false);'); expect(appSource).toContain('{isConnectionModalMounted && (');