fix: stop emitting tabwriter escapes in create response #15
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
nagonag
nagonag/ignore
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
heiko/fj!15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-7-color-create-response"
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?
Fixes issue #7.
coloredLabelNamesalways wrapped ANSI in\xffmarkers (fortabwriter.StripEscape). The list views flushed through a tabwriterso this was invisible, but
postIssue/postPRused plainfmt.Printfand the bytes hit the terminal as
��.Split into two helpers:
coloredLabelNames— plain ANSI (used by post* create response)coloredLabelNamesTabwriter—\xff-wrapped (used by list views)New
root_test.gotest asserts that the first never contains\xffand the second always does (when color is forced on).
Closes #7
ius:ai:claude-opus-4-7
`coloredLabelNames` wrapped each label's ANSI color codes in `\xff` markers so `text/tabwriter` (with `StripEscape`) could treat them as zero-width when computing column widths. The list views flushed through a tabwriter so the markers were stripped, but `postIssue` / `postPR` reused the same helper inside a plain `fmt.Printf`, sending the `\xff` bytes to the terminal verbatim — rendering as `��`: Created issue #55 [��Kind/Bug��] releases page Split into two helpers in `internal/cli/root.go`: - `coloredLabelNames` — plain ANSI, no `\xff`. Used by the create response lines. - `coloredLabelNamesTabwriter` — `\xff`-wrapped ANSI. Used by the `issue list` and `pr list` tabwriter rows. Shared implementation behind a bool; `labelColorStyle` and `tabwriterEscape` untouched. New test in `root_test.go` locks in the byte-content invariant for both helpers. Closes #7 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> ius:ai:claude-opus-4-7