Skip to content

Update issue card closed-state labels from GitHub state reasons#123

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/update-issue-status-ux
Draft

Update issue card closed-state labels from GitHub state reasons#123
Copilot wants to merge 3 commits into
mainfrom
copilot/update-issue-status-ux

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description:

Issue cards only exposed open / closed, which lost the distinction between completed work and non-actionable closures. This updates the issue preview header to reflect GitHub's closed issue reasons directly in the card UX.

  • Status mapping

    • Map closed issue state_reason to the card subtitle and icon:
      • completed🟣 completed
      • not_planned⊘ not planned
      • duplicate⊘ duplicate
    • Keep existing behavior for open issues and closed issues without a reason.
    • Update the non-actionable closed-state icons based on review feedback.
  • Type support

    • Extend GitHubIssue with optional state_reason so the UI can render the richer closed-state variants.
  • Coverage

    • Add focused unit tests for completed, not planned, and duplicate issue cards, including the reviewed icon expectations.
if (data.state === "closed") {
  switch (data.state_reason) {
    case "completed":
      stateIcon = "🟣";
      stateText = "completed";
      break;
    case "not_planned":
      stateIcon = "⊘";
      stateText = "not planned";
      break;
    case "duplicate":
      stateIcon = "⊘";
      stateText = "duplicate";
      break;
  }
}

Related Issues:

  • [feature] Update issue status UX

Checklist:

  • Review the CONTRIBUTING.md documentation.
  • Add a reference to a related issue in the repository.
  • Add a description of the changes proposed in the pull request.
  • Add unit tests if applicable.
  • Update documentation if applicable.
  • Add a note in the CHANGELOG.md if applicable.

Copilot AI linked an issue May 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update issue card status display Update issue card closed-state labels from GitHub state reasons May 29, 2026
Copilot AI requested a review from ianlewis May 29, 2026 00:37

@ianlewis ianlewis left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot please address these comments

Comment thread src/ui.ts Outdated
stateText = "completed";
break;
case "not_planned":
stateIcon = "⚪";

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
stateIcon = "";
stateIcon = "";

Comment thread src/ui.ts Outdated
stateText = "not planned";
break;
case "duplicate":
stateIcon = "⚪";

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
stateIcon = "";
stateIcon = "";

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please address these comments

Addressed in 89761df.

Copilot AI requested a review from ianlewis June 14, 2026 05:38
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] Update issue status UX

2 participants