Repository navigation
fix(sync): display per-recording transfer progress and admit direct transfer generation (#25653) - #25749
Conversation
…ransfer generation (BasedHardware#25653)
Git-on-my-level
left a comment
There was a problem hiding this comment.
Verdict: the fix itself is correct and well-targeted; three small mechanical items block merge.
What I verified:
- wal_item_detail_page.dart — reading currentWal.deviceDownloadFraction?.clamp(0.0, 1.0) (a pre-existing per-recording field populated by the sync services) instead of the shared walsSyncedProgress fixes the wrong-recording percentage/speed/ETA display from #25653. Null now renders an indeterminate bar + "Progress unknown" instead of a misleading 0%, and Row→Wrap prevents overflow of the speed chip. Good.
- sync_provider.dart transferWalToPhone() (~line 1385) — setting _admittedWorkGeneration = generation before _updateSyncState(...toSyncing()) is the right fix: onWalSyncedProgress() (~line 1289) drops callbacks unless _isCurrent(_admittedWorkGeneration), and a direct transfer as the session's first operation previously ran with -1, dropping every progress event.
- wal_item_detail_transfer_progress_test.dart — both branches covered (42% shown while shared progress is 0%; unknown state when the fraction is null).
Blocking items:
- Formatting check is red: in _performSync the added _admittedWorkGeneration = generation; is redundant (it is already assigned a few lines up, before await _keepAlive.acquire()), and _updateSyncState(...) is mis-indented — drop the duplicate line and run dart format.
- Hygiene (ui-evidence) is red: user-visible UI changed, so the PR body needs a screenshot reference or an explicit "UI-Evidence: none" declaration per the repo's evidence contract.
- 'Progress unknown' (~line 268) is the only hardcoded user-facing string in a file otherwise fully localized via context.l10n.* — please move it to the localization tables (and update the test accordingly).
Performance / security: no new queries or external calls, no data-handling change — nothing material. Blast radius: one detail page plus one state assignment in the sync provider; contained.
USER IMPACT: transferring a recording now shows that recording's own progress, speed, and ETA instead of the global sync aggregate, and an honest "Progress unknown" instead of a misleading 0%.
Once the three items above land this is in good shape — leaving for human maintainer review before merge.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
Failure-Class: none Verified app/test.sh focused Recording Details, generation and wake suites: 22 passed, plus shared spine contracts. Reuses the issue's synthetic interactive UI evidence for the unchanged measured-progress state.
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. |
Recording Details used shared backlog progress while displaying the selected recording's speed and ETA. It now uses that recording's measured fraction, displays localized Unknown until a measurement arrives, preserves measured 0%, and keeps the row readable on short screens. Direct Transfer to Phone admits the current session so its first progress callback is accepted.
Fixes #25653. Preserves the contributor implementation and incorporates the previously tested #25653 patch and short-screen regression.
Failure-Class: none
The violated boundary is recording identity for displayed progress and session admission for direct-transfer callbacks. Behavioral regressions exercise the real widget through its transfer button, unrelated background progress, unknown/zero/advancing measurements, short screens, and first direct transfer followed by session reset.
The screenshot is existing synthetic Flutter runtime evidence from f157a4b for the unchanged 38%/50 KB/s state, not a physical pendant or customer transfer receipt. Local verification: app/test.sh with the Recording Details progress/recovery and SyncProvider generation/wake suites passed all 22 tests, plus the shared spine contracts. All applicable current-head CI passed, including the full Flutter analyzer/test job and timezone checks. The new direct-transfer regression was also verified to fail without admission (expected 38%, observed 0%). Existing changes-requested review needs clearance before merge; no release or recovery claimed.