fix(canvas): align fixed design sidebars

This commit is contained in:
inman
2026-09-07 16:08:17 +08:00
parent e98603435d
commit 6a05992e18
10 changed files with 74 additions and 25 deletions

View File

@@ -132,6 +132,18 @@ describe('TitleBar platform behavior', () => {
expect(screen.getByTestId('titlebar-logo')).toBeInTheDocument();
});
it('leaves the narrow Windows Canvas rail to the native window controls', () => {
window.electron.platform = 'win32';
render(<TitleBar integrated overlay showSidebarControls={false} />);
expect(screen.queryByTestId('titlebar-sidebar-toggle')).not.toBeInTheDocument();
expect(screen.queryByTestId('titlebar-logo')).not.toBeInTheDocument();
expect(screen.getByTitle('Minimize')).toBeInTheDocument();
expect(screen.getByTitle('Maximize')).toBeInTheDocument();
expect(screen.getByTitle('Close')).toBeInTheDocument();
});
it('keeps an optional page title after the macOS traffic-light safe area', () => {
window.electron.platform = 'darwin';
useSettingsStore.setState({ sidebarCollapsed: true });