fix(views): enable searching and fix selection flow in TUI lists#773
fix(views): enable searching and fix selection flow in TUI lists#773Sypher845 wants to merge 1 commit intogoharbor:mainfrom
Conversation
Signed-off-by: Sypher845 <suyashpatil845@gmail.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #773 +/- ##
=========================================
- Coverage 10.99% 7.79% -3.20%
=========================================
Files 173 270 +97
Lines 8671 13170 +4499
=========================================
+ Hits 953 1027 +74
- Misses 7612 12030 +4418
- Partials 106 113 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes the TUI selection list behavior so users can filter items by name and don’t accidentally exit the program while applying a filter (addressing #772).
Changes:
- Enabled Bubble List filtering by returning the item’s string value from
FilterValue(). - Adjusted Enter-key handling so Enter applies the filter first (when filtering), and only selects/quits when not in filtering mode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| return m, tea.Quit |
There was a problem hiding this comment.
In the non-filtering path, the code calls tea.Quit even when SelectedItem() is nil or not of type Item (i.e., ok == false). That can still exit the TUI with an empty Choice, which upstream turns into "no ... selected" errors (e.g., when a filter yields 0 results). Consider only quitting when an item is successfully selected; otherwise keep the program running (or set an explicit abort state) so the user can adjust the filter instead of exiting with an error.
| } | |
| return m, tea.Quit | |
| return m, tea.Quit | |
| } |
Description
This PR fixes the interactive selection lists where the search filter was not working and the program would close too early when trying to filter.

Type of Change
Please select the relevant type.
Changes