feat(status-ui): add compact session status strip
This commit is contained in:
+14
-3
@@ -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" });
|
||||
|
||||
Reference in New Issue
Block a user