cli/pkg/cmd/discussion/view
Max Beizer ca84d4c6a3
Add discussion view --comments with threaded display
Implement the --comments flag for discussion view, showing threaded
comments with replies.

Features:
- --comments flag fetches and displays discussion comments
- --order flag (oldest/newest) controls comment ordering
- Answer badge (✓ Answer) on marked answer comments
- Threaded replies with indentation
- Truncation messages when more replies exist than fetched
- TTY: markdown-rendered comments with author/timestamp/reactions
- Non-TTY: stable tab-delimited format for scripting
- JSON: populated comment nodes via ExportData

Implementation:
- GetWithComments uses raw GraphQL to dynamically switch between
  first/last based on ordering. Fetches 30 comments with 4 replies
  each. Explicitly reverses for newest-first ordering.
- --order without --comments returns a flag error
- Reuses existing shared.ReactionGroupList for reaction display

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-24 21:24:30 +01:00
..
view.go Add discussion view --comments with threaded display 2026-04-24 21:24:30 +01:00
view_test.go Add discussion view --comments with threaded display 2026-04-24 21:24:30 +01:00