8000 Bloom host: ActivityIndicator drawn as Android's ProgressBar, settled around (#559) by NateIsern · Pull Request #563 · OxyHQ/OxyOS · GitHub
[go: up one dir, main page]

Skip to content

Bloom host: ActivityIndicator drawn as Android's ProgressBar, settled around (#559) - #563

Merged
NateIsern merged 9 commits into
mainfrom
feat/host-progress-bar
Nov 11, 2026
Merged

NateIsern merged 9 commits into
mainfrom
feat/host-progress-bar

Conversation

@NateIsern
@NateIsern NateIsern commented Nov 10, 2026 •
Copy link
Copy Markdown
Member

Closes #559. Stacked on #554 (the UI thread, ADR 0067), which is in the merge queue: until it lands this PR also shows its commit; review the top commit.

React Native's ActivityIndicator renders Android's AndroidProgressBar, which the host did not implement: every Bloom button's loading spinner and every toast's spinner was blank on OxyOS. This implements it in the host as an explicit adaptation, and makes a scenario's step settle while a spinner turns, at the root.

The host (tools/rn-host-spike/progress-bar.h)

  • Measured and drawn as AOSP's ProgressBar, set up as React Native's ReactProgressBarViewManager sets it: sized by its style unless styled (Small 16, Normal 48, Large 76 dp; ActivityIndicator's 20/36); indeterminate, progress_indeterminate_material's ring (radius 19 of a 48-unit viewport stroked 4, square caps), its arc trimmed over 1333 ms by AOSP's trim path interpolators, offset a quarter turn a cycle, the ring turning 720° in 4444 ms; determinate, a still arc of progress; Horizontal, a track and its fill; in color, else the session's accent; not animating, nothing (as ProgressBarContainerView hides it).
  • Animated on the UI thread: a surface whose last frame had a ring spinning draws again each refresh of its display (the window, a popup, a shell region), its ring's rectangle alone damaged (damage.h), whatever JavaScript is doing. A ring nothing shows (scrolled away) does not turn.
  • Reduce Motion, as macOS: the ring goes on turning (its motion is the state it shows), but its arc is held at three quarters of a turn: the growing and shrinking sweep, motion that only decorates, is what Reduce Motion takes away. Followed live as the session changes it.
  • Accessible as a progress indicator (ProgressBar role, named by its label): busy while indeterminate, its percentage while determinate; hidden while not animating. Bloom's button hides its own spinner (no-hide-descenda 8000 nts) and is itself busy, as before.

The harness: settling while a spinner turns

A step settles when the application's surfaces stay unchanged for 750 ms; a spinner never stops, so a screen whose only motion is a spinner never settled. Nothing is turned off for tests:

  • WindowDamage keeps the rings' damage apart from every other change and says whether a frame changed nothing else (spinningOnly); popups and shell regions likewise. The host's report then marks that frame's present line progress_only.
  • The director (tools/oxyos-offscreen/src/progress.rs) reads the application's report (and the shell's, when it is the one shell) as it is written and reads such a frame as the one before it: it neither answers a step nor keeps one from settling. The client's frame sequence runs across its surfaces, so a popup's frames between are skipped. A frame not yet in the report waits at most 250 ms, and only while its surface turns a spinner: every other frame counts at once, so scenarios without a spinner settle exactly as before.
  • Paced at the display's refresh: a compositor that answers each frame at once (the development one) is not asked for thousands a second (it was, 2,700/s, before pacing: the report grew 200 MB a minute).
  • regress.py: progress_frames ([least, most] spinner-only frames in a step) and progress_phase_ms (rings drawn every frame, but at that point of their animation, so pixels can say where the arc is).

Scenarios

  • progress (phase held, reader on in Spanish): the indicator "Sincronizando" spinning in its colour (pixels on and off the arc), a busy progress indicator; Tab to Guardar ("Guardar, botón"); Space: the button's spinner over its hidden label (pixels), the button busy, its spinner hidden from the reader, "Guardando…" said, keyboard focus unchanged; 2.5 s later "Guardado" said, the spinner gone, focus still on the button.
  • progress-turning: the same by the clock: each step settles while both rings turn (progress_frames > 0 in every step).
  • progress-reduce-motion: at a phase where the normal arc is short, the arc is three quarters of a turn (pixels at 6 and 9 o'clock).

Verification (seldon, my slice throttled to 8 cores, load 30–90, one run at a time)

  • progress, progress-turning, progress-reduce-motion: pass (each several times). progress: 396 frames in 6.6 s, a refresh apart (16.8 ms median gap), 392 of them progress_only; every step settled, the reader steps included.
  • Negative controls: progress-reduce-motion with Reduce Motion off fails on its pixels at 6 and 9 o'clock (#ffffff, expected #d03030); progress-turning with the director's filter removed fails: "deadline exceeded waiting for the first frame".
  • cargo test -p oxyos-offscreen (8 new progress:: tests), cargo clippy -p oxyos-offscreen --all-targets -D warnings, python3 -m unittest test_regress (2 new), ruff, Biome, check-cpp-format.py: pass.
  • Full suite (522 scenarios, JOBS=2, load 60–90): 25 failed, none with a spinner frame in its reports (timing under load: glides, speech order, the five perf-* speed budgets on a throttled slice). The 20 others run again alone: 18 pass; glide-elsewhere-scaled ("glider sped up as it glided") and settings-displays-keys-scaled (the dialog's chosen radio not said) fail the same way on Bloom host: the UI thread apart from JavaScript's (ADR 0067, step 2) #554's tree alone, without this change, so they are not this PR's (they never reach its code: no ring drawn, no frame deferred). The merge queue's gate is the judge of both.

Coordination with #536

#536 (open) declares AndroidProgressBar as unimplemented in android-adaptation and unimplemented_sometimes in settings-passwords. With this, no host draws it as a plain view, so those declarations must go: whichever lands second drops them (and the matching AndroidProbe/docs text).

🤖 Generated with Claude Code

… around (#559)

React Native's ActivityIndicator renders Android's AndroidProgressBar, which the host did not
implement: every Bloom button's loading spinner and every toast's spinner was blank.

- progress-bar.h: AOSP's ProgressBar as ReactProgressBarViewManager sets it up, measured by its
  style and drawn by the host: progress_indeterminate_material's ring (its trims over 1333 ms by
  AOSP's interpolators, the ring turning 720 degrees in 4444 ms), determinate arcs, the horizontal
  bar; in its colour, else the accent; nothing while not animating. Reduce Motion keeps it turning
  with its arc held at three quarters, as a Mac's spinners go on spinning. A progress indicator to
  assistive technologies: busy while indeterminate, its percentage while determinate.
- On the UI thread: a surface whose last frame had a ring spinning draws again each refresh of its
  display (window, popup, shell region), its ring alone damaged, whatever JavaScript is doing; a
  ring nothing shows does not turn.
- The harness, at the root: WindowDamage keeps the rings' damage apart and says whether a frame
  changed nothing else; the host's report marks such a present `progress_only`, and the director
  (oxyos-offscreen's progress.rs) reads that frame as the one before, so a spinner neither answers
  a step nor keeps it from settling (a frame its host has not said yet waits at most 250 ms,
  and only while its surface turns a spinner: every other frame counts at once, as before).
  regress.py: `progress_frames`, `progress_phase_ms`.
- Scenarios progress (phase held: pixels on and off the arc; Bloom's Guardar button's spinner over
  its hidden label, the button busy, its spinner hidden from the reader, the status said, keyboard
  focus unchanged; then the result; the reader saying the indicator), progress-turning (by the
  clock: every step settles while both rings turn; without the director's filter the window never
  settles), progress-reduce-motion (fails with Reduce Motion off).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NateIsern
NateIsern added this pull request to the merge queue Nov 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 10, 2026
…t-progress-bar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NateIsern
NateIsern added this pull request to the merge queue Nov 10, 2026
…t-progress-bar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 10, 2026
@NateIsern
NateIsern enabled auto-merge November 10, 2026 19:10
@NateIsern
NateIsern added this pull request to the merge queue Nov 10, 2026
NateIsern and others added 2 commits November 10, 2026 21:53
…t-progress-bar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NateIsern
NateIsern removed this pull request from the merge queue due to a manual request Nov 10, 2026
@NateIsern
NateIsern added this pull request to the merge queue Nov 10, 2026
…t-progress-bar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-merge-queue
github-merge-queue Bot removed this pull request from 8000 the merge queue due to a conflict with the base branch Nov 11, 2026
NateIsern and others added 2 commits November 11, 2026 02:46
…t-progress-bar

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With #543: the shells are the development compositor's Shells, watched and
restarted; a spinner of the shell's still leaves a step settled when it is
the one shell (progress.rs follows the shells' clients, restarted ones
among them, as start_shell starts them).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NateIsern
NateIsern enabled auto-merge November 11, 2026 01:53
@NateIsern
NateIsern added this pull request to the merge queue Nov 11, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NateIsern
NateIsern enabled auto-merge November 11, 2026 07:23
@NateIsern
NateIsern added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 30efb5b Nov 11, 2026
10 checks passed
@NateIsern
NateIsern deleted the feat/host-progress-bar branch November 11, 2026 12:06
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.

Bloom host: draw ActivityIndicator (React Native's AndroidProgressBar)

1 participant

0