Skip to content

feat: Add task-scoped kwargs key/value filtering to task search#95

Open
li-ashim wants to merge 2 commits into
danfimov:mainfrom
li-ashim:feature/improve_task_search
Open

feat: Add task-scoped kwargs key/value filtering to task search#95
li-ashim wants to merge 2 commits into
danfimov:mainfrom
li-ashim:feature/improve_task_search

Conversation

@li-ashim

@li-ashim li-ashim commented May 5, 2026

Copy link
Copy Markdown

Problem

Task list search was limited to task name/id or status, making it hard to find tasks by business identifiers stored in kwargs (for example, entity_id=A-100).

Solution

This PR adds task-scoped kwargs filtering with dynamic key discovery:

  • extend task search query with task_name, arg_key, arg_value
  • add dynamic argument-key options endpoint for selected task name
  • apply key/value filtering in repository for both Postgres and SQLite
  • preserve filter state through HTMX updates, sorting links, and infinite scroll

Implementation details

  • API/router:
    • normalize and trim all new filters
    • add GET /filters/arg-keys for key options partial rendering
  • Domain:
    • extend AbstractTaskRepository with find_task_names and find_argument_keys
  • Infrastructure:
    • implement task-name and argument-key discovery
    • implement DB-specific kwargs filtering:
      • Postgres JSONB access
      • SQLite json_extract
  • Templates:
    • add task-name, arg-key, arg-value controls in home.html
    • add partial/arg_key_options.html
    • keep new filters in list partial pagination/sort flow

Tests

Added and updated tests covering:

  • integration (Postgres): task name filtering, kwargs key/value filtering, task-scoped key extraction
  • unit (router): filter normalization and HTMX behavior
  • unit (SQLite): kwargs filtering and task-scoped key extraction
  • edge case: arg filtering ignored when task name is not selected

li-ashim and others added 2 commits May 5, 2026 14:52
- extend task search query with `task_name`, `arg_key`, `arg_value`
- add dynamic task key options endpoint for selected task name
- apply key/value filtering in repository for both Postgres and SQLite
- preserve filter state through HTMX updates, sorting links, and infinite scroll
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