feat(frontend): minimal central area; WIP icon above composer toggles model-activity panel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 21:47:50 +02:00
co-authored by Claude Sonnet 4.6
parent b391101a5d
commit feda972a08
2 changed files with 46 additions and 8 deletions
@@ -78,6 +78,23 @@ test("a failed resume keeps the panel open and does not activate the session", a
await waitFor(() => expect(screen.getByText("Domanda originale")).toBeInTheDocument());
});
import { act } from "@testing-library/react";
import { useSessionStore } from "../store/sessionStore";
test("WIP icon toggles the Model activity panel and shows the streamed text", async () => {
wrap();
// Activate a session by opening + resuming is heavy; instead drive the store directly.
// The WIP icon only renders with an active session, so simulate one via Resume.
server.use(http.post("http://localhost:8787/sessions/:id/resume", () => new HttpResponse(null, { status: 204 })));
await userEvent.click(await screen.findByText("Attiva uno")); // opens docs panel
await userEvent.click(await screen.findByRole("button", { name: /resume/i })); // active session
act(() => { useSessionStore.getState().applyEvent({ type: "text_delta", text: "Looking at dim_patient." }); });
// Model activity hidden until the WIP icon is clicked
expect(screen.queryByText(/Looking at dim_patient/)).not.toBeInTheDocument();
await userEvent.click(screen.getByRole("button", { name: /model activity/i }));
expect(await screen.findByText(/Looking at dim_patient/)).toBeInTheDocument();
});
test("renaming a group reassigns its members via setSessionGroup", async () => {
const groupSets: Array<{ id: string; group: string }> = [];
server.use(