Repository navigation
Remove the not-captured calendar gap UI from conversations - #20884
Merged
Git-on-my-level merged 3 commits intoOct 7, 2026
Merged
Conversation
Member
Author
|
Lane verdict chain (head
|
Member
Author
|
Full review chain for head
Merge gated on full CI green for |
Git-on-my-level
added a commit
that referenced
this pull request
Oct 7, 2026
## What changed and why Hardens the never-lose-audio paths on the phone: - **Capture liveness watchdog**: while the coordinator believes capture is live, a watchdog now detects "socket down or no audio frames flowing" and forces recovery at a WAL boundary instead of silently continuing to believe audio is being captured. - **Stale-WAL reconciliation**: local WALs stuck in `miss` past a threshold are reported at startup/foreground instead of only retrying silently, so uploads that never land are visible. - **Calendar capture-gap monitor**: while a calendar meeting the user is attending is active and capture is not owning, the app records a capture-gap signal through the existing calendar capture telemetry — post-capture visibility, not the conversation-list placeholders removed in #20884. - **Backend loss accounting**: conversation finalize emits a counter with `capture_evidence.coverage` and covered-span vs wall-span seconds, so partial captures are countable in metrics. ## Why A real 120-minute meeting produced zero server-side audio for its first 70 minutes (device made no server contact), and nothing in the product noticed. The server cannot transcribe audio it never receives, so the fix is at the capture client: notice silence-while-live, surface not-owning-during-meeting, and account for partial coverage server-side. ## Failure-Class Failure-Class: none ## Product invariants affected - INV-CAP-1 — this PR's diff touches `app/lib/services/capture/**` and `app/lib/services/wals/**`. It adds no pause, unsubscribe, or fence: the watchdog only forces recovery (WAL finalize + new session) when frames have already stopped flowing, and the gap monitor is telemetry-only. Every audio frame captured still reaches the socket or a durable WAL write; nothing discards frames. - INV-MEM-4 — `backend/utils/conversations/process_conversation.py` is in its path globs. The change adds a telemetry emission next to finalization; it does not create an intake route, promote, archive, or fast-track any memory, and canonical intake routing is untouched. - INV-TASK-2 — `backend/utils/conversations/process_conversation.py` is in its path globs. The change adds no capture proposal surface; task suggestion policy and its Suggested surfaces are untouched. ## Line-Count-Exception Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 4081 -> 4211 | watchdog state hooks, suspension invalidation and socket-aware recovery callbacks; split deferred to the #9838 follow-up Line-Count-Exception: app/lib/services/capture/capture_coordinator.dart | 2842 -> 2932 | watchdog wiring, socket-aware recovery dispatch and suspension-gap tracking Line-Count-Exception: app/lib/services/wals/local_wal_sync.dart | 2576 -> 2636 | stale-miss reporting and reconciliation on startup and foreground Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3574 -> 3577 | three-line coverage counter emission at conversation finalize ## Test plan - `app`: capture/watchdog/WAL-stale suites — 138 spine + 412 affected tests pass (coordinator re-runs the load-bearing subset before review) - `backend`: `tests/unit/test_capture_loss_accounting.py` — 14 passed ## UI-Evidence UI-Evidence: none -- no user-visible surface changed in this PR; the gap monitor is telemetry-only and recovery is behavior-preserving at equal UX. ## Known limitations - The watchdog detects loss while the app runs; a killed/backgrounded app before capture starts is covered by the calendar gap monitor's signal, not prevention — prevention (meeting-aware capture nudge) is a follow-up. - Backend counter is in-process until scraped; no dashboard yet. ## Review round 1 fixes (grok REQUEST CHANGES → addressed) - P1: calendar gap polling now only fires for locally known uncaptured meetings (from cached calendar-list responses), with 60s→10min exponential backoff — zero steady-state polling when no meeting is imminent or capture is owning (b92a4d2). - P2: liveness failures now carry the observed wall-gap and are invalidated across app suspension; `onAppResumed` clears pending failures before the reducer can apply them — no mid-sentence mic stop after screen lock (0f58880). - P2: recovery branch chosen from current socket readiness at check time; socket-down prefers reconnect, and a keepalive-restored socket discards a queued failure instead of restarting the mic (f9e1475). - P3: finalize accounting test now exercises the internal Pydantic `CaptureEvidenceMetadata` path (faf763f).
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.
Summary
Remove the mobile Conversations list placeholders for calendar meetings that were not captured, and delete the client models, fetch, and localization that only existed to render them. Server-side calendar capture gaps, including the discard override and
GET /v1/calendar/capture-gaps, stay in place.Product invariants affected
None. This removes a read-only UI surface (calendar capture-gap placeholders)
and its dead client plumbing; conversation processing, the calendar discard
override, and the capture-gaps HTTP endpoint are unchanged.
Test plan
cd app && bash test.sh(exit 0; spine suite printed00:32 +138: All tests passed!)flutter analyzeon the touched Dart sources reports only the pre-existingconstant_identifier_namesinfos already counted inapp/analysis_baseline.jsongrep -rn "aptureGap" app/lib app/testreturns no hits