Skip to content

feat(review): stop a client review capture and show its progress - #1709

Merged
gregpriday merged 5 commits into
developfrom
feature/issue-1413-long-client-review-captures-offer-no-way
Nov 28, 2026
Merged

gregpriday merged 5 commits into
developfrom
feature/issue-1413-long-client-review-captures-offer-no-way

Conversation

@gregpriday

Copy link
Copy Markdown
Member

Client review captures can now be stopped, and the status says how far a capture has got, instead of one general message from start to finish.

Resolves #1413

Changes

  • Stop capture. While a capture runs, a Stop capture button sits beside the status. Stopping aborts the capture's job in the main process (Controller.stopReviewCapture, IPC project:stopReviewCapture). No more pages are pictured, and nothing of the stopped capture is kept, because the edition is assembled in staging and only moved into the reviews folder at the end. Editions captured earlier stay as they were. The result is { ok: false, stopped: true } and shows as a neutral status, not an error. An edition whose final move had already started when Stop arrived is kept whole, and the dialog reports it as captured.
  • Stop reaches only its own capture. Each capture is asked for with an ID the renderer picks. Stop carries that ID, so a capture left running by an editor that has since reloaded keeps going. Stop pressed while edits are still being saved means the capture is never requested. When saving those edits fails, the outcome says the capture was stopped and names the unsaved change.
  • Progress. The main process sends review:progress events tagged with the capture's ID: build, then capture before each picture (page, width label, pictures tried so far), then saving. The status reads "Building the website…", then "Picturing About at Desktop · 2 of 6 done", then "Keeping the edition of 6 pictures…". Events travel separately from the capture's reply, so the dialog ignores any event whose ID isn't the running capture's.
  • Stopping during the build. The website build itself (Vite) can't be interrupted. A stopped review skips the build if it hasn't started yet, and no longer waits for pending image copies before skipping it. A build already running finishes, the capture ends straight after it, and the status says "Stopping once the website is built…". A new capture is refused while a stopped one is still finishing, so two review builds never run together.
  • File → Close Project is still ignored while any dialog is open (Editor.tsx dialog guard). That rule covers every dialog, so it is unchanged. Stop gives the way out the issue asks for.

Testing

  • Own: review-edition.test.ts (stop mid-capture keeps earlier editions byte-for-byte and nothing new, a stop for another ID does nothing, a stop before or during build preparation launches no build, the progress sequence including an unavailable picture, saving sent before the edition is in place), export-modal-actions-browser.test.ts (status per phase, Stop sends the capture's ID, neutral stopped outcome with focus on it, late and foreign events ignored), review-ipc.test.ts, live-capabilities.test.ts (Stop is host-only).
  • Adjacent: review-build, review-capture, review-sheet, review-sheet-browser, export-page-check, command-menu-enter-browser: all green.
  • Impact: 68 of 671 unit test files (10%), all green. npm run typecheck green.
  • After the final rebase: own tests plus the base's newly changed tests reaching controller.ts/api.ts (11 files) green, except a flaky timing test, local-orchestrator.test.ts › "ends a reply that streams without end at the time limit…", which passes when rerun alone. That AI streaming timing path is outside this change.

Open (low)

  • When copies finish first, the abort-signal listener added by the image-copy race stays attached until the job's signal is collected (one per capture).
  • If Stop has keyboard focus when a capture succeeds and the editions list is slow to refresh, focus is briefly dropped before it moves to the outcome.

- Stop capture action, stopReviewCapture IPC and review:progress events
- Status names the build, each page and width, and pictures done
- A stopped capture keeps nothing and leaves earlier editions as they were
…asked with

- Progress travels apart from the capture's answer, so a late event of an earlier capture is not shown
… on its answer

- Stop carries the capture's id; main stops only that capture
- A review stopped while image copies are made stops waiting for them
- Stop pressed while edits save is said as stopped, with the save problem
- The Stop action goes once the capture has answered
@gregpriday
gregpriday merged commit 5b6c312 into develop Nov 28, 2026
1 check passed
@gregpriday
gregpriday deleted the feature/issue-1413-long-client-review-captures-offer-no-way branch November 28, 2026 10:32
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.

Long client review captures offer no way to stop or see page progress

1 participant