Files
paseo/packages/app/src/components/tree-rail-layout.test.ts
T
Mohamed Boudra ab274d635e Make the workspace right pane a first-class tab host (#3287)
* feat(app): add persistent workspace side panes

Keep the common review and file-browsing workflow beside the active agent without tearing down pane contents. Workspace tabs now share one compact chip language, assistant file links route into the retained right pane, and diff/file trees share stable geometry.

* fix(app): localize pull request empty state

* test(app): update explorer pane coverage

* fix(app): preserve explorer pane workflows

* test(app): make explorer tab selection idempotent

* fix(app): persist workspace review pins

* fix(app): preserve sidebar scrim drag hook

* fix(app): restore companion pane interactions

* test(app): follow selected sidebar surface
2026-08-16 18:18:32 +02:00

22 lines
797 B
TypeScript

import { describe, expect, it } from "vitest";
import {
acceptTreeRailContainerMeasurement,
resolveVisibleTreeRailWidth,
} from "@/components/tree-rail-layout";
describe("tree rail layout", () => {
it("keeps the last usable geometry while a retained panel is hidden", () => {
const visibleContainerWidth = 900;
const hiddenContainerWidth = acceptTreeRailContainerMeasurement(visibleContainerWidth, 0);
expect(hiddenContainerWidth).toBe(visibleContainerWidth);
expect(resolveVisibleTreeRailWidth(420, hiddenContainerWidth)).toBe(420);
});
it("clamps the rail after a usable narrow-container measurement", () => {
const containerWidth = acceptTreeRailContainerMeasurement(900, 500);
expect(resolveVisibleTreeRailWidth(420, containerWidth)).toBe(260);
});
});