Repository navigation
Connected push for dashboard/Customize switches; exact caret-expansion heights - #67
Conversation
…n heights The screen switch previously hard-cut the outgoing screen and nudged the destination in by 36pt, which read as disconnected. It now plays as one critically damped full-width push: the outgoing page stays mounted (frozen at its pre-switch size so the per-frame height morph never re-lays it out), slides out beside the entering page, and stays parked offscreen so the next switch back needs no mount — profiled at 3 stalls/215ms across 10 switches vs 10/917ms on the previous hard-cut design. Caret expansions also co-animate to the right height on the first toggle: the estimate now mirrors the card's real render path (applicability filter, On Demand promotion, per-row-type heights with the text-row condensing rule), fixing Copilot's every-toggle wobble and the grow-past-then-shrink overshoot on text-heavy expansions. The quick-links row swaps its LazyVGrid for eager stacks so the buttons stop flying in from the viewport origin when a card above expands.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b4a0f6209
ℹ️ 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".
…ne row estimate The parked page's .allowsHitTesting(false) only blocked pointer input — keyboard focus, shortcuts (the parked dashboard footer's Cmd-R), and VoiceOver could still reach its offscreen controls. It now disables once the exit slide settles (not mid-flight, so visible controls don't grey out) and is hidden from accessibility for its whole parked life. The Usage Trend row estimate summed label + chart heights, but UsageSparkline lays them side by side in an HStack — the row height is their max, so the first-toggle estimate overshot chart-bearing expansions by ~18pt.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df1fddab84
ℹ️ 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".
… disable, hover cleanup Three fixes from the codex-personal review of the pager: - A switch during a still-running push snapped both pages to the new push's edges before animating back. A SlideProgressEffect (the PanelHeightModifier idiom) records the rendered slide progress each frame, and a reversal now seeds the new push at 1 - rendered so the pages continue from exactly where they visibly are. - The parked page's .disabled keyed off isSliding, which reads false the instant the push COMMITS (state hits its target immediately), so the outgoing page's controls dimmed mid-flight. It now keys off the push completion (settledSlideID). - Hover popovers/tooltips used to dismiss via the switched-away screen's onDisappear; a parked page never disappears, so the screen-change handler dismisses them explicitly (a Usage Trend hover detail could otherwise float over Customize).
…arget Follow-up to the reversal fix, from the cloud review's re-pass: parking mid-reversal froze the new parked page at state-level animatedHeight, which already holds the interrupted push's destination — a height the page never visibly reached, snapping its footer. The freeze now reads the height controller's live visualHeight (fed per frame by the PanelHeightBridge), identical to animatedHeight whenever the previous push had settled.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7eb213b15
ℹ️ 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".
Addresses the review's two P1s: the caret-expansion height math (revealed-row selection with applicability filtering and On Demand promotion, per-anatomy row pricing, the delta cache key) moves out of the oversized DashboardView into a pure ExpansionHeightEstimator, and ExpansionHeightEstimatorTests locks the regressions it fixed — counting saved-but-never-rendered widgets, flat per-row pricing of condensing text clusters, and summing the sparkline's side-by-side label + bars.
**TL;DR** Second batch from the production cleanup audit: rewrites comments and one doc page that describe code that no longer exists or no longer works that way. No code changes. **What was happening** - Claude and Codex comments still described the era before read-only credentials (#84, #90) and guarded renewal (#99): "Runway never refreshes a Claude token", "so Runway rotates on the same schedule", "a successful usage fetch (which rotates tokens back to disk)". Two functions in `CodexAuthStore` carried two doc comments fused together, the first describing removed behavior. - `DashboardView` comments said steady state keeps one live screen tree and that the outgoing page unmounts when the push completes. Since #67 the page stays parked until the popover closes. Others referred to a "scroll spacer" and an `outgoing` identifier that do not exist. - `WidgetRowView` described a per-row timeline gate that #60 replaced with the shared clock, 22 lines below a doc comment saying it is deliberately not that. - `MemoryEditorState.saveDirtyDocument` was documented as overwriting a moved file; it keeps the conflict check. - Comments named things that are gone or renamed: `EscapeToCloseReader`, `discover`, `compactValue`, `formatTokens`, `enterpriseUnverified`, a `Logger` in `LocalUsageServer`, the `MenuBarExtra` label, "Phase 1" of account discovery, a pinned count on `ProviderRow`. - `ProviderAuthRetry` was described as shared by every OAuth-style provider; only Grok calls `fetch`. - `docs/providers/openrouter.md` said `/credits` is required for a usable snapshot. The provider renders whatever either endpoint returned and reports an invalid key only when both return 401 or 403. **What this changes** - Rewrites each comment to match the code, after checking the claim against the current source. - Moves the keychain-before-file ordering doc in `ClaudeAuthStore` from the `StoredCandidateLoad` struct to `orderedStoredCandidates`, the function it describes. This is the only non-comment line movement in the diff. - Updates the OpenRouter page. **Tests** `swift build --build-tests` passes. The diff changes only comment lines, apart from the struct move above.
TL;DR — The dashboard↔Customize switch now plays as one connected full-width push instead of a hard cut, and the panel's height animations (screen switches and caret expansions) land on target the first time instead of overshooting and springing back.
What was happening
script/profile_ui.sh) showed every switch also stalled the main thread ~90ms rebuilding the destination tree on the interaction frame (10 stalls / 917ms across the 10-switch phase onmain).LazyVGridre-resolves cells against the scroll viewport mid-animation.What this changes
Motion.push.ForEachkeyed by screen with an atomically written page list, so role flips preserve structural identity and a mid-flight reversal can't hand out duplicate IDs.PopoverTopBar/PopoverFooternow key on the page's screen, not the destination), so bars travel with their screen during the push.ProviderLinksViewswapsLazyVGridfor eager stacks with the same visual contract (three-across flexible columns, wrapping, partial rows keep column width).Heads-up
cacheDisplayraster of the outgoing screen was tried first and reverted: rasterizing the hosting view cost 85–330ms of main-thread stall on the switch frame (the profiler numbers are in theDashboardViewheader comment for posterity).Tests
swift testsuite passes.script/profile_ui.shbefore/after: screen-switch phase went from 10 stalls / 917ms (main) to 3 stalls / 215ms; the remaining ~98ms stall is the session's first Customize mount, which lands before motion starts. Expand-phase numbers are run-to-run noise on all builds (332ms–4.6s including onmain).