feat(jira): sort Jira issues by key, issue, status, priority, assignee and updated#7959
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis change updates the Jira tab to support sortable columns and collapsible status-based issue groupings. It adds Jira priority and project-status loading, priority-aware sorting utilities, status section construction, sortable headers with direction indicators, and keyboard-accessible expandable sections containing existing issue rows and actions. A Vitest suite covers priority weighting, issue sorting, and section grouping and ordering. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
src/renderer/src/components/task-page-jira-sorting.test.ts (1)
267-431: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftTests reimplement sorting logic instead of importing the actual implementation.
Each sorting test duplicates the comparator logic from
TaskPage.tsxinline rather than calling the realsortedJiraIssues/jiraIssueSectionsmemos. For example, the priority sort test at line 348 usesweightA - weightBwhile the actual implementation usesweightB - weightAwith a direction flip — both produce correct results for their respective directions, but the test doesn't validate the real code path. If the implementation changes, these tests won't catch regressions.Consider refactoring
getJiraPriorityWeight, the sort comparator, and the section-grouping logic into testable pure functions that bothTaskPage.tsxand this test file import.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 64ee2e38-3e36-456f-9814-349409da64d6
📒 Files selected for processing (2)
src/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/task-page-jira-sorting.test.ts
3ab4d91 to
43afda6
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 89c572d1-011e-4d83-8684-d69335750ad8
📒 Files selected for processing (3)
src/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/jira-issue-sorter.tssrc/renderer/src/components/task-page-jira-sorting.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/renderer/src/components/TaskPage.tsx
43afda6 to
b35dd3f
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/jira/issues.ts (1)
850-891: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a brief comment explaining the board column reordering logic.
The reordering of statuses by Agile board column configuration (lines 867-891) is a design-driven, non-obvious behavior. Per coding guidelines, code driven by a design doc or non-obvious constraint should include a brief explanatory comment.
💬 Suggested comment
Array.isArray(configResponse.columnConfig.columns) ) { + // Order statuses by their position in the board's column configuration + // so the renderer can group issues in board-column order. const orderedNames: string[] = [] const seen = new Set<string>()Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: bdc56081-0add-4d45-8ec1-68bf10c65860
📒 Files selected for processing (10)
src/main/ipc/jira.tssrc/main/jira/issues.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/rpc/methods/jira.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/TaskPage.tsxsrc/renderer/src/components/jira-issue-sorter.tssrc/renderer/src/components/task-page-jira-sorting.test.tssrc/renderer/src/runtime/runtime-jira-client.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/renderer/src/components/task-page-jira-sorting.test.ts
- src/renderer/src/components/jira-issue-sorter.ts
- src/renderer/src/components/TaskPage.tsx
b35dd3f to
b48c887
Compare
Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Add test coverage for the new Jira issue sorting features including: - Priority weight calculation with fallback logic - Sorting by key, title, priority, assignee, and updated date - Issue grouping and section ordering after sorting - Handling of edge cases like unassigned assignees and unknown priorities Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Extract getJiraPriorityWeight and sorting logic into a shared jira-issue-sorter module. - Fix grid column definitions on md viewports in TaskPage.tsx. - Implement cancelled flags in useEffect hooks in TaskPage.tsx to guard against stale responses. - Swapped priority weights mapping to blocker=99, lowest=1, missing=0 to sort ascending from lowest-to-highest priority using weightA - weightB. - Focus-ring enhancements on sort button headers and aria-expanded/chevron fix on collapsible groups. - Remove duplicate helpers from unit tests and verify the new sorting expectations.
b48c887 to
647d8be
Compare
AmethystLiang
left a comment
There was a problem hiding this comment.
Thanks! I rebased this onto the merged Jira grouping work and completed the maintainer review.
- Added reliable desktop and compact sorting controls.
- Corrected priority ordering across custom, multi-site Jira schemes.
- Added accessibility, localization, and production-path regression coverage.
- Verified focused tests, full type/lint gates, performance, and Electron behavior.
Note
This PR should be merged after #7958 as the sorting was built on top of the grouping functionality.
Description
Adds interactive header columns to Jira issues in the task page (Key, Issue, Status, Priority, Assignee, Updated) supporting togglable sorting directions (
ascanddesc). Priority sorting is mapped numerically, and status sorting reverses the standard group order.User-Visible Changes
desc(down) on the first click since the default is alreadyasc(no icon shown).asc) and High to Low (desc).Media
AI Code Review Summary
Technical Details