Skip to content

fix(WhereUI): Make transient Locations loading diagnosable - #220

Open
kyleve wants to merge 2 commits into
mainfrom
codex/log-location-loading-lifecycle
Open

fix(WhereUI): Make transient Locations loading diagnosable#220
kyleve wants to merge 2 commits into
mainfrom
codex/log-location-loading-lifecycle

Conversation

@kyleve

@kyleve kyleve commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Posted by an AI agent on kve's behalf.

Summary

  • record each foreground entry with the scene callback and the lifecycle runner's pre-promotion reason and phase
  • record each year-report activation with its trigger, whether it is the model's first activation, and whether a report was already present
  • keep report loading scene-scoped and preserve the existing headless-launch and warm-refresh behavior
  • pin the structured payloads and the ready-headless / fresh-versus-retained classifications with Swift Testing

Why

The Locations screen can briefly reveal its loading state when launch reaches ready before the scene-scoped year report finishes its first pull. Existing spans measured the work but could not distinguish a fresh scene model from an ordinary foreground refresh or say whether a headless drive had already completed. These events capture those facts before promotion or refresh changes them.

Interpretation:

  • foregroundEntered(... previous phase: ready) means the launch trunk had completed before the scene entered the foreground.
  • activationStarted(... first: true, had report: false) identifies a fresh report model that can show initial loading.
  • activationStarted(... first: false, had report: true) identifies a retained report performing a warm refresh without replacing the cards.

Review focus

  • the diagnostic event values are captured before the relevant await, while emission remains on the existing typed Where log tree
  • this does not work around Periscope's known pre-sink window: a very early cold-launch foreground event may remain OSLog-only until the scope's durable sink attaches
  • no rendered UI or report-loading policy changes

Testing

  • python3 -m unittest discover -s Tools/Tests -p 'test_snapshot_shards.py' (10 tests passed)
  • ./snapshot-shards check (42 suites assigned)
  • ./swiftformat --lint
  • ./test (7 backup-upgrader tests, 471 unit/integration tests, and 39 snapshot tests passed)

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