Repository navigation
Conversation
… close-time settle
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a961b08cfe
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a4c5e211fb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
TL;DR — Warm popup open drops from ~84ms to ~35ms click-to-first-frame (upstream openusage measures 42ms with half our content). Three changes: per-view
TimelineViews gated on visibility become one shared observable clock, the panel height is retained across closes instead of reset to 0, and the close settles the hidden tree so the next open finds it clean.What was happening
TimelineViewbehind anif popoverIsVisiblegate. The panel's SwiftUI tree survivesorderOut, so each open AND close was a structural branch swap that tore down and rebuilt every dated row's subtree — measured as the largest cost in the open's pre-showlayoutSubtreeIfNeeded(~57ms avg).animatedHeightto the 0 sentinel, so each reopen walked 0 → target: a root frame change that forced a second full-tree layout.What this changes
DashboardClock(new): one 1s/30s wall clock owned byAppContainer, started/stopped at the panel show/hide chokepoints. Rows and the footer read it via observation — stable view structure, no ticks while closed, fresh stamps on open. Environment reads are optional soImageRenderershare cards (no clock) stay static, matching prior behavior.DashboardViewkeepsanimatedHeightacross closes; the reopen seed and the hidden collapsed re-measure walk it un-animated, and same-value seeds are skipped.hidePanel()runslayoutSubtreeIfNeeded()on the hidden tree so close pays for close (~34ms, invisible), replacing the ~70–100ms post-close display-cycle stall.Heads-up
Tests
DashboardClockTests.script/profile_ui.shbefore/after on this machine: open.toFirstRunloopTurn 84.1ms → 35.6ms avg; close.syncTotal 3.6ms+deferred-stall → 34.1ms all-inclusive.