feat(tui): add tag autocomplete and query composition #43

Merged
lerko merged 1 commits from feat/tag-autocomplete-query-compose into main 2026-05-21 16:22:01 +00:00
Owner

Summary

  • Tag autocomplete: typing #partial in capture bar shows matching suggestions from existing tags. Tab/enter accepts, up/down navigates, esc dismisses. Popup renders above capture bar with dynamic content height adjustment.
  • Query composition: extends ? search with composable operators — @today, @yesterday, @week, @month for date ranges, <Nd/>Nd for age filters, ^type for card type filters. DB-level filters (date, card type) push to SQL via ListParams; text/tag filters remain in-memory. All operators combine freely: ?deploy #ops @week ^snippet.
  • Header search pill and preview text updated to reflect active query filters.

Test plan

  • Type # followed by partial tag name in capture bar — verify suggestions appear
  • Tab/enter accepts suggestion, esc dismisses, up/down navigates
  • Verify autocomplete popup disappears after accepting or on esc
  • Test ?@today returns only today's entries
  • Test ?@week returns last 7 days
  • Test ?>30d returns entries older than 30 days
  • Test ?^snippet returns only snippet cards
  • Test combined query ?deploy #ops @week ^snippet
  • Verify esc clears all query filters and reloads
  • Existing ?text #tag search still works unchanged
  • All tests pass (go test ./...)
## Summary - **Tag autocomplete**: typing `#partial` in capture bar shows matching suggestions from existing tags. Tab/enter accepts, up/down navigates, esc dismisses. Popup renders above capture bar with dynamic content height adjustment. - **Query composition**: extends `?` search with composable operators — `@today`, `@yesterday`, `@week`, `@month` for date ranges, `<Nd`/`>Nd` for age filters, `^type` for card type filters. DB-level filters (date, card type) push to SQL via ListParams; text/tag filters remain in-memory. All operators combine freely: `?deploy #ops @week ^snippet`. - Header search pill and preview text updated to reflect active query filters. ## Test plan - [x] Type `#` followed by partial tag name in capture bar — verify suggestions appear - [x] Tab/enter accepts suggestion, esc dismisses, up/down navigates - [x] Verify autocomplete popup disappears after accepting or on esc - [x] Test `?@today` returns only today's entries - [x] Test `?@week` returns last 7 days - [x] Test `?>30d` returns entries older than 30 days - [x] Test `?^snippet` returns only snippet cards - [x] Test combined query `?deploy #ops @week ^snippet` - [x] Verify esc clears all query filters and reloads - [x] Existing `?text #tag` search still works unchanged - [x] All tests pass (`go test ./...`)
lerko added 1 commit 2026-05-21 16:13:51 +00:00
feat(tui): add tag autocomplete and query composition
CI / test (pull_request) Successful in 2m31s
e22e040688
Tag autocomplete shows suggestions when typing #partial in capture bar.
Tab/enter accepts, up/down navigates, esc dismisses.

Query composition extends ? search with date filters (@today, @week,
@month, <7d, >30d), card type filters (^snippet), all composable
with existing text and tag filters.
lerko merged commit d24df8432f into main 2026-05-21 16:22:01 +00:00
lerko deleted branch feat/tag-autocomplete-query-compose 2026-05-21 16:22:01 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lerko/nib-v1#43