Skip to content

Add OSC-8 hyperlink passthrough to plugin-view terminal pane - #960

Open
anutron wants to merge 1 commit into
masterfrom
argus/plugin-link-passthrough
Open

Add OSC-8 hyperlink passthrough to plugin-view terminal pane#960
anutron wants to merge 1 commit into
masterfrom
argus/plugin-link-passthrough

Conversation

@anutron

@anutron anutron commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The plugin-view terminal pane's cell-style mapper (terminalpane.uvCellToTcellStyle) deliberately omitted the OSC-8 hyperlink path the default agent pane's mapper (terminal.UvCellToTcellStyle) already has — the existing code comment said so outright.
  • Adds the same cell.Link.URLstyle.Url(...) mapping so plugin-printed links (PR references, "view artifact" links) render as real clickable terminal hyperlinks, at parity with the default pane.
  • This package has no cachedCell-equivalent replay cache and no DesaturateStyle-equivalent grayscale pass — paint calls screen.SetContent directly from the freshly mapped style every frame — so nothing else needed updating for the URL to survive redraws.
  • Mouse-click passthrough (making a rendered link clickable via a plugin-forwarded click event) is explicitly out of scope — a separate, larger UX question.

OpenSpec

  • New change add-plugin-view-hyperlinks (proposal + delta spec under plugin-views + tasks) created and archived in this same PR per repo policy — the base spec at openspec/specs/plugin-views/spec.md already reflects the merged requirement.

Docs

  • Added a gotcha bullet to context/knowledge/gotchas/pty-terminal.md and bumped the bullet count in context/knowledge/index.md.

Test plan

  • internal/tui/terminalpane unit tests: TestUvCellToTcellStyle_Hyperlink (link maps to a tcell.Style with the URL attached) and TestUvCellToTcellStyle_NoLinkLeavesUrlUnset (no-link regression guard).
  • make build vet fmt-check lint-pr — clean.
  • make test-cover-gate — full race suite green, 88.7% filtered coverage (floor 88); internal/tui/terminalpane at 100%.
  • openspec validate --all --strict — passes.
  • make vuln — pre-existing stdlib-only findings (Go 1.26.3 vs 1.26.6), CI runs this step with continue-on-error: true; unrelated to this change.

🤖 Generated with Claude Code

The plugin-view cell-style mapper deliberately omitted the hyperlink
path the default agent pane already had, so plugin-printed links (PR
references, artifact links) rendered as plain text with no user-visible
reason for the gap. Map cell.Link.URL to style.Url(...) the same way
the default pane does; this package has no cache/desaturation layer to
also update.

Mouse-click passthrough stays out of scope (separate, larger UX work).
@anutron
anutron force-pushed the argus/plugin-link-passthrough branch from 1497bce to f6ad879 Compare August 30, 2026 18:33
@github-actions

Copy link
Copy Markdown

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/drn/argus/internal/tui/terminalpane 100.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/drn/argus/internal/tui/terminalpane/terminalpane.go 100.00% (ø) 152 (+2) 152 (+2) 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/drn/argus/internal/tui/terminalpane/terminalpane_test.go

anutron added a commit that referenced this pull request Sep 1, 2026
# Conflicts:
#	context/knowledge/index.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant