Skip to content

feat(jira): add bounded site-specific favourite filter catalogue - #29028

Merged
nwparker merged 1 commit into
mainfrom
nwparker/jira-favourite-filter-port
Oct 15, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/jira-favourite-filter-port

Conversation

@nwparker

@nwparker nwparker commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​627 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​625
Prod 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​248 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​241

ELI5

Prepare a safe way to read the favourite filters already saved in one Jira site. This is the first, read-only part of replacing the stale filter PR #13395; it does not yet add a menu or apply imported queries.

What Changed

  • Add one explicit-site favourite-filter read through the existing authenticated Jira request, host runtime, desktop bridge and web bridge. Cloud uses /rest/api/3/filter/favourite?expand=jql; Server/Data Center uses its v2 equivalent.
  • Limit the upstream HTTP body to 2 MiB, then validate and bound the returned catalogue to 100 filters and 512 KiB after JSON encoding. Preserve each originating site, omit unusable queries with an explicit truncated flag, and reject malformed or cross-site transport responses.
  • Return an explicit unsupported result when an older host lacks the method. Permission, authentication, network and malformed-response failures remain visible; a failed read never deletes credentials or switches to another host's account.

Why

The original PR duplicates the custom JQL filters now stored by the host and targets files that no longer exist. This narrower read is independently reviewable and does not replace the current filter store, task resume data or issue search.

Imported JQL can contain site-local numeric references. The follow-up UI must keep its selected site and query together rather than copying that JQL into the current host-only custom-filter store. It also needs owner/site lifetime fences before it can safely apply queries. This PR deliberately separates that remaining medium-risk work.

Linked Issue

Part of #13395 and #17686. Neither is completed by this foundation.

Visual Proof

N/A — no user-visible UI or interaction changes; the new catalogue has no UI consumer in this slice.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

121 focused tests passed across ten files. Full pnpm tc, all seven changed-code quality stages, formatting, generated RPC catalog and diff checks passed. Local platform: macOS arm64. Full build/lint and cross-platform matrix are left to required PR CI; local checks used focused tests, full types and the changed-code quality gate. Cloud and Server/DC requests use fixtures; no live Jira account was exercised. Paired runtime, desktop and web routing, malformed/oversized data, auth failures, cancellation and older-host handling are covered by automated tests. Linux/Windows CI remains required.

Review

Independent review identified and corrected an in-flight authentication race, response schemas that rejected additive fields from newer hosts, and web bridge error classification. Final independent source review found no remaining findings.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Unusually large Jira HTTP responses fail explicitly at the 2 MiB limit. No credentials are stored, no query is executed, and no task/filter persistence schema changes. The caller explicitly identifies the execution owner and one connected site. No repository/worktree assumption is added, so folder workspaces use the same account-owned transport. No platform-specific APIs or remote stream opcodes change.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e34b55fe-fe36-43b6-b299-4cde6239eb7c
📥 Commits

Reviewing files that changed from the base of the PR and between 89d0ed1 and 45c03da.

⛔ Files ignored due to path filters: 1
  • src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing: 20
  • src/main/ipc/jira-project-metadata-registration.test.ts
  • src/main/ipc/jira.ts
  • src/main/jira/authenticated-request-json-limit.test.ts
  • src/main/jira/authenticated-request.ts
  • src/main/jira/favourite-filters.test.ts
  • src/main/jira/favourite-filters.ts
  • src/main/jira/jira-api-error.ts
  • src/main/runtime/rpc/methods/jira-favourite-filters.test.ts
  • src/main/runtime/rpc/methods/jira.ts
  • src/main/runtime/runtime-jira-commands.ts
  • src/preload/api/jira-api.ts
  • src/preload/api/jira-bridge.ts
  • src/renderer/src/runtime/runtime-jira-client.ts
  • src/renderer/src/runtime/runtime-jira-favourite-filters-client.test.ts
  • src/renderer/src/runtime/runtime-jira-favourite-filters-client.ts
  • src/renderer/src/web/preload-api/web-jira-api.ts
  • src/renderer/src/web/web-preload-api-jira.test.ts
  • src/shared/jira-favourite-filters.test.ts
  • src/shared/jira-favourite-filters.ts
  • src/shared/rpc-contract/jira-favourite-filter-params.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The change adds a Jira favourite-filter listing operation. Shared schemas validate site IDs and filter data, and normalization enforces list limits. The Jira service fetches filters with a bounded response size. IPC, RPC, preload, and renderer APIs expose the operation for local and environment targets.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 45c03

This adds a read-only, bounded way to list favourite Jira filters for one selected site. It has no UI or persistence changes, and older hosts report an explicit unsupported result. No merge-blocking issue was found. Server/Data Center behavior was tested only against fixtures.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 20 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: adding a bounded, site-specific Jira favourite-filter catalogue.
Description check Passed The description is complete and aligned with the template. It explains the change, motivation, scope, testing, compatibility considerations, and limitations. It also documents that visual proof is not…
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

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