Skip to content

fix: display issue priority in selector for linear#2175

Open
janburzinski wants to merge 7 commits into
mainfrom
jan/eng-1377-display-priority-in-the-issue-modal
Open

fix: display issue priority in selector for linear#2175
janburzinski wants to merge 7 commits into
mainfrom
jan/eng-1377-display-priority-in-the-issue-modal

Conversation

@janburzinski
Copy link
Copy Markdown
Collaborator

image

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 21, 2026

Greptile Summary

This PR adds issue priority display to the Linear integration by fetching priorityLabel from Linear's GraphQL API and surfacing it as a priority icon in the issue selector UI.

  • Backend: priorityLabel is added to all three GraphQL fragments (list, search, context queries) and mapped to a new optional priority field on the shared Issue type.
  • UI: A new IssuePriorityIcon component renders priority as a 3-bar chart (high=3, medium=2, low=1) or a "!" badge for urgent; hasMeaningfulPriority is extracted and exported so both IssueSelector and InlineIssueSelector can reserve consistent column space; issues are sorted by priority when the Linear provider is active.
  • Bug fixes bundled in: status color ordering is corrected so "blocked/cancelled" takes precedence over "done", GitHub "open" status no longer shows a misleading status dot, and placeholder strings now show the provider's display name instead of its raw key.

Confidence Score: 5/5

Safe to merge — the changes are additive and well-scoped, with no impact on existing data paths for non-Linear providers.

The priority field is optional throughout, so existing issues without it degrade gracefully to no icon. The GraphQL additions are additive and all three query fragments are updated consistently. The priority sort is guarded to Linear only. The UI alignment logic is computed from live issue data and passed explicitly by both callers, so no stale defaults slip through. No logic errors were found.

No files require special attention.

Important Files Changed

Filename Overview
src/shared/tasks.ts Adds optional priority?: string field to the Issue type — a minimal, non-breaking schema extension.
src/main/core/linear/linear-issue-provider.ts Adds priorityLabel to all three GraphQL fragments (list, search, context) and maps it to priority in toIssue; straightforward data-fetching change.
src/main/core/linear/linear-issue-provider.test.ts Test fixtures and assertions updated to include priorityLabel in mock responses and verify the mapped priority field; coverage is adequate.
src/renderer/features/tasks/components/issue-selector/useIssueSearch.ts Adds stable priority sort (urgent→high→medium→low→none) via useMemo, applied only to the Linear provider; no issues found.
src/renderer/features/tasks/components/issue-selector/issue-selector.tsx Adds IssuePriorityIcon, hasMeaningfulPriority (now exported), and shouldShowStatusDot; refactors IssueRow and SelectedIssueValue to render priority; fixes status color ordering so "blocked/cancelled" takes precedence over "done".
src/renderer/features/tasks/components/issue-selector/inline-issue-selector.tsx Imports hasMeaningfulPriority, computes reservePrioritySpace, fixes placeholder/empty-state strings to use display name, and passes reservePrioritySpace to IssueRow.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Linear GraphQL API] -->|priorityLabel field| B[linear-issue-provider toIssue]
    B -->|priority string| C[Issue type in shared/tasks.ts]
    C --> D[useIssueSearch sortByPriority]
    D --> E{issueProvider?}
    E -->|linear| F[sorted by priority]
    E -->|other| G[original order]
    F --> H[IssueSelector / InlineIssueSelector]
    G --> H
    H --> I{hasMeaningfulPriority in list?}
    I -->|yes| J[reservePrioritySpace = true]
    I -->|no| K[reservePrioritySpace = false]
    J --> L[IssueRow - IssuePriorityIcon]
    K --> L
    L --> M{priority value}
    M -->|urgent| N[exclamation badge]
    M -->|high| O[3 bars active]
    M -->|medium| P[2 bars active]
    M -->|low| Q[1 bar active]
    M -->|no priority or null| R[placeholder span or null]
Loading

Reviews (2): Last reviewed commit: "Match Linear urgent priority icon" | Re-trigger Greptile

Comment thread src/renderer/features/tasks/components/issue-selector/issue-selector.tsx Outdated
Comment thread src/renderer/features/tasks/components/issue-selector/issue-selector.tsx Outdated
Copy link
Copy Markdown
Contributor

@arnestrickmann arnestrickmann left a comment

Choose a reason for hiding this comment

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

great addition

@arnestrickmann
Copy link
Copy Markdown
Contributor

Also added the status of the GitHub issues, right?

CleanShot 2026-05-25 at 15 21 05@2x

@mezotv
Copy link
Copy Markdown
Contributor

mezotv commented May 25, 2026

It would be cool if the issues were sorted by severity similar to linears default ui cc: @janburzinski

@mezotv
Copy link
Copy Markdown
Contributor

mezotv commented May 25, 2026

Also added the status of the GitHub issues, right?

Looks like a bug tbh

@janburzinski
Copy link
Copy Markdown
Collaborator Author

upsiii, on it :D

@janburzinski
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-05-26 at 07 20 40 Screenshot 2026-05-26 at 07 21 04

now github looks more like what we had before and linear has the status in it (also sorted) :D

@janburzinski
Copy link
Copy Markdown
Collaborator Author

@greptileai

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.

3 participants