fix(home): format issue/PR activity display when comment is empty #164
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/steeper!164
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/activity-types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Fix home panel display for activity events where the API returns
Contentas a JSON array[id, text]with empty comment text. Previously showed raw JSON like["165",""]. Now shows human-readable fallbacks.Changes
close_issue,create_issue,comment_issue): parse JSON[issueNum, commentText], show comment if present, elseIssue #N closed/Issue #N opened/Comment on #Nclose_pull_request,approve_pull_request,reopen_pull_request): added to PR handler, show#N → textif comment present, elsePR #N closed/PR #N approved/PR #N reopenedWhy
Raw JSON in the activity feed is unreadable. These op types exist in the Gitea/Forgejo API but were unhandled.
Testing
go build ./...passesBreaking Changes
None
Notes
Follows existing pattern for PR events (parsing
Contentas[]stringJSON). TheformatDescfunction inhomeview.gonow covers all known issue and PR activity op types.Review
Result: Approved — no blocking issues.
Summary: Clean fix. Parses
ContentJSON array for issue events, shows comment text when present, falls back to friendly label (e.g. "Issue #165 closed") when empty. Follows existing pattern from PR event handling (lines 318-321).Non-blocking suggestion:
formatDescis a closure insiderenderActivities(), making it untestable. Extracting it would allow table-driven tests for this formatting logic. Filed as #165.Checklist
fix(home): format closed/opened issue display when comment is emptyto fix(home): format issue/PR activity display when comment is empty