Skip to content

Conversation

@maphew
Copy link
Owner

@maphew maphew commented Nov 8, 2025

Summary

  • Display closing reason in Recent Events section of issue detail page
  • Show event actor (who made the change)
  • Display status transitions and other event details

Test Plan

  • Verified with manual testing: closed an issue with reason "Completed as part of sprint"
  • Confirmed reason now appears in Recent Events section
  • Confirmed actor name and event type display correctly
  • Build succeeds (go build -o beady ./cmd/beady)

Implementation Details

Updated detail.html Recent Events section to render:

  • Event timestamp and actor ({{.CreatedAt}} and {{.Actor}})
  • Event type ({{.EventType}})
  • Status transitions for StatusChanged events ({{.OldValue}} → {{.NewValue}})
  • Event comment/reason for closing events ({{.Comment}})

Updated CLAUDE.md documentation to describe Recent Events section.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Recent Events section to display audit trail details including event timestamps, actors, event types, and closing reasons.
    • Enhanced event display with additional context such as value changes and comments.
  • UI Changes

    • Updated Close button label to clarify that closing reasons are stored in the audit trail.

The closing reason was being captured and stored in the database but not
displayed in the UI. Updated the Recent Events section in detail.html to
show the event comment (which contains the closing reason), the actor who
made the change, and status transitions.

This makes the closing reason visible to users when viewing an issue's
audit trail.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 8, 2025

Walkthrough

The Issue Detail Page and UI Components are enhanced to display comprehensive audit trail information. The Close button label is updated to indicate reason storage in the audit trail, and a new Recent Events section presents detailed event entries with timestamps, actors, event types, and optional fields like value changes and comments.

Changes

Cohort / File(s) Change Summary
Documentation
CLAUDE.md
Updated summary documenting Close button label enhancement and new Recent Events section displaying audit trail with timestamps, actors, event types, and closing reasons.
Template Enhancements
assets/beady/templates/detail.html
Enhanced Recent Events section to display richer event details per item: bold CreatedAt, optional Actor, EventType, conditional OldValue → NewValue line, and optional emphasized Comment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Template conditional rendering logic for optional fields (OldValue/NewValue, Comment, Actor) is straightforward but requires verification of correct field accessibility and display conditions
  • Documentation accuracy check for described functionality alignment

Poem

🐰 Hark! The audit trail now gleams so bright,
Each event's story told just right,
With actors, reasons, values too,
The Recent Events paint a richer view!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: display closing reason in issue detail Recent Events section' accurately and specifically describes the main change: adding display of closing reasons in the Recent Events section of the issue detail page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/closed-issue-reason

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
assets/beady/templates/detail.html (1)

192-192: Minor: Empty Comment strings will render empty emphasis tags.

Line 192 checks {{if .Comment}} but will still render <em></em> if Comment is an empty string (empty string is truthy in Go conditionals only when pointer nil). This is cosmetic but consider filtering empty comments at the backend or adding length check.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28c9dc5 and 1c0b24e.

📒 Files selected for processing (2)
  • CLAUDE.md (1 hunks)
  • assets/beady/templates/detail.html (1 hunks)
🔇 Additional comments (2)
CLAUDE.md (1)

242-242: Documentation updates accurately reflect the Recent Events feature.

The changes to CLAUDE.md correctly document the UI enhancements: the close button description notes reason storage in the audit trail, and the Recent Events section description comprehensively covers the new audit trail display with timestamps, actors, and event details.

Also applies to: 246-246

assets/beady/templates/detail.html (1)

189-193: Verify data consistency for optional fields in events.

The template conditionally renders .OldValue and .NewValue together, but the check only verifies .OldValue presence. If .NewValue is ever absent or empty when .OldValue exists, the output will appear incomplete.

Run the following script to search for how .Events data structure is populated in the backend:

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.

2 participants