Skip to content

🐛 Footer rebinds its buttons on every page so same-titled pages run their own handlers - #17

Merged
dryan merged 1 commit into
mainfrom
fix/footer-rebinds-per-page
Oct 18, 2026
Merged

dryan merged 1 commit into
mainfrom
fix/footer-rebinds-per-page

Conversation

@dryan-gh-actions

Copy link
Copy Markdown
Contributor

Fixes the footer running the previous page's handlers when two consecutive pages publish the same button titles.

Cause: OnboardingActions.== ignores handlers, so the one permanent OnboardingFooter saw equal inputs across the page change and never rebound its buttons.

Fix: .id on the footer keyed by the current page. A new instance per page rebinds the buttons; within a page the instance is stable, so isRevealed fades as before. An Equatable token would have worked too, but would have changed the public type and still relied on SwiftUI diffing.

Test: OnboardingFooterIdentityTests checks that equal-titled actions compare equal (the premise) while the footer identity differs per page. The view itself is not driven (no UI test target in the kit).

After merge: tag 1.3.1.

🤖 Generated with Claude Code

…heir own handlers

OnboardingActions equality ignores handlers, and OnboardingFlowView passed the current page's actions to one permanent OnboardingFooter. When two consecutive pages published the same titles, SwiftUI saw equal inputs, skipped the update, and the footer's buttons kept the previous page's closures.

Proof (Marie, iPad simulator): tapping Allow on the notifications page ran the analytics page's handler; renaming the analytics button made the system alert appear.

The footer is now keyed with .id on the current page, so each page gets its own instance. Within a page the instance is stable, so a page's staged reveal (isRevealed) still fades.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dryan-gh-actions
dryan-gh-actions Bot requested a review from a team as a code owner October 18, 2026 17:06
@dryan
dryan merged commit 93f1702 into main Oct 18, 2026
2 checks passed
@dryan
dryan deleted the fix/footer-rebinds-per-page branch October 18, 2026 17:48
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