Read: preserve draft and playback when loading text from History or Saved resources
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- macos, swift
- Domain
- audio-video-rtc, desktop
Research direction
Start with the History and Saved resources actions in Sources/LocalVoice/CaptureHistoryView.swift and DemoLibraryView.swift, then read the import decision and replacement logic in AppModel.swift. Check ReadSelectionChecks and add shared-owner plus native entry-point coverage for idle, playing, paused, and generating states. Done means Keep preserves the current reading and playback, while Replace installs the chosen text, stops old playback, and prevents stale generation results from affecting it.
Written by the indexing model from the issue text.
Description
Outcome and priority
P1 functional defect. Choosing Read aloud elsewhere can silently replace the saved draft while the page still displays the previous reading and paused transport.
Native reproduction
Preview 2.3.0, build 20260928054038, clean source 00be555139f87d4557f48fcffc132b8621c251a2; macOS 26.5.1 (25F80), built-in display. Verified through Copy build details in the running app and bundle metadata.
- In Read, enter synthetic passage A (274 characters), Listen with Mac voices, then Pause at about 0:06 of 0:18.
- Open Saved resources, select a different prompt B (22 characters), and click Read aloud.
- No Replace/Keep choice appears. The page still shows highlighted A and Resume at 0:06/0:18, but the character count is 22.
- Stop reveals editable B. A was replaced behind the paused display.
Original draft, voice and rate were restored, and synthetic playback stopped. Screenshots/AX receipts stay private. Audible output and export were not independently checked.
History has the same direct assignment in source; that entry point was not separately exercised.
Source owner and bounds
Library action and History action directly set speechText. speechText persistence does not resolve playback. Read's displayed text can still be playingTrack.text while draft-based controls use B.
Reuse the existing reading-import decision and confirmed replacement. Source inspection shows Save audio checks the full signature before reusing audio, so this is not evidence that cached A is exported as B. It can generate B while the page still shows A; that mismatch belongs to this request.
Chosen behaviour
Every Read import uses one state owner. If current nonempty text differs, show the existing Replace reading / Keep current choice.
Keep current preserves exact draft, player/generation and playback position. Replace stops old playback/generation, invalidates stale audio/progress and any stale selection review, rejects any late completion from the old generation, displays the chosen text immediately, and waits for Listen. Identical text does not restart playback. An empty draft can accept new text directly. Import does not silently send text to an online provider.
Acceptance
- Exercise History and Saved resources with idle nonempty, playing, paused and generation-in-progress Read states.
- Keep preserves text and position; Replace makes text/count/progress/next action agree and leaves playback stopped.
- Replacing during generation cancels the old operation where supported and detaches its results before installing the new draft. Late A completion cannot restore A audio, progress or errors over B. Keep current preserves A generation. Reuse/coordinate #16 for local cancellation rather than relying on invalidateAudio alone.
- Identical imports do not restart; empty imports follow existing empty-text validation.
- A pending macOS Service review cannot remain attached to unrelated imported text.
- Save audio and playback use the content clearly presented after the decision, including the Mac and online provider state models.
- Add meaningful shared-owner checks and native entry-point coverage. Existing ReadSelectionChecks alone do not prove the History/Library wiring.
- Record signed installed retest with Copy build details.
Coordination
New request under #164, related to #134 and #17's safe Service behavior. #161 owns a different audio-source exception path. Coordinate AppModel edits with other recovery work.
- Dominant language
- Swift
- Stars
- 0
- Forks
- 1
- Avg merge
- 8h 5m
- Merged PRs (30d)
- 215
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Ship-Work/workbench
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 Half a day Newbie friendliness 74/100
Ship-Work/workbench#29 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
Maintainers usually reply within 1 day
All issues in Ship-Work/workbench
Similar issues
-
Review backlog (style): Test helper still reads stdout after waitUntilExitPossibly taken @hivecommons-hive claimed this today. Openagent/reviewer help wanted hive/claimed-by-scanner stage/030-pr-in-progress
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
hivecommons/hotshot#243 · 1 comment ·
Maintainers usually reply within 1 day
-
Ctrl+C while pictures are drawing also kills the image worker (traceback, story ends partial/failed)Openlow-priority
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
jessvb/tiny-talk-adventures#92 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug tests
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jonathanong/no-mistakes#2261 ·
Maintainers usually reply within 1 day