Skip to content

fix(NavigationStack): a platform-animated history back or forward plays no second animation - #12004

Merged
cixzhang merged 11 commits into
mainfrom
fix/navigationstack-ios-platform-back
Nov 21, 2026
Merged

cixzhang merged 11 commits into
mainfrom
fix/navigationstack-ios-platform-back

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

User impact

When a browser animates a history back or forward itself and says so, Lab NavigationStack then played its own pop or push animation as well, so a person saw the screen move twice. After this change, the stack applies such a traversal without a second slide. Every other traversal (the Back button, the stack's own swipes, history.back()) still slides once, as before.

Problem and solution fit

  • Why it fails: the stack animates every path change, whoever made it. When the platform has already animated a history traversal, the stack's own animation repeats it.
  • The fix: when the browser reports its own visual transition for a traversal (hasUAVisualTransition on the Navigation API's navigate event or on popstate), the stack applies it without a second slide; any other traversal still slides. The stack listens for both events on its container's window, attached and detached with the container (capture for popstate, so the mark is set before an app's own listener commits the path), and keeps the mark for two frames. A pop then drops the leaving screen at once, and a push puts the new screen on top at once. Focus moves as after any settled push or pop. No new API.
  • The evidence page: the device takes below used a raw sandbox probe page (it pushed history entries and logged each popstate and Navigation API navigate event with its hasUAVisualTransition). It is not part of this pull request any more: this pull request changes only packages/lab/src/NavigationStack/NavigationStack.tsx and its test, so it is a Lab-only change.

Expected behavior and authority

spec:AST-094 FR22: "iOS Safari's back swipe from the screen edge and Android's system back gesture MUST stay the browser's and the system's; a touch presentation never overrides them." A platform-run back is the platform's, so the stack does not animate it a second time. The specification owner confirmed this as a records-decided repair. The stack's own edge and content swipes are unchanged: with this rule a traversal plays one animation whoever runs it.

Evidence

  • Red first: three jsdom cases in NavigationStack.test.tsx (after the platform animated a history traversal). A popstate with hasUAVisualTransition: true that pops leaves no sliding screen, and one that pushes puts the new screen on top with focus on its title at once. Both fail on main (the screen slides) and pass with the change. A popstate without the mark still slides.
  • Device (iPhone 14, iOS 26.2, Reduce Motion off, Safari and a Home Screen app), at earlier heads only, on the sandbox probe page this pull request no longer contains. These takes are context, not evidence for this head; this head was not device-checked (a Lab-only change merges on normal gates): each take loaded the probe fresh, pushed twice, and ran one traversal. Every log read navigate type=traverse hasUAVisualTransition=false then popstate hasUAVisualTransition=false, and the stack slid About → General once, then held still, frame by frame.
    • At ad6b37f (12 takes, an earlier head): a stack swipe from x 17 and x 30 in the Home Screen app, from x 45 and x 60 in Safari, two content swipes and two Back taps in each.
    • At 534e5c1 (4 takes, an earlier head): history.back() twice in each.
    • At b40e1dd, an earlier head (a main merge that brought in a change to the shared layer module packages/core/src/Layer/useLayer.tsx, so the earlier takes do not carry, spec:AST-094 DEC-31): all 14 takes the test driver can produce pass on the same iPhone. In Safari: a content swipe, a Back tap and history.back(), 2 of 2 each. In the Home Screen app: a stack edge swipe, a content swipe, a Back tap and history.back(), 2 of 2 each. Each slid About → General once and then held still.
    • At 3363e4b, an earlier head (a main merge that brings in the merged NavigationStack fixes, which change NavigationStack.tsx, so the takes above do not carry): a side-by-side on the same iPhone of 3363e4b against b40e1dd, covering the 7 drivable take types (Home Screen app: edge swipe, content swipe, Back tap, history.back(); Safari: content swipe, Back tap, history.back()), interleaved. Graded takes per type: at least 2 per build, 35 in all (b40e1dd 15: 2 per type, 3 for the Home Screen history.back(); 3363e4b 20: 2 per Home Screen type, 4 per Safari type, counting re-takes on a second unit). Six b40e1dd Safari takes where the page never painted are not graded. 3363e4b matches b40e1dd in every graded take: each log reads navigate type=traverse hasUAVisualTransition=false then popstate hasUAVisualTransition=false, and the stack slides About → General once (swipes track the finger, then finish), then holds still. No major difference.
    • At 34ab1a5, an earlier revision (its NavigationStack code differs from this head's by clearing the mark when the listener detaches) (a main merge that changes the shared packages/core/src/Layer/useLayer.tsx and packages/core/src/gestures/GestureHost.ts, so the takes above do not carry, spec:AST-094 DEC-31): two iPhone 14 units with iOS 26.2, Safari on one and a Home Screen app on the other, 34ab1a5 against 3363e4b, each build's version confirmed on the phone. The 7 drivable take types ran 2 each and match at both builds. Every traversal logs navigate type=traverse hasUAVisualTransition=false then popstate hasUAVisualTransition=false. In Safari a content swipe, a Back tap and history.back() slide About → General once and then hold still to the end of a 15 s frame-by-frame sample. In the Home Screen app the same three slide once. In this run the driver's stack edge swipe in the Home Screen app did not complete a back: the stack followed the finger and sprang back to About, the same at both builds.
  • Safari's own tab edge swipe, the platform-animated case this change fixes: not device-verified, and out of scope under the Lab-only merge rule (a Lab-only change merges on normal gates with no device check). A test driver cannot produce it. Synthesized left-edge swipes reach the page as ordinary touches and Safari's back gesture never starts, so every traversal recorded above reports hasUAVisualTransition=false. The three red-first unit cases cover the fixed path. No device claim is made for this gesture.
  • Desktop: the browser Back button in desktop Chromium and desktop WebKit (Playwright, two takes each, before at the probe's first commit and after at b40e1dd, an earlier head): all eight logs read hasUAVisualTransition=false, and the stack slid once at both builds, so the Back button is unchanged. The branch runs whenever the browser marks a traversal, with no touch gate: where a desktop browser marks a trackpad swipe back (for example desktop Safari's two-finger swipe), the stack now skips its own slide as on a phone, since the browser has already animated the page. A test driver cannot produce a trackpad swipe, so that case is not measured.
  • Not claimed: desktop Safari's two-finger trackpad swipe back. A test driver cannot produce it, so whether the browser marks it and the stack then plays no second slide is an open evidence gap.
  • Unchanged paths: all NavigationStack unit suites pass (45 tests in 2 files).
  • Preflight at 34ab1a5 (pnpm preflight --browser, a clean worktree on current main): every check passes, including the full interaction suite (1,878 passed, 54 skipped, no failures) and the accessibility specs this change selects.

Scope

Components: NavigationStack (lab)

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run packages/lab/src/NavigationStack: red first as above, plus a case where a marked traversal hides the stack (React <Activity>) before the mark clears: the next tap push still slides.
  • pnpm preflight --browser at this head (strict lint): every step passes, including pnpm review:pre and the interaction step, which runs the two specs it selects (NavigationStack.interaction.browser.spec.ts and NavigationStackScrollEdge.interaction.browser.spec.ts): 68 passed.
  • eslint (strict) on the changed files: no errors.
  • Safari's own tab edge swipe: out of scope under the Lab-only merge rule; a test driver cannot produce it (see Evidence).

Owner and land path

Owner: Cindy's Astryx gaps lane 3 (agent). Land path, once the fix is in: Specs stamp as a defect repair, then CodeBunny review on the exact head, then ready, CI, and merge through the drain queue. No release (@astryxdesign/lab is private).

…istory back

On a real phone, the page pushes two history entries and logs each popstate and Navigation API navigate event with its hasUAVisualTransition, and the display mode it runs in. It is the evidence page for NavigationStack skipping its own pop or push animation after a platform-animated traversal.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 9:14am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 11:23 AM UTC

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · d8684f5

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/NavigationStack 86.3 kB (+249 B) · 1.5 kB CSS (0) — — · ✓ · —
lab/NavigationScreen 86.3 kB (+248 B) · 1.5 kB CSS (0) — — · — · —

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested. The page is a sound instrument for the device evidence, but this head does not match its title yet, and the page's own stack can show misleading motion.

  • The title, the user-impact paragraph and the ticked scope box claim a NavigationStack fix, but this head changes no package code: add the fix commits with their red-first tests, or title the pull request as its commit is (test(sandbox): …) until they land.
  • getKey={(entry) => entry} keys a screen by its row name while every screen offers the same three rows, so pushing General twice renders two screen-General screens and React logs a duplicate-key warning: drop getKey or key by index and name.
  • A pop only calls history.go and updates the path later in popstate, but the stack's back swipe springs back and pops a second time when the shorter path is not committed by the next animation frame, which an asynchronous history.go does not guarantee: set the path in the handler for pops too.

Also worth a look: a back between the two "Push two entries" entries pops the stack to its root, because a history state without path maps to [].

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: a history back or forward that the platform animated no longer plays a second NavigationStack animation — false at this head; no package file changes and the stack still animates every path change.
  • Claim: after the fix, the stack applies such a pop or push at once — not in this head; it describes later commits.
  • Claim: the stack animates every path change, whoever made it — verified in the stack's transition logic.
  • Claim: the fix reads hasUAVisualTransition on navigate and popstate, changes nothing where it is missing, and adds no API — not checkable; no fix code yet.
  • Claim: the page pushes history entries and logs each popstate and navigate event with hasUAVisualTransition and the display mode — verified (page.tsx:105-150).
  • Claim: the page's stack pushes one history entry per push and follows the history back and forward — verified (page.tsx:66-90), with the defects above.
  • Claim: the quoted touch-presentation requirement keeps the edge back swipe with the browser and the system — verified against the current record.
  • Claim: the specification owner confirmed this as a records-decided repair — not verifiable from the repository; no record changes here.
  • Claim: one defect is restored — false at this head; no new public API — verified; no internal context in public text — verified.
  • Claim: the sandbox route-manifest and routing tests pass with the new route listed — verified, 10 of 10 at this head.
  • Claim: the fix's red-first tests follow — not at this head.
  • Claim: each listed overlapping pull request adds its own route to the shared list — not checked; this head adds one line.
  • Claim: no release, since Lab is private — verified.
  • File apps/sandbox/scripts/next-export-routes.json: clear (one sorted route line; the route contract test passes).
  • File apps/sandbox/src/app/(raw)/pages/history-back-probe/page.tsx: the duplicate-key and pop-timing findings above, plus the non-blocking reset note.

Automated review (maintainer link)

…ys no second animation

When the platform has just animated a history traversal (Safari's edge swipe back or forward, an iOS Home Screen app's back gesture), the browser sets hasUAVisualTransition on the Navigation API navigate event and on popstate. The stack marks it for two frames, and the path change that traversal causes is applied at once: a pop drops the leaving screen with no slide, a push puts the new screen on top with no slide. Focus moves as after any settled push or pop. A traversal the platform did not animate still slides.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 497288d

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested. The fix behaves as described when the browser marks a traversal, but the description claims more than this head shows, and a few items need work before approval.

  • The iPhone impact (Safari's edge swipe and a Home Screen app's back gesture) is not shown at this head, since the only stated device take logged hasUAVisualTransition=false for every pop: add the real-finger result as text (device, browser, head, animation scale, result), or narrow the impact to traversals the browser marks and drop the Home Screen claim.
  • The new branch is not gated to touch input, so the description needs desktop (mouse or trackpad) before and after results, for example desktop Safari's two-finger swipe back and desktop Chrome's Back button.
  • usePlatformAnimatedTraversal adds its window listeners in a mount Effect (NavigationStack.tsx:780-810); move them into a ref callback called from containerCallback (NavigationStack.tsx:893-903), as useInteractionModalityTracking's ref does.
  • The probe page still keys screens by row name (page.tsx:93), so a row pushed twice gives two screens one key; drop getKey or key by index and name.
  • The probe page still commits pops only from popstate (page.tsx:90), so a late popstate shows a spring-back and then a second pop; set the path before calling history.go(...).

Also worth a look: the component's JSDoc (NavigationStack.tsx:828-829) and its .doc.mjs description still say every push and pop slides.

Claims and files checked

Review mode: incremental; reason: none

  • Claim: on an iPhone, a platform-animated back or forward makes the stack slide a second time — not shown at this head; the stated device take saw one slide and no marked traversal.
  • Claim: with the fix, a platform-animated pop or push is applied at once — verified with a marked event (the new tests and browser frames).
  • Claim: on the base the stack animates every path change, whoever made it — verified (NavigationStack.tsx:972-1000).
  • Claim: the stack reads the mark from both history events, with a window capture listener that runs before the app's own listener — verified (NavigationStack.tsx:787-804).
  • Claim: the mark lasts two frames — verified (NavigationStack.tsx:790-796).
  • Claim: focus moves as after any settled push or pop — verified (NavigationStack.tsx:1468-1477, browser frames).
  • Claim: an unmarked traversal, or a browser without the mark, still slides — verified (the control test; frames identical to the base).
  • Claim: no new API — verified.
  • Claim: the probe page logs both events with the mark and the display mode, and its stack follows the history — verified, with the two probe findings above.
  • Claim: the quoted touch-presentation requirement keeps the edge back swipe with the browser and the system — verified against the current record.
  • Claim: the specification owner confirmed this as a repair under that requirement — verified as an engineering owner's approval comment on this head.
  • Claim: three red-first tests, two that fail on the base and pass with the change, and a control that still slides — verified.
  • Claim: the before take on an iPhone at the first commit — accepted as stated; it shows no marked traversal.
  • Claim: all NavigationStack suites pass — verified, 42 of 42.
  • Claim: the sandbox route tests pass with the new route listed — verified, 10 of 10.
  • Claim: strict lint on the changed files reports no errors — verified.
  • Claim: one defect restored, no hidden API, no internal context in public text — verified.
  • Claim: each listed overlapping pull request adds its own route to the shared list — not checked.
  • Claim: no release, since Lab is private — verified.
  • File apps/sandbox/scripts/next-export-routes.json: clear.
  • File apps/sandbox/src/app/(raw)/pages/history-back-probe/page.tsx: the two probe findings above, plus a non-blocking reset note (page.tsx:70).
  • File packages/lab/src/NavigationStack/NavigationStack.tsx: the desktop-results and Effect findings above, plus the JSDoc note.
  • File packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.

Automated review (maintainer link)

The popstate and navigate listeners now attach in the container ref callback on the element window, beside the modality tracker, and detach with it, so a stack moved to another document listens to its new window. The probe page keys screens by position and name, sets the path when the stack pops before it moves the history, and leaves its own two entries out of the stack path.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec ad6b37f

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested. The listener move and the probe fixes from the last review are in, and the fix behaves as described for a traversal the browser marks, but three items need work before approval.

  • The probe's stack no longer follows a back to the page's first entry, because the sandbox router stores {idx: 0} there and the new popstate handler (page.tsx:70-75) ignores any state without a path, so skip only the probe's own step entries instead, for example if (state?.step != null) return; setPath(state?.path ?? []); (the earlier suggestion to map only null to [] missed the router's state).
  • The new branch is not gated to touch input, so the description itself needs desktop (mouse or trackpad) before and after results, for example desktop Safari's two-finger swipe back and desktop Chrome's Back button, since a later comment does not cover it.
  • The description says the history.back() device takes carry to this head, but the latest commit changes NavigationStack.tsx and the probe page, so they do not carry under the device-evidence rule; say they were taken at the earlier head, or take them again after the probe fix and state device, browser, head, animation scale and result.

Also worth a look: the component's JSDoc (NavigationStack.tsx:830-831) still says every path change animates.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none since the last review.
  • Claim: when a browser animates a history back or forward itself and says so, the stack played a second animation — verified for a browser-marked traversal (red-first tests, Chromium frames).
  • Claim: after the change, such a traversal applies without a second slide — verified (tests; Chromium shows no running animation 50 ms in).
  • Claim: every other traversal (Back button, the stack's own swipes, history.back()) still slides once — verified (unmarked control test and frames; the swipe-release path is untouched).
  • Claim: the stack animates every path change, whoever made it — verified on the base.
  • Claim: the stack reads the mark from navigate and popstate, listens on its container's window, attaches and detaches with the container, uses capture for popstate, and keeps the mark two frames — verified (NavigationStack.tsx:775-823, :895-908).
  • Claim: a pop drops the leaving screen at once and a push puts the new screen on top at once — verified.
  • Claim: focus moves as after any settled push or pop — verified (the new title after a push, the root title after a pop).
  • Claim: no new API — verified.
  • Claim: the probe page logs both events with the mark and the display mode — verified (page.tsx:117-150).
  • Claim: the probe's stack follows the history back and forward — false for a back to the page's first entry (finding above).
  • Claim: the quoted touch-presentation requirement — verified against the current record.
  • Claim: the specification owner confirmed this as a repair under that requirement — verified as an engineering owner's approval comment on this head.
  • Claim: three red-first cases, two that fail on main and pass with the change, and a control that still slides — verified.
  • Claim: eight device takes at the earlier head each slid once and logged no mark — accepted as stated.
  • Claim: the history.back() takes carry to this head — false (finding above).
  • Claim: desktop results follow in a comment — not present (finding above).
  • Claim: nothing is claimed about Safari's own edge swipe — consistent with the rest of the description.
  • Claim: all NavigationStack suites pass (42 tests in 2 files) and the sandbox route tests pass with the new route — verified (42 of 42; 10 of 10).
  • Claim: the stated vitest run passes 48 tests — verified (42 plus 6).
  • Claim: strict lint on the changed files reports no errors — verified.
  • Claim: one defect restored, no hidden API, no internal context in public text — verified.
  • Claim: each listed overlapping pull request adds its own route to the shared route list — verified for all 18.
  • Claim: no release, since Lab is private — verified.
  • File apps/sandbox/scripts/next-export-routes.json: clear.
  • File apps/sandbox/src/app/(raw)/pages/history-back-probe/page.tsx: the first-entry finding above.
  • File packages/lab/src/NavigationStack/NavigationStack.tsx: the desktop-results finding above, plus the JSDoc note.
  • File packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.

Automated review (maintainer link)

The router marks the first history entry, so its state is neither null nor a stack path. The probe now skips only its own two step entries and treats any other entry without a path as the root. The component JSDoc names the exception to its animation.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 534e5c1

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet because the pull request is still a draft, so it is not ready to merge until the required checks run and pass.

The probe's stack now follows a back to the page's first entry, and the description states desktop before-and-after results and dates the iPhone takes to the heads they were taken at, so the earlier change requests are resolved.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none since the last review.
  • Claim: when a browser animates a history back or forward itself and says so, the stack used to play its own slide as well — verified (the two marked cases fail on the base; Chromium on the base still runs the slide 50 ms after a marked traversal).
  • Claim: after the change such a traversal applies without a second slide — verified (tests; Chromium on the head runs no animation, with the screen settled and focus on its title).
  • Claim: every other traversal (Back button, the stack's own swipes, history.back()) still slides once — verified (the unmarked control passes on both; unmarked traversals run the same seven animations on base and head; the swipe release path is untouched).
  • Claim: the stack animated every path change, whoever made it — verified on the base.
  • Claim: the stack reads the mark from navigate and popstate on its container's window, attaches and detaches with the container, uses capture for popstate, and keeps the mark two frames — verified (NavigationStack.tsx:775-822, :896-909).
  • Claim: a pop drops the leaving screen at once and a push puts the new screen on top at once — verified (tests; Chromium).
  • Claim: focus moves as after any settled push or pop — verified (the revealed or pushed title takes focus).
  • Claim: no new API — verified.
  • Claim: the probe page logs both events with the mark and the display mode — verified (page.tsx:117-150).
  • Claim: the probe's stack pushes one history entry per push and follows the history back and forward — verified under the sandbox's router, including a back to the first entry.
  • Claim: the quoted touch-presentation requirement — verified against the current record.
  • Claim: the specification owner confirmed this as a repair under that requirement — verified as an engineering owner's approval comment on this head.
  • Claim: the stack's own edge and content swipes are unchanged — verified (the new branch runs only without a finger release).
  • Claim: three red-first cases, two that fail on main and pass with the change, and a control that still slides — verified.
  • Claim: the iPhone takes at the two earlier heads logged no mark and slid once — accepted as stated, and correctly dated to those heads.
  • Claim: a set of takes at this head follows — not yet present; no claim rests on it.
  • Claim: desktop Chromium and WebKit Back-button takes, before and after, logged no mark and slid once on both builds — accepted as stated; consistent with the code, which skips the slide only after a marked traversal.
  • Claim: nothing is claimed about Safari's edge swipe or the desktop trackpad swipe — consistent with the rest of the description.
  • Claim: all NavigationStack suites pass (42 tests in 2 files) and the sandbox route tests pass with the new route — verified (42 of 42; 10 of 10).
  • Claim: the stated vitest run passes 48 tests — verified (42 plus 6).
  • Claim: lint on the changed files reports no errors — verified.
  • Claim: one defect restored, no hidden API, no internal context in public text — verified.
  • Claim: each listed overlapping pull request adds its own route to the shared route list — verified for all 18.
  • Claim: no release, since Lab is private — verified.
  • File apps/sandbox/scripts/next-export-routes.json: clear.
  • File apps/sandbox/src/app/(raw)/pages/history-back-probe/page.tsx: clear.
  • File packages/lab/src/NavigationStack/NavigationStack.tsx: clear.
  • File packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 17, 2026 16:17
@cixzhang cixzhang added the release-critical Admitted to CI at once (AST-030 DEC-30). Counts only when a writer applies it. label Nov 17, 2026
Main moved past #12297 (CI planner budget); a clean merge, no conflicts.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the code still behaves as described, but the rewritten Device evidence claims more than the touch-presentation record allows.

  • The Device bullet says the 12 iPhone takes from the earlier head (stack edge swipes, content swipes and Back taps) carry to this head, but spec:AST-094 DEC-31 carries device evidence only over test-only files, knowledge records, release notes and the listed generated files, and the last commit changes page.tsx and NavigationStack.tsx, so date those takes to the earlier head and drop the carry sentence, or retake the swipes and Back taps at this head.

The CI run on this head stopped because CI was full, not because of this change, so it needs a re-run.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0): none since the last review.
  • Claim: when a browser animates a history back or forward itself and says so, the stack used to play its own slide as well — verified (the two marked cases fail on the base).
  • Claim: after the change such a traversal applies without a second slide — verified (tests; Chromium frames of this head).
  • Claim: every other traversal (Back button, the stack's own swipes, history.back()) still slides once — verified (the unmarked control passes on both; the skip needs no finger release).
  • Claim: the stack animated every path change, whoever made it — verified on the base.
  • Claim: the stack reads the mark from navigate and popstate on its container's window, attaches and detaches with the container, uses capture for popstate, and keeps the mark two frames — verified (NavigationStack.tsx:775-822, :896-909).
  • Claim: a pop drops the leaving screen at once and a push puts the new screen on top at once — verified (tests).
  • Claim: focus moves as after any settled push or pop — verified (the revealed or pushed title takes focus).
  • Claim: no new API — verified.
  • Claim: the probe page logs both events with the mark and the display mode — verified (page.tsx:117-150).
  • Claim: the probe's stack pushes one history entry per push and follows the history back and forward — verified (page.tsx:65-111).
  • Claim: the quoted touch-presentation requirement — verified against the current record.
  • Claim: the specification owner confirmed this as a repair under that requirement — verified as an engineering owner's approval comment on this head.
  • Claim: the stack's own edge and content swipes are unchanged — verified (the new branch runs only without a finger release).
  • Claim: three red-first cases, two that fail on main and pass with the change, and a control that still slides — verified.
  • Claim: the twelve iPhone takes at the earlier head logged no mark and slid once — accepted as stated for that head.
  • Claim: those twelve takes carry to this head — false (the device-evidence carry rule asks for a new take after a commit that changes the probe page and the component).
  • Claim: the commits since that head change only the probe's back to its first entry and a doc comment — verified.
  • Claim: four iPhone history.back() takes at this head logged no mark and slid once — accepted as stated.
  • Claim: desktop Chromium and WebKit Back-button takes, before and after, logged no mark and slid once on both builds — accepted as stated; consistent with the code.
  • Claim: nothing is claimed about Safari's edge swipe or the desktop trackpad swipe — consistent with the rest of the description.
  • Claim: all NavigationStack suites pass (42 tests in 2 files) and the sandbox route test passes — verified.
  • Claim: the stated vitest run passes 48 tests — verified (42 plus 6).
  • Claim: lint on the changed files reports no errors — verified.
  • Claim: one defect restored, no hidden API, no internal context in public text — verified.
  • Claim: each listed overlapping pull request adds its own route to the shared route list — verified for all 18.
  • Claim: no release, since Lab is private — verified.
  • File apps/sandbox/scripts/next-export-routes.json: clear.
  • File apps/sandbox/src/app/(raw)/pages/history-back-probe/page.tsx: clear.
  • File packages/lab/src/NavigationStack/NavigationStack.tsx: clear.
  • File packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as draft November 17, 2026 16:37
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec b40e1dd

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the code is unchanged and still behaves as described, but after the merge of main none of the iPhone results in the description count for this head.

  • Regression: the merge brings in a change to packages/core/src/Layer/useLayer.tsx, one of the shared layer modules that the touch-presentation record's evidence-carry rule lists, so the four history.back() takes from the previous head need a new take at this head (or, once the owner has passed the behavior on a device, a side-by-side on the same devices).
  • The Device bullet still says the swipe and Back-tap takes from two heads back carry to this head, which the same rule does not allow after the later edits to the probe page and NavigationStack.tsx.

Next: repeat the iPhone traversals at this head and date every take to the head it ran on. CI has not run on this head yet because the pull request is a draft.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim: a browser-marked back or forward applies without a second slide, and every other traversal still slides once: verified (NavigationStack.test.tsx:182-204; the two marked cases fail on the base and pass on this head).
  • Claim: the stack listens for popstate (capture) and navigate on its container's window, attached and detached with the container, and keeps the mark for two frames: verified (NavigationStack.tsx:766-823, :896-909).
  • Claim: a marked pop drops the leaving screen at once, a marked push puts the new screen on top at once, and focus moves as after a settled push or pop: verified (NavigationStack.tsx:1466-1488).
  • Claim: no new API: verified (Lab is private and its exports are unchanged).
  • Claim: the probe page logs each popstate and navigate with its mark and the display mode, and its stack adds one history entry per push and follows back and forward: verified (history-back-probe/page.tsx:83-129, :131-168).
  • Claim: the touch-presentation record's FR22 is quoted correctly, and the specification owner ruled this a defect repair: verified (an engineering owner's /approve-spec names this head).
  • Claim: the earlier swipe and Back-tap takes carry to this head: false (see above).
  • Claim: four history.back() takes were made at this head: false at this head (they ran on the previous head; see above).
  • Claim: desktop Chromium and WebKit Back-button takes logged no mark and slid once before and after: stated in the description, not reproduced here.
  • Claim: all NavigationStack suites (42 tests in 2 files) and the sandbox route tests pass with the new route listed: verified on this head (48 passed).
  • Claim: strict eslint finds no errors on the changed files: verified.
  • Claim: the only overlap with the listed open pull requests is the shared route list: not rechecked; this pull request adds one line to that list.
  • Claim: no release, because the Lab package is private: verified.
  • File apps/sandbox/scripts/next-export-routes.json: clear.
  • File apps/sandbox/src/app/(raw)/pages/history-back-probe/page.tsx: clear.
  • File packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.
  • File packages/lab/src/NavigationStack/NavigationStack.tsx: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

Update to my correction above: this PR changes Lab only, and Lab work merges on its normal gates. It does not wait for an owner phone check. Any device evidence for the Safari edge swipe comes from the device farm.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 34ab1a5

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the newest evidence note restates the iPhone takes this revision already has, but it adds no Safari edge-swipe result, so the one remaining point stands.

  • Regression: Safari's tab edge swipe, the gesture the touch-presentation record's edge-gesture requirement names and the only input the new platform-animated branch serves, still has no real-device result, and the Lab-only merge path the note relies on does not apply because the pull request also changes apps/sandbox, which the CI record's Lab-only definition counts as a mixed change.

The three jsdom cases prove the branch's logic with a synthetic popstate, but they cannot show whether iOS Safari marks its edge swipe. Next: either state a real-finger Safari-tab edge-swipe result at this revision, or move the probe page and its route entry into their own pull request so this one is Lab-only and merges on Lab's gates. No code change is needed.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Claim: a browser-marked back or forward applies without a second slide, while the Back button, the stack's own swipes and history.back() still slide once: verified (NavigationStack.tsx:1539, the branch runs only with no finger release; NavigationStack.test.tsx:192-214).
  • Claim: the stack listens for popstate (capture) and navigate on its container's window, attached and detached with the container, and keeps the mark for two frames: verified (NavigationStack.tsx:826-874, :948-961).
  • Claim: a marked pop drops the leaving screen at once, a marked push puts the new screen on top at once, and focus moves as after a settled push or pop: verified (NavigationStack.tsx:1537-1559).
  • Claim: no new API: verified (the Lab package is private and the new hook is module-private).
  • Claim: the probe page logs each popstate and navigate with its mark and the display mode, and its stack adds one history entry per push and follows back and forward: verified (history-back-probe/page.tsx:61-111, :113-183).
  • Claim: the touch-presentation record's edge-gesture requirement is quoted correctly, and the specification owner ruled this a defect repair: verified (the quote matches the current record; an engineering owner's spec approval names this revision).
  • Claim: the stack's own edge and content swipes are unchanged: verified (the new branch needs no finger release; the touch module is not in the diff).
  • Claim: the three new jsdom cases are red first: verified (with the new test file on the base, the two marked cases fail and the control passes; all three pass at this revision).
  • Claim: iPhone takes at four earlier revisions logged no mark and slid once: stated and labelled as earlier revisions; they do not carry to this revision, as the description says.
  • Claim: at this revision, a merge of the main branch changes the shared layer hook and gesture host, so earlier takes do not carry: verified (the merge changes both files).
  • Claim: a side-by-side at this revision of the seven drivable take types matches the previous revision on two iPhones: stated and accepted under the record's side-by-side rule; the Home Screen app's stack edge swipe sprang back at both builds.
  • Claim: Safari's tab edge swipe is not device-verified at this revision and no device claim is made for it: true as stated; it is the blocking finding, since the change exists for that gesture.
  • Claim: the desktop browser Back button in Chromium and WebKit logged no mark and slid once before and after: stated for an earlier revision; accepted for the desktop rule with this revision's spec approval.
  • Claim: desktop Safari's trackpad swipe back is not claimed: noted; no finding.
  • Claim: all NavigationStack unit suites pass (44 tests in 2 files), the sandbox route tests pass, and the stated command passes 50 tests: verified at this revision (3 files, 50 passed; routing and route-manifest suites, 10 passed).
  • Claim: strict lint on the changed files reports no errors: verified at this revision.
  • Claim: the full preflight with browser specs passes at this revision: stated; not rerun here.
  • Claim: public text carries no internal context: verified (no match in the title, description, branch name, commit messages or added lines).
  • Claim: the new route is listed in the export route list, distinct from the other open pull requests' routes: verified (next-export-routes.json:26, the only entry for this page).
  • Claim: no release is needed because the Lab package is private: verified (packages/lab/package.json is private).
  • Evidence note claim: the change is Lab-only and merges on Lab's gates: false (two changed files are under apps/sandbox, and the CI record lists a Sandbox change beside Lab as mixed).
  • Evidence note claim: the seven drivable gestures ran twice each on two iPhones and matched the previous revision: matches the description; already credited.
  • Evidence note claim: the three red-first unit cases cover the branch Safari's edge swipe takes: true for the branch's logic; not real-device evidence for iOS Safari.
  • File: packages/lab/src/NavigationStack/NavigationStack.tsx: clear as code; the blocking finding is device evidence for its branch at :1539.
  • File: packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.
  • File: apps/sandbox/src/app/(raw)/pages/history-back-probe/page.tsx: clear as code; with the route list, it is what keeps the pull request off the Lab-only lane.
  • File: apps/sandbox/scripts/next-export-routes.json: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

(Posted by Cindy's agent.)

Evidence note for the open request on Safari's own tab edge swipe, at 34ab1a5:

  • Project rule: this change is Lab-only (packages/lab/src/NavigationStack/ plus a sandbox probe page and its route entry). Under the project's Lab-only rule, a Lab change merges on its normal gates, with no human device check.
  • Device coverage at this head: on two physical iPhone 14 units with iOS 26.2 (Safari, and a Home Screen app), the 7 back and forward gestures a test driver can produce ran 2 times each against the previous head, and behaved the same at both heads: one slide per traversal, then still.
  • Safari's own tab edge swipe: a test driver cannot produce it, because synthesized edge swipes reach the page as ordinary touches. It is not device-verified at this head. The three red-first unit cases in NavigationStack.test.tsx cover the branch it takes: a platform-animated back, a platform-animated forward, and a back the platform did not animate.

Please re-review at this head.

@astracat-bot

astracat-bot Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

In reply to @cixzhang

I'll run a full review to re-check this with your evidence note.

The probe page served only the device takes. Without it this pull request
changes the Lab NavigationStack and its test alone.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec e91f402

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: with the sandbox probe out, this is a Lab-only change and Safari's own edge-swipe device take no longer gates it, but two things need fixing.

  • Miss: the listener removal in usePlatformAnimatedTraversal (NavigationStack.tsx:860-864) cancels the frame that clears the mark but never resets markRef, so after a browser-marked traversal that hides the stack within two frames (for example in React's <Activity>), the next tap push or Back pop jumps with no slide; adding markRef.current = false; to the removal, with a test for that sequence, fixes it.
  • The description's Evidence bullet for the newest iPhone side-by-side calls its revision "this head", but this head is the later commit that drops the probe page, so please relabel those takes as taken at the previous revision, whose stack code is unchanged.

The three red-first cases fail on the base and pass here, and the 44 NavigationStack tests and strict lint pass at this head. CI has not run on this head yet because the pull request is a draft.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim: a browser-marked back or forward applies without a second slide: verified (NavigationStack.tsx:1537-1558; the marked back and forward cases fail on the base and pass here).
  • Claim: every other traversal (the Back button, the stack's own swipes, history.back()) still slides once: verified for unmarked traversals; false right after a detach inside the mark's two frames (first finding).
  • Claim: the stack listens for popstate (capture) and navigate on its container's window, attached and detached with the container: verified (:853-863, :948-961).
  • Claim: the mark lasts two frames: false after a detach inside those frames (first finding).
  • Claim: a marked pop drops the leaving screen at once, a marked push puts the new screen on top at once, and focus moves as after a settled transition: verified (:1541-1555 against :1621-1635 and :1654-1660).
  • Claim: no new API: verified (the Lab package is private and the hook is module-private).
  • Claim: the change touches only NavigationStack.tsx and its test, so it is Lab-only: verified.
  • Claim: the edge-gesture requirement is quoted correctly: verified against the current touch-presentation record.
  • Claim: the stack's own edge and content swipes are unchanged: verified (a finger-release pop never takes the mark).
  • Claim: device takes at earlier revisions logged no mark and slid once: stated; the bullet that calls the previous revision this head is false (second finding).
  • Claim: Safari's own tab edge swipe is not device-verified and is out of scope for a Lab-only change: true as stated; it does not gate a Lab-only merge.
  • Claim: desktop Chromium and WebKit Back-button takes logged no mark and slid once: stated for an earlier revision; no finding.
  • Claim: desktop Safari's trackpad swipe back is not claimed: noted; no finding.
  • Claim: all NavigationStack unit suites pass (44 tests in 2 files): verified at this revision.
  • Claim: the three new cases are red first: verified (two fail on the base, the unmarked control passes).
  • Claim: strict lint on the changed files reports no errors: verified at this revision.
  • Claim: the browser preflight passed at the previous revision: stated; not rerun.
  • Claim: public text carries no internal context: verified.
  • Claim: no release is needed because the Lab package is private: verified.
  • File: packages/lab/src/NavigationStack/NavigationStack.tsx: first finding at :860-864; otherwise clear.
  • File: packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear; add the detach case with the fix.

Automated review (maintainer link)

…tform mark

A container that detached within two frames of a browser-marked traversal
kept the mark, so the next tap push or Back pop played no slide.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 3d4e0fa

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the stale mark from the last review is fixed (the listener removal now clears it, and the new hide-then-push case fails without that line), so only two description claims need correcting.

  • The Evidence bullet for the newest iPhone side-by-side says its revision's NavigationStack code is the same as this head's, but this head adds the mark reset at NavigationStack.tsx:862-863, so please say the code differs only by clearing the mark on detach, a path those takes never reach.
  • The Evidence bullet "all NavigationStack unit suites pass (44 tests in 2 files)" is one short, since this head runs 45 tests in those two files, all passing.

Optionally, the hide-then-push case could also wait for focus to reach the General title, so it proves the push happened as well as that it did not settle at once. CI has not run on this head yet because the pull request is a draft.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim: a browser-marked back or forward applies without a second slide: verified (NavigationStack.tsx:1539-1561; the marked back and forward cases fail on the base code and pass here; in Chromium no animation runs 120 ms after a marked back).
  • Claim: every other traversal (the Back button, the stack's own swipes, history.back()) still slides once: verified for unmarked traversals, and now also for a tap push after a marked traversal that hid the stack (:862-863).
  • Claim: the stack listens for popstate (capture) and navigate on its container's window, attached and detached with the container: verified (:853-866, :950-963).
  • Claim: the mark lasts two frames: verified (:845-848); the removal now also clears it.
  • Claim: a marked pop drops the leaving screen at once, a marked push puts the new screen on top at once, and focus moves as after a settled transition: verified (:1543-1557 against :1623-1637 and :1656-1662).
  • Claim: no new API: verified (the Lab package is private and the hook is module-private).
  • Claim: the change touches only NavigationStack.tsx and its test, so it is Lab-only: verified.
  • Claim: the edge-gesture requirement is quoted correctly: verified against the current touch-presentation record.
  • Claim: the specification owner confirmed the fix as a repair: stated; not needed for a Lab-only change.
  • Claim: the stack's own edge and content swipes are unchanged: verified (a finger-release pop never takes the mark).
  • Claim: three jsdom cases are red first: verified (two fail on the base code, the unmarked control passes).
  • Claim: device takes at earlier revisions logged no mark and slid once: stated; the newest bullet's statement that its revision has this head's stack code is false (first finding).
  • Claim: Safari's own tab edge swipe is not device-verified and is out of scope for a Lab-only change: true as stated; it does not gate a Lab-only merge.
  • Claim: desktop Chromium and WebKit Back-button takes at an earlier revision slid once: stated; no finding.
  • Claim: desktop Safari's trackpad swipe back is not claimed: noted; no finding.
  • Claim: all NavigationStack unit suites pass (44 tests in 2 files): false; this head has 45 tests in those files, all passing (second finding).
  • Claim: the browser preflight passed at an earlier revision: stated; not rerun.
  • Claim: after a marked traversal hides the stack, the next tap push still slides: verified (the new case fails with the previous revision's code and passes here; in Chromium 7 animations run 120 ms after the tap).
  • Claim: the browser preflight at this head passes apart from a preflight-tool error, and the two selected interaction specs pass by hand: stated; not rerun.
  • Claim: strict lint on the changed files reports no errors: verified at this head.
  • Claim: public text carries no internal context: verified.
  • Claim: no release is needed because the Lab package is private: verified.
  • File: packages/lab/src/NavigationStack/NavigationStack.tsx: clear.
  • File: packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear; an optional stronger assertion at :256-259.

Automated review (maintainer link)

@cixzhang cixzhang added ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) lane:3 Astryx fix-loop lane 3 owns this labels Nov 21, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not run on this head yet because the pull request is a draft, so it is not ready to merge until the required checks pass. Marking it ready for review starts CI.

Both description points from the last review are fixed: the newest device bullet now says its revision's stack code differs from this head's only by the mark reset on detach, and the unit count matches the 45 tests in the two files, all passing here. The earlier optional suggestion for the hide-then-push case is withdrawn, since its heading query already fails when no push happens.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: a browser-marked history back or forward no longer plays a second slide: verified (NavigationStack.tsx:1539-1561; the marked back and forward cases fail on the base code and pass here).
  • Claim: every other traversal (the Back button, the stack's own swipes, history.back()) still slides once: verified (the unmarked back still slides; a finger-release pop never takes the mark, :1541).
  • Claim: the stack animated every path change, so a platform-animated traversal moved twice: verified on the base.
  • Claim: the stack listens for popstate (capture) and navigate on its container's window, attached and detached with the container: verified (:853-866, :950-963).
  • Claim: the mark lasts two frames: verified (:844-849); the removal also clears it (:862-863).
  • Claim: a marked pop drops the leaving screen at once, a marked push puts the new screen on top at once, and focus moves as after a settled transition: verified (:1543-1557 against :1623-1637 and :1656-1662).
  • Claim: no new API: verified (the Lab package is private and the hook is module-private).
  • Claim: the probe page is no longer part of the change, which touches only the stack and its test, so it is Lab-only: verified.
  • Claim: the quoted edge-gesture requirement matches the current touch-presentation record: verified.
  • Claim: the specification owner confirmed the repair: stated; an engineering owner's spec approval for this head is present, and a Lab-only change does not need it.
  • Claim: the stack's own edge and content swipes are unchanged: verified (a finger-release pop never takes the mark).
  • Claim: red first, a marked back and a marked forward fail before the change and pass after, and an unmarked back still slides: verified.
  • Claim: device takes at earlier revisions logged no mark and slid once: stated; not reproducible here.
  • Claim: the newest device take's revision differs from this head's stack code only by clearing the mark on detach, a path those takes never reach: verified (:862-863 is the only difference in that file, and every logged traversal is unmarked).
  • Claim: Safari's own tab edge swipe is not device-verified and is out of scope for a Lab-only change: true as stated; it does not gate a Lab-only merge.
  • Claim: desktop Back-button takes in Chromium and WebKit at an earlier revision slid once: stated; no finding.
  • Claim: the branch has no touch gate, so a desktop browser that marks a trackpad swipe also skips the slide: verified (:840 checks only the mark).
  • Claim: desktop Safari's trackpad swipe back is not claimed: noted; no finding.
  • Claim: all NavigationStack unit suites pass, 45 tests in 2 files: verified (45 passed).
  • Claim: the browser preflight passed at an earlier revision: stated; not rerun.
  • Claim: a marked traversal that hides the stack before the mark clears does not make the next tap push jump: verified (the case fails without the detach reset and passes here).
  • Claim: the browser preflight at this head stops only on the preflight tool's own project error, and the two selected interaction specs pass by hand: the tool error is verified (this branch's preflight passes the project option before the spec files, which the base branch has since fixed); the hand-run passes are stated and not rerun.
  • Claim: strict lint on the changed files reports no errors: verified.
  • Claim: one defect restored, no hidden API, default or interaction model, and no tagalong: verified.
  • Claim: public text carries no internal context: verified.
  • Claim: no release is needed because the Lab package is private: verified (packages/lab/package.json:4).
  • File: packages/lab/src/NavigationStack/NavigationStack.tsx: clear.
  • File: packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d8684f5

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: one description claim no longer holds now that main is merged in; the code has no open finding.

  • Regression: the Testing bullet says pnpm preflight --browser ran at this head and stopped on the preflight tool's own project error because this branch's preflight script predates the fix on main, but this head now includes that fix (scripts/preflight.mjs:370 passes --project chromium after the selected specs), so please rerun the browser preflight at this head and report its result, or date the bullet to the revision it ran at.

CI has not run on this head yet because the pull request is a draft.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: a browser-marked history back or forward no longer plays a second slide: verified (NavigationStack.tsx:1539-1561; the marked back and forward cases fail on the base code and pass here).
  • Claim: every other traversal (the Back button, the stack's own swipes, history.back()) still slides once: verified (the unmarked back still slides; a finger-release pop never takes the mark, :1541).
  • Claim: the stack animated every path change, so a platform-animated traversal moved twice: verified on the base.
  • Claim: the stack listens for popstate (capture) and navigate on its container's window, attached and detached with the container: verified (:853-866, :950-963).
  • Claim: the mark lasts two frames: verified (:844-849); the removal also clears it (:862-863).
  • Claim: a marked pop drops the leaving screen at once, a marked push puts the new screen on top at once, and focus moves as after a settled transition: verified (:1543-1557 against :1623-1637 and :1656-1662).
  • Claim: no new API: verified (the Lab package is private and the hook is module-private).
  • Claim: the probe page is no longer part of the change, which touches only the stack and its test, so it is Lab-only: verified.
  • Claim: the quoted edge-gesture requirement matches the current touch-presentation record: verified.
  • Claim: the specification owner confirmed the repair: stated; an engineering owner's spec approval for this head is present, and a Lab-only change does not need it.
  • Claim: the stack's own edge and content swipes are unchanged: verified (a finger-release pop never takes the mark).
  • Claim: red first, a marked back and a marked forward fail before the change and pass after, and an unmarked back still slides: verified (the head's test file on the base code: those two fail and the unmarked case passes).
  • Claim: device takes at earlier revisions logged no mark and slid once: stated; not reproducible here.
  • Claim: the newest device take's revision differs from this head's stack code only by clearing the mark on detach, a path those takes never reach: verified (:862-863 is the only difference).
  • Claim: Safari's own tab edge swipe is not device-verified and is out of scope for a Lab-only change: true as stated; it does not gate a Lab-only merge.
  • Claim: desktop Back-button takes in Chromium and WebKit at an earlier revision slid once: stated; no finding.
  • Claim: the branch has no touch gate, so a desktop browser that marks a trackpad swipe also skips the slide: verified (:840 checks only the mark).
  • Claim: desktop Safari's trackpad swipe back is not claimed: noted; no finding.
  • Claim: all NavigationStack unit suites pass, 45 tests in 2 files: verified at this head (45 passed).
  • Claim: the browser preflight passed at an earlier revision: stated; not rerun.
  • Claim: a marked traversal that hides the stack before the mark clears does not make the next tap push jump: verified (the case passes here).
  • Claim: the browser preflight at this head stops only on the preflight tool's own project error because this branch's preflight script predates the fix on main: false (this head includes the fix, scripts/preflight.mjs:370); the hand-run passes of the two selected specs are stated and not rerun.
  • Claim: strict lint on the changed files reports no errors: verified at this head.
  • Claim: one defect restored, no hidden API, default or interaction model, and no tagalong: verified.
  • Claim: public text carries no internal context: verified.
  • Claim: no release is needed because the Lab package is private: verified (packages/lab/package.json:4).
  • Claim: the owner and land path: a stated plan; nothing in the code to check.
  • File: packages/lab/src/NavigationStack/NavigationStack.tsx: clear.
  • File: packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: the required checks on this head are still queued or running, so it is not ready to merge until they pass.

A browser-marked history back or forward now settles at once while every unmarked traversal still slides, and the four new jsdom cases cover both paths and the detach that clears the mark. No finding is open.

Claims and files checked

Review mode: same-head; reason: none

  • Claim: a browser-marked history back or forward no longer plays a second slide: verified (NavigationStack.tsx:1539-1561; the marked back and forward cases fail on the base code and pass here).
  • Claim: every other traversal (the Back button, the stack's own swipes, history.back()) still slides once: verified (the unmarked back still slides, and a finger release never takes the mark at :1541).
  • Claim: the stack animated every path change, so a platform-animated traversal moved twice: verified on the base (the two marked cases fail there because the screen slides).
  • Claim: the stack listens for popstate (capture) and navigate on its container's window, attached and detached with the container, and keeps the mark for two frames: verified (:839-866, :950-963).
  • Claim: a marked pop drops the leaving screen at once, a marked push puts the new screen on top at once, and focus moves as after a settled transition: verified (:1543-1557 against :1623-1637 and :1656-1662).
  • Claim: no new API: verified (the hook is module-private and the Lab package is private).
  • Claim: the probe page is no longer part of the change, which touches only the stack and its test, so it is Lab-only: verified (two changed files).
  • Claim: the quoted edge-gesture requirement matches the current touch-presentation record: verified (word for word).
  • Claim: the specification owner confirmed the repair: stated; an engineering owner's spec approval for this head is present, and a Lab-only change does not need it.
  • Claim: the stack's own edge and content swipes are unchanged: verified (a finger-release pop never takes the mark).
  • Claim: red first, a marked back and a marked forward fail before the change and pass after, and an unmarked back still slides: verified (the head's test file on the base code: 2 failed, 43 passed).
  • Claim: device takes at earlier revisions logged no mark and slid once: stated; judged from the text.
  • Claim: the newest device take's revision differs from this head's stack code only by clearing the mark on detach: verified (:862-863 is the only difference in the stack's source).
  • Claim: Safari's own tab edge swipe is not device-verified and is out of scope for a Lab-only change: true as stated; it does not gate a Lab-only merge.
  • Claim: desktop Back-button takes in Chromium and WebKit slid once at both builds: stated; no finding.
  • Claim: the branch has no touch gate, so a desktop browser that marks a trackpad swipe also skips the slide: verified (:840 checks only the mark).
  • Claim: desktop Safari's trackpad swipe back is not claimed: noted; no finding.
  • Claim: all NavigationStack unit suites pass, 45 tests in 2 files: verified (45 passed).
  • Claim: the browser preflight passed at an earlier revision, full interaction suite included: stated; not rerun.
  • Claim: a marked traversal that hides the stack before the mark clears does not make the next tap push jump: verified (the case passes here and fails when the detach clear is removed).
  • Claim: the browser preflight at this head passes, and its interaction step runs the two stack specs it selects with 68 passed: verified for the interaction step (the selection picks exactly those two specs, and they pass 68 of 68 in Chromium here); strict lint and the unit tests rerun and pass; the other steps are stated.
  • Claim: strict lint on the changed files reports no errors: verified.
  • Claim: one defect restored, with no hidden API, default or interaction model and no tagalong: verified.
  • Claim: public text carries no internal context: verified.
  • Claim: no release is needed because the Lab package is private: verified (packages/lab/package.json:4).
  • Claim: the owner and land path: a stated plan; nothing in the code to check.
  • File: packages/lab/src/NavigationStack/NavigationStack.tsx: clear.
  • File: packages/lab/src/NavigationStack/NavigationStack.test.tsx: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 10:47
@cixzhang
cixzhang merged commit 47d48fd into main Nov 21, 2026
147 checks passed
@github-actions
github-actions Bot deleted the fix/navigationstack-ios-platform-back branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — d8684f5f Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. lane:3 Astryx fix-loop lane 3 owns this release-critical Admitted to CI at once (AST-030 DEC-30). Counts only when a writer applies it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant