Repository navigation
Add status quick filters to the Jira issues list header - #6734
brennanb2025 wants to merge 1 commit into
Conversation
Add multi-selectable status chips under the Assigned/Reported/All Open/Done scope tabs in the Tasks page Jira view. Chips are harvested from the loaded issues' workflow statuses (no project status endpoint exists), OR'd together, and composed into the active preset's base JQL server-side. The composed query shows in a read-only preview with an "Edit as JQL" bridge; clearing the chips restores the tab default; the selection persists across sessions. - New src/shared/jira-preset-jql.ts: getJiraPresetBaseJql + composeJiraStatusJql (insert `status in (...)` before the last ORDER BY, escape names) + orderJiraStatusCatalog. filterToJql now delegates to it. - Persist selection via TaskResumeState.jiraStatuses; carry it through both the renderer hydration sanitizer and the strict RPC ui.set schema so it survives restart on local and remote/SSH runtimes. Co-authored-by: Orca <[email protected]>
|
Warning Review limit reached
Next review available in: 2 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Live Electron validation evidenceValidated in a dev build (Jira IPC boundary stubbed with a fixture so the real renderer chip code runs end-to-end; the JQL composition / main-process path is covered by unit tests). Each behavior was confirmed on screen. Screenshots captured locally (not committed, per repo evidence policy) — paths for the maintainer's reference:
Behavior checklist (all PASS): chips populate from real statuses · single + multi-select narrowing · scope-tab + chip composition reflected in the JQL preview · Edit-as-JQL copies the composed query into the box and clears chips · Clear restores the tab default · selection persists across reload · manual JQL hides chips + shows helper. The reload-persistence path is what surfaced the two hydration/schema fixes described in the PR body; without them the restored chip in |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
I'm waiting for this to be merged! |
|
Closing as superseded: a merged PR already covers this change. Merged #28623 (702777e) added TaskPageJiraStatusFilters.tsx. It has multi-select status filters that compose into the preset JQL via buildJiraPresetJql(activeJiraPreset,{statuses}), the same feature. The PR's TaskPage.tsx was deleted by (Stale-PR cleanup 2026-10-20, approved by Brennan. Reopen if something here is still missing on main.) |
ELI5
If you use the Tasks page with Jira, narrowing the list by workflow status today means hand-writing a JQL query. This adds clickable status chips under the Assigned / Reported / All Open / Done tabs: tap one or more to filter, tap again to unselect, Clear to reset. Your picks persist between sessions, combine with the active tab, and run as a real Jira search so long backlogs stay accurate. Typing your own query hides the chips — your query is never rewritten — and an "Edit as JQL" button hands you the composed query for free editing.
What changes
Adds multi-selectable status quick-filter chips to the Jira issues list header in the Tasks page, under the existing Assigned / Reported / All Open / Done scope tabs. Clicking a chip narrows the list to that workflow status; multiple chips OR together; the selection composes into the active scope tab's JQL and persists across sessions.
What does not change: chips apply only in preset mode. When you type your own JQL in the box, the chips hide (that's full manual control) and a one-line helper says so — typed queries are never silently rewritten by chips. The composed query is shown in a read-only preview with an "Edit as JQL" button that drops it into the box for free editing.
Closes #5669
How it works
src/shared/jira-preset-jql.tsholdsgetJiraPresetBaseJql(the four preset base queries) andcomposeJiraStatusJql, which insertsAND status in ("…")immediately before the lastORDER BY(appends if none) and escapes status names. The main-processfilterToJqlnow delegates to it, so renderer and main share one source of truth. Selecting chips runs the composed query through the existingsearchJiraIssuespath (server-side), so filtering stays correct even when the backlog exceeds the load window.TaskResumeState.jiraStatuses. Clearing all chips falls back to the tab's defaultlistJiraIssuesquery.Design approach & review
Server-side JQL composition (not client-side filtering of the loaded page) so filters genuinely "compose into the underlying JQL" and stay correct past the 50-issue window. Catalog harvested from loaded issues because no status-list endpoint exists. Criterion "reflected in the JQL box and remain editable" is satisfied via the read-only composed preview + "Edit as JQL" bridge rather than live-writing chip text into the box, which would create a chip↔text sync trap. Design review converged clean over two iterations (the load-bearing fix was rendering
catalog ∪ selectedStatusesso a persisted selection always shows chips + a reachable Clear).Implementation & deviations
Implemented per the reviewed design with no deviations. Completeness verification against every acceptance criterion: COMPLETE.
Headline behavior status: IMPLEMENTED
The chips render in the production header, toggling them runs the composed query through the real fetch path, and the selection persists. Verified live on screen (see below), not just via fixtures.
perf audit: PERF-CLEAN
Touched hot paths: the Tasks page render, the Jira fetch effect, the catalog-harvest effect. No actionable findings — memo deps use the primitive
selectedJiraStatuses.lengthwhere array identity would over-fire; no new store subscription; chip toggles reuse the store's existing 60s cache + in-flight dedup; the harvest effect is a guarded ≤50-item sort; no timers/listeners/polling/startup work added. Existing deterministic unit coverage is sufficient.Code-review loop
One round, two
review-codereviewers in parallel — both returned CLEAN (no actionable findings). A second focused review of the post-validation fix delta (below) also returned CLEAN.brennan-test-changes (live Electron validation)
Validated all behaviors on screen in a dedicated dev instance (Jira IPC boundary stubbed with a fixture so the real renderer code runs; the JQL/main path is covered by unit tests): chips populate from statuses, single + multi-select narrowing, scope-tab + chip composition in the JQL preview, "Edit as JQL", Clear restores default, persistence across a full reload (chip restored active, list pre-narrowed), and manual-JQL hides chips + shows the helper. Screenshot evidence attached as a PR comment.
This pass found and fixed two persistence bugs in the read/hydration half of the persist-across-sessions behavior, which the write-side implementation and unit/code review missed:
jiraStatuses.sanitizeTaskResumeStateallow-listedjiraPreset/jiraQuerybut notjiraStatuses, so the selection was written to disk yet discarded on restart. Fixed + regression tests added.ui.setschema rejected the write. The.strict()TaskResumeStateZod schema omitted the jira fields; on the environment/SSH runtime path a strict schema rejects unknown keys, dropping the wholetaskResumeStatewrite. Added the optional fields (widening a strict schema is back-compatible) — this covers the SSH/remote use case.Static checks & tests
pnpm run typecheck— passpnpm run lint(oxlint + switch-exhaustiveness + scrollbars + localization catalog/coverage) — pass; locale parity across en/es/ja/ko/zhsrc/shared/jira-preset-jql.test.ts(composition, ORDER BY placement, escaping, ordering, byte-identical preset strings) + newui.test.tsregression tests (hydration round-trip, non-string drop); jira store/main suites greenAssumptions / residual risk
all): a status present on one site but not another yields a swallowed per-site 400 (pre-existing fan-out behavior); partial results still render.Made with Orca 🐋