Skip to content

feat(jira): kanban board view for Jira issues in the Tasks panel - #13054

Closed
EugeValeiras wants to merge 4 commits into
stablyai:mainfrom
EugeValeiras:feat/jira-tasks-kanban
Closed

EugeValeiras wants to merge 4 commits into
stablyai:mainfrom
EugeValeiras:feat/jira-tasks-kanban

Conversation

@EugeValeiras

Copy link
Copy Markdown
Contributor

Summary

Adds a List / Board toggle to the Jira panel in Tasks, rendering issues as a kanban board — mirroring the existing Linear board pattern.

Board view

  • Columns come from groupJiraIssuesByStatus, so they follow the project's real Agile board column order (jira.getProjectStatusOrder) when the issues resolve to a single project/site with one board, and degrade to alphabetical status order otherwise — same behavior the grouped list already has.
  • Column headers reuse the status pill tone (getJiraStatusTone), cards show key, priority, title, labels, assignee, and relative update time, with the same Start workspace / Open in Jira actions as list rows.
  • The toggle lives in the panel header; sort controls stay list-only. View options reuse the shared localized catalog (getJiraViewOptions).

Drag & drop with Jira transitions

Jira only changes status through transitions, so dropping a card:

  1. Loads the issue's available transitions (cached per issue + current status via createMetadataRequestStore, so a moved issue naturally misses its stale entry; works over IPC locally and jira.listTransitions RPC on remote runtimes).
  2. Resolves the transition targeting the destination column — by the to.id of statuses already present in the column, falling back to to.name matching the section label.
  3. Applies an optimistic patchJiraIssue status patch, calls jira.updateIssue with the transitionId, and rolls back with a toast if no transition exists or the update fails.

The drag payload is a typed MIME (application/x-orca-jira-issue-ref) carrying key + siteId (keys are only unique per site), with the same size guard and Electron dragover hidden-payload handling as the Linear board payload.

Tests

  • jira-board-drag-payload.test.ts — round-trip, hidden/missing/rejected payload states.
  • task-page-jira-board-transitions.test.ts — transition resolution by id and label, per-status caching, failure fallback.
  • task-page-jira-board.test.tsx — column rendering, board-order sorting, updating-card drag lockout.

No open issue tracks this; closest prior art is the GitHub Projects board work (#9943, #10186), which doesn't cover Jira.

🤖 Generated with Claude Code

Adds a List/Board toggle to the Jira tasks panel, mirroring the Linear
board. Columns come from groupJiraIssuesByStatus, so they follow the
project's real Agile board column order when available and fall back to
alphabetical status order otherwise. Cards support HTML5 drag & drop
between columns; since Jira only changes status through transitions, the
drop resolves a transition targeting the destination column (cached per
issue+status via the metadata request store), applies an optimistic
status patch, and rolls back with a toast when no transition exists or
the update fails.

Co-Authored-By: Claude Fable 5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Jira task pages now support list and board layouts, sprint-only filtering, and board issue movement. The board groups issues by configured or discovered status sections and supports issue selection, workspace actions, Jira links, and drag-and-drop movement. Transition loading uses scoped, status-aware caching and matches target sections by status ID or label. Issue moves apply optimistic updates, submit Jira transitions, roll back failures, and track per-issue progress. Tests cover status ordering, board rendering, transition lookup, sprint filtering, drag payload validation, and failure handling.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the board and transition features, but it omits the required Screenshots, Testing checklist, AI Review Report, Security Audit, and Notes sections. Add all required template sections, complete the testing checklist, and document AI review, cross-platform checks, security findings, screenshots, and follow-up notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: a Jira kanban board view in the Tasks panel.
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.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3528e9bf-3305-48cf-9f63-03bbb051b752

📥 Commits

Reviewing files that changed from the base of the PR and between 02a1251 and 525ead7.

📒 Files selected for processing (9)
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/task-page-jira-board-transitions.test.ts
  • src/renderer/src/components/task-page-jira-board-transitions.ts
  • src/renderer/src/components/task-page-jira-board.test.tsx
  • src/renderer/src/components/task-page-jira-board.tsx
  • src/renderer/src/components/task-page-localized-options.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/jira-board-drag-payload.test.ts
  • src/renderer/src/lib/jira-board-drag-payload.ts

Comment on lines +20 to +25
function matchesDragRef(issue: JiraIssue, ref: JiraBoardIssueDragRef): boolean {
if (issue.key !== ref.key) {
return false
}
return !ref.siteId || !issue.siteId || ref.siteId === issue.siteId
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use exact site matching for issue identity.

At Line 24 and Line 45, a missing siteId matches every site. If a list contains the same issue key in multiple site contexts, handleSectionDrop can call onMoveIssue for the wrong issue. Compare siteId values exactly in both helpers.

Proposed fix
 function matchesDragRef(issue: JiraIssue, ref: JiraBoardIssueDragRef): boolean {
   if (issue.key !== ref.key) {
     return false
   }
-  return !ref.siteId || !issue.siteId || ref.siteId === issue.siteId
+  return ref.siteId === issue.siteId
 }

 function isSelectedIssue(issue: JiraIssue, selectedIssue: JiraIssue | null): boolean {
   if (!selectedIssue || issue.key !== selectedIssue.key) {
     return false
   }
-  return !selectedIssue.siteId || !issue.siteId || selectedIssue.siteId === issue.siteId
+  return selectedIssue.siteId === issue.siteId
 }

Also applies to: 41-45

Comment on lines +5799 to +5815
patchJiraIssue(
issue.key,
{ status: transition.to },
{ sourceContext: jiraTaskSourceContext }
)
const result = await jiraUpdateIssue(
providerSettings,
issue.key,
{ transitionId: transition.id },
issue.siteId
)
if (result.ok === false) {
patchJiraIssue(
issue.key,
{ status: previousStatus },
{ sourceContext: jiraTaskSourceContext }
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Scope optimistic Jira patches by site ID.

Line 5799 patches by issue.key only. When All Jira sites is selected, two sites can contain the same Jira key. The optimistic update and rollback can then modify the wrong cached issue.

Pass issue.siteId through patchJiraIssue, and match the composite site/key reference. Add a same-key cross-site rollback test.

EugeValeiras and others added 2 commits August 7, 2026 16:13
The board reused the Linear grid, which wraps columns into 2-3 per row;
Jira boards commonly have more columns than fit the panel, so lanes now
sit side by side with horizontal scrolling.

Co-Authored-By: Claude Fable 5 <[email protected]>
# Conflicts:
#	src/renderer/src/components/TaskPage.tsx
#	src/renderer/src/components/task-page-localized-options.tsx
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

Two board gaps: columns only existed when an issue occupied them, and
there was no way to focus the board on the active sprint.

getProjectStatusOrder now carries each board column's name alongside its
status ids (optional field, so old remote runtimes keep the id-only
shape), and the board builds one lane per real column — empty ones
render with a drop placeholder and resolve transitions through their
config status ids. Statuses outside the board config still get appended
lanes.

The Sprint toggle composes `sprint in openSprints()` onto the active
preset or search JQL client-side and rides the existing JQL search
path, so it needs no wire change and works against older remote hosts.

Co-Authored-By: Claude Fable 5 <[email protected]>
@EugeValeiras

Copy link
Copy Markdown
Contributor Author

Pushed two board improvements after using it against a real sprint-heavy project:

  • Full board columns — getProjectStatusOrder now returns each column's name alongside its status ids (optional field, wire-compatible with old remote runtimes), and the board renders one lane per real board column. Empty columns show a drop placeholder and resolve drop transitions through their config status ids; statuses outside the board config still get appended lanes.
  • Current-sprint filter — a Sprint toggle in the panel header composes sprint in openSprints() onto the active preset/search JQL client-side, riding the existing JQL search path (no wire change, works against older remote hosts).

Both covered by unit tests (board sections, transition resolution for empty lanes, JQL composition, main-side column extraction).

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 78756233-15f8-4daf-a40b-4a30be3d3eb5

📥 Commits

Reviewing files that changed from the base of the PR and between 34f2a62 and b9d15b8.

📒 Files selected for processing (17)
  • src/main/jira/issues.test.ts
  • src/main/jira/issues.ts
  • src/renderer/src/components/TaskPage.tsx
  • src/renderer/src/components/task-page-jira-board-sections.test.ts
  • src/renderer/src/components/task-page-jira-board-sections.ts
  • src/renderer/src/components/task-page-jira-board-transitions.test.ts
  • src/renderer/src/components/task-page-jira-board-transitions.ts
  • src/renderer/src/components/task-page-jira-board.test.tsx
  • src/renderer/src/components/task-page-jira-board.tsx
  • src/renderer/src/components/task-page-jira-sprint-filter.test.ts
  • src/renderer/src/components/task-page-jira-sprint-filter.ts
  • src/renderer/src/components/task-page-localized-options.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/jira-board-drag-payload.test.ts
  • src/renderer/src/lib/jira-board-drag-payload.ts
  • src/shared/jira-types.ts
  • src/shared/types.ts
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/renderer/src/lib/jira-board-drag-payload.test.ts
  • src/renderer/src/components/task-page-jira-board.test.tsx
  • src/renderer/src/components/task-page-jira-board-transitions.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/jira-board-drag-payload.ts
  • src/renderer/src/components/task-page-jira-board-transitions.test.ts
  • src/renderer/src/components/task-page-jira-board.tsx
  • src/renderer/src/components/task-page-localized-options.tsx
  • src/renderer/src/components/TaskPage.tsx

Comment on lines +24 to +30
const orderByMatch = jql.match(/\sORDER\s+BY\s[\s\S]*$/i)
if (!orderByMatch || orderByMatch.index === undefined) {
return `(${jql}) AND ${CURRENT_SPRINT_CLAUSE}`
}
const where = jql.slice(0, orderByMatch.index).trim()
if (!where) {
return jql

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Apply the current-sprint clause to bare ORDER BY queries.

jiraCurrentSprintJql trims custom JQL before it calls withCurrentSprintClause. The helper does not detect ORDER BY at offset zero, and its empty-predicate branch omits the filter.

  • src/renderer/src/components/task-page-jira-sprint-filter.ts#L24-L30: Match ORDER BY at the start of the query and return the sprint clause before the order clause when where is empty.
  • src/renderer/src/components/task-page-jira-sprint-filter.test.ts#L31-L33: Assert that ORDER BY created ASC becomes sprint in openSprints() ORDER BY created ASC.
Proposed fix
-  const orderByMatch = jql.match(/\sORDER\s+BY\s[\s\S]*$/i)
+  const orderByMatch = jql.match(/(?:^|\s)ORDER\s+BY\s[\s\S]*$/i)
   if (!orderByMatch || orderByMatch.index === undefined) {
     return `(${jql}) AND ${CURRENT_SPRINT_CLAUSE}`
   }
   const where = jql.slice(0, orderByMatch.index).trim()
+  const orderBy = jql.slice(orderByMatch.index).trim()
   if (!where) {
-    return jql
+    return `${CURRENT_SPRINT_CLAUSE} ${orderBy}`
   }
-  const orderBy = jql.slice(orderByMatch.index).trim()
   return `(${where}) AND ${CURRENT_SPRINT_CLAUSE} ${orderBy}`
📍 Affects 2 files
  • src/renderer/src/components/task-page-jira-sprint-filter.ts#L24-L30 (this comment)
  • src/renderer/src/components/task-page-jira-sprint-filter.test.ts#L31-L33

@nwparker nwparker removed the P2 label Aug 19, 2026
nwparker added a commit that referenced this pull request Oct 14, 2026
Show Jira issues as a board alongside the existing list and add the current-sprint preset. Status moves use the existing owner-scoped mutation queue, collect required workflow fields/comments, retain rejected drafts, and reload the mounted comment timeline once after success. Source/session fences keep older detail failures from undoing newer board moves.

Preserve statuses plus sprint in query preview and Edit-as-JQL. Older hosts must advertise sprint support; unsupported peers fail clearly. Existing capability definitions and test fixtures are split without changing public exports, wire strings, or coverage to meet current lint limits.

Validation:351 tests/42 suites,all46 changed sources full-file lint/anti-slop and7quality stages,localization/RPC checks,and independent source review passed. Node types passed on runtime-identical99d and web types passed on final602d. Fresh hidden Electron54/54 checks passed on99d; final two test-only changes were hash and emitted-runtime audited. The inherited IPC301-line failure is byte-identical main and being corrected separately by the image PR.

Adapted Eugenio Valeiras (@EugeValeiras)'s board contribution from PR #13054.

Co-authored-by: Eugenio Valeiras <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
@EugeValeiras EugeValeiras closed this by deleting the head repository Oct 24, 2026
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.

4 participants