Skip to content

fix(build): add 'Keep going' button to resume stalled generation (#1038) - #1040

Merged
developer-ainative merged 1 commit into
mainfrom
fix/1038-resume-autoplay-button
Oct 9, 2026
Merged

developer-ainative merged 1 commit into
mainfrom
fix/1038-resume-autoplay-button

Conversation

@developer-ainative

Copy link
Copy Markdown
Contributor

Summary

Confirmed live tonight (#1038): once a build's `state.auto` becomes `false` — via "Take the wheel," or simply resuming an in-progress build in a new session — artifact generation stops completely and permanently, with no error and no UI path back. The `KEEP_GOING` reducer action (`auto: true`) was already fully implemented but had zero callers anywhere in the component tree.

This PR implements only the conservative fix: a "Keep going →" button wired to the existing `KEEP_GOING` dispatch, shown whenever paused with real work remaining (reuses the exact same "track has undone views" check `useAutoplay.ts` already uses, rather than reinventing it).

Deliberately out of scope: the issue's second suggested direction — decoupling manual `Next ›` navigation from the `auto` gate so on-demand per-view generation could happen independent of autoplay — needs a real product decision and is left untouched in #1038 for that call.

Test plan

  • `npx vitest run tests/components/build/ArtifactFrame-keep-going.test.tsx` — 5/5 pass (TDD red confirmed first)
  • Full suite — 6889 passed, same pre-existing failures (verified via stash/pop, none touch the changed files)
  • `npx tsc --noEmit` — clean
  • Real Playwright verification against a local dev server, reached through the real `?screen=ws&company=...&view=...` deep-link path (no mocking of the component tree): reproduced the bug (0/7 drafted, stuck placeholder, zero generation requests), confirmed the new button appears, clicked it, confirmed real `POST /api/build/artifact` requests fired and autoplay correctly advanced through the undone sequence — including gracefully surfacing the existing retry/fail UI for a view that hit a genuine local-dev credential error, rather than hanging again

Closes (partially) #1038 — the decouple-from-autoplay question stays open for a product decision

Once state.auto became false — via "Take the wheel" or via resuming an
in-progress build (START_BUILD's resume path deliberately leaves
auto:false per #1033) — artifact generation stopped permanently. The
KEEP_GOING reducer action already existed and flips auto back to true,
but nothing in the component tree ever dispatched it.

Add a "Keep going" button to ArtifactFrame's paused-nav row, shown
whenever the build is paused and the active track still has
undone/non-errored views remaining (same trackViews(track) lookup
useAutoplay.ts uses to decide a track is finished). Clicking it
dispatches KEEP_GOING, which flips auto back to true and lets
useAutoplay's own gate resume driving generation from wherever the
sequence left off.

Live-verified against a local dev server: seeded a paused, unfinished
build via the existing ?screen=ws&company=&view= deep-link path (which
itself dispatches TAKE_THE_WHEEL), confirmed no /api/build/artifact
requests were firing, clicked Keep going, and watched autoplay resume
driving the full undone sequence — real /api/build/artifact POSTs
fired, the design/thesis/wedge views advanced in order, and genuine
provider failures (local-dev-only, no AI credentials configured) were
retried and surfaced through the existing GEN_FAIL path rather than
hanging, exactly as useAutoplay already handles elsewhere.
@developer-ainative
developer-ainative merged commit cc090f3 into main Oct 9, 2026
1 check passed
@developer-ainative
developer-ainative deleted the fix/1038-resume-autoplay-button branch October 9, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant