Skip to content

Add status quick filters to the Jira issues list header - #6734

Closed
brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/issue-5669-issues-list-status-filters
Closed

brennanb2025 wants to merge 1 commit into
mainfrom
brennanb2025/issue-5669-issues-list-status-filters

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Status options are harvested from the loaded issues' statuses (deduped, ordered by category then name). Jira exposes no per-project status list endpoint, so there is no extra fetch — chips reflect what's actually in the current scope.
  • A new shared module src/shared/jira-preset-jql.ts holds getJiraPresetBaseJql (the four preset base queries) and composeJiraStatusJql, which inserts AND status in ("…") immediately before the last ORDER BY (appends if none) and escapes status names. The main-process filterToJql now delegates to it, so renderer and main share one source of truth. Selecting chips runs the composed query through the existing searchJiraIssues path (server-side), so filtering stays correct even when the backlog exceeds the load window.
  • Selection persists via TaskResumeState.jiraStatuses. Clearing all chips falls back to the tab's default listJiraIssues query.

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 ∪ selectedStatuses so 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.length where 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-code reviewers 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:

  1. Renderer hydration dropped jiraStatuses. sanitizeTaskResumeState allow-listed jiraPreset/jiraQuery but not jiraStatuses, so the selection was written to disk yet discarded on restart. Fixed + regression tests added.
  2. Remote (RPC) ui.set schema rejected the write. The .strict() TaskResumeState Zod schema omitted the jira fields; on the environment/SSH runtime path a strict schema rejects unknown keys, dropping the whole taskResumeState write. Added the optional fields (widening a strict schema is back-compatible) — this covers the SSH/remote use case.

Static checks & tests

  • pnpm run typecheck — pass
  • pnpm run lint (oxlint + switch-exhaustiveness + scrollbars + localization catalog/coverage) — pass; locale parity across en/es/ja/ko/zh
  • Vitest: new src/shared/jira-preset-jql.test.ts (composition, ORDER BY placement, escaping, ordering, byte-identical preset strings) + new ui.test.ts regression tests (hydration round-trip, non-string drop); jira store/main suites green

Assumptions / residual risk

  • The chip catalog reflects loaded issues; on a persisted-active first load only the selected statuses show as chips until the unfiltered view is observed (clearing reveals the rest) — documented behavior with a "Clear to see all statuses" hint, not a defect. No status-list endpoint exists to pre-populate.
  • Multi-site (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.
  • Cross-platform: pure string/state logic, no path or keyboard-shortcut code.

Made with Orca 🐋

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]>
@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@brennanb2025, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4b224384-1e6f-41b6-b4ac-571a6af4936e

📥 Commits

Reviewing files that changed from the base of the PR and between d877d94 and ebe35f9.

📒 Files selected for processing (13)
  • src/main/jira/issues.ts
  • src/main/runtime/rpc/methods/client-ui.ts
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/store/slices/ui.test.ts
  • src/renderer/src/store/slices/ui.ts
  • src/shared/jira-preset-jql.test.ts
  • src/shared/jira-preset-jql.ts
  • src/shared/types.ts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Live Electron validation evidence

Validated 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:

State What it proves File
Chips initial Status chips (To Do / Developed / In Progress / Done) render under the scope tabs, ordered by category then name, harvested from loaded issues 10-chips-initial.png
Multi-select OR "Developed" + "In Progress" active (bg-accent), list narrowed to 2, JQL preview shows … AND status in ("In Progress", "Developed") ORDER BY updated DESC, Clear + Edit-as-JQL present 12-multiselect-or.png
Restored after reload After a full page reload, the persisted "In Progress" chip restores active, list pre-narrowed to 1, "Clear to see all statuses" hint shown (catalog not yet harvested under this preset) 13-restored-after-reload.png
Manual JQL helper Typing project = ABC hides the chips and shows "Status chips apply to preset views — clear the search to use them" 14-manual-jql-helper.png

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 13-restored-after-reload.png would not appear.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@luis-urrutia-flute

Copy link
Copy Markdown

I'm waiting for this to be merged!

@brennanb2025

Copy link
Copy Markdown
Contributor Author

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.)

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.

[Feature]: Add quick status filters to the issues list header

2 participants