Repository navigation
Show verified live speech and generate a recap when Summary opens - #25771
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 768e00cd59
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!_canShowLiveContent || | ||
| (_requestSpeech != null && !listEquals(_requestSpeech, _speechSnapshot(widget.conversation)))) { | ||
| _stopRequest(); |
There was a problem hiding this comment.
Keep live recap requests running across append-only speech updates
If new speech lands during generation, the page's 15-second LiveConversationRefresher supplies a longer transcript and this full-list comparison cancels the recap request, even when every covered segment is unchanged. Cancellation prevents the backend stream from publishing its result, and _attemptedLiveRecap prevents another automatic attempt on subsequent Summary openings. An actively speaking user can therefore repeatedly lose generation before seeing a recap. Allow a verified append-only extension while continuing to reject corrections to the covered prefix; the backend already supports storing such results with their original coverage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 1dae9f6. A strictly later append keeps the request alive and retains the original coverage. Covered speech edits still invalidate it. The Flutter regression appends speech before the done frame, then checks a correction.
| 'id', | ||
| 'created_at', | ||
| 'started_at', | ||
| 'v3_recording_ids', |
There was a problem hiding this comment.
Preserve covered recap provenance when recording IDs are appended
When an ongoing conversation gains another recording, planner.build appends its ID to v3_recording_ids while retaining the existing conversation and transcript prefix. Including the entire growing list in the immutable fingerprint makes read_live_summary reject the previously saved recap immediately; it also makes _strict_live_append reject generation spanning that transition. This affects recording rotation and reconnect continuations even when the covered speech is unchanged, so a valid coverage-labelled recap disappears during normal capture. Validate that the covered recording provenance is preserved rather than requiring the complete current ID list to equal the original list.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 1dae9f6. The receipt records its covered recording-ID prefix length and hashes the covered prefix. A later recording ID can extend it, while replacement or reordering of a covered ID invalidates it. Verified against the actual Firestore emulator transaction.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c194d2fe14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| onLiveEnd: () { | ||
| _liveEndRequested = true; | ||
| _summaryOpenPending = false; |
There was a problem hiding this comment.
Reset the recap suppression flag after a failed End
If End's WAL drain fails and the conversation remains live, _liveEndRequested stays true for the rest of the page's lifetime. _summaryTabIsVisible() consequently always returns false, preventing both subsequent Summary openings and the visible Update/Try Again button from requesting a recap (_catchUp checks that visibility through _currentLiveTarget). The End button restores its own state when the drain settles, but nothing resets this page-level flag. Clear the suppression when finalization fails or settles without ending the conversation so recap generation remains usable without closing and reopening the page.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 7d3b021. When End settles with the same capture still present, the detail page restores recap eligibility and clears pending tab intent. A successful End keeps recaps suppressed. The two full-route regression cases verify that settling never starts a request and that a subsequent deliberate Summary opening works after an unsuccessful End. All 19 Home widget cases and the Dart analyzer ratchet passed.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
/approve-ui 2010810 |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
|
/approve-ui 2b1a6d2 |
## Summary Generate port task drafts when a merged Python PR changes finalization or batch behavior. The map covers all 34 finalization and 41 batch runtime Python sources cited by the [landed contracts](#25802), plus imported family policy and implementation. The [scope document](https://github.com/BasedHardware/omi/blob/9554967bf78fab4d18b1504a7ef19b31e46141af/backend-go/docs/port-map-scope.md) records the boundaries and exclusions. The PR branch includes `main` at contracts merge `97b4059861a7`. The batch map includes the projection kill-switch defaults introduced upstream in #25791. The Backend Go Checks workflow runs the Python suite when these files change in a PR. On each main push, it walks the pushed first-parent merge commits, looks up their merged main PRs, and checks the complete paginated file list against GitHub's `changed_files` count before drafting. The CLI also rejects duplicate filenames in a counted input and uses both sides of renames. The job prints JSON and uses read-only permissions. Tracker writes are outside this change. [Commit-to-PR API](https://docs.github.com/en/rest/commits/commits#list-pull-requests-associated-with-a-commit) · [PR files API](https://docs.github.com/en/rest/pulls/pulls#list-pull-requests-files) ## Verification - Nine focused tests exercise family matching, renames, duplicate or truncated file lists, malformed inputs, task text, existence of every mapped file, and coverage of the checked-in batch contract. Run `python3 -m unittest discover -s .github/scripts -p test_go_port_tasks.py -v`. - `actionlint .github/workflows/backend-go-checks.yml` passed. Ran the workflow's push steps locally over three real first-parent merges and verified Go test selection on Go and Python-only ranges. - `cd backend-go && TEST_FIRESTORE_REQUIRED=1 make check` passed with Postgres 16 and the Firestore emulator. - Compared both map families to every runtime Python citation in the landed contracts. Replaying merged PR #25791 also matched the new batch projection kill switch. - Repository preflight and `gh pr checks 25810 --watch` passed at head `9554967bf7`. Local preflight skipped the 90-day failure-class ratchet because the checkout is shallow. [Backend Go Checks](https://github.com/BasedHardware/omi/actions/runs/44627579785) ## Product invariants affected none ## Examples from merged PRs ```bash count=$(gh api "repos/BasedHardware/omi/pulls/$PR" --jq .changed_files) gh api --paginate --slurp "repos/BasedHardware/omi/pulls/$PR/files?per_page=100" | jq 'add' | python3 .github/scripts/go_port_tasks.py --pr "$PR" --changed-files "$count" ``` ### PR #25771 ```json [ { "family": "finalization", "title": "Port Python PR #25771 to Go finalization", "body": "Python PR [#25771](#25771) changed `backend/database/conversations.py`, `backend/models/conversation.py`, `backend/utils/conversations/process_conversation.py`, `backend/utils/conversations/render.py`, `backend/utils/conversations/v3/policy.py`. Review the merged diff and port any behavior changes to the Go finalization family under `backend-go/`. Add or update parity coverage for the changed behavior, or record why the Go port needs no change.", "matched_paths": [ "backend/database/conversations.py", "backend/models/conversation.py", "backend/utils/conversations/process_conversation.py", "backend/utils/conversations/render.py", "backend/utils/conversations/v3/policy.py" ] } ] ``` ### PR #25755 ```json [ { "family": "finalization", "title": "Port Python PR #25755 to Go finalization", "body": "Python PR [#25755](#25755) changed `backend/config/merge_before_processing.py`, `backend/models/conversation.py`, `backend/models/structured.py`, `backend/utils/conversations/deterministic_minimum.py`, `backend/utils/conversations/empty_structure_minimum.py`, `backend/utils/conversations/fragment_visibility.py`, `backend/utils/conversations/historical_minimum.py`, `backend/utils/conversations/home_titles.py`, `backend/utils/conversations/merge_conversations.py`, `backend/utils/conversations/process_conversation.py`, `backend/utils/conversations/processing_trigger.py`, `backend/utils/conversations/relevance_salience.py`, `backend/utils/conversations/summary_delivery.py`, `backend/utils/conversations/sync_hold_completion.py`, `backend/utils/episodes/member_notes.py`, `backend/utils/llm/notes_short_clip_policy.py`. Review the merged diff and port any behavior changes to the Go finalization family under `backend-go/`. Add or update parity coverage for the changed behavior, or record why the Go port needs no change.", "matched_paths": [ "backend/config/merge_before_processing.py", "backend/models/conversation.py", "backend/models/structured.py", "backend/utils/conversations/deterministic_minimum.py", "backend/utils/conversations/empty_structure_minimum.py", "backend/utils/conversations/fragment_visibility.py", "backend/utils/conversations/historical_minimum.py", "backend/utils/conversations/home_titles.py", "backend/utils/conversations/merge_conversations.py", "backend/utils/conversations/process_conversation.py", "backend/utils/conversations/processing_trigger.py", "backend/utils/conversations/relevance_salience.py", "backend/utils/conversations/summary_delivery.py", "backend/utils/conversations/sync_hold_completion.py", "backend/utils/episodes/member_notes.py", "backend/utils/llm/notes_short_clip_policy.py" ] } ] ``` ### PR #25686 ```json [ { "family": "finalization", "title": "Port Python PR #25686 to Go finalization", "body": "Python PR [#25686](#25686) changed `backend/utils/conversations/lifecycle.py`, `backend/utils/conversations/process_conversation.py`, `backend/utils/conversations/v3/policy.py`, `backend/utils/conversations/v3/service.py`, `backend/utils/conversations/v3/triggers.py`. Review the merged diff and port any behavior changes to the Go finalization family under `backend-go/`. Add or update parity coverage for the changed behavior, or record why the Go port needs no change.", "matched_paths": [ "backend/utils/conversations/lifecycle.py", "backend/utils/conversations/process_conversation.py", "backend/utils/conversations/v3/policy.py", "backend/utils/conversations/v3/service.py", "backend/utils/conversations/v3/triggers.py" ] } ] ```
…ange (R29) (#25860) ## Summary This implements David's R29 ruling (2026-11-20, omi-workspace `2a41cff`). An `/approve-ui` approval now stays valid on a later head when that head only adds commits on top of the approved one and none of them touch UI. Today every new head clears the approval. On #25771 that meant two hand re-approvals after backend-only fix rounds (SCA-3062/SCA-3063). An approval carries forward only when all three conditions hold: - **Newest command is an approval:** the newest approver command on the PR is `/approve-ui` for an earlier head, and no command names the current head. Any later `/reject-ui` withdraws it. - **Descendant head:** the approved head is an ancestor of the current head (compare status `ahead` or `identical`). The compared range is then exactly approved..current. - **No UI change:** that range touches no UI path. This includes renamed paths and Swift UI detected by file contents, using the same `evidence()` reads as the main check. Anything else still needs a fresh approval: a rebase, a force-push, a UI change, a truncated or unreadable range, or a newer command on the current head. The bot notice is now posted only while approval is actually missing. ## Tests - `node --test .github/scripts/tests/ui-author-approval.test.cjs`: 23 pass, 5 of them new. The new tests cover the carry candidate rules, how `decision()` treats a carried approval, an end-to-end carry, refusals (UI, renamed UI, rebase, behind, truncated range, later reject) and the Swift content scan inside the range. - `scripts/pr-preflight`: 14 checks pass. ## Risk and rollback The gate is not loosened for UI changes. The workflow runs the script from `github.workflow_sha` (main), so this takes effect for every PR once merged. Rollback is reverting this commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
…ange (R29) David ruled 2026-11-20 (R29) that /approve-ui stays valid across heads when the UI did not change. BasedHardware#25771 needed two hand re-approvals after backend-only fix rounds. The carry applies only when: - the newest approver command on the PR approves an earlier head, and no command names the current head (any later /reject-ui withdraws it); - the approved head is an ancestor of the current head (compare status ahead/identical), so the compared range is exactly approved..current; and - that range touches no UI path, including Swift UI found by content. A rebase, force-push, UI change, truncated range or read failure still needs a fresh approval. The bot notice is posted only when approval is still missing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What changed and why
Opening a live conversation shows the current phone's transcript as soon as the authenticated recording and episode match. The detail replaces those lines when the server transcript arrives and preserves the reader's position. The Summary tab shows recent speech for short conversations. Opening the Summary tab requests the first eligible recap and shows the last time included. Saved recaps display immediately. Eligible new speech refreshes the recap every five uninterrupted minutes with Summary visible in the foreground. Leaving Summary, navigating away or backgrounding resets the interval. Only a failed request offers Try again. Opening the row on Transcript and passive detail refreshes make zero live-summary model calls.
The new stream requires the exact accessible live episode and uses the existing notes policy and lease. Cached notes live in an owner-encrypted field separate from final notes. Repeated requests can reuse the same input. Speech that arrives during generation remains in the conversation and the recap retains its original coverage.
The End action landed in #25725. This PR now targets main. Internal iOS distribution and compatible backend serving are tracked in SCA-3063. Implementation and design approval are tracked in SCA-3062.
Internal TestFlight rollout
Release pairs the signed app with a serving backend restricted to authenticated members of David’s existing internal group. Emptying the live-recap cohort disables streaming and hides saved live recaps while keeping Transcript and finished summaries available. Before distribution, Release verifies that synthetic nonmembers trigger zero provider calls and that first opens, retries, and timed requests can be joined to provider attempts, including failures. Cache reuse and lease conflicts are counted separately.
Pipeline pauses the beta on the first confirmed automatic generation outside eligible foreground Summary viewing or more than one per viewer in a rolling five-minute window. Release can disable admission immediately. Pipeline owns the server-enforced generation budget required before expansion. SCA-3063 owns backend serving, signing, processing and group availability.
Product invariants affected
INV-MEM-4 and INV-TASK-2. A live recap skips memory intake, task discovery and task writes. Finished conversations use the existing processing policy.
INV-CAP-1
How it was verified
On the m5 worker, the local Firestore emulator regression passed using synthetic speech and no provider calls. Five focused backend modules passed 205 tests covering routing, lease transactions, live capture, the wire contract and final delivery. All ten response compression tests passed. Pyright reported zero errors for the changed router, model, writer and summary orchestration modules.
The Flutter Home/detail, live recap widget and authenticated transport suites passed 60 tests on the final tab-open implementation. The suite includes canceled swipes, passive growth, account changes, End, failed hydration and deliberate retry, and reopening a saved recap. The Flutter engine rendered the four iOS-layout images below. The public OpenAPI contract and the generated Dart, TypeScript and Swift client bindings passed their checks. TestFlight distribution and real-device measurements are tracked separately on SCA-3063.
The additional routed-detail, transcript geometry and preview suites passed 114 Flutter tests. They cover first paint, replacement by the hydrated transcript, reading position within two logical pixels, redaction, owner changes and capture rollover.
On the revised five-minute refresh candidate, the Dart analyzer ratchet and 43 Flutter widget tests passed locally. The routed test counts one first-open and one additional stream request at the uninterrupted interval with new speech, zero extra requests for unchanged speech or across tab, app, and route interruptions. The rendered coverage screenshot reflects the revised screen. These synthetic checks measure request dispatch; production model work, device latency and TestFlight availability await Release.
For the internal cohort and attribution revision, 68 focused Flutter tests passed, including foreground interval rotation, missing speech, auth replay and removal of denied saved previews. The four-file synthetic backend suite passed 154 tests. Two visits on opposite sides of a five-minute bucket boundary joined to the same viewer within the rolling window. The synthetic gateway accounting recorded one successful and two failed provider attempts. Cache reuse, lease conflict, denied membership and revocation before provider dispatch made zero paid requests in their respective fixtures. Backend type checking reported zero errors. The feature registry and deployment classification checks passed. No production accounts or provider services were used in these proofs.
The independent review follow-up passed 47 Flutter tests and 117 backend tests. They cover cancellation of an active client subscription when the app leaves foreground, a transcript fallback after preview invalidation, contiguous versus overlapping new speech, and removal of generated legacy sections from serialized integration responses. An upstream provider invocation already dispatched may still finish.
The follow-up stream regressions confirm that an owner correction invalidates a saved live preview and that correction plus new speech rejects an in-flight stale result before publication.
Tests
The Firestore emulator test round-trips synthetic speech through the storage codec and actual lease transaction. It checks that a second writer cannot acquire the lease, an append preserves the original coverage, and a same-clock correction rejects stale output. Flutter tests exercise the live row, Summary and Transcript tabs, and requests across identity and navigation changes.
UI evidence
Failure class (fixes)
Failure-Class: none
Line-Count-Exception: app/lib/backend/http/api/conversations.dart | 1623 -> 1635 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: app/lib/pages/conversation_detail/conversation_detail_provider.dart | 1499 -> 1527 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: app/lib/pages/conversation_detail/page.dart | 1492 -> 1734 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 5046 -> 5082 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: app/lib/widgets/conversation_bottom_bar.dart | 1513 -> 1516 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: app/lib/widgets/transcript.dart | 1583 -> 1593 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: backend/database/conversations.py | 5292 -> 5293 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: backend/routers/conversations.py | 2957 -> 3014 | Extend the existing owning surface for authenticated live transcript and recap handling.
Line-Count-Exception: backend/utils/conversations/process_conversation.py | 3541 -> 3549 | Extend the existing owning surface for authenticated live transcript and recap handling.