feat: add workspace management editor

This commit is contained in:
2026-08-04 06:27:59 +02:00
parent b686ffe271
commit 48fd316b90
10 changed files with 744 additions and 7 deletions
@@ -18,6 +18,7 @@ beforeEach(() => {
(globalThis as any).EventSource = FakeEventSource;
useSessionStore.getState().resetSession();
server.use(
http.get("http://localhost:8787/me", () => HttpResponse.json({ issuer: "test", subject: "test", displayName: "Test", isAdmin: false })),
http.get("http://localhost:8787/sessions", () => HttpResponse.json([])),
http.get("http://localhost:8787/settings", () =>
HttpResponse.json({ workspace: "default", provider: "test", model: "test", thinking: "low" })),
@@ -148,6 +149,19 @@ test("model selector shows the three Pi-enabled models and stores the selected p
}));
});
test("opens Workspace management from the right sidebar without interrupting the shell", async () => {
server.use(
http.get("http://localhost:8787/workspace-registry/status", () =>
HttpResponse.json({ branch: "main", ahead: 0, behind: 0, degraded: false })),
);
renderShell();
await userEvent.click(screen.getByRole("button", { name: "Workspace management" }));
expect(await screen.findByRole("heading", { name: "Workspace management" })).toBeVisible();
expect(screen.getByTestId("app-shell")).toHaveAttribute("data-activity-layout", "closed");
});
test("marks the composer as awaiting input for a pending freetext gate", () => {
useSessionStore.setState({