feat(tui): add vertical session tabs (#40072)

This commit is contained in:
Kit Langton 2026-08-01 13:10:08 -04:00 committed by GitHub
commit 0e3da4b4f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 795 additions and 143 deletions

View file

@ -12,9 +12,16 @@ 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"])