Skip to content

fix(sync): display per-recording transfer progress and admit direct transfer generation (#25653) - #25749

Merged
aryanorastar merged 3 commits into
BasedHardware:mainfrom
PINYOPATTANAWASANPORN:fix/25653-wal-transfer-progress
Nov 20, 2026
Merged

aryanorastar merged 3 commits into
BasedHardware:mainfrom
PINYOPATTANAWASANPORN:fix/25653-wal-transfer-progress

Conversation

@PINYOPATTANAWASANPORN

@PINYOPATTANAWASANPORN PINYOPATTANAWASANPORN commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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.

Synthetic recording transfer at 38%
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.

@Git-on-my-level Git-on-my-level left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.
  2. 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.
  3. '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.

@Git-on-my-level Git-on-my-level added the flutter flutter work label Nov 19, 2026
@aryanorastar
aryanorastar marked this pull request as draft November 20, 2026 15:48
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.
@aryanorastar
aryanorastar marked this pull request as ready for review November 20, 2026 16:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T16:45:29.930694Z a45bf34 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@aryanorastar
aryanorastar merged commit a7cb1ef into BasedHardware:main Nov 20, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS: Transfer to Phone can show 0% while the selected recording reports a changing transfer speed

3 participants