fix: preserve bottom cap during width drags

This commit is contained in:
Zzy
2026-08-21 23:54:49 +08:00
parent c426431e8b
commit 04686dcc7d
2 changed files with 23 additions and 3 deletions
+11
View File
@@ -0,0 +1,11 @@
import { readFileSync } from 'node:fs'
import { describe, expect, it } from 'vitest'
const source = readFileSync('src/client/Sidebar.tsx', 'utf8')
describe('Sidebar layout-push integration', () => {
it('does not bypass the shared bottom-height cap during width drags', () => {
expect(source).not.toContain('Math.min(state.bottomHeight, window.innerHeight)')
expect(source.match(/pushedBottomHeight\(/g)).toHaveLength(3)
})
})