fix(status): keep git popup above panels

This commit is contained in:
lucaronin
2026-05-03 20:25:50 +02:00
parent b872b6148c
commit 6a033cd2db
2 changed files with 3 additions and 1 deletions

View File

@@ -567,6 +567,7 @@ describe('StatusBar', () => {
/>
)
fireEvent.click(screen.getByTestId('status-sync'))
expect(screen.getByTestId('status-bar')).toHaveStyle({ zIndex: '30' })
expect(screen.getByTestId('git-status-popup')).toBeInTheDocument()
expect(screen.getByText('main')).toBeInTheDocument()
expect(screen.getByText(/2 ahead/)).toBeInTheDocument()

View File

@@ -17,6 +17,7 @@ import type { VaultOption } from './status-bar/types'
export type { VaultOption } from './status-bar/types'
const COMPACT_STATUS_BAR_MAX_WIDTH = 1000
const STATUS_BAR_STACKING_Z_INDEX = 30
function getWindowWidth() {
return typeof window === 'undefined' ? Number.POSITIVE_INFINITY : window.innerWidth
@@ -246,7 +247,7 @@ function StatusBarFooter(props: StatusBarFooterProps) {
fontSize: 12,
color: 'var(--muted-foreground)',
position: 'relative',
zIndex: 10,
zIndex: STATUS_BAR_STACKING_Z_INDEX,
}}
>
<StatusBarPrimaryFromFooter {...props} />