fix(tui): make vertical tabs responsive (#40080)

This commit is contained in:
Kit Langton 2026-08-01 14:06:13 -04:00 committed by GitHub
commit f158abd694
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 24 additions and 19 deletions

View file

@ -12,16 +12,9 @@ import {
seedSessionTabMotion,
sessionTabComplete,
sessionTabOverflowWidth,
sessionTabVerticalWidth,
} from "../../src/context/session-tabs-model"
describe("session tabs", () => {
test("keeps the vertical rail compact while preserving narrow-terminal content", () => {
expect(sessionTabVerticalWidth(140)).toBe(30)
expect(sessionTabVerticalWidth(90)).toBe(27)
expect(sessionTabVerticalWidth(60)).toBe(20)
})
test("moves a tab to a clamped index and returns the same tabs for no-ops", () => {
const tabs = ["a", "b", "c"].map((sessionID) => ({ sessionID }))
expect(moveSessionTab(tabs, "a", 2).map((tab) => tab.sessionID)).toEqual(["b", "c", "a"])