Skip to content

Update glamour to v2 - #14148

Merged
babakks merged 2 commits into
cli:trunkfrom
heaths:issue3718
Oct 21, 2026
Merged

babakks merged 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 Resolved
Yverr0y pushed a commit to Yverr0y/skillquarium that referenced this pull request Sep 10, 2026
… each connection independently (stanfish06#722)

PR numbers live on the base repository, so reading headRepositoryOwner/headRepository
queried a fork PR against the fork -- cli/cli#14148 raised "Could not resolve to a
PullRequest with the number of 14148", and where the fork happened to have its own PR
at that number it silently returned a different PR. `gh pr view --json` (gh 2.98.0) has
no baseRepository field, so derive owner/repo from the PR url instead.

The three connections shared one pagination loop and were extended unconditionally, so
an exhausted one re-fetched page 1 every iteration. Verified against ahnpolished/dorv#70:
was 136 comments (4 unique) and 1394 threads (41 unique) over 34 calls, now 4/4 and 41/41.
Page sizes are now per-connection variables set to 0 once drained.

Also paginate reviewThreads.comments, which was capped at first: 100 with no pageInfo.
@heaths
heaths marked this pull request as ready for review October 17, 2026 09:34
@heaths
heaths requested a review from a team as a code owner October 17, 2026 09:34
@heaths
heaths requested a review from williammartin October 17, 2026 09:35
@github-actions github-actions Bot added unmet-requirements and removed needs-triage needs to be reviewed labels Oct 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request! Unfortunately, it doesn't meet the requirements for review:

  • None of the referenced issues have the help wanted label

Please update your PR to address the above. This PR will be automatically closed in 4 days if these requirements are not met.

Full contribution requirements
  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123)

@babakks babakks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot for this, @heaths, and for pushing the whole Glamour v2 upgrade through go-gh as well! 🎉

We're going to merge this as is, since we need to ship another feature that depends on the go-gh v2.17.0 bump. Sorry if you weren't quite finished with it yet. 🙏

One thing we noticed: with Lip Gloss v2 counting the border inside Width(), the left column of gh status ends up one cell narrower, so some truncated rows now wrap onto a second line. We'll follow up with a small fix that bumps the bordered column's width by one and restores the original status_test.go expectations.

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 unmet-requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants