feat(frontend): rotating activity icon + 5-line expandable activity panel

- CentralStatus: replace the red pulsing dot at the start of the "working" line
  with the rotating WorkingSpinner, now a button that opens the model-activity
  panel (onOpenActivity). WorkingSpinner is extracted to its own module (was
  local to AppShell).
- ModelActivityPanel: show the last 5 lines of the model-stream tail (refreshing
  as the stream grows) with an expand toggle to the full stream, replacing the
  unbounded full transcript.
- AppShell: drop the separate spinner button (the inline icon is now the single
  trigger) and the local WorkingSpinner def.
- Remove the now-orphaned Transcript.tsx (its only consumer was the panel).

TDD: CentralStatus + ModelActivityPanel tests RED->GREEN; frontend suite 87/87;
tsc clean. Live visual verification pending (to do with the B/C frontend pass).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-30 16:26:43 +02:00
co-authored by Claude Opus 4.8
parent c12bdcd257
commit 0eeb3f7522
7 changed files with 115 additions and 70 deletions
+10 -1
View File
@@ -1,10 +1,19 @@
import { render, screen } from "@testing-library/react";
import { beforeEach } from "vitest";
import userEvent from "@testing-library/user-event";
import { beforeEach, vi } from "vitest";
import { useSessionStore } from "../store/sessionStore";
import { CentralStatus } from "./CentralStatus";
beforeEach(() => useSessionStore.getState().resetSession());
test("the working activity icon opens the model-activity panel", async () => {
const onOpenActivity = vi.fn();
useSessionStore.getState().applyEvent({ type: "text_delta", text: "reading the schema" });
render(<CentralStatus working onOpenActivity={onOpenActivity} />);
await userEvent.click(screen.getByRole("button", { name: /model activity/i }));
expect(onOpenActivity).toHaveBeenCalledTimes(1);
});
test("renders nothing when not working and there is no user entry or step messages", () => {
const { container } = render(<CentralStatus working={false} />);
expect(container).toBeEmptyDOMElement();