Library: Quit asks before discarding an open resource editor, and Use with transcripts says the skill is chosen
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Swift
- Stelle
- 0
- Fork
- 1
- Merge medio
- 12h 29m
- PR unite (30g)
- 201
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Ship-Work/workbench
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue help wanted
Difficoltà 2/5 Mezza giornata Idoneità per principianti 74/100
Ship-Work/workbench#29 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
-
Persona: Show with nothing to show says why, Remove group… asks first, and an unsaved layout survives leaving the pageForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Ship-Work/workbench
Issue simili
-
builtin-port enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
cmlarsen/writemorebetter#235 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
callstack/agent-device#3627 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
maziyarpanahi/openmed#4207 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
open-telemetry/opentelemetry-swift#1235 · 1 reazione ·
I maintainer di solito rispondono entro 4 giorni