Speaker inbox: keep name draft until deferred save confirms, surface failures inline#1063
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
SpeakerVoiceToNameRow.saveName()cleared the typed name immediately, whileSpeakerPeopleSettingsViewModel.namePendingReviewItemran off-main and could fail entirely —TranscriptSaver.updateDeferredSpeakerNamereturnsfalsewhen 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
meetingsWhat changed
SpeakerPeopleSettingsViewModel.namePendingReviewItemgained an optionalcompletion: ((Bool) -> Void)?that reportsallTranscriptUpdatesSucceededon the main queue right after the refreshed snapshot is applied (the empty-name guard also reportsfalseso the callback can't be silently dropped).SpeakerVoiceToNameRowkeeps 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.isSavingflag that disables the save button (label flips to "Saving…") and guardsonSubmit, so a save can't double-fire while one is in flight.onChange.Reviewer note: this relies on
SpeakerPendingReviewItem.idbeing 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.shbash build.sh --no-openbash run-tests.sh(4574/4574 passed)bash build.sh --no-openruns the bundle gate)bash run-integration-smoke.shif I touchedSources/Meeting/orSources/TranscriptedCore/— not touchedswift testif I touchedPackage.swift,Sources/TranscriptedCore/, or the public core seam — not touchedRisk Review
.agent-review/visuals/evidence — failure state needs a moved/deleted transcript to reproduce; not capturedNotes
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