Skip to content

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

Draft
a-khushal wants to merge 2 commits intoZeusLN:masterfrom
a-khushal:feat/menu-search
Draft

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

Conversation

@a-khushal
Copy link
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
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
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.

views/Menu.tsx Outdated

const showSeed =
hasEmbeddedSeed &&
isSearchMatch(seedLabel, 'seed', 'backup', 'recovery');
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The additional search keywords (e.g., 'seed', 'backup', 'recovery') are hardcoded in English. This is great for English-speaking users but won't work for users searching in other supported languages. While the main labels are localized, these extra keywords provide a better search experience that is currently limited to English. Consider localizing these keywords as well to provide a consistent experience for all users.

@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
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
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
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
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.

@a-khushal a-khushal force-pushed the feat/menu-search branch 2 times, most recently from 30ebdc5 to 0b6af0a Compare March 5, 2026 19:39
Copy link
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
Contributor Author

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?

@a-khushal a-khushal marked this pull request as draft March 6, 2026 14:46
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