Widget layout audit: compact sizes and size-aware layouts - #11
Open
jondkinney wants to merge 21 commits into
Open
Widget layout audit: compact sizes and size-aware layouts#11jondkinney wants to merge 21 commits into
jondkinney wants to merge 21 commits into
Conversation
Xcode 16.4's compiler rejects several spots that earlier toolchains accepted under the pinned Swift 6 language mode: - PluginWidgetEntry declares Sendable while storing an NSImage; mark the image nonisolated(unsafe), since entries are built and consumed on the main actor. - The analog clock's inline tick-mark arithmetic exceeds the type checker's expression time limit; extract a helper with explicit CGFloat conversions. - The edit-mode toggle mutates main-actor state from a @sendable zone action; hop to the main actor explicitly. - The plugin notify path sends non-Sendable UNNotificationSettings across isolation; extract just the authorization status via the completion-handler API. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 41a6d72ed5d0e22531abe12f9f9492938ae33e26)
The test target did not compile, so the suite had never run. Two distinct isolation errors: tests calling the main-actor-isolated CICDSettingsView.quotaText from nonisolated test methods, and LayoutEngineTests building main-actor state inside setUpWithError / tearDownWithError, whose XCTest signatures are nonisolated even on a @mainactor test case. Annotate the two quota tests @mainactor, and move the layout fixtures to the async set-up hooks, which do inherit the class's isolation. The super calls go with them: awaiting the non-Sendable superclass across the actor hop is itself an error, and XCTest already invokes the empty base implementations. All 87 tests now build and pass.
One commit can fan out to several workflows, and some runs share
a constant display title ("pages build and deployment"), so rows
showing only repository and title render as indistinguishable
duplicates. Append the workflow name, dimmed like the host label,
so such rows tell apart.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV
(cherry picked from commit e7f7a7b6afb6d01500d47d4344f86be4c86ee27f)
Repeat runs of one workflow (re-runs, successive Pages deploys with their constant title) rendered as indistinguishable rows. The widget reads better as a status board than an activity log: show each repository workflow once with its most recent run's result, add a compact age label to every row, and make the header badge count the workflows actually listed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 209fb62b24a5af417b71e643fdb7e9b12488ba7d)
Hiding a repository required typing its exact owner/name into the Hidden list. The settings pane now also offers a menu of the repositories the widget is showing right now; picking one adds it to the hidden set, which the service already persists and excludes from polling. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit adb1fe21b145afc7bb01b31bd284c8c9dad0a9f6)
Disk I/O, Storage, Network Stats, WiFi Info, Audio and Day Progress all render single-row content in their compact layouts yet declared 2-row minimums, wasting half their footprint on a 6-row strip display. Lower the minimums to height 1; give Network Stats a side-by-side variant at that height (its stacked rows could overflow the cell), keep Day Progress's ring out of 1-row placements, and clip widget content to its cell so a compact layout can never paint over neighbors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 1bf2297022cb1f8da96d9698a5fa4649b2d29364)
An audit of every size-adaptive widget, aimed at fitting more on a 6-row strip without premature degradation: - Radial gauges draw their type label inside the ring instead of a caption row below, so the ring fills the cell and a 2x2 placement works; temp widgets keep the gauge at 2x2 rather than degrading to icon+number. - Top Processes keeps its MEM column at every height (it was keyed to height though columns are a width concern) and fills available rows from measured height instead of a fixed 4/8, with the process service cap raised from 5 to 12. - Storage keeps its ring layout down to 2 rows when wide, sizes the ring to the cell instead of a 140px cap, and centers vertically; Disk I/O and Day Progress center instead of floating above dead space. - Per-core temp and CPU cores pick column count from height as well as width, so tall placements fill and short ones avoid needless scrolling. - Weather's compact layout was unreachable (threshold below the minimum size); it now serves 4-row placements. World Clocks distributes cards across the available height. - Bluetooth's device list scrolls instead of clipping; WiFi and Network Stats keep their info chips in compact when width allows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit ab8b8ccb7e09489f050d5c6f1cb6943dfdfe9d1b)
Small sizes were shedding the text that says what a widget is:
gauges dropped their subtitle ("M4 MAX", "96.3 / 128 GB") below
150px, Disk I/O lost its header in compact and 1-row layouts,
and Storage fell back to an anonymous bar at 3x2 although its
ring layout scales to the cell. Gauge subtitles now render at
every size, Disk I/O keeps its name down to 1 row when width
allows, Storage keeps the ring at every multi-row size, and the
Network 1-row layout gains DOWN/UP labels matching Disk I/O.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV
(cherry picked from commit 61caf4945c6c6734f587e820934cecc50f98cefe)
Network and Disk I/O both show a pair of labeled rates, yet at identical box sizes one stacked top-aligned rows over dead space while the other centered side-by-side groups. Extract RatePairView and render both widgets through it, so widgets of the same shape look the same at every size. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit f96ec803d4ae7c0ca280abd144c6f139da439922)
The Unit and Sort By pickers rendered blank and would not open: their schema entries declared no options, and nothing consumed their values. Unit duplicated the global Units setting, so the dead entries are removed. Sort By is now real (CPU or memory) and Top Processes gains a Rows choice — auto fills the widget height as before, a number pins the count and scrolls past it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit a925501e118714a354a3b57e7ceef1102f2a2daa)
Network now keeps its name at the same sizes and spot Disk I/O does (full header to 2 rows, caption at 1 row). The Day Bar clock's day-of-week strip was 9-11pt beside a double-height time row; raise it to 12-15pt. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 0501f5c712a855dbca29ff870a70f50334fca5c8)
A full-height 6-row placement fits 16 rows of 43px, but both the service's published list and the widget's auto clamp stopped at 12, stranding a four-row strip at the bottom. Raise both, and offer 16 in the Rows picker. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 67d97a471e6d4a37f095817c7a0a1a8a3554b3b7)
The bar layout skipped the leading spacer Disk I/O has, pinning the rate pair under the caption instead of centering it in the card. Same spacers now, so the two widgets align row for row. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 7b0eeada2af4dae10640c206347389a6927613f6)
The time row rendered at a fixed multiple of the theme font, so it never matched the day strip's width. It is now one concatenated Text (colored colons, dimmed seconds and AM/PM scale as a single unit) at a deliberately oversized base size that minimumScaleFactor shrinks to exactly fill the container — the SwiftUI way to grow type to fit. Day Bar spacing opens up a step to match. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 5b8f184e24deb106393a21c75d32292ea90ab219)
Day cells were equal-width columns with the highlight capsule filling the whole cell, so the strip's visible edges depended on which day was highlighted — inset the clock to match the labels and a Saturday capsule would overhang it. Chips now hug their labels and justify across the row: the first and last chip sit flush against the container edges the clock also fills, so the two rows share edges on every day of the week. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit d1b16e620fdf4195850f631f678dee993bd1d20b)
Replace the edge-justified distribution with a centered cluster at fixed chip spacing, sitting over the width-filling clock with the existing row spacing between them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 2a223d70e6859fa9d6edf2f74cf4de3eed944199)
Restore the justified day strip (the width was right) and drop the time row's greedy height, which was pinning the days to the top edge. The strip-plus-clock group now hugs its content and the container centers it vertically. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 7b112a03820350a489c0cac58509a3651a107d9b)
Values like "3.5 KB/s" and "216.5 KB/s" measured differently, so minimumScaleFactor re-picked the scale on every tick and the type visibly pulsed with live data. Pad every value to the formatters' widest possible output (11 figures) with figure spaces: constant measured width, constant rendered size, sized for the worst realistic reading instead of the current one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 94be637b1d46bdfdfbd938633297537d3a26fa62)
CPU and MEM headers are live sort buttons (touch and mouse): tap to sort by that column, tap again to flip direction, with the active column showing its arrow. The configured Sort By remains the default the widget opens with. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 60b43b0504bbfc1da2dc941581796ee76aaf76dd)
The caption was gated on width >= 3, so a 1x2 placement showed an unlabeled pair of numbers. One small-caps line fits a 2-column cell; show it at every width. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit 3ff6ea5d3316145b3922a6476f96c0b183580090)
RatePairView gains a vertical mode — groups stacked instead of side by side — used when either widget is one column wide, under a slim caption title (the full header can't fit ~120px). Minimum sizes open to 1x1 accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BcS3YNvZzHypLREnxBU5sV (cherry picked from commit a6f1f75e1a4d420b4f6fd07b2659ce8f9d094f7a)
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.
Stack 3 of 7 — builds on #10
Incremental diff (just this PR's changes): jondkinney/edgecontrol@pr2-cicd-runs...pr3-widget-density
What this does
An audit of how widgets render at every supported size, so more of them fit usefully on one screen.
Verification
** TEST SUCCEEDED **— 87 tests, 0 failures. Each widget checked at its min, default and max size on a XENEON EDGE.Targets
mainper GitHub's base-branch rule; until #9 and #10 merge this diff also contains their commits. Use the compare link for this PR's own changes.