Repository navigation
feat(app): show each Offline Sync recording as one row, not one per file - #20874
aryanorastar merged 5 commits into
Conversation
Capture backs audio up every 75 s and the pendant hands storage over in fixed chunks, so Offline Sync listed one continuous recording as dozens of identical 1-3 minute rows, and an afternoon the server refused as too old was ten rows with ten Delete buttons. Consecutive files from the same device and place (on the device vs on the phone) with gaps up to 120 s, the backend's default conversation_timeout, now read as one recording: start, total length and the status of its most serious file. Its one action covers the recording (Try again re-sends the failed files, Delete removes a recording nothing can move forward); tapping it lists the files, each with its own row, detail page and actions. A one-file recording keeps today's swipe-to-delete row. Adds a visual-audit scenario built from a customer's history for the before/after. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ording rows Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Reviewed the full diff — all six files. This is a careful, display-only change with real test coverage. Notes per file:
Two observations, neither blocking:
No new l10n keys, no sync/auth/protocol changes, all mutations go through existing by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile feature (Offline Sync recording-grouping UX), not a bug fix — per policy approve-only for mobile/community features (no 4/5 confidence gate applies since it's not a bug/issue fix). CI clean, no abuse signal, well-tested with before/after visual evidence. needs-maintainer-review label present so left for Nik's own merge call.
|
Follow-up to my earlier review of this head: @kodjima33's approval covers the product-semantics sign-off I asked for (120 s grouping gap, worst-file status, whole-recording delete), so I've removed The one outstanding item from that review still stands: the app CI lanes are skipped on this head, so the two new test files ( AI-generated maintainer feedback on behalf of the Omi maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Pushed
|
|
Verified on the current head (8a4af49): since the approval on 6236c6d, the branch only picked up a merge of current main plus the UI-evidence artifacts under .agent-artifacts/ui-evidence/20874/ — no feature-code changes, and the manifest's source values pass the evidence contract. Re-checked the substance of the change: recording_blocks.dart joins files into one recording only when they share a device, sit in the same place (on-device vs on-phone), and sit within the 120 s gap; the exhaustive severity switch means a future WalSyncDisplayState cannot compile without an explicit rank, so a recording can't silently read healthier than its worst part. auto_sync_page.dart keeps single-file rows exactly as before (including swipe-to-delete), gives multi-file recordings one confirmed Delete that removes all files (widget test asserts all 10 go), and the files sheet re-reads from the provider so it stays live. The unit and widget tests cover the grouping edge cases (back-to-back 75 s, 3 min chunks, gap split, different device/storage, worst-state representative). One small observation, non-blocking: _buildRecordingsHeader takes a total parameter it no longer uses (auto_sync_page.dart:431) — fine to drop whenever the file is next touched. The evidence-only delta since the approval is safe from my side; the merge call stays with a human maintainer. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Files were compared only with the last block, so phone and device copies of the same recording, or two devices recording at once, alternated in the newest-first list and each file started a new row (4 rows instead of 2). Keep one open block per device and location so interleaved files still join their own recording. Drop the unused header count parameter. Failure-Class: none Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Pushed 54f2b88: a grouping fix for interleaved files.
I did not re-run the simulator for this change: it only affects grouping logic, which the unit tests cover. |
|
Follow-up on the new head (54f2b88): the unused Re-walked the row behavior in No concerns with the grouping rework; positive signal. The human approval (kodjima33, Oct 7) predates this commit, so the merge call stays with a maintainer who has seen the interleaved-grouping behavior. (AI-generated feedback on behalf of the maintainers.) by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile Flutter UX feature (Offline Sync one-row-per-recording grouping) — feature not bug fix, approve-only per area policy; CI clean, re-confirmed on new commits.
|
Reviewed all 14 changed files against the merge base. This is a clean, cohesive fix for a real UX problem — one afternoon of recording reading as dozens of identical 1–3 min rows. What I verified:
Two non-blocking notes:
Thanks @aryanorastar — the evidence screenshots before/after make the customer impact easy to see. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
On the skipped Dart checks: I ran the suite locally on this head (54f2b88), using the same
This includes the interleaved phone/device and two-device grouping tests. I'm leaving |
|
Ran the new tests locally on 54f2b88, since CI skips them on a fork PR: |
What changed and why
What a customer sees today. Open Offline Sync and one afternoon of recording is a wall of near-identical rows:
1m 15s,1m 13s,9s,29s,3m,3m,3m… Ten rows from the same afternoon each say "Too old to sync", each with its own Delete button. A real user's history is thousands of these. Someone who doesn't know how capture works reads it as a broken app, not as backup files.Why it looks like that. Each row is a backup file, not a recording. Capture writes a phone file every 75 s (
chunkSizeInSeconds+newFrameSyncDelaySeconds), and the pendant handed storage over in fixed chunks (sdcardChunkSizeSecs, 180 s until it became 60 s). Nothing joined them back together for display.What this PR does. Offline Sync (
AutoSyncPage) now shows one row per recording:conversation_timeout. A pause short enough not to end a conversation doesn't end a recording either. Each device and place keeps its own open recording, because their files interleave in the newest-first list (the same audio on phone and device, or two devices recording at once).No new strings: the row and sheet title reuse the existing date, time and duration formatting, and the statuses reuse the existing labels.
Before / after
Same synthetic history (shaped on a customer's real Offline Sync) rendered by
app/scripts/visual_audit.shonmainand on this branch: six 75 s files today, ten 3 min files too old to sync, twelve 9 s–75 s synced files, and fourteen 3 min synced files.main), 42 rows across three screensIn the running app (iOS Simulator, iPhone 16 Pro, iOS 26.5, local emulator backend, 43 seeded files):
Product invariants affected
none
How it was verified
wals.json+ placeholder audio, viaWalFileManager.saveWalsover the VM service) and hot-restarted so the real load path picked them up. Offline Sync showed 5 rows (the lone 40 s recording stays a plain single row).wals.json(43 → 33) and their audio files from disk (43 → 33), and the "10 recordings need attention" card cleared.app/scripts/visual_audit.sh --base origin/main --head HEAD --only conversations-offline-sync-history,conversations-offline-sync-recording-files(images above). The files scenario fails onmainby design, since there is no recording row to tap there.SyncPage(devices without multi-file sync) still lists one row per file. It has the same clutter, and I left it out to keep this change reviewable. Happy to follow up with the same grouping there.recording_blocks.dart) and the page change is small, so whichever lands second merges simply.Tests
test/pages/conversations/recording_blocks_test.dart: back-to-back 75 s files make one recording; 3 min chunks join and a pause longer than the gap splits; a different device, or the device copy of phone audio, never merges; interleaved phone/device copies and two devices recording at once each group into their own recording (2 rows, not 4); a recording reports its most serious file.test/pages/conversations/offline_sync_recording_blocks_test.dart(page level): ten too-old files render as one row with one Delete; that Delete removes all ten; tapping a recording lists its files. All three fail with grouping switched off (checked by replacing the grouping with one block per file).switch, so a new sync state cannot compile without a rank.conversations-offline-sync-historyandconversations-offline-sync-recording-filespasstest/visual_audit/visual_audit_smoke_test.dart(113 scenarios).app/scripts/analyze_ratchet.shpassed.Failure class (fixes)
Failure-Class: none