Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Library: Quit asks before discarding an open resource editor, and Use with transcripts says the skill is chosen

Aperta
#341 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@EthDawg ci sta già lavorando.

Dal 14/10/2026.

  • #350 di @EthDawg — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
22/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
swift
Ambito
desktop

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

bug

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-@Published draftWorkingCopy, set by noteDraftEdit(_:), which ignores another id;
      • cleared in draft's didSet;
      • hasUnsavedDraft, and an approveDiscard seam 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.
    • 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.
  • 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:
    • prepareSkill takes an optional handoffJobs. 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() opens HistoryDoor(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
  1. Outcome: typed prompt text is never lost silently, and a skill choice confirms itself. Evidence: the traced paths.
  2. Simpler route: the Snap draft's quit question, and History's existing handoff caption.
  3. Owner: DemoLibraryModel and PackLibraryModel.
  4. Complexity: no new control, setting or stored default.
  5. 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Ship-Work/workbench

Tutte le issue di Ship-Work/workbench

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.