Skip to content

Show background syncing through the Today battery indicator#837

Open
Quaii wants to merge 2 commits into
ryanbr:mainfrom
Quaii:today-syncing-indicator
Open

Show background syncing through the Today battery indicator#837
Quaii wants to merge 2 commits into
ryanbr:mainfrom
Quaii:today-syncing-indicator

Conversation

@Quaii

@Quaii Quaii commented Jul 26, 2026

Copy link
Copy Markdown

What this PR does

Shows background strap-history syncing through the existing battery indicator instead of a separate status chip in the Liquid Today header.

  • Morphs the charge ring and percentage into the liquid-heart sync spinner.
  • Briefly expands into a Syncing capsule as a lightweight notification, then collapses while syncing continues.
  • Pushes earlier header controls left during expansion and fades long titles beneath the control row instead of allowing overlap.
  • Smoothly returns to the live battery state when syncing finishes.
  • Provides the indicator as a reusable StrandDesign component with shared layout, typography, palette, and motion tokens, interactive previews, and Reduce Motion support.
  • Keeps the detailed Data Sources sync row unchanged.

Syncing happens in the background and does not prevent the rest of the app from being used. A separate persistent chip makes the header feel busy and can make the app appear blocked; integrating the state into the battery control keeps the status visible without giving it undue prominence.

No BLE, protocol, analytics, or Android behavior changed.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • CI / tooling

How it was tested

  • swift test in Packages/StrandDesign — 32 tests passed.
  • python3 Tools/i18n_audit.py --ci upstream/main — passed for Android and all Apple catalogs.
  • git diff --check — passed.
  • Manually exercised the complete charge → syncing → charge cycle and long-title collision case using a temporary DEBUG fixture in the iPhone 16e simulator on iOS 26.3.
  • The app build currently reaches an existing upstream/main failure in untouched code: Strand/BLE/OuraLiveSource.swift:270: cannot find type 'OuraMotionDump' in scope. Retrying through full xcodebuild produces the same upstream error; no diagnostics originate from files changed here.

Checklist

  • Swift package tests pass for any package I touched (swift test in Packages/<name>)
  • Android unit tests pass if I touched android/
  • No new build warnings introduced
  • UI changes use only StrandDesign tokens — no hardcoded colors, fonts, or spacing
  • No hardcoded hex frame bytes; protocol facts live in the schema / decoders
  • Follows the conventions in docs/CONTRIBUTING.md
  • I did not commit generated output (Strand.xcodeproj/) or any secrets/keystores

Related issues

None.

@Quaii Quaii changed the title Improve Today syncing indicator Show background syncing through the Today battery indicator Jul 26, 2026
@Quaii
Quaii marked this pull request as ready for review July 26, 2026 15:31

@ryanbr ryanbr left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice work — the component is properly tokenised, Reduce Motion is handled, previews included, and StrandDesign's catalog is updated. 32/32 and 9/9 green.

  1. The build error is not upstream. Strand/BLE/OuraMotionDump.swift exists on main and defines the type — it landed earlier today in #805. Since Strand.xcodeproj is generated and not committed, a project generated before that commit will not contain the file, which produces exactly "cannot find type in scope". xcodegen generate after pulling should clear it. Worth confirming, because it means the app target has not actually built against your change yet.

  2. This collides with #833. You delete LiquidSyncChip; #833 is currently adding a "N pages behind" detail to that same chip. Whichever lands second either conflicts or silently drops the other's work. Needs a call from @ryanbr on which surface wins before either merges.

  3. The new indicator is boolean. It takes syncing: Bool and a fixed "Syncing" label, where the chip it replaces shows a live chunk count (plus pages-behind under #833). Classic Today keeps both since you do not touch it, so the two Today layouts would diverge in what they tell you. Deliberate? Your reasoning about header busyness is fair, but "syncing" with no progress signal is also the thing #806 and #833 were trying to move away from.

No BLE/protocol/analytics touched, iOS-only presentation — no parity obligation here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants