Skip to content

feat(frontend): add client-side text search for tasks#94

Open
prodriguezxyz wants to merge 4 commits intoDCsunset:masterfrom
prodriguezxyz:feature/task-search
Open

feat(frontend): add client-side text search for tasks#94
prodriguezxyz wants to merge 4 commits intoDCsunset:masterfrom
prodriguezxyz:feature/task-search

Conversation

@prodriguezxyz
Copy link
Copy Markdown

Relates to #71.

This PR adds a lightweight text search field to the task list, covering the common "find tasks mentioning X" use case.

What's included

  • Case-insensitive substring search across description, project, tags, and annotations.
  • Expand-on-click magnifier icon in the status-tabs row (keeps the default view uncluttered).
  • Keyboard shortcuts:
    • / — focus search (ignored when typing in other inputs, so it doesn't interfere with the new-task dialog, etc.)
    • Ctrl+K / Cmd+K — focus search from anywhere, including inside inputs
    • Esc — close and clear
  • Blur while empty auto-closes the input; blur with a value keeps it open so the user doesn't lose their filter context.
  • Filters within the currently selected status tab (pending, waiting, completed, deleted, recurring).
  • Changing the search term clears the current row selection (to avoid batch-acting on hidden rows), mirroring the existing behavior on tab switch.

What's deliberately out of scope

I wanted to keep this PR narrow and leave room for discussion on the shape of more advanced modes. Happy to follow up with any of these if you'd prefer them in this PR instead:

  • Regex mode matching Taskwarrior's own task /expression/ syntax (the example in Search engine #71). Could be added behind a .* toggle inside the input to keep the default UX accessible to non-regex users.
  • Native Taskwarrior filters (e.g. project:Home status:pending due.before:eow) passed through to the backend via task <filter>. This would require a backend endpoint and moves search off the client.
  • Server-side / CLI-backed search in general — useful for very large task sets, but not needed for the common case.

Notes on the approach

  • Client-side only. No backend changes, no new dependencies, no schema changes, no new settings keys. The search state lives in component scope (not in Vuex / localStorage).
  • Tasks are already loaded into store.state.tasks on navigation, so filtering happens against the in-memory array — instant response, works offline.
  • I did not touch the lint baseline; the file had pre-existing style warnings/errors that are unchanged by this PR.

Context on the issue

Issue #71 has been open since 2023-05-29 with no prior PR addressing it, which is why I'm opening this directly rather than starting a discussion on the issue first. If you'd prefer a different shape (regex by default, CLI passthrough, different UI placement), I'm happy to iterate — just let me know and I'll rework the branch.

prodriguezxyz and others added 4 commits April 18, 2026 22:04
Adds a case-insensitive search input in the TaskList toolbar that
filters the current status tab by matching against description,
project, tags, and annotations. Clearing the field or switching
status preserves the expected no-filter view. Selection is cleared
when the search term changes to avoid acting on hidden rows.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Moves the search input from the data-table toolbar into the status
tabs row, right-aligned via v-spacer. Uses outlined + dense style
with a placeholder for clearer affordance, replacing the thin
underline that blended into the surrounding whitespace. Groups
search semantically with the status filter it operates on.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces the always-visible search field with a magnifier icon that
expands into the input when clicked, pressing '/' from anywhere on
the page, or shrinks back when Escape is pressed or the input loses
focus while empty. Matches the Todoist/Notion affordance and keeps
the tabs row uncluttered when search is not in use.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extends the global keydown handler so Ctrl+K (and Cmd+K on macOS)
also expands the search input, matching the Todoist / Slack / Notion
palette convention. The '/' shortcut keeps its input-aware skip, but
Ctrl+K fires anywhere — even from inside text fields — since modifier
combos don't collide with typing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant