Filter dialog: only offer options that yield results

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 20:48:57 +02:00
co-authored by Claude Sonnet 5.5
parent ac1c2ebce2
commit 8a357f7418
7 changed files with 215 additions and 81 deletions
+2 -2
View File
@@ -209,13 +209,13 @@ func (a *App) openModal(p tview.Primitive, width, height int) {
// openSidePanel shows p at the top right so most of the view behind it stays
// visible, for dialogs whose changes are applied live.
func (a *App) openSidePanel(p tview.Primitive, width, height int, hints string) {
func (a *App) openSidePanel(p tview.Primitive, width, height int, hints string, onClose func()) {
box := tview.NewFlex().
AddItem(nil, 0, 1, false).
AddItem(tview.NewFlex().SetDirection(tview.FlexRow).
AddItem(p, height, 0, true).
AddItem(nil, 0, 1, false), width, 0, true)
a.pushOverlay(box, p, hints, false, nil)
a.pushOverlay(box, p, hints, false, onClose)
}
// openFull shows p above the whole view area (the tab bar and status bar stay visible).