Skip to content

omamobile-shell 0.2.102: stagger Quick Settings status refreshes - #518

Merged
derekross merged 4 commits into
derekross:mainfrom
marselnenaj:codex/quicksettings-staggered-refresh
Nov 10, 2026
Merged

derekross merged 4 commits into
derekross:mainfrom
marselnenaj:codex/quicksettings-staggered-refresh

Conversation

@marselnenaj

@marselnenaj marselnenaj commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Opening Quick Settings starts eleven backend refresh entry points together during the reveal. Queue their starts after the reveal and tracked gestures settle, spacing them 48 ms apart. Read notifications first, then Do Not Disturb and brightness, before the remaining status probes.

Coalesce unfinished open requests and cancel pending starts on close. Reveal animation, background dragging and movement in the sheet, pager, edit list or notification list pause the queue. Opening directly in edit mode still refreshes without waiting for Done. Direct user actions and confirmation reads remain immediate. Already running processes may overlap and are not cancelled; periodic refreshes and notification seen-state bookkeeping remain unchanged.

The first queued read starts one slot after settling; all eleven start over approximately 528 ms. Cached values remain visible during that interval. Slider presses are not tracked. This removes the simultaneous launch burst; device frame savings have not been measured.

Validation at 55d70a8: the production scheduler fixture passes nine Qt entries with no skips, including first-screen priority, idle edit-mode entry, reveal/scroll gates, spacing, cancellation, coalescing and immediate actions. Restoring the previous order or edit gate fails the corresponding tests, and the synchronous-burst negative control fails. The complete shell package suite passes 298 checks with no failures or skips. Changed QML parsing and the policy gate pass.

The maintainer will allocate the shell version at merge and perform the device feel check.

Opening Quick Settings starts eleven backend reads together while the
sheet animates. Queue those existing read entry points after reveal and
tracked sheet interactions settle, with one start per 48 ms. Coalesce
unfinished open requests and cancel pending work when the sheet closes.
Keep direct actions and their confirmation reads immediate.

Exercise the production queue declarations under real Qt bindings for
settling, staggering, cancellation, coalescing and scroll/edit gates.
A synchronous burst control fails the timing and coalescing assertions.

The queue tracks reveal animation, background drag, the four Flickables
and edit mode. It does not track slider presses or serialize process
completion. Existing polling and in-flight completion remain unchanged.
No physical frame-rate improvement is claimed. The proposed package
version must be allocated again at merge.

Co-Authored-By: Codex <codex@openai.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you, @marselnenaj. This is carefully done. The queue pauses for every gesture that matters, closing cancels only what hasn't started, a tap on a tile still reads back at once, and the burst control fails the test as it should. I ran your test here: 7 of 7 pass, and --burst-negative fails three. Thanks also for not claiming a frame-rate number.

My concern is what it costs on every open. The notification read is ninth in the queue, so it starts about 220 ms (the slide) plus 9 x 48 ms after Quick Settings opens, roughly 0.65 s, and later if you touch or scroll the sheet. Nothing refreshes the list while the sheet is closed: the 3-second timer only runs while it's open. So for most of a second the shade shows the list from the last time it was open. The most common reason to open it is the message that just arrived. Brightness and DND come late too, and they're on the first screen.

Could you put the reads the first screen shows at the front: notifications, then DND and brightness? Or keep refreshNotifications() immediate in open() and queue the rest. One more question: when Quick Settings opens straight into edit mode (page: "edit"), the editing gate holds every read until Done. Is that what you intended?

On evidence: your phone is on Omarchy 4.5, where main's shade can't read notifications yet (#482), so I'll do the feel check on my 7 Pro once the order is changed. If you have a way to show that the burst costs frames during the slide on a phone, that would make the case. Without it, I'm happy to take this as tidying, as long as the shade doesn't feel slower.

This conflicts with #516 only in test/all; I'll keep both blocks, and both tests pass together. I'll set the shell version at merge, since several open PRs say 0.2.102.

Dispatch notifications first, then DND and brightness, so the shade does not
wait behind less visible status reads on every open. Editing itself no longer
blocks the queue until Done; actual reveal, drag and scrolling still pause it.

Keep action readbacks immediate and preserve close cancellation/coalescing.
Actual Qt tests cover first-screen order and idle edit-mode opens as well as
spacing and gesture gates. Restoring either old behavior fails its test.

Co-Authored-By: Codex <codex@openai.com>
@marselnenaj

marselnenaj commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor Author

The follow-up is prepared locally: notifications first, then DND and brightness. Reveal and movement gates remain; edit mode alone no longer holds the queue until Done, while scrolling the edit list still pauses it.

The Qt fixture passes 9 entries with no skips, including first-screen order and completion while editing remains enabled. Restoring the old order or edit gate fails the respective tests; the burst negative control still fails. Changed QML parsing and the policy gate pass. Pushed as 55d70a8. The complete shell suite now passes at this exact head: 298 checks, no failures or skips, 356 seconds. No device frame savings were measured.

My phone already has a local 4.5 notification reader, but it is an adapted development installation, not main's shade. #482 remains the public reader contribution. Your 7 Pro feel check is still needed; this is scheduling cleanup rather than a claim of proven frame savings.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @marselnenaj, this is exactly what I hoped for. Notifications now come first, then DND and brightness, so the list starts refreshing about a quarter of a second after the slide begins, where before it took most of a second. Opening straight into edit mode no longer waits for Done.

I ran your test on today's main with #516 merged as well (both test/all blocks kept): 9 of 9 pass, and the burst control still fails three. Putting the edit gate back fails the edit-mode test, and your previous head's file fails the order tests, so they guard what they should.

Your fixture's reveal is a plain animation, while the real one sits in a Behavior, so I also checked that a Behavior's animation reports running the moment opened changes. It does, so the reveal gate works on the real sheet too.

One small thing for readability, not a blocker: the fixture still records the notification read as 9, its old slot number, so the expected order reads "9,1,2,0,…". A name there would read more easily.

Next is the feel check on my 7 Pro: opening with a fresh notification waiting, and opening into edit mode. If it doesn't feel slower, I'll merge it with the next free shell version in the title (main is at 0.2.107 now) and keep both test blocks alongside #516.

Record refresh entry points by name instead of their former numeric slots.
This makes the notification-first order and immediate DND assertions readable
without changing the production scheduler, its timing or gesture gates.

The real offscreen Qt fixture passes all nine entries. The synchronous burst,
old ordering and restored edit gate still fail their targeted assertions.

Co-Authored-By: Codex <codex@openai.com>
@marselnenaj

Copy link
Copy Markdown
Contributor Author

I replaced the fixture's old numeric slot labels with the refresh names, so the expected order now reads notifications,dnd,brightness,probe,…. This changes only the test template; the production scheduler and package version are unchanged.

The actual offscreen Qt fixture still passes all nine entries. The burst control, old ordering and restored edit gate still fail their corresponding assertions; the policy check and git diff --check pass. I left the reviewed branch based on the same head, since you are handling the combined test blocks and version allocation at merge. Your 7 Pro feel check remains outstanding.

# Conflicts:
#	packages/omamobile-shell/test/all
#	packages/omamobile-shell/version
@derekross
derekross merged commit e5ba01e into derekross:main Nov 10, 2026
2 checks passed
@derekross

Copy link
Copy Markdown
Owner

Merged as omamobile-shell 0.2.110. On my 7 Pro it opened with a fresh notification showing first and didn't feel slower, and edit mode opened straight away. Thanks for the renamed fixture labels too.

robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ekross#518)

* omamobile-shell 0.2.102: defer open-time backend refresh until settled

Opening Quick Settings starts eleven backend reads together while the
sheet animates. Queue those existing read entry points after reveal and
tracked sheet interactions settle, with one start per 48 ms. Coalesce
unfinished open requests and cancel pending work when the sheet closes.
Keep direct actions and their confirmation reads immediate.

Exercise the production queue declarations under real Qt bindings for
settling, staggering, cancellation, coalescing and scroll/edit gates.
A synchronous burst control fails the timing and coalescing assertions.

The queue tracks reveal animation, background drag, the four Flickables
and edit mode. It does not track slider presses or serialize process
completion. Existing polling and in-flight completion remain unchanged.
No physical frame-rate improvement is claimed. The proposed package
version must be allocated again at merge.

Co-Authored-By: Codex <codex@openai.com>

* omamobile-shell: prioritize visible Quick Settings reads

Dispatch notifications first, then DND and brightness, so the shade does not
wait behind less visible status reads on every open. Editing itself no longer
blocks the queue until Done; actual reveal, drag and scrolling still pause it.

Keep action readbacks immediate and preserve close cancellation/coalescing.
Actual Qt tests cover first-screen order and idle edit-mode opens as well as
spacing and gesture gates. Restoring either old behavior fails its test.

Co-Authored-By: Codex <codex@openai.com>

* omamobile-shell: name refresh probes in the scheduler fixture

Record refresh entry points by name instead of their former numeric slots.
This makes the notification-first order and immediate DND assertions readable
without changing the production scheduler, its timing or gesture gates.

The real offscreen Qt fixture passes all nine entries. The synchronous burst,
old ordering and restored edit gate still fail their targeted assertions.

Co-Authored-By: Codex <codex@openai.com>

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: Derek Ross <derekross@gmail.com>
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