Repository navigation
Conversation
The Sessions widget lists the current server's sessions from the saved widget data, needs you first, then working, then newest, and each row opens its session. It sizes from a 2x2 (the top session with counts around it) through a 4x2 (header and as many rows as fit, then "+N more") to 4x3 and taller (a scrolling list). The header has a summary, a refresh and a New Session control, dropped before text when narrow. Nothing pushes when a session starts working, so this widget can read the list itself: from the header's refresh, and about every 30 minutes on a network while one is placed (scheduled in onEnabled, cancelled in onDisabled). It skips while the app is in the foreground. A refresh keeps saved badge colours (a new session takes those of a saved session in the same project, otherwise the default; the palette stays in :feature:drawer) and keeps a saved Unread or Failed status for a session that is still idle. A failed read records refreshFailedAt and the header shows "Offline · <time>". A working row older than two minutes reads "Last seen working", and a one-time job redraws the widget when that happens. Verified: scripts/check.sh :feature:system on the VM; the lab at 130x130 to 400x480, light and dark, font 1.3, with the busy, stale, empty, caught-up, unpaired, offline and single fixtures; and on the emulator's home screen against session-lab: placed the widget, changed the lab's checkpoint, force-stopped the app and tapped refresh (Needs your input -> Working), saw it turn "Last seen working" about 3 minutes later, then stopped the lab and tapped refresh (Offline · 1:06 AM). Resized on the launcher.
Turning the Home Screen Widgets experiment off disables the receiver without onDisabled, so the periodic refresh kept waking the app every 30 minutes. The worker now cancels its work when no Sessions widget is placed. Verified on the emulator: placed a widget, periodic job enqueued; turned the experiment off (getGlanceIds returned [] while the receiver was disabled), ran the worker, and the periodic job was cancelled. With the experiment on, the placed widget's refresh still ran the worker and showed the row as Working. vm.sh check :feature:system passes.
This branch has not been deployed
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.
Adds the Sessions widget: the current server's sessions, needs you first, each row opening its session, from a 2x2 up to a scrolling 4x3 and taller. Because nothing pushes when a session starts working, it can refresh itself, from the header's refresh button and about every 30 minutes on a network while one is placed. A failed refresh shows the header as "Offline · ", and a working row older than two minutes reads "Last seen working".
Sizes, light and dark (180×180, 360×180, 360×330):
Offline and stale; empty and not paired:
One session, narrow and tall, and font scale 1.3:
On the home screen against session-lab: published by the app, refreshed with the app force-stopped (now Working), redrawn as stale about 3 minutes later, refreshed with the lab stopped (Offline). The third picture was taken before the header stopped counting stale rows as working. The last picture shows resizing on the launcher.
ProjectAvatarPalettestays in:feature:drawer.scripts/check.sh :feature:systemon the VM, plus the lab and emulator checks above.Not included: diff counts, the current step and spinners from the mockup (the data doesn't have them; the status is a static dot or word), and the loading skeleton (the widget uses the shared loading layout).
Part of #287