Skip to content

feat: Add Menu search/filter for faster navigation#3743

Open
a-khushal wants to merge 1 commit intoZeusLN:masterfrom
a-khushal:feat/menu-search
Open

feat: Add Menu search/filter for faster navigation#3743
a-khushal wants to merge 1 commit intoZeusLN:masterfrom
a-khushal:feat/menu-search

Conversation

@a-khushal
Copy link
Copy Markdown
Contributor

@a-khushal a-khushal commented Feb 21, 2026

Description

Relates to issue: ZEUS-3731

image

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
Copy Markdown
Contributor

Summary of Changes

Hello @a-khushal, 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 enhances the user experience by integrating a search and filter mechanism directly into the main menu. This allows users to quickly locate specific settings or features by typing keywords, making the application more efficient and user-friendly, especially for those with extensive menu options.

Highlights

  • Menu Search/Filter Functionality: Implemented a search bar at the top of the menu screen, allowing users to filter menu items for faster navigation. The search is case-insensitive and trims whitespace.
  • Dynamic Menu Item Visibility: Introduced conditional rendering for almost all menu items, ensuring they only appear if they match the current search query or if no search query is active. This significantly streamlines the menu based on user input.
  • State Management for Search: Added a searchQuery state variable to the Menu component to manage the input from the new search bar.
Changelog
  • views/Menu.tsx
    • Added TextInput component import for search functionality.
    • Introduced searchQuery to the component's state for managing search input.
    • Implemented isSearchMatch utility function to determine if menu items should be displayed based on the search query.
    • Defined localized string variables for various menu item labels to be used in search matching.
    • Added a search input field with an icon to the menu UI.
    • Updated conditional rendering logic for numerous menu sections to filter items based on the searchQuery.
Activity
  • No specific activity (comments, reviews, progress updates) was provided in the context for this pull request.
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
Copy Markdown
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

This pull request introduces a search functionality to the Menu.tsx component. The changes include adding a TextInput for user input, managing the search query in the component's state, and implementing a isSearchMatch utility to dynamically filter menu items based on the query. Menu items are now conditionally rendered using this search logic, which incorporates both localized labels and additional hardcoded English keywords for matching. The review comment highlights that these hardcoded English search keywords, while improving searchability, are not localized and suggests localizing them to provide a consistent experience for all users.

Comment thread views/Menu.tsx Outdated
@a-khushal a-khushal force-pushed the feat/menu-search branch 2 times, most recently from 7fab0e6 to e3a5a3c Compare February 21, 2026 05:43
@kaloudis
Copy link
Copy Markdown
Contributor

this is not very comprehensive and has a lot of shortcomings. we'd have to redo the entire settings system here to get the results we want, but it could be an opportunity to unify the style across the views

@a-khushal a-khushal force-pushed the feat/menu-search branch 2 times, most recently from 50d7bab to 1db5680 Compare February 22, 2026 17:01
@a-khushal a-khushal marked this pull request as draft February 22, 2026 17:06
@a-khushal a-khushal force-pushed the feat/menu-search branch 5 times, most recently from 613520a to 3b47fb4 Compare February 26, 2026 12:17
@a-khushal
Copy link
Copy Markdown
Contributor Author

a-khushal commented Feb 26, 2026

this is not very comprehensive and has a lot of shortcomings. we'd have to redo the entire settings system here to get the results we want, but it could be an opportunity to unify the style across the views

few questions:

  1. should the search work across Menu, Settings, and Tools (not just Menu)?
  2. “redo the settings system,” does this mean rebuilding how the items are defined and rendered into one consistent util, and matching the ui across those screens

@kaloudis

@kaloudis
Copy link
Copy Markdown
Contributor

kaloudis commented Mar 1, 2026

this is not very comprehensive and has a lot of shortcomings. we'd have to redo the entire settings system here to get the results we want, but it could be an opportunity to unify the style across the views

few questions:

1. should the search work across Menu, Settings, and Tools (not just Menu)?

2. “redo the settings system,” does this mean rebuilding how the items are defined and rendered into one consistent util, and matching the ui across those screens

@kaloudis

yes and yes

@a-khushal
Copy link
Copy Markdown
Contributor Author

WhatsApp.Video.2026-03-02.at.11.56.43.PM.mp4

@kaloudis

@a-khushal a-khushal marked this pull request as ready for review March 2, 2026 18:38
ajaysehwal

This comment was marked as resolved.

Comment thread views/Menu.tsx Outdated
@a-khushal a-khushal force-pushed the feat/menu-search branch 3 times, most recently from 0b6af0a to ad26545 Compare March 5, 2026 19:41
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.

approach still seems wrong here. We still have to maintain each view and a search registry now?

Copy link
Copy Markdown
Contributor Author

@a-khushal a-khushal Mar 6, 2026

Choose a reason for hiding this comment

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

im trying to refactor all three views (Menu.tsx, Tools/index.tsx, and Settings/Settings.tsx) into a single dynamically rendered AppMenu.tsx, how does that sound?

@kaloudis

@a-khushal a-khushal marked this pull request as draft March 6, 2026 14:46
@a-khushal a-khushal force-pushed the feat/menu-search branch 4 times, most recently from c819232 to df71691 Compare March 9, 2026 18:27
@a-khushal
Copy link
Copy Markdown
Contributor Author

@gemini-code-assist /review

@a-khushal a-khushal force-pushed the feat/menu-search branch 2 times, most recently from 5b4f111 to 0bde719 Compare March 9, 2026 19:39
@a-khushal
Copy link
Copy Markdown
Contributor Author

@gemini-code-assist /review

Copy link
Copy Markdown
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

This pull request introduces a significant and well-executed refactoring of the app's menu, settings, and tools screens. By consolidating them into a single, data-driven AppMenu component with search functionality, the navigation becomes more user-friendly and the codebase more maintainable. The new architecture, centered around searchRegistry.ts, is clean, scalable, and makes future modifications to menu items much simpler. The changes are well-contained and the removal of old components is done correctly. Overall, this is an excellent feature enhancement and architectural improvement.

Note: Security Review did not run due to the size of the PR.

Comment thread views/AppMenu.tsx
@a-khushal a-khushal force-pushed the feat/menu-search branch 2 times, most recently from 1fd8013 to 80d584a Compare March 9, 2026 19:57
@a-khushal
Copy link
Copy Markdown
Contributor Author

@gemini-code-assist /review

Copy link
Copy Markdown
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

This pull request introduces a significant and well-executed refactoring by consolidating the Menu, Settings, and Tools screens into a new, dynamic AppMenu component. This change is powered by a declarative search registry, which is a fantastic improvement for maintainability and extensibility. The addition of a search/filter feature will greatly enhance user navigation. The overall code quality is high, and my feedback includes a few suggestions for the new AppMenu.tsx component to further improve type safety and code structure.

Comment thread views/AppMenu.tsx Outdated
Comment thread views/AppMenu.tsx Outdated
Comment thread views/AppMenu.tsx Outdated
Copy link
Copy Markdown
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

This pull request introduces a significant and well-executed refactoring of the menu, settings, and tools screens. By consolidating them into a single, data-driven AppMenu component, you've greatly improved maintainability and extensibility. The new search functionality is a fantastic addition for user experience, allowing for much faster navigation. The code is well-structured, using a central registry for menu items which is a great pattern. I have a few minor suggestions to further improve type safety and performance.

Comment thread views/AppMenu.tsx Outdated
Comment thread views/AppMenu.tsx Outdated
@a-khushal a-khushal marked this pull request as ready for review March 9, 2026 20:16
@a-khushal
Copy link
Copy Markdown
Contributor Author

@kaloudis you can give this a test now

@kaloudis kaloudis added this to the v0.14.0 milestone Mar 11, 2026
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.

3 participants