Paradaux

PAR-211

0

Search v2: comparator operators (date/number) + AND/OR combinator + shareable saved views

DoneNormalUnassignedTesksFeature

Remaining scope of the PAR-191 search epic after the v1 filter builder + per-user saved views shipped. These are cohesive feature work, not quick wins.

1. Comparator operators. tesks-ui/lib/filters.ts only models FilterOp = 'is' | 'isNot' and lib/sql/issues.ts conditionSql emits equality/negation only. To make due date and votes filterable (currently absent from FILTER_FIELDS) we need range/comparison ops: date before/after/on, numeric >/</>=/<=. Add the ops to the model, the SQL mapping, and the value editors (date picker / number input).

2. AND/OR combinator. Today conditions are implicitly AND-ed (lib/sql/issues.ts: loop of .where(...)). Add an explicit AND/OR grouping in the model + UI + SQL so e.g. "Priority is Urgent OR Assignee is me" is expressible.

3. Shareable / workspace-level saved views. Saved views currently persist only per-user in user_pref.prefs.savedViews[] (lib/sql/settings.ts, lib/actions/views.ts) — not shareable. Add workspace-level/shared views: a saved_view table (tenant-scoped, optional shared flag, owner), backend CRUD gated appropriately, and UI to publish/consume shared views.

Sibling: PAR-201 (JQL-style text query language over the same predicate model) — the power-user layer; do after the predicate model is richer (1+2).

Resources

Comments

tesks · Jun 17, 2026, 6:17 AM

Progress shipped & browser-verified (tesks-ui b31e311): comparator operators + the due-date and votes facets.

  • Model: FilterOp adds before/after/gt/lt; opsForField/fieldKind helpers; parseConditions accepts the wider set.
  • SQL (conditionSql): due (due_date </>/= ::date, plus is-none) and votes (correlated sum over issue_vote, >/</=).
  • UI: per-field operator options + a date/number value control; date/number fields always available (no option list).

Verified against a seeded DB through Playwright (the tesks-ui visual harness): due before/after/none and votes >/< return the correct result counts; the builder shows a date input + before/after for Due date and a number input + >/< for Votes; a UI-applied "Votes > 2" filtered to the expected 3 issues with the chip rendered.

Still remaining on this issue: AND/OR combinator (today conditions are implicitly AND-ed) and shareable / workspace-level saved views (today per-user in user_pref). JQL is the separate PAR-201.

tesks · Jun 17, 2026, 8:08 AM

Complete — all three pieces shipped & verified:

  • Comparator operators + due-date/votes facets (tesks-ui b31e311) — browser-verified counts.
  • AND/OR combinator (6d0781a) — Match all/any toggle; AND=1 / OR=5 verified.
  • Shareable workspace-level saved views — backend saved_view table + settings.manage-gated endpoints (tesks b4d41bc, with tests) and UI (tesks-ui e5f274d): ★-chips read from the mirror, "Save shared" for managers; render/apply browser-verified, writes covered by backend tests.

JQL remains the separate PAR-201 (Backlog). Closing PAR-211.

Activity

  • tesks commented
  • tesks changed status to Status → Done
  • ParadauxIO linked a commit — Commit b4d41bc — Shared workspace saved views: table + endpoints (PAR-211)
  • tesks commented
  • tesks created the issue