Skip to content

Speaker inbox: keep name draft until deferred save confirms, surface failures inline#1063

Merged
r3dbars merged 2 commits into
mainfrom
claude/goofy-rosalind-ecb955
Jun 10, 2026
Merged

Speaker inbox: keep name draft until deferred save confirms, surface failures inline#1063
r3dbars merged 2 commits into
mainfrom
claude/goofy-rosalind-ecb955

Conversation

@r3dbars

@r3dbars r3dbars commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Why

SpeakerVoiceToNameRow.saveName() cleared the typed name immediately, while SpeakerPeopleSettingsViewModel.namePendingReviewItem ran off-main and could fail entirely — TranscriptSaver.updateDeferredSpeakerName returns false when the transcript was moved/deleted, and in that case the speaker database is never updated either. On failure the row reappeared after the next snapshot refresh with the typed name lost and no user feedback. Pre-existing behavior flagged during adversarial review of PR #1062.

Product Impact

  • Affects: meetings
  • Why this matters: users naming deferred speakers in Settings > People no longer silently lose their typed name when the underlying meeting file has moved or been deleted — they keep the draft and see why the save failed.

What changed

  • SpeakerPeopleSettingsViewModel.namePendingReviewItem gained an optional completion: ((Bool) -> Void)? that reports allTranscriptUpdatesSucceeded on the main queue right after the refreshed snapshot is applied (the empty-name guard also reports false so the callback can't be silently dropped).
  • SpeakerVoiceToNameRow keeps the draft text until the save is confirmed: it only clears on success, and on failure shows a red inline caption — "Couldn't save — the meeting file may have moved." — while preserving the typed name.
  • Added an isSaving flag that disables the save button (label flips to "Saving…") and guards onSubmit, so a save can't double-fire while one is in flight.
  • Editing the name clears the inline error via onChange.

Reviewer note: this relies on SpeakerPendingReviewItem.id being stable (speaker id + transcript path + channel + diarizer id), so when the failed row is re-emitted by the snapshot refresh, SwiftUI keeps the same row view and its @State — the draft and error survive the refresh.

How I checked it

  • scripts/dev/agent-preflight.sh
  • bash build.sh --no-open
  • bash run-tests.sh (4574/4574 passed)
  • Performance budget passed (bash build.sh --no-open runs the bundle gate)
  • bash run-integration-smoke.sh if I touched Sources/Meeting/ or Sources/TranscriptedCore/ — not touched
  • swift test if I touched Package.swift, Sources/TranscriptedCore/, or the public core seam — not touched
  • Manual check: not run (no pending deferred-review rows available in this worktree session)

Risk Review

  • Privacy / local-first behavior reviewed — no new off-device payloads; error copy is static
  • Storage path or migration impact reviewed — none
  • Public-facing copy stays concrete and matches current product scope
  • Release/update impact reviewed — none
  • Agent PRs link the issue/workpad and stay draft until human review
  • UI changes include sanitized .agent-review/visuals/ evidence — failure state needs a moved/deleted transcript to reproduce; not captured
  • No private transcripts, audio, tokens, personal paths, or customer data are included

Notes

Follow-up to the adversarial review of #1062. The failure path is easy to reproduce manually by moving a saved meeting markdown file out of the capture library and then naming its pending speaker row in Settings > People.

🤖 Generated with Claude Code

r3dbars and others added 2 commits June 10, 2026 06:04
…s inline

SpeakerVoiceToNameRow.saveName() cleared the typed name immediately while
namePendingReviewItem ran off-main and could fail (updateDeferredSpeakerName
returns false when the transcript was moved/deleted, and the speaker database
is then never updated). On failure the row reappeared after the next snapshot
refresh with the typed name lost and no feedback.

Now namePendingReviewItem reports the result back through an optional
completion called on the main queue after the snapshot is applied. The row
keeps the draft until the save is confirmed, shows a red inline error on
failure ("Couldn't save — the meeting file may have moved."), disables the
save button while a save is in flight, and clears the error when the user
edits the name.

Pre-existing behavior flagged during adversarial review of PR #1062.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-ecb955

# Conflicts:
#	Sources/UI/Settings/SpeakerPeopleSettingsSection.swift
@r3dbars r3dbars merged commit accd6ed into main Jun 10, 2026
1 check passed
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.

1 participant