Skip to content

feat: Rework get pr output into a readable PR summary view - #158

Open
BlueLabelscotch wants to merge 9 commits into
mainfrom
naman/pr-nits
Open

feat: Rework get pr output into a readable PR summary view#158
BlueLabelscotch wants to merge 9 commits into
mainfrom
naman/pr-nits

Conversation

@BlueLabelscotch

Copy link
Copy Markdown
Collaborator

Summary

Reworks harness get pr rendering into a readable summary view, instead of the previous plain labeled-fields dump.

  • Header: #<number> <title> with a colorized state/draft badge, author/branch summary, file/commit/diff stats, and check status.
  • Description: rendered through a lightweight markdown formatter (pkg/console/markdown.go).
  • Comments summary: a collapsed "Not showing N comments" section at the end showing the newest comment (author, relative time, text), with a hint pointing at harness list pr_comment <id> to view the full conversation. Best-effort
    — fetched via the PR's activities endpoint; a failure or empty comment list simply omits the section without failing the command.

Details

  • modules/code/pr.go: new renderPRHeader, description block, and comments-summary wiring in GetPRWorkflow/renderPR.
  • modules/code/activity.go (new): normalizes raw PR activity items and renders the collapsed comments summary (renderCommentsSummary) plus relative-time formatting.
  • pkg/console/markdown.go (new): minimal markdown-to-terminal renderer for the PR description.
  • pkg/console/console.go: small additions supporting the new rendering (colors/helpers).

Comments are fetched inline via the existing PR activities endpoint (no new registered command) — kept intentionally minimal for now.

Sign up for freeto 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.

1 participant

@BlueLabelscotch