feat(workspace): the console tab bar is the session view's only header
The status/name/back-arrow row is gone; Tools sits at the tab bar's right end and the pipeline/feature pickers show only with a template. LaneConsolePane is reduced to the terminal (no title, no Active runs, no New run): RunHistory.tsx, api.run.history and the page's active-sessions poll are removed.
This commit is contained in:
@@ -173,13 +173,6 @@ vi.mock("../../lib/api", async (importOriginal) => {
|
||||
recordCall("GET", "/api/run/list");
|
||||
return { runs: [], items: [] };
|
||||
}),
|
||||
history: vi.fn().mockImplementation(async (limit?: number, opts?: { laneId?: number }) => {
|
||||
recordCall(
|
||||
"GET",
|
||||
`/api/run/history?limit=${limit}${opts?.laneId ? `&laneId=${opts.laneId}` : ""}`
|
||||
);
|
||||
return { items: [] };
|
||||
}),
|
||||
binary: vi.fn().mockImplementation(async () => {
|
||||
recordCall("GET", "/api/run/binary");
|
||||
return { found: true, path: "/usr/bin/claude" };
|
||||
@@ -612,7 +605,7 @@ describe("Workspace — home and session view", () => {
|
||||
expect(screen.getByTestId("lane-detail").parentElement).toHaveClass("hidden");
|
||||
});
|
||||
|
||||
it("opens the session view for ?run=, and the back button returns home", async () => {
|
||||
it("opens the session view for ?run=, headed by the tab bar alone", async () => {
|
||||
render(
|
||||
<MemoryRouter initialEntries={["/workspace?lane=1&run=agenthub-lane-1"]}>
|
||||
<Workspace />
|
||||
@@ -622,8 +615,10 @@ describe("Workspace — home and session view", () => {
|
||||
await settle();
|
||||
expect(screen.queryByTestId("workspace-home")).toBeNull();
|
||||
expect(screen.getByTestId("lane-detail").parentElement).not.toHaveClass("hidden");
|
||||
await userEvent.setup().click(screen.getByTestId("workspace-back-home"));
|
||||
expect(await screen.findByTestId("workspace-home")).toBeInTheDocument();
|
||||
// No header row (status, back arrow, name) and no pane header: the tab bar is it.
|
||||
expect(screen.queryByTestId("workspace-back-home")).toBeNull();
|
||||
expect(screen.queryByText(/^Run /)).toBeNull();
|
||||
expect(screen.getByTestId("console-tab-new")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("opens an ended session's replay for ?session=, hiding (not unmounting) the console", async () => {
|
||||
|
||||
Reference in New Issue
Block a user