feat(status-ui): add compact session status strip

This commit is contained in:
2026-08-25 18:32:33 +02:00
parent 166b065ad4
commit 612b146fd6
5 changed files with 332 additions and 105 deletions
+14 -3
View File
@@ -92,6 +92,13 @@ describe("App command progress and errors", () => {
});
});
it("shows explicit Pi readiness in the compact session status", () => {
render(<App />);
const status = screen.getByRole("status", { name: "Session status" });
expect(status).toHaveTextContent("Pi ready");
expect(status).toHaveTextContent("Ready for your next prompt");
});
it("shows restart progress until the replacement snapshot is restored", async () => {
const user = userEvent.setup();
const restart = deferred<unknown>();
@@ -211,9 +218,13 @@ describe("App command progress and errors", () => {
expect(screen.getByLabelText("Prompt")).toBeDisabled();
expect(screen.getByRole("button", { name: "Sending…" })).toBeDisabled();
expect(screen.getByText("Sending your prompt…")).toBeInTheDocument();
expect(screen.getByText("Working", { selector: ".state-pill" })).toHaveClass(
"working",
);
const sessionStatus = screen.getByRole("status", { name: "Session status" });
expect(sessionStatus).toHaveTextContent("Working");
expect(sessionStatus).toHaveTextContent("Sending prompt to Pi…");
expect(sessionStatus).toHaveTextContent("Bridge");
expect(sessionStatus).toHaveTextContent("ready");
expect(sessionStatus).toHaveClass("working");
expect(rendered.container.querySelector(".status-row")).toBeNull();
await act(async () => {
submissionA.resolve({ delivery: "prompt" });