Tracking a known gap deferred from #150 ("Generate spec" CTA).
Problem
The "Generate spec" CTA (#150) starts a room-scoped agent turn that writes requirements/requirements.md into the live collab doc. That doc only commits ~60s later (committer debounce), and hasSpec on GET /projects/{p}/status is computed from git HEAD — so hasSpec stays false for the whole generation window. If the user navigates back to the project overview mid-generation, the Spec card still shows "Generate spec", and a second click starts a duplicate, racing turn against the same room.
#150 ships without a guard (deliberately, to keep it simple).
Proposed fix (later)
A BE-side in-flight signal so the console can reliably disable the CTA while generation is running — e.g. ProjectStatus reflects a "generating"/in-progress state (a phase value or a dedicated boolean) that flips when a generation turn is dispatched and clears when it commits or fails. The console then renders a disabled "Generating…" state instead of the CTA.
Client-only alternatives considered and rejected for now: reading the agent-chat store's active-turn state (couples the card to the chat feature), or a localStorage "generation-started" flag (goes stale if a turn fails). A BE signal is the durable fix.
Links
Tracking a known gap deferred from #150 ("Generate spec" CTA).
Problem
The "Generate spec" CTA (#150) starts a room-scoped agent turn that writes
requirements/requirements.mdinto the live collab doc. That doc only commits ~60s later (committer debounce), andhasSpeconGET /projects/{p}/statusis computed from git HEAD — sohasSpecstaysfalsefor the whole generation window. If the user navigates back to the project overview mid-generation, the Spec card still shows "Generate spec", and a second click starts a duplicate, racing turn against the same room.#150 ships without a guard (deliberately, to keep it simple).
Proposed fix (later)
A BE-side in-flight signal so the console can reliably disable the CTA while generation is running — e.g.
ProjectStatusreflects a "generating"/in-progress state (aphasevalue or a dedicated boolean) that flips when a generation turn is dispatched and clears when it commits or fails. The console then renders a disabled "Generating…" state instead of the CTA.Client-only alternatives considered and rejected for now: reading the agent-chat store's active-turn state (couples the card to the chat feature), or a localStorage "generation-started" flag (goes stale if a turn fails). A BE signal is the durable fix.
Links