Skip to content

Keep graph Timeline hosts stable through right-swipe transitions - #143

Merged
RCmerci merged 4 commits into
mainfrom
fix/resident-graph-switch-jitter
Oct 30, 2026
Merged

RCmerci merged 4 commits into
mainfrom
fix/resident-graph-switch-jitter

Conversation

@RCmerci

@RCmerci RCmerci commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Right-swiping into a resident graph moved its Timeline from a preview hierarchy into the focused navigation hierarchy. The resulting remount/layout/offset restoration caused an end-of-switch jump, and disabled preview ancestors tinted image buttons. Closing and reopening a graph could also leave an old image release waiting after its session had retired.

This change keeps each full graph owner’s Timeline and navigation host in a stable native container. Warm switches move the existing pages and change their interaction role; hidden presentation updates stay frozen while graph synchronization continues. Preview hit testing and accessibility are blocked without applying the disabled appearance to images.

For a first visit, a source-only snapshot follows the pan, then a native 0.24s slide starts before target construction. The target reveals after its own post-slide layout is ready, using a 0.15s fade. Loading readiness is fenced by owner, motion nonce and phase token. Cancelled or stale callbacks cannot complete a newer transition. Initial state/feed preparation runs once per admitted owner without mounting hidden UI. Retired resource requests finish through their original owner so image lease cleanup cannot block later graph actions.

The existing right-only, maximum-three graph behavior, per-graph drafts/navigation/scroll, resident management and hidden synchronization remain covered.

Validation

  • Journal CI run 40970740750 completed successfully on the final head; full build and full regression passed. Both cache-save steps were intentionally skipped on restored cache hits.

Final head: 5db35c0f00b29ea27bfeb3738b3fe472b248cd7e; base: 161c096e9dffd7aeb2a75801a3daa9964807a2d8.

  • Full locked-source dune build @all app/native_embed.exe.o and dune runtest --force: passed. Exact production hashes match the final commit.
  • Existing native ownership/scroll checks passed; independent read-only review found no remaining evidence-backed P1/P2.
  • Actual Apple XCTest touches on a dedicated synthetic Simulator covered cached/delayed/hidden real PNGs, image color and preview hit barrier, cold/warm right cycles, left no-op, cancellation, rapid gestures, scroll restoration, graph drafts and queued saving, hidden encrypted graph transactions, 1/2/3 resident management/replacement/reopen/restart, and three-host sign-out cleanup. Eight original-speed recordings were delivered to the user’s Library; original logs and recordings are preserved.
  • Six traced focus commits each produced one native property patch (0.210–0.616ms), with no Timeline mount/disappear/restore or host creation/destruction in the following 700ms. Five measured warm tail windows had 0px vertical shift and moving-frame gaps <=20ms.
  • One controlled 22s Simulator Time Profiler comparison: main running sample weight 3779→1657ms; one 275.6ms detected microhang in the baseline, none >250ms in the candidate. Baseline lost its scroll anchor; candidate preserved it.
  • Old-scope physical image lease tables reached 4→0 in the cleanup diagnostic; all three retained native hosts dismantled on sign-out.

Limits

First construction still has measured 127–135ms main display-callback gaps. The native first-open transition handles presentation; it does not remove that CPU cost or guarantee every device’s frame rate. Cold snapshot capture measured approximately 21ms.

The optimized Simulator fixture used the explicitly experimental host-restamp route (cross_abi_validated=false), not a device/TestFlight archive. The profile includes XCTest/accessibility overhead and is one paired run. PNG asset tests exercise the legacy managed raw-PNG path, not real-account encrypted image packages. Peak memory, dedicated rotation/background behavior and an injected first-feed-still-queued case were not separately measured. spec-dev-tool was unavailable.

See docs/agent-guide/001-fixed-timeline-hosts.md for ownership, transition and cleanup decisions. No protected spec or Dune changes, test/CI infrastructure meta-tests, merge or release are part of this PR.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T23:07:52.984275Z 5db35c0 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@RCmerci
RCmerci merged commit 462fbc1 into main Oct 30, 2026
2 checks 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