Fix inert OSC-8 hyperlinks: bump vendored x/vt to upstream parser fix - #962
Open
anutron wants to merge 1 commit into
Open
Fix inert OSC-8 hyperlinks: bump vendored x/vt to upstream parser fix#962anutron wants to merge 1 commit into
anutron wants to merge 1 commit into
Conversation
Argus's pinned github.com/charmbracelet/x/vt had a parser bug in handleHyperlink: an OSC-8 sequence with an id= param (the form Claude Code emits for PR references) swapped Link.URL and Link.Params, so every hyperlink rendered styled but pointed at "id=..." instead of the real URL. Fixed upstream in x/vt#868; bump to that exact commit (x/ansi 0.11.6->0.11.7 comes along as a coordinated requirement). Adds a regression test that drives the real x/vt emulator with the actual OSC-8 wire bytes instead of a hand-built cell — the gap that let this ship untested — plus a gotcha note and an OpenSpec change (archived in this same PR) documenting the fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
anutron
force-pushed
the
argus/fix-hyperlink-vt-bump
branch
from
August 31, 2026 06:52
08903f1 to
cb693ea
Compare
Merging this branch will not change overall coverage
Coverage by fileChanged unit test files
|
anutron
added a commit
that referenced
this pull request
Sep 1, 2026
# Conflicts: # context/knowledge/index.md # openspec/specs/terminal-rendering/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
OSC-8 terminal hyperlinks (e.g. clickable
#960PR references in Claude Code's status line) are inert everywhere in Argus, including panes that already have the hyperlink-style mapping wired up (UvCellToTcellStyle→tcell.Style.Url).Root cause: Argus's vendored
github.com/charmbracelet/x/vt(pinned to commitf2fb44ab3145) has a parser bug invt/osc.go'shandleHyperlink— for an OSC-8 sequence that includes anid=param (ESC ] 8 ; id=1vaggxp ; https://... ST, the exact form Claude Code emits), the two OSC data segments are assigned to the wrong struct fields:cell.Link.URLreceives theid=...params segment andcell.Link.Paramsreceives the real URL. Every downstream consumer faithfully renders a syntactically valid but useless hyperlink whose href is the literal string"id=1vaggxp"— text displays styled (orange/underlined) but Option/Cmd-click does nothing.Already fixed upstream:
github.com/charmbracelet/x/vtcommit3c30eef5e73e8ad8e1765913b0ca2aeb43d32e4f("fix(vt): store osc 8 hyperlink params and uri in correct fields (#868)", merged 2026-08-28).What changed
github.com/charmbracelet/x/vtto the exact upstream fix commit (pinned rather than@latest, to avoid pulling in two extra days of unrelated upstream changes).github.com/charmbracelet/x/ansimoves 0.11.6 → 0.11.7 as a coordinated transitive requirement (confirmed viago mod tidy— the fix itself lives entirely inx/vt).UvCellToTcellStyle's existingcell.Link.URL→Style.Url(...)mapping was already correct.TestOSC8HyperlinkWithIDParam_RealWireFormat(internal/tui/terminal/terminalpane_test.go) drives the real x/vt emulator with the actual OSC-8 wire-format bytes Claude Code emits, instead of a hand-builtuv.Cell— the exact gap that let this ship with zero test coverage. Verified it fails on the old pinned commit with the predicted swapped values, and passes on the fix.context/knowledge/gotchas/pty-terminal.md.openspec/specs/terminal-rendering/spec.mdgains an "OSC-8 hyperlink rendering" requirement) per this repo's spec-driven-development convention for behavioral fixes.Out of scope:
internal/tui/terminalpane/terminalpane.go(the plugin-view pane) — only exists on an unmerged sibling branch (PR #960); it inherits this fix automatically once merged, since it depends on the same correctedx/vtcell data.Test plan
TestOSC8HyperlinkWithIDParam_RealWireFormatpasses on the fix, and was confirmed to fail (with the exact predicted swap) against the old pinnedx/vtcommitmake pre-pr— build/vet/fmt-check/lint-pr all clean;test-cover-gateclean at 88.7% coverage (two pre-existing, unrelated local-only false-fails excluded: hera-worker env-var leakage intointernal/agentprofile-env tests, and the advisory-onlymake vulnstdlib-CVE gate that CI itself runs ascontinue-on-error)🤖 Generated with Claude Code