fix(frontend): refine activity layout and input state

This commit is contained in:
User
2026-07-14 10:32:11 +02:00
parent 6dbf93fff9
commit 3633a5ebd9
7 changed files with 87 additions and 7 deletions
@@ -41,6 +41,8 @@ test("New session starts prewarm without delaying composer focus", async () => {
const composer = screen.getByRole("textbox", { name: /new question/i });
await waitFor(() => expect(prewarmStarted).toBe(true));
await waitFor(() => expect(composer).toHaveFocus());
expect(composer).toHaveAttribute("data-awaiting-input", "true");
expect(composer).toHaveClass("thot-awaiting-input");
});
test("shows the question and creation timer before POST /sessions resolves, then opens SSE", async () => {
@@ -87,3 +89,12 @@ test("a failed create restores the landing view and preserves the question for r
expect(useSessionStore.getState().lastUserEntry).toBeNull();
expect(FakeEventSource.instances).toHaveLength(0);
});
test("marks the composer as awaiting input for a pending freetext gate", () => {
useSessionStore.setState({
pendingWidget: { id: "free-1", widget: "freetext", title: "Clarify" },
});
renderShell();
expect(screen.getByRole("textbox", { name: /new question/i })).toHaveAttribute("data-awaiting-input", "true");
});