Skip to content

[DO NOT MERGE] refactor: simplify Screen and Toolbar component usage#3900

Draft
gastonm5 wants to merge 2 commits intomainfrom
fix/screen-toolbar-refactor
Draft

[DO NOT MERGE] refactor: simplify Screen and Toolbar component usage#3900
gastonm5 wants to merge 2 commits intomainfrom
fix/screen-toolbar-refactor

Conversation

@gastonm5
Copy link
Contributor

@gastonm5 gastonm5 commented Feb 23, 2026

Description

Please include a summary of the change and which issue is fixed.

Fixes #

Which feature is affected?

  • Create vault ( Secure / Fast) - Please ensure you created a Secure vault & fast vault
  • Sending - Please attach a tx link here
  • Swap - Please attach a tx link for the swap here
  • New Chain / Chain related feature - Please attach tx link here

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Screenshots (if applicable):

Additional context

Summary by CodeRabbit

Release Notes

  • Refactor
    • Refactored screen configuration architecture to use environment-based modifiers instead of initializer parameters, improving code maintainability and consistency across the app.

@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

Walkthrough

This pull request refactors the Screen component to use environment-based configuration via modifiers instead of initializer parameters. A new ScreenEnvironmentKeys.swift file introduces environment keys and corresponding view modifiers, while Screen.swift is updated to consume these values. All existing usages of Screen throughout the app are updated to the new modifier-based API.

Changes

