Skip to content

feat(WhereUI): add a subtle personalized Locations background - #324

Merged
kyleve merged 14 commits into
mainfrom
codex/locations-background
Sep 25, 2026
Merged

kyleve merged 14 commits into
mainfrom
codex/locations-background

Conversation

@kyleve

@kyleve kyleve commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add a stationary monochrome region pattern behind the Locations tab, layered over faint full-view rosette rings. Alternate rows shift by half a cell. A 54-point preferred cell pitch keeps the repeat compact, with compensated artwork extent to preserve the region size. The print uses flat, faint strokes without shadows; slender regions receive a bounded size adjustment to balance the marks.

The pattern includes visited geographic regions in the selected year, including manual entries and Elsewhere. The catch-all Other entry is omitted from the print, so the background has no globe icons or empty placeholder cells. It uses catalog order so ranking changes do not rearrange it. Repeated cells extend beyond all four edges, and every region retains a fully visible copy.

Why

Extend the personalized print on the region cards into a quieter screen background while preserving a continuous staggered repeat.

Review focus

  • Appearance lives in dedicated stylesheet tokens. Region paths come from the existing injected cache; full-view rosettes use the existing shared renderer.
  • Layout keeps square cells with a half-cell horizontal offset on alternating rows and overscan at every edge.
  • Obsolete artwork is hidden when membership changes. Empty, initial-loading, and failed states retain only full-view rosettes. Reduce Transparency hides all decorative ink.
  • Screen snapshots allow one second for native glass and artwork settling. The loaded fixture warms its outline cache before capture, including accessibility preparation.
  • No persistence, public API, or dependency changes.

Testing

  • Focused layout and stylesheet tests passed, covering half-cell row offsets, overscan, full region coverage, and empty history.
  • 52 reviewed captures across LocationsBackground, LocationsView, MainTabs, and RootView, including light/dark, iPad, accessibility sizes, and Reduce Transparency.
  • Architecture validation and 15 rule tests passed.
  • Refreshed the MainTabs welcome references for the full-view rosettes; CI exposed a stale dark-mode reference. Compared the affected screen suites after merging the current main branch.
  • SwiftFormat, SF Symbol lint, and diff whitespace checks passed.
  • Live scrolling and year-switch gestures were not manually exercised; membership changes and stale-load suppression have unit coverage.
./test --no-generate \
  --only WhereUITests/LocationsBackgroundLayoutTests \
  --only WhereUITests/WhereStylesheetTests \
  --only WhereUISnapshotTests/LocationsBackgroundSnapshotTests \
  --only WhereUISnapshotTests/LocationsViewSnapshotTests \
  --only WhereUISnapshotTests/MainTabsSnapshotTests \
  --only WhereUISnapshotTests/RootViewSnapshotTests --record all
./test --no-generate --no-build \
  --only WhereUISnapshotTests/LocationsBackgroundSnapshotTests \
  --only WhereUISnapshotTests/LocationsViewSnapshotTests \
  --only WhereUISnapshotTests/MainTabsSnapshotTests \
  --only WhereUISnapshotTests/RootViewSnapshotTests --review

The recording run reports intentional recording failures; the final comparison verifies the reviewed references.

.clipped()
.allowsHitTesting(false)
.accessibilityHidden(true)
.task(id: requestedRegions) {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not for this PR, but I think we have this duplicated in a few spots, maybe a good candidate for a shared modifier of some sort?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent on @kyleve's behalf.

Extracted this in #325 (commit b9b63d4). The Locations background, Elsewhere card, region cards, welcome card, and forecast panel now share regionArtworkTask plus RegionArtworkModel. The shared lifecycle handles cache injection, cancellation, and stale results, while the region card retains compatible outlines during point refreshes. Fifteen focused tests and six existing snapshot suites passed without reference changes. Since #324 has merged, the follow-up targets main.

@kyleve
kyleve merged commit e9a870c into main Sep 25, 2026
8 checks passed
kyleve added a commit that referenced this pull request Sep 25, 2026
## Summary

Share the artwork-loading lifecycle across the Locations background,
Elsewhere summary card, region summary card, welcome card, and forecast
panel. Each surface keeps its existing path resolutions and rendering.

`regionArtworkTask` reads the injected cache and ties work to the view's
request identity. `RegionArtworkModel` rejects cancelled or superseded
results and hides artwork whose display key no longer matches. Region
cards keep compatible outlines visible while their recorded-point
constellation refreshes.

## Review focus

- Request identity restarts work; the separate display key controls
whether existing artwork can remain visible during that work.
- A unique load token rejects older results even when two overlapping
requests have the same display key.
- Cache replacement restarts loading; removing the cache clears the
artwork.
- No snapshot references or appearance tokens change.

## Testing

- 15 focused tests across the shared model/modifier, region card,
Locations artwork, and Elsewhere artwork passed. Coverage includes
cancellation, out-of-order completion, stale-key hiding, retained
artwork, and cache replacement/removal.
- Existing snapshots compared for CalendarContentView,
ElsewhereSummaryCard, ElsewhereView, LocationsBackground, LocationsView,
and MainTabs.
- Architecture validation and 15 architecture rule tests, SwiftFormat
lint, SF Symbol lint, and whitespace checks passed.

## Stack

Follow-up to #324 and [the shared-loading review
comment](#324 (comment)).
#324 merged while this follow-up was being prepared, so the stack is
reconciled onto `main`.
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.

1 participant