Skip to content

ui: dedicated success screens for channel open & peer connect#3748

Open
myxmaster wants to merge 4 commits intoZeusLN:masterfrom
myxmaster:open-channel-success-screen
Open

ui: dedicated success screens for channel open & peer connect#3748
myxmaster wants to merge 4 commits intoZeusLN:masterfrom
myxmaster:open-channel-success-screen

Conversation

@myxmaster
Copy link
Contributor

Description

This fixes #2166 by displaying dedicated success screens similar to successful payments.

I do find the big ZEUS logo, animated check mark and lightning bolts a bit too celebratory for this, so I made a calm success message, short summary and useful action buttons.

Error case is unchanged -> an inline error message via SuccessErrorMessage component makes sense here.

For open channel:
Button "VIEW STATUS" navigates to channels pane > pending channels tab.

For peer connect:
Button "OPEN CHANNEL TO THIS PEER" navigates to open channel screen and pre-fills inputs with pubkey/host of the just connected peer.

Before After
grafik grafik
grafik grafik
grafik grafik

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • Embedded LND
  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (CLNRest)
  • Nostr Wallet Connect
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the ZEUS Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and yarn.lock have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @myxmaster, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the user experience for critical operations like opening Lightning channels and connecting to peers. By implementing dedicated success screens, the application now provides clearer, more contextual feedback to the user, along with direct pathways to relevant next steps. This change moves away from generic notifications towards a more guided and informative post-action flow.

Highlights

  • Dedicated Success Screens: Introduced dedicated success screens for both successful Lightning channel openings and peer connections, replacing generic success messages.
  • Enhanced User Experience: The new success screens provide a calm message, a concise summary of the operation, and useful action buttons for immediate follow-up.
  • Actionable Buttons: For channel success, a 'View status' button navigates to the pending channels tab. For peer connection success, an 'Open channel to this peer' button pre-fills the open channel inputs with the newly connected peer's details.
  • Localization Updates: Added new localization strings to support the text displayed on the new success screens and their action buttons.
Changelog
  • locales/en.json
    • Added new translation keys for 'View status', 'Open channel to this peer', and pending channel notes.
  • views/OpenChannel.tsx
    • Imported Divider and Amount components for use in the new success screens.
    • Removed the generic SuccessMessage component import, as custom success screens are now implemented.
    • Updated ChannelsStore import to include ChannelsType for navigation.
    • Introduced logic to determine peerAlias, displaySatAmount, and allChannels for displaying relevant information on success screens.
    • Refactored the component's render method to conditionally display either the new success screens (for channel or peer success) or the original channel/peer input form.
    • Implemented the UI for the channel success screen, showing a checkmark, success title, details of opened channels (pubkey, capacity, alias), and a pending note.
    • Added action buttons to the channel success screen: 'View status' (navigates to pending channels) and 'OK' (goes back).
    • Implemented the UI for the peer connection success screen, showing a checkmark, success title, peer details (alias, pubkey).
    • Added action buttons to the peer success screen: 'Open channel to this peer' (pre-fills inputs) and 'OK' (goes back).
    • Defined new styles (successContent, successCheckmark, successTitle, channelIndex, successNote, successButtons) to support the new success screen layouts.
  • views/Wallet/Wallet.tsx
    • Implemented navigation logic to switch to the 'Channels' tab within the wallet when a switchToChannels navigation parameter is passed, supporting the new channel success screen's 'View status' button.
Activity
  • The pull request introduces dedicated success screens for channel opening and peer connection, addressing issue UI improvement: Success message for channel opening #2166.
  • The author has provided detailed descriptions, including before/after screenshots, and confirmed adherence to code quality standards (tsc, lint, prettier, tests).
  • Testing was performed on Android with LND (REST).
  • New locale text has been added, requiring translations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces dedicated success screens for channel opening and peer connection, providing a cleaner and more informative user experience. I have identified a critical issue regarding tab navigation in localized environments and suggested a fix to ensure consistent behavior across all languages.

@kaloudis kaloudis added this to the v0.13.0 milestone Feb 23, 2026
@myxmaster myxmaster force-pushed the open-channel-success-screen branch from f37ad55 to 6b2ecf4 Compare February 23, 2026 18:39
@shubhamkmr04
Copy link
Contributor

@myxmaster can you please rebase this PR ? so we can have latest rn84 changes here

@myxmaster myxmaster force-pushed the open-channel-success-screen branch from 6b2ecf4 to 8c73744 Compare March 2, 2026 11:50
Copy link
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

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

Simulator.Screen.Recording.-.iPhone.17.-.2026-03-02.at.20.55.14.mov

for the backends that don't have option for pending channels view

@myxmaster
Copy link
Contributor Author

good catch. so we just hide the "VIEW STATUS" button in that case, right?

@shubhamkmr04
Copy link
Contributor

good catch. so we just hide the "VIEW STATUS" button in that case, right?

right. that works

@myxmaster myxmaster force-pushed the open-channel-success-screen branch from 8c73744 to 1ed385b Compare March 3, 2026 10:16
@myxmaster
Copy link
Contributor Author

Regarding the last commit:

While investigating the peer connect flow, I noticed that the CLNRest backend always includes host and port in the connect request body, even when empty. CLN also supports connecting by pubkey only (gossip lookup), but received host: "" and port: NaN in that case. Small fix, so including it here.

Copy link
Contributor

@shubhamkmr04 shubhamkmr04 left a comment

Choose a reason for hiding this comment

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

Simulator.Screen.Recording.-.iPhone.17.-.2026-03-04.at.22.45.12.mov

we are not getting redirected to pending channel tab

@myxmaster
Copy link
Contributor Author

Ok that was an existing bug.

Root cause:
createBottomTabNavigator() was called inside render(), which created a new navigator object on every re-render. Since ChannelsPane is a MobX @observer, any observable change (e.g. channel counts updating after async enrichment) triggered a re-render -> unmount/remount of the entire tab navigator -> spurious focus events on the first ("Open") tab -> channelsType overwritten back to Open. On top of that, tab route names included dynamic channel counts ("Pending (0)", "Pending (1)"), so when those counts changed after mount, React Navigation could no longer resolve the previously active route and fell back to the first tab.

Fix:
Move createBottomTabNavigator() and the route name constants to module level. With a stable navigator type, re-renders no longer cause unmount/remount cycles. With stable route names the active tab is never lost when channel counts update. The dynamic counts are now only used for the tabBarLabel display, not as route identifiers.

Additionally fixed the flashing empty Open Channel form by skipping resetOpenChannel() on mount in case channelSuccess is true.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI improvement: Success message for channel opening

3 participants