Cohort / File(s) Summary
Screen Component Infrastructure
VultisigApp/VultisigApp/Views/Components/Screen/ScreenEnvironmentKeys.swift, VultisigApp/VultisigApp/Views/Components/Screen/Screen.swift, VultisigApp/VultisigApp/Views/Components/Toolbar/CrossPlatformToolbar/CrossPlatformToolbarModifier.swift
Introduces new environment-driven configuration system. ScreenEnvironmentKeys.swift defines ScreenBackgroundType enum and environment keys for title, insets, navigation bar visibility, back button visibility, and toolbar items, with corresponding public view modifiers. Screen.swift refactored to use @Environment properties instead of stored initializer parameters; initializer simplified to accept only content builder. CrossPlatformToolbarModifier.swift adds new overload accepting explicit CustomToolbarItem array.
DeFi Protocol Views
VultisigApp/VultisigApp/Features/Defi/Protocols/Circle/*.swift, VultisigApp/VultisigApp/Features/Defi/Protocols/Tron/*.swift
Screen initializer updated to parameterless form with title, background type, and navigation bar settings moved to .screenTitle(), .screenBackground(), and .screenNavigationBarHidden() modifiers respectively.
Onboarding & Import Vault Views
VultisigApp/VultisigApp/Features/Onboarding/ImportVault/.../*.swift
Screen initializers replaced with modifier-based configuration. Replaced crossPlatformToolbar calls with new screenTitle(), screenBackButtonHidden(), screenIgnoresTopEdge(), screenToolbar(), and screenEdgeInsets() modifiers.
Function Transaction Views
VultisigApp/VultisigApp/Features/FunctionTransaction/FormScreen.swift, VultisigApp/VultisigApp/Views/FunctionCall/FunctionCall*.swift
Screen initializer parameters moved to .screenTitle() and .screenToolbar() modifiers; removed crossPlatformToolbar calls in favor of new modifier-based toolbar configuration.
Asset Selection & Referral Views
VultisigApp/VultisigApp/Features/FunctionTransaction/Maya/AssetSelectionList/AssetSelectionListScreen.swift, VultisigApp/VultisigApp/Views/Referral/*.swift
Replaced Screen(showNavigationBar: false) with parameterless Screen, and replaced crossPlatformToolbar with sequence of modifiers including .screenTitle(), .screenBackButtonHidden(), and .screenToolbar().
Address Book Views
VultisigApp/VultisigApp/Views/Address Book/*.swift
Screen initializer parameters for title and navigation bar visibility moved to .screenTitle(), .screenBackButtonHidden(), and .screenToolbar() modifiers; replaced crossPlatformToolbar with new modifier chain.
Send Transaction Views
VultisigApp/VultisigApp/Views/Send/Screens/*.swift, VultisigApp/VultisigApp/Views/Send/SendCrypto*.swift, VultisigApp/VultisigApp/iOS/View/Send/SendDetailsScreen+iOS.swift, VultisigApp/VultisigApp/macOS/View/Send/SendDetailsScreen+macOS.swift
Screen initializer title parameter moved to .screenTitle() modifier; replaced crossPlatformToolbar with .screenTitle() and .screenToolbar() modifiers.
Vault Management Views
VultisigApp/VultisigApp/Views/Vault/.../*.swift
Screen initializers with title and edge insets replaced with parameterless form and .screenTitle(), .screenEdgeInsets(), .screenNavigationBarHidden(), and .screenToolbar() modifiers.
Settings & Configuration Views
VultisigApp/VultisigApp/Views/Settings/.../*.swift
Screen initializers with title and edge insets parameters moved to .screenTitle() and .screenEdgeInsets() modifiers; replaced crossPlatformToolbar with new modifier-based configuration.
Keygen & Other Views
VultisigApp/VultisigApp/Views/Keygen/*.swift, VultisigApp/VultisigApp/Views/Swap/Swap*.swift, VultisigApp/VultisigApp/Views/Update Check/PhoneCheckUpdateView.swift, VultisigApp/VultisigApp/Views/Components/banxa/BanxaDisclaimer.swift, VultisigApp/VultisigApp/Views/FunctionTransaction/Maya/AssetSelectionList/AssetSelectionListScreen.swift, VultisigApp/VultisigApp/Views/VultDiscountTiers/VultDiscountTiersScreen.swift, VultisigApp/VultisigApp/Views/Wallet/Receive/Screens/ReceiveChainSelectionScreen.swift
Consistent conversion of Screen initializer parameters to view modifiers; replaced crossPlatformToolbar with .screenTitle(), .screenBackButtonHidden(), .screenToolbar(), .screenNavigationBarHidden(), and .screenEdgeInsets() modifiers as needed.
Project Configuration
VultisigApp/VultisigApp.xcodeproj/project.pbxproj
Added new ScreenEnvironmentKeys.swift file to build graph and project structure.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: refactoring Screen and Toolbar component usage for simplification. It directly relates to the core changeset focus.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/screen-toolbar-refactor

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gastonm5 gastonm5 marked this pull request as ready for review February 23, 2026 21:01
@gastonm5 gastonm5 changed the title refactor: simplify Screen and Toolbar component usage [DO NOT MERGE] refactor: simplify Screen and Toolbar component usage Feb 23, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
VultisigApp/VultisigApp/Views/FunctionCall/FunctionCallPairScreen.swift (1)

20-43: ⚠️ Potential issue | 🟡 Minor

Add .screenBackButtonHidden() for consistency with similar screen migrations.

The screen now shows a title and toolbar (via .screenTitle() and .screenToolbar()), but it's missing .screenBackButtonHidden() which should be included to preserve the original behavior where Screen(showNavigationBar: false) suppressed the back button. All similar screens in the codebase that display a title (PreferredAssetSelectionView, AddressBookChainSelectionScreen, ReceiveChainSelectionScreen, AssetSelectionListScreen) consistently include .screenBackButtonHidden() when migrating from the old pattern.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@VultisigApp/VultisigApp/Views/FunctionCall/FunctionCallPairScreen.swift`
around lines 20 - 43, The Screen wrapper for FunctionCallPairScreen is missing
the .screenBackButtonHidden() modifier so the back button is suppressed like the
original Screen(showNavigationBar: false) behavior; update the view chain that
includes KeysignDiscoveryView (inside Screen { ... }) to append
.screenBackButtonHidden() alongside the existing .screenTitle("pair".localized)
and .screenToolbar { ... } so this screen matches the other migrated screens
(PreferredAssetSelectionView, AddressBookChainSelectionScreen,
ReceiveChainSelectionScreen, AssetSelectionListScreen).
VultisigApp/VultisigApp/Views/Settings/SettingsMainScreen/SettingsMainScreen.swift (1)

68-87: ⚠️ Potential issue | 🔴 Critical

Add .screenNavigationBarHidden(true) to restore the hidden navigation bar behavior.

The old initializer explicitly set showNavigationBar: false, but the refactored code omits the equivalent .screenNavigationBarHidden() modifier. Since ScreenNavigationBarHiddenKey defaults to false (nav bar shown), the Settings screen will now display a navigation bar that was previously hidden—a visual regression.

Add .screenNavigationBarHidden(true) after .screenToolbar to restore the original behavior.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@VultisigApp/VultisigApp/Views/Settings/SettingsMainScreen/SettingsMainScreen.swift`
around lines 68 - 87, SettingsMainScreen lost the previous hidden navigation bar
behavior after refactor: add the .screenNavigationBarHidden(true) view modifier
to the Screen chain (e.g., after .screenToolbar) in the SettingsMainScreen view
so the navigation bar is hidden again; locate the Screen declaration and
modifiers around Screen, .screenTitle, .screenEdgeInsets and .screenToolbar and
append .screenNavigationBarHidden(true) to restore the original behavior.
🧹 Nitpick comments (2)
VultisigApp/VultisigApp/Views/Vault/RegisterVaultView.swift (1)

21-51: LGTM!

Title migration to .screenTitle is correct. Minor pre-existing note: the struct name RegisterVaultView wraps a full screen with Screen — per coding guidelines, it should be named RegisterVaultScreen. Worth addressing in a follow-up. Based on learnings: "Use the Screen component as the standard wrapper for all full-screen views and suffix screen struct names with Screen".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@VultisigApp/VultisigApp/Views/Vault/RegisterVaultView.swift` around lines 21
- 51, The struct currently named RegisterVaultView wraps a full-screen Screen
and should be renamed to RegisterVaultScreen to follow the guideline of
suffixing full-screen components with "Screen"; update the type declaration from
RegisterVaultView to RegisterVaultScreen, rename any previews, initializers,
navigation pushes/instantiations, and references (e.g., previews, parent views,
or routing) that use RegisterVaultView, and ensure the
.screenTitle("registerVault".localized) and onLoad(setData) usages remain
unchanged after the rename.
VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/ChainsSetup/KeyImportChainsSetupScreen.swift (1)

47-48: Minor: duplicated viewModel.state == .activeChains expression.

Lines 47 and 48 both evaluate the same predicate. Extracting it to a local let or computed property reduces the risk of the two conditions diverging in a future edit.

♻️ Suggested extraction
+       let isActiveChains = viewModel.state == .activeChains
         .screenIgnoresTopEdge(isActiveChains)
-        .screenIgnoresTopEdge(viewModel.state == .activeChains)
         .screenBackground(isActiveChains ? .gradient : .plain)
-        .screenBackground(viewModel.state == .activeChains ? .gradient : .plain)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/ChainsSetup/KeyImportChainsSetupScreen.swift`
around lines 47 - 48, The two calls that use the same predicate (viewModel.state
== .activeChains) — screenIgnoresTopEdge(...) and screenBackground(...) — should
use a single local boolean to avoid duplication; introduce a local let (e.g.,
let isActiveChains = viewModel.state == .activeChains) or a computed property
and use isActiveChains in both screenIgnoresTopEdge and screenBackground so the
conditions remain consistent and easier to maintain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@VultisigApp/VultisigApp/Views/Send/Screens/SendDoneScreen.swift`:
- Around line 30-31: Replace the native SwiftUI modifier
.navigationBarBackButtonHidden(true) on the SendDoneScreen's Screen view with
the custom .screenBackButtonHidden() modifier so the Screen's custom navigation
bar respects the back-button hide state; locate the Screen that currently chains
.screenTitle("done".localized).navigationBarBackButtonHidden(true) and change
that last modifier to .screenBackButtonHidden() (keep the .screenTitle call
unchanged).

---

Outside diff comments:
In `@VultisigApp/VultisigApp/Views/FunctionCall/FunctionCallPairScreen.swift`:
- Around line 20-43: The Screen wrapper for FunctionCallPairScreen is missing
the .screenBackButtonHidden() modifier so the back button is suppressed like the
original Screen(showNavigationBar: false) behavior; update the view chain that
includes KeysignDiscoveryView (inside Screen { ... }) to append
.screenBackButtonHidden() alongside the existing .screenTitle("pair".localized)
and .screenToolbar { ... } so this screen matches the other migrated screens
(PreferredAssetSelectionView, AddressBookChainSelectionScreen,
ReceiveChainSelectionScreen, AssetSelectionListScreen).

In
`@VultisigApp/VultisigApp/Views/Settings/SettingsMainScreen/SettingsMainScreen.swift`:
- Around line 68-87: SettingsMainScreen lost the previous hidden navigation bar
behavior after refactor: add the .screenNavigationBarHidden(true) view modifier
to the Screen chain (e.g., after .screenToolbar) in the SettingsMainScreen view
so the navigation bar is hidden again; locate the Screen declaration and
modifiers around Screen, .screenTitle, .screenEdgeInsets and .screenToolbar and
append .screenNavigationBarHidden(true) to restore the original behavior.

---

Nitpick comments:
In
`@VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/ChainsSetup/KeyImportChainsSetupScreen.swift`:
- Around line 47-48: The two calls that use the same predicate (viewModel.state
== .activeChains) — screenIgnoresTopEdge(...) and screenBackground(...) — should
use a single local boolean to avoid duplication; introduce a local let (e.g.,
let isActiveChains = viewModel.state == .activeChains) or a computed property
and use isActiveChains in both screenIgnoresTopEdge and screenBackground so the
conditions remain consistent and easier to maintain.

In `@VultisigApp/VultisigApp/Views/Vault/RegisterVaultView.swift`:
- Around line 21-51: The struct currently named RegisterVaultView wraps a
full-screen Screen and should be renamed to RegisterVaultScreen to follow the
guideline of suffixing full-screen components with "Screen"; update the type
declaration from RegisterVaultView to RegisterVaultScreen, rename any previews,
initializers, navigation pushes/instantiations, and references (e.g., previews,
parent views, or routing) that use RegisterVaultView, and ensure the
.screenTitle("registerVault".localized) and onLoad(setData) usages remain
unchanged after the rename.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5b9c35 and 6ea3068.

📒 Files selected for processing (69)
  • VultisigApp/VultisigApp.xcodeproj/project.pbxproj
  • VultisigApp/VultisigApp/Features/Defi/Protocols/Circle/CircleDepositView.swift
  • VultisigApp/VultisigApp/Features/Defi/Protocols/Circle/CircleView.swift
  • VultisigApp/VultisigApp/Features/Defi/Protocols/Circle/CircleWithdrawView.swift
  • VultisigApp/VultisigApp/Features/Defi/Protocols/Tron/TronFreezeView.swift
  • VultisigApp/VultisigApp/Features/Defi/Protocols/Tron/TronUnfreezeView.swift
  • VultisigApp/VultisigApp/Features/Defi/Protocols/Tron/TronView.swift
  • VultisigApp/VultisigApp/Features/FunctionTransaction/FormScreen.swift
  • VultisigApp/VultisigApp/Features/FunctionTransaction/Maya/AssetSelectionList/AssetSelectionListScreen.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/ImportVaultSelectionSheet/ImportVaultSelectionSheet.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/ChainsSetup/KeyImportChainsSetupScreen.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/DeviceCount/OnboardingDevicesSelectionScreen.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/OnboardingOverviewScreen.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/OnboardingVaultSetupScreen.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/KeyImport/OnboardingYourVaultSetupScreen.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/Main/Views/ImportVaultShareScreen.swift
  • VultisigApp/VultisigApp/Features/Onboarding/ImportVault/VaultSetup/VaultSetupScreen.swift
  • VultisigApp/VultisigApp/Features/VultDiscountTiers/VultDiscountTiersScreen.swift
  • VultisigApp/VultisigApp/Features/Wallet/Receive/Screens/ReceiveChainSelectionScreen.swift
  • VultisigApp/VultisigApp/Views/Address Book/AddAddressBookScreen.swift
  • VultisigApp/VultisigApp/Views/Address Book/AddressBookChainSelectionScreen.swift
  • VultisigApp/VultisigApp/Views/Address Book/AddressBookScreen.swift
  • VultisigApp/VultisigApp/Views/Address Book/EditAddressBookScreen.swift
  • VultisigApp/VultisigApp/Views/Components/Screen/Screen.swift
  • VultisigApp/VultisigApp/Views/Components/Screen/ScreenEnvironmentKeys.swift
  • VultisigApp/VultisigApp/Views/Components/Toolbar/CrossPlatformToolbar/CrossPlatformToolbarModifier.swift
  • VultisigApp/VultisigApp/Views/Components/banxa/BanxaDisclaimer.swift
  • VultisigApp/VultisigApp/Views/FunctionCall/FunctionCallDetailsScreen.swift
  • VultisigApp/VultisigApp/Views/FunctionCall/FunctionCallPairScreen.swift
  • VultisigApp/VultisigApp/Views/FunctionCall/FunctionCallVerifyScreen.swift
  • VultisigApp/VultisigApp/Views/Keygen/PeerDiscoveryScreen.swift
  • VultisigApp/VultisigApp/Views/Keygen/ReviewYourVaultsScreen.swift
  • VultisigApp/VultisigApp/Views/Onboarding/OnboardingSummaryScreen.swift
  • VultisigApp/VultisigApp/Views/Referral/CreateReferralDetailsView.swift
  • VultisigApp/VultisigApp/Views/Referral/EditReferralDetailsView.swift
  • VultisigApp/VultisigApp/Views/Referral/PreferredAssetSelectionView.swift
  • VultisigApp/VultisigApp/Views/Referral/ReferralInitialScreen.swift
  • VultisigApp/VultisigApp/Views/Referral/ReferralMainScreen.swift
  • VultisigApp/VultisigApp/Views/Referral/ReferralVaultSelectionScreen.swift
  • VultisigApp/VultisigApp/Views/Referral/ReferredCodeFormScreen.swift
  • VultisigApp/VultisigApp/Views/Referral/ReferredOnboardingView.swift
  • VultisigApp/VultisigApp/Views/Send/Screens/SendDoneScreen.swift
  • VultisigApp/VultisigApp/Views/Send/Screens/SendKeysignScreen.swift
  • VultisigApp/VultisigApp/Views/Send/Screens/SendPairScreen.swift
  • VultisigApp/VultisigApp/Views/Send/Screens/SendVerifyScreen.swift
  • VultisigApp/VultisigApp/Views/Send/SendCryptoAddressBookView.swift
  • VultisigApp/VultisigApp/Views/Send/SendCryptoSecondaryDoneView.swift
  • VultisigApp/VultisigApp/Views/Settings/OnChainSecurity/OnChainSecurityScreen.swift
  • VultisigApp/VultisigApp/Views/Settings/SettingsCurrencySelectionView.swift
  • VultisigApp/VultisigApp/Views/Settings/SettingsFAQView.swift
  • VultisigApp/VultisigApp/Views/Settings/SettingsLanguageSelectionView.swift
  • VultisigApp/VultisigApp/Views/Settings/SettingsMainScreen/SettingsMainScreen.swift
  • VultisigApp/VultisigApp/Views/Swap/SwapCryptoDetailsView.swift
  • VultisigApp/VultisigApp/Views/Swap/SwapCryptoDoneView.swift
  • VultisigApp/VultisigApp/Views/Update Check/PhoneCheckUpdateView.swift
  • VultisigApp/VultisigApp/Views/Vault/Backup/ServerVaultCheckInboxScreen.swift
  • VultisigApp/VultisigApp/Views/Vault/Backup/VaultBackupNowScreen.swift
  • VultisigApp/VultisigApp/Views/Vault/Backup/VaultBackupPasswordScreen.swift
  • VultisigApp/VultisigApp/Views/Vault/Backup/VaultServerBackupScreen.swift
  • VultisigApp/VultisigApp/Views/Vault/RegisterVaultView.swift
  • VultisigApp/VultisigApp/Views/Vault/RenameVaultView.swift
  • VultisigApp/VultisigApp/Views/Vault/Settings/VaultAdvancedSettingsScreen.swift
  • VultisigApp/VultisigApp/Views/Vault/Settings/VaultSettingsScreen.swift
  • VultisigApp/VultisigApp/Views/Vault/VaultDeletionConfirmView.swift
  • VultisigApp/VultisigApp/Views/Vault/VaultDetail/VaultPairDetailView.swift
  • VultisigApp/VultisigApp/Views/Vault/VaultDetailQRCodeView.swift
  • VultisigApp/VultisigApp/iOS/View/Send/SendDetailsScreen+iOS.swift
  • VultisigApp/VultisigApp/macOS/Native/ServerBackupVerificationView.swift
  • VultisigApp/VultisigApp/macOS/View/Send/SendDetailsScreen+macOS.swift

Comment on lines +30 to 31
.screenTitle("done".localized)
.navigationBarBackButtonHidden(true)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find Screen.swift and examine screenBackButtonHidden usage
fd -t f "Screen\.swift" --path "*/Views/*" | head -5

Repository: vultisig/vultisig-ios

Length of output: 298


🏁 Script executed:

#!/bin/bash
# Search for screenBackButtonHidden environment key usage
rg -n "screenBackButtonHidden" --type swift -A 2 -B 2

Repository: vultisig/vultisig-ios

Length of output: 5787


🏁 Script executed:

#!/bin/bash
# Read SendDoneScreen.swift to verify current state
cat -n "VultisigApp/VultisigApp/Views/Send/Screens/SendDoneScreen.swift"

Repository: vultisig/vultisig-ios

Length of output: 1033


🏁 Script executed:

#!/bin/bash
# Check for other screens in Send/Screens that use screenBackButtonHidden
fd -t f "Screen\.swift" "VultisigApp/VultisigApp/Views/Send/Screens/" | xargs -I {} sh -c 'echo "=== {} ===" && rg -n "screenBackButtonHidden|navigationBarBackButtonHidden" {} || true'

Repository: vultisig/vultisig-ios

Length of output: 528


Replace .navigationBarBackButtonHidden(true) with .screenBackButtonHidden() on line 31.

Screen reads the screenBackButtonHidden environment key to control its custom navigation bar. The native .navigationBarBackButtonHidden(true) modifier has no effect on the Screen component's rendering. This is consistent with how other screens throughout the codebase (AddressBookChainSelectionScreen, ReceiveChainSelectionScreen, AssetSelectionListScreen, etc.) suppress the back button.

♻️ Proposed fix
         .screenTitle("done".localized)
-        .navigationBarBackButtonHidden(true)
+        .screenBackButtonHidden()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.screenTitle("done".localized)
.navigationBarBackButtonHidden(true)
.screenTitle("done".localized)
.screenBackButtonHidden()
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@VultisigApp/VultisigApp/Views/Send/Screens/SendDoneScreen.swift` around lines
30 - 31, Replace the native SwiftUI modifier
.navigationBarBackButtonHidden(true) on the SendDoneScreen's Screen view with
the custom .screenBackButtonHidden() modifier so the Screen's custom navigation
bar respects the back-button hide state; locate the Screen that currently chains
.screenTitle("done".localized).navigationBarBackButtonHidden(true) and change
that last modifier to .screenBackButtonHidden() (keep the .screenTitle call
unchanged).

@gastonm5 gastonm5 marked this pull request as draft February 24, 2026 21:26
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