Repository navigation
Conversation
…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>
Owner
|
Thanks for this fix. The explanation is I ran the switcher suite here: all 15 pass with your change, and with main's One thing I'll take care of at merge: several open shell PRs, this one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 resetscurrentIndexto 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
uname -r): 7.3.0-rc6-omamobile-push1-g7423da0736b1Checks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packagespasses (or the packages I touched: omamobile-shell,test/all)versionbumped, and the new version is in the commit subjectCo-Authored-By:orAssisted-by:trailer, never aSigned-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
Switcher.qmlas a local plugin copy (~/.config/omarchy/plugins/omamobile.switcher) over omamobile-shell 0.2.100, not a built 0.2.102 packageuserdata, 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-smokereportphone-smoke: unknown
Kernel
7.3.0-rc6-omamobile-push1-g7423da0736b1, tools atunknown, 2026-11-08T15:19Z.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