Skip to content

Update glamour to v2 - #14148

Draft
heaths wants to merge 2 commits into
cli:trunkfrom
heaths:issue3718
Draft

Update glamour to v2#14148
heaths wants to merge 2 commits into
cli:trunkfrom
heaths:issue3718

Conversation

@heaths

@heaths heaths commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #3718.

This updates the markdown stack to Glamour v2 and keeps the status column spacing aligned with trunk under Lip Gloss v2. Lip Gloss v2 counts the right border inside Width(), so the left status column adds one cell to preserve the previous content width and spacing.

The log fixture changes are separate from that width adjustment. Glamour v2 now wraps with Lip Gloss rather than the previous ansi-based wrapper, so break behavior changed for width-constrained text. For example, -o previously could wrap with the - at the end of the line, but now it stays together and wraps one cell later.

Copilot AI balanced review requested due to automatic review settings August 15, 2026 00:09
@github-actions github-actions Bot added external pull request originating outside of the CLI core team needs-triage needs to be reviewed labels Aug 15, 2026
@heaths

heaths commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Draft until cli/go-gh#281 is merged, a new version of go-gh is released, and the replacement is removed from go.mod.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades Markdown rendering to Glamour v2 to prevent wrapped links from producing broken URLs.

Changes:

  • Migrates Glamour and Lip Gloss imports to v2.
  • Updates rendering snapshots for changed wrapping behavior.
  • Temporarily replaces go-gh with its pending v2-compatible fork.
Show a summary per file
File Description
go.mod Updates rendering dependencies and temporary go-gh replacement.
go.sum Updates dependency checksums.
pkg/markdown/markdown.go Uses Glamour v2 types.
pkg/cmd/extension/browse/browse.go Migrates README rendering to Glamour v2.
pkg/cmd/status/status.go Migrates status layout to Lip Gloss v2.
pkg/cmd/status/status_test.go Updates status layout expectations.
pkg/cmd/agent-task/shared/testdata/log-1-want.txt Updates transcript wrapping fixture.
pkg/cmd/agent-task/shared/testdata/log-2-want.txt Updates transcript wrapping fixture.

Review details

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 7/8 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread pkg/cmd/status/status.go
Effectively restores status_test.go since Lip Gloss v2 changed how it calculates width to include the column separator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team needs-triage needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-detected links with new lines result in 404s when clicked

2 participants