Skip to content

feat: show close reason in issue detail view#63

Open
TPreece101 wants to merge 2 commits intomantoni:mainfrom
TPreece101:feat/show-close-reason
Open

feat: show close reason in issue detail view#63
TPreece101 wants to merge 2 commits intomantoni:mainfrom
TPreece101:feat/show-close-reason

Conversation

@TPreece101
Copy link

Summary

  • Display close_reason in the Properties sidebar of the issue detail view, between Status and Priority
  • Only rendered when close_reason is truthy (hidden for open issues or closed issues without a reason)
  • No server changes needed — the field already flows through via the spread operator in list-adapters.js

Closes #34

Changes

  • types/subscriptions.ts — added close_reason to Issue interface
  • app/views/detail.js — added close_reason to IssueDetail typedef and conditional render in properties sidebar
  • app/views/detail.test.js — 2 new tests: renders when present, hidden when absent

Test plan

  • All 263 tests pass (npm test)
  • Manual: closed issue with reason shows "Close Reason" row
  • Manual: closed issue without reason shows default "Closed"
  • Manual: open issue does not show "Close Reason" row
  • Manual: long close reasons wrap correctly

🤖 Generated with Claude Code

Display the close_reason field in the Properties sidebar of the issue
detail view, between Status and Priority. Only shown when close_reason
is present (truthy). Closes mantoni#34.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@TPreece101 TPreece101 force-pushed the feat/show-close-reason branch from d9e5905 to f82916d Compare March 10, 2026 15:38
@mantoni
Copy link
Owner

mantoni commented Mar 10, 2026

Please fix the failing build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@TPreece101
Copy link
Author

I think that should fix it 😄

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds display of the close_reason field in the issue detail view's Properties sidebar, addressing issue #34 where closed issues didn't show why they were closed. The field is conditionally rendered only when a close reason is present.

Changes:

  • Added close_reason to the Issue TypeScript interface and the IssueDetail JSDoc typedef
  • Conditionally renders a "Close Reason" row in the properties sidebar between Status and Priority
  • Added two tests covering the presence and absence of the close reason field

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
types/subscriptions.ts Added close_reason?: string | null to the Issue interface
app/views/detail.js Added close_reason to JSDoc typedef and conditional rendering in the properties sidebar
app/views/detail.test.js Two new tests verifying close reason renders when present and is hidden when absent

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

* @property {string} [acceptance]
* @property {string} [notes]
* @property {string} [status]
* @property {string} [close_reason]
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.

close reason is not shown in UI

3 participants