Library: Quit asks before discarding an open resource editor, and Use with transcripts says the skill is chosen
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
Start with applicationShouldTerminate in main.swift (around lines 736-744) and the draft state in DemoLibrary.swift and DemoLibraryView.swift (around lines 333-370), then read the existing discard prompt in CaptureImagePreview.swift. For the second part, read prepareSkill in PackLibraryModel.swift (around line 252) and the History notice in HandoffJobs.swift. Done when the new cases in DemoLibraryChecks and PackLibraryChecks pass, and the native checks in the issue (⌘Q with an open edited prompt, and Use skill on a transcripts skill) behave as described.
Written by the indexing model from the issue text.
Description
Outcome: text typed in Library's editor survives an accidental ⌘Q, and choosing a transcript skill in Packs says what happened and what to do next.
1. Quit asks before discarding the resource editor
- Problem: the editor keeps every edit only in the sheet's
@State(DemoLibraryView.swift:333-337; the prompt editor at :348) until Save (:370).applicationShouldTerminate(main.swift:736-744) asks first only for Snap & Talk narration (:737) and the Snap draft (:743), then returns.terminateNow.- So ⌘Q (main.swift:491), the panel's Quit (WorkbenchQuickPanel.swift:130), log out and restart all silently discard up to 50,000 characters (DemoLibrary.swift:14).
- Only update restarts wait for an attached sheet (main.swift:370).
- Change:
- DemoLibraryModel (near DemoLibrary.swift:249):
- a non-
@PublisheddraftWorkingCopy, set bynoteDraftEdit(_:), which ignores another id; - cleared in
draft's didSet; hasUnsavedDraft, and anapproveDiscardseam for checks;canTerminate()asks "Discard your changes to this ?" with Keep editing and Discard, and never clears the draft. This is the rule CaptureImagePreview.swift:579-590 follows.
- a non-
- DemoResourceEditor:
.onChange(of: item)reports each edit. Init seeds from a matching working copy, so Keep editing shows the kept text. - main.swift: one guard after :743. When the editor has unsaved changes and Keep editing is chosen, it opens Library and returns
.terminateCancel. No other ordering changes.
- DemoLibraryModel (near DemoLibrary.swift:249):
- Check: new cases in DemoLibraryChecks.runModelChecks, run by
LocalVoice --check-library:- no draft, or an unchanged draft: allows Quit without asking;
- changed, then Keep: refuses Quit, with the draft unchanged;
- changed, then Discard: allows Quit, with the draft still set;
- saved or cancelled: allows Quit without asking;
- an edit for another id is ignored.
2. Use with transcripts confirms the choice
- Problem: a transcripts-only skill's Use skill sets only an in-memory
preferredTranscriptSkillID(PackLibraryModel.swift:252) and opens History on All (:264; AppModel.swift:888). No message appears.- The Snap & Talk branch confirms its choice (:251).
- The choice is read only when Hand off opens (WorkbenchHome.swift:251), so the click looks like it did nothing.
- Change:
prepareSkilltakes an optionalhandoffJobs. On a successful transcripts choice it sets the existing History caption (HandoffJobsModel.notice, HandoffJobs.swift:453; shown at HistoryView.swift:381) to " is chosen for Hand off. Select transcripts, then Hand off…", using the title the Hand off picker shows.use()opensHistoryDoor(filter: .transcripts).- The choice is not stored across launches.
- Check: PackLibraryChecks, run by
--check-readback-pack:- a refused choice sets no notice;
- a transcripts choice sets the preference and a notice naming the skill and "Hand off…";
- a Snap & Talk choice leaves the History notice empty.
Native checks owed
- ⌘Q, and the panel's Quit, with a changed prompt open: the question appears. Keep editing returns to the text. Discard quits.
- Library › Packs › a transcripts skill › Use skill: History opens on Transcripts with the line, and Hand off… starts on that skill.
Value before scope
- Outcome: typed prompt text is never lost silently, and a skill choice confirms itself. Evidence: the traced paths.
- Simpler route: the Snap draft's quit question, and History's existing handoff caption.
- Owner: DemoLibraryModel and PackLibraryModel.
- Complexity: no new control, setting or stored default.
- Verified by: --check-library and --check-readback-pack.
Grammar: Quality.
Sequencing: the main.swift guard lands after the #330 branch, which changes the same function.
Not claimed here: leaving Library through a panel or shortcut door while the sheet is open.
Refs #279
Build-ready record from the overnight lead session of 15 Oct 2026 (round two), verified against main edc15df by an independent skeptic per item. Implementation follows on a claude/* branch; this issue closes only after native acceptance.
Build-ready record from the overnight lead session of 15 Oct 2026 (second discovery round), verified against main edc15df by an independent skeptic per item. This issue closes only after native acceptance.
- Dominant language
- Swift
- Stars
- 0
- Forks
- 1
- Avg merge
- 12h 29m
- Merged PRs (30d)
- 201
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 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 4/5 3-5 days Newbie friendliness 18/100
Maintainers usually reply within 1 day
-
Persona: Show with nothing to show says why, Remove group… asks first, and an unsaved layout survives leaving the pagePossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
All issues in Ship-Work/workbench
Similar issues
-
builtin-port enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cmlarsen/writemorebetter#235 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstack/agent-device#3627 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
maziyarpanahi/openmed#4207 · 1 comment ·
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
meshtastic/Meshtastic-Apple#2603 ·
Maintainers usually reply within 1 day