color state and author handles in output #24

Merged
heiko merged 3 commits from fix/3-colored-output into master 2026-05-18 09:26:20 +02:00
Owner

Fixes #3.

Summary

  • State chips (open=green, closed=red, merged=purple) using the same 24-bit RGB style as labels
  • Author logins rendered in blue chips via @user in lists and show output
  • Both list paths (tabwriter-safe \xff wrapping) and show paths covered
  • prDisplayState detects merged PRs via merged_at since the API returns state:closed for them
  • Extracted colorString(text, hex, forTabwriter) helper to unify all four coloring paths

Test plan

  • fj issues / fj prs — open items show green state, closed red, author blue
  • fj pr list --state closed on a merged PR — state shows purple
  • fj issue show N / fj pr show N — state and author colored in table
  • fj issues --color never — plain output, no ANSI
  • go test ./... passes
Fixes #3. ## Summary - State chips (open=green, closed=red, merged=purple) using the same 24-bit RGB style as labels - Author logins rendered in blue chips via `@user` in lists and show output - Both list paths (tabwriter-safe `\xff` wrapping) and show paths covered - `prDisplayState` detects merged PRs via `merged_at` since the API returns `state:closed` for them - Extracted `colorString(text, hex, forTabwriter)` helper to unify all four coloring paths ## Test plan - [x] `fj issues` / `fj prs` — open items show green state, closed red, author blue - [x] `fj pr list --state closed` on a merged PR — state shows purple - [x] `fj issue show N` / `fj pr show N` — state and author colored in table - [x] `fj issues --color never` — plain output, no ANSI - [x] `go test ./...` passes
Fixes #3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ius:ai:claude-sonnet-4-6
Open=green, closed=red, merged=purple chips (same 24-bit RGB style as
labels). Author logins rendered in blue. Both list (tabwriter-safe) and
show paths covered.

Fixes #3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ius:ai:claude-sonnet-4-6
fix: detect merged PRs via merged_at for correct color
Some checks failed
mod-nag (Push) / mod-nag (push) Has been cancelled
754f60e198
The Forgejo API returns state:closed for merged PRs; merged_at
distinguishes them. Add prDisplayState() and a test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ius:ai:claude-sonnet-4-6
heiko merged commit 1b0173f0df into master 2026-05-18 09:26:20 +02:00
heiko deleted branch fix/3-colored-output 2026-05-18 09:26:21 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
heiko/fj!24
No description provided.