Thanks to visit codestin.com
Credit goes to github.com

Skip to content

REF: Use native uibaritems for close button#8739

Open
marcosrdz wants to merge 21 commits into
masterfrom
e
Open

REF: Use native uibaritems for close button#8739
marcosrdz wants to merge 21 commits into
masterfrom
e

Conversation

@marcosrdz

@marcosrdz marcosrdz commented Jul 4, 2026

Copy link
Copy Markdown
Member

Close and More header menu buttons now use native buttons

Copilot AI 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.

Pull request overview

This PR refactors navigation header controls to prefer native iOS 26 unstable_header*Items (UIBarButtonItem-backed) for close/menu buttons, and introduces a helper to map existing Action definitions into native menu items.

Changes:

  • Add unstable_headerLeftItems / unstable_headerRightItems close button support to navigationStyle.
  • Introduce mapActionsToNativeHeaderMenuItems to convert Action[] into native-stack header menu item definitions.
  • Update AddWalletStack and DetailViewScreensStack to use native header menus for actions (ellipsis menu) and extracted options builders.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
navigation/DetailViewScreensStack.tsx Extracts ReceiveDetails options to build native header menu items and adjust close/menu layout.
navigation/AddWalletStack.tsx Adds native header menu items for Add/Import wallet screens and threads menu state via route params.
components/navigationStyle.tsx Extends shared navigation options to emit native-stack unstable_header*Items for the close button.
components/nativeHeaderMenuItems.ts New utility to map Action/subactions into native-stack menu/submenu items.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread navigation/DetailViewScreensStack.tsx Outdated
Comment thread navigation/DetailViewScreensStack.tsx
Comment thread components/navigationStyle.tsx
@marcosrdz marcosrdz added the testflight Upload iOS and macOS builds to Testflight. label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

✅ Build 8.0.1 (1783342536) has been uploaded to TestFlight and will be available for testing soon.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

✅ Build 8.0.1 (1783378871) has been uploaded to TestFlight and will be available for testing soon.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

✅ Build 8.0.1 (1783462148) has been uploaded to TestFlight and will be available for testing soon.

@limpbrains limpbrains left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I've tried, easy to reproduce

navigation/AddWalletStack.tsx:191 — Native wallet-type menu desyncs from screen state; picking a type in the native menu silently creates the wrong wallet. Menu reads/writes route.params.selectedIndex/selectedWalletType, but screen/wallets/Add.tsx keeps selection in a local reducer, never reads those params (Add.tsx:123 destructures only entropy/words), and createWallet branches on reducer state (Add.tsx:340). iOS 26 user picks Taproot/Legacy/Lightning in the header menu → params update, screen doesn't → Create builds default SegWit wallet. Reverse too: on-screen selector never updates the native checkmark. Also, unstable_headerRightItems is set unconditionally here, while DetailViewScreensStack gates on isIOS26OrHigher.

other issues Claude complained but I did not check

  1. navigation/DetailViewScreensStack.tsx:669 — BIP47 "Payments Code" header menu is dead on ALL platforms; toggle unreachable. showBip47Menu gates on route.params.allowBIP47 && isBIP47Enabled — nothing in the repo ever sets those params (nor are they in the param list types), so it's permanently false. toggleBIP47RequestedAt (:673) is written but read nowhere. And the screen's own setParams({ headerRight: renderHeaderRightMenu }) (ReceiveDetails.tsx:367-382) is now ignored because withRouteParamHeaderOptions was dropped from this route — so the JS-path menu is gone too. Sub-issue: ignored headerBackVisible: false param may resurface a duplicate back button on Android.
  2. screen/send/SendDetails.tsx:1214 — headerRightActions().flat() collapses menu groups on the native path. headerRightActions returns Action[][] (5 sections); the JS iOS path preserves group separators via synthetic inline parents (TooltipMenu.helpers.ts:60-79), but flat() yields one undivided native list. Native API supports inline submenus (inline: true) — map each sub-array to an inline group instead of flattening.
  3. screen/send/SendDetails.tsx:1213 — duplicate full actions build per keystroke. New useMemo calls headerRightActions() in addition to HeaderRight's own call; wallet.getBalance(), howManySignaturesCanWeMake(), allowCosignPsbt() etc. now run ~2× per change, and addresses gets a new identity per amount keystroke, so this fires while typing (the setOptions churn itself is pre-existing). Build the actions array once in a memo and feed both renderers.
  4. navigation/AddWalletStack.tsx:239 — ellipsis-menu envelope copy-pasted 4×. Identical {type:'menu', label: loc.wallets.details_options, icon: ellipsis, menu:{...}} + parallel JS HeaderMenuButton pair at AddWalletStack ×2, DetailViewScreensStack :688 (already drifted — omits identifier), SendDetails :1221. One helper returning { headerRight, unstable_headerRightItems } from a single Action[] kills all four.
  5. (weak, take or leave) components/nativeHeaderMenuItems.ts:29 — parallel Action-tree traversal alongside TooltipMenu.helpers.ts mapLeaf/buildMenu. Verified as real surface duplication, but target types genuinely differ (tri-state 'mixed' preserved here vs collapsed there; either/or submenu shape) — sharing is a non-trivial refactor, defensible to decline.

@github-actions

Copy link
Copy Markdown

✅ Build 8.0.1 (1783647669) has been uploaded to TestFlight and will be available for testing soon.

@github-actions

Copy link
Copy Markdown

✅ Build 8.0.1 (1783649344) has been uploaded to TestFlight and will be available for testing soon.

@github-actions

Copy link
Copy Markdown

✅ Build 8.0.1 (1783676165) has been uploaded to TestFlight and will be available for testing soon.

@GladosBlueWallet

Copy link
Copy Markdown
Collaborator

Wake the fuck up samurai, we have PRs to merge

image

[all PRs for @Overtorment] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/Overtorment

@github-actions

Copy link
Copy Markdown

✅ Build 8.0.1 (1783741629) has been uploaded to TestFlight and will be available for testing soon.

Comment thread components/headerMenuOptions.tsx Fixed
…tion or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

✅ Build 8.0.1 (1783745178) has been uploaded to TestFlight and will be available for testing soon.

@github-actions

Copy link
Copy Markdown

✅ Build 8.0.1 (1783752051) has been uploaded to TestFlight and will be available for testing soon.

@GladosBlueWallet

Copy link
Copy Markdown
Collaborator

Wake the fuck up samurai, we have PRs to merge

image

[all PRs for @Overtorment] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/Overtorment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testflight Upload iOS and macOS builds to Testflight.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants