Skip to content

fix(mobile): native header buttons run their current handler - #56

Merged
joaoheusi merged 1 commit into
mainfrom
t3/mobile-header-latest-press
Oct 23, 2026
Merged

joaoheusi merged 1 commit into
mainfrom
t3/mobile-header-latest-press

Conversation

@joaoheusi

Copy link
Copy Markdown
Owner

On iOS, NativeHeaderToolbar re-sends header items to the navigator only when what they show changes. That avoids a setOptions loop, because functions are compared by their source text. As a result, a button whose handler changed without a visible change kept the handler from an older render. On the quick action merge sheet, toggling a second pull request left Continue looking the same, so Continue checked only the first pull request.

Fix: each native item now calls a stable wrapper. The wrapper looks up the current handler in a ref, which is updated after each render. Wrapper source text stays the same, so this adds no extra setOptions calls. The new test fails before the change: it ran the first selection's handler.

This may not explain the reported "Continue does nothing". I could not reproduce that, because the pull requests were merged by hand before I could.

Checks: vp run check:changed passes format, lint, typecheck, and the toolbar tests. knip reports three unused files that this PR does not touch.

Done by Claude Opus 5.5 in Claude Code (T3 Code).

iOS header items are re-sent to the navigator only when what they show
changes. A button whose handler changed without a visible change kept the
handler from an older render. On the merge sheet, toggling a second pull
request kept Continue's look, so Continue checked only the first one.

Presses now go through a ref that holds the current handlers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joaoheusi
joaoheusi merged commit af6fb12 into main Oct 23, 2026
3 of 14 checks passed
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant