Repository navigation
Update glamour to v2 - #14148
Update glamour to v2#14148
Conversation
|
Draft until cli/go-gh#281 is merged, a new version of go-gh is released, and the |
There was a problem hiding this comment.
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-ghwith 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
… 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.
|
Thanks for your pull request! Unfortunately, it doesn't meet the requirements for review:
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
|
babakks
left a comment
There was a problem hiding this comment.
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.
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,-opreviously could wrap with the-at the end of the line, but now it stays together and wraps one cell later.