Skip to content

omamobile-shell 0.2.102: recents keep the user's card when a window closes - #524

Open
den-kloot wants to merge 1 commit into
derekross:mainfrom
den-kloot:omamobile-shell-switcher-keep-position
Open

den-kloot wants to merge 1 commit into
derekross:mainfrom
den-kloot:omamobile-shell-switcher-keep-position

Conversation

@den-kloot

Copy link
Copy Markdown
Contributor

What and why

Recent apps dropped back to the first (newest) card whenever a window closed while they were open, for example after flicking a card up to close it. The ListView's model is root.windows, a new JavaScript array on every toplevel change, and a new model resets currentIndex to 0; the re-centring after the count change then centred that 0.

The view now remembers the card the user is on, by its window and its index, when a swipe ends or it centres a card, and comes back to it after the model changes: the same window if it is still open, else the card that took the closed one's place (clamped to the last). Opening recents still starts on the newest card. No change to the model or the card order.

Device and build

  • Phone: Pixel 9a (tegu)
  • Kernel release (uname -r): 7.3.0-rc6-omamobile-push1-g7423da0736b1
  • Packages changed, with versions: omamobile-shell 0.2.102

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes
  • tests/packages passes (or the packages I touched: omamobile-shell, test/all)
  • Each changed package has its version bumped, and the new version is in the commit subject
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

New test test/switcher-touch → test_closing_a_window_keeps_the_place: four windows, swipe to the second card, close another window (the same window stays current), then the current one (the next card, not the newest). It fails on main ("the same window after another one closed") and passes with this change; the other 14 switcher tests pass unchanged.

On the phone

  • I ran this on my own phone, booted into this build: the changed Switcher.qml as a local plugin copy (~/.config/omarchy/plugins/omamobile.switcher) over omamobile-shell 0.2.100, not a built 0.2.102 package
  • Runbook steps passed: none (no plan step); recents opened, a window closed under it, no QML errors
  • What I did not test: on the phone by hand only "a window closes while recents are open"; the swipe-then-close path is covered by the new test, not by a finger on the phone. Not tested on another phone or in landscape.
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)

The phone's kernel is a local test build (g7423da0736b1, a CP-link experiment); this change doesn't touch anything it affects.

tools/phone-smoke report

phone-smoke: unknown

Kernel 7.3.0-rc6-omamobile-push1-g7423da0736b1, tools at unknown, 2026-11-08T15:19Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-g7423da0736b1, slot b, up 10133s
storage guard (required) ok 62 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 92G free
kernel health (required) ok no oops or BUG; 0 WARN, 5 error lines in dmesg (0 known, 5 new)
new dmesg errors not ok N N: brcmf_escan_timeout: timer expired x5
systemd units ok none failed
USB gadget (required) ok bound to 11210000.usb
display ok card1-DSI-1 connected, 1080x2424
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked false)
touch ok Synaptics TouchComm Touchscreen
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link down
Bluetooth ok hci0, powered true
battery ok 42% Discharging, 27 °C
sound cards ok googleteguaocsn
sensors ok Accelerometer AmbientLight Proximity
cameras skip no libcamera tools
thermal ok hottest zone 40 °C

Packages: hyprland 0.57.0-3.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.2-1, omamobile-audio 0.5.15-1, omamobile-device-tegu 0.2.9-1, omamobile-firstboot 0.1.3-1, omamobile-gnss 0.2.7-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.2-1, omamobile-modem 0.1.16-1, omamobile-modem-sit 0.3.31-1, omamobile-omarchy 0.1.32-1, omamobile-owl-widgets 0.1.2-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.100-1, omamobile-voice 0.1.0-1, omaphone 0.2.3-1, omarchy 4.0.6-1, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1

…loses

Flicking a card up to close it, or any window closing while recent apps
are open, dropped the switcher back to the first (newest) card. The
ListView's model is root.windows, a new JavaScript array whenever the
toplevel list changes, and a new model puts currentIndex back to 0; the
re-centring after the count change then centred that 0.

The view now remembers the card the user is on, by its window and by its
index, whenever a swipe ends or it centres a card, and comes back to it
after the model changes: the same window if it is still open, else the
card that took the closed one's place (clamped to the last). Opening
recents still starts on the newest card.

test/switcher-touch: test_closing_a_window_keeps_the_place swipes to the
second card, closes another window (the same window stays current), then
the current one (the next card, not the newest). It fails without the
change ("the same window after another one closed") and passes with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thanks for this fix. The explanation is
spot on (a new model array resets currentIndex), and the fix stays small:
remember the card, then come back to the same window or to the one that took
its place, while opening recents still starts on the newest card.

I ran the switcher suite here: all 15 pass with your change, and with main's
Switcher.qml your new test fails with exactly the message you quote, so it
really guards the fix. CI is green too, and the QML suite ran there rather
than skipping.

One thing I'll take care of at merge: several open shell PRs, this one
included, all bump omamobile-shell to 0.2.102, so I'll give this one the
next free version and put that in the title. Nothing for you to change.

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