idea: searching in the TUI with / #31

Closed
opened 2026-07-15 18:30:54 +00:00 by hugo · 1 comment
Owner

when a user enters / in the post or media sidebar, a search entry is shown and the entered text is used to search for matching posts. this should be the simple text search, but should also support tag search with a tag: format, same with category:. also if the entry is a date in iso format yyyy-mm-dd, the posts from that date are shown.

Searching filters the sidebar, just like with the GUI application and should work for media and posts.

when a user enters / in the post or media sidebar, a search entry is shown and the entered text is used to search for matching posts. this should be the simple text search, but should also support tag search with a tag:<tag> format, same with category:<category>. also if the entry is a date in iso format yyyy-mm-dd, the posts from that date are shown. Searching filters the sidebar, just like with the GUI application and should work for media and posts.
hugo added the idea label 2026-07-15 18:30:54 +00:00
Author
Owner

Implemented in e027364.

/ in sidebar focus opens a vi-style search prompt in the status line that live-filters the current view on every keystroke — posts, pages and media, through the exact same BDS.UI.Sidebar filter params the GUI sidebar uses.

Query syntax:

  • plain words: simple text search (title, slug, excerpt, tags, categories for posts; title, filename, alt, caption, tags for media)
  • tag:x and category:x: filter like the GUI chips (repeatable, AND semantics)
  • an ISO date yyyy-mm-dd: only entries from that day — this needed a new day-level filter in the shared sidebar queries (year/month already existed), so the GUI could use it too
  • tokens combine with AND, e.g. tag:elixir 2026-07-04 release

Enter keeps the filter (it stays visible appended to the sidebar title, e.g. "Posts /tag:elixir"), esc clears it and restores the full list. Filters are kept per view, so posts and media can be filtered independently.

Covered by tests (sidebar search describe block in test/bds/tui_test.exs, day-filter test in test/bds/ui/sidebar_test.exs), spec updated (rule SidebarSearch in specs/tui.allium, allium check clean), status-line hint translated for de/fr/it/es. Build, full test suite, credo, deps.audit and dialyzer are all clean.

Implemented in e027364. `/` in sidebar focus opens a vi-style search prompt in the status line that live-filters the current view on every keystroke — posts, pages and media, through the exact same `BDS.UI.Sidebar` filter params the GUI sidebar uses. Query syntax: - plain words: simple text search (title, slug, excerpt, tags, categories for posts; title, filename, alt, caption, tags for media) - `tag:x` and `category:x`: filter like the GUI chips (repeatable, AND semantics) - an ISO date `yyyy-mm-dd`: only entries from that day — this needed a new day-level filter in the shared sidebar queries (year/month already existed), so the GUI could use it too - tokens combine with AND, e.g. `tag:elixir 2026-07-04 release` Enter keeps the filter (it stays visible appended to the sidebar title, e.g. "Posts /tag:elixir"), esc clears it and restores the full list. Filters are kept per view, so posts and media can be filtered independently. Covered by tests (sidebar search describe block in test/bds/tui_test.exs, day-filter test in test/bds/ui/sidebar_test.exs), spec updated (rule SidebarSearch in specs/tui.allium, allium check clean), status-line hint translated for de/fr/it/es. Build, full test suite, credo, deps.audit and dialyzer are all clean.
hugo closed this issue 2026-07-16 19:42:37 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hugo/bDS2#31