Skip to content

fix(tui): add viewer copy action - #1251

Open
kusonooyasumi wants to merge 1 commit into
usestrix:mainfrom
kusonooyasumi:fix/viewer-copy-button-pr
Open

fix(tui): add viewer copy action#1251
kusonooyasumi wants to merge 1 commit into
usestrix:mainfrom
kusonooyasumi:fix/viewer-copy-button-pr

Conversation

@kusonooyasumi

Copy link
Copy Markdown
Contributor

Summary

  • add explicit Open and Copy controls for the running viewer URL
  • copy the raw unwrapped URL through the native clipboard locally and tmux/OSC 52 over SSH
  • collapse the viewer details when the panel body is clicked, while keeping button clicks independent

Testing

  • go test -race ./...
  • go vet ./...
  • gofmt
  • git diff --check

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds explicit Open and Copy controls to the running viewer panel, including native, tmux, and OSC 52 clipboard backends, and allows the panel body to collapse or expand.

  • Copies the raw, trimmed viewer URL without triggering the viewer-open command.
  • Selects clipboard behavior based on local, SSH, and tmux environments.
  • Adds mouse hit-testing and tests for viewer controls, collapsing, URL wrapping, and clipboard backend selection.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or independently actionable non-blocking issue identified.

The viewer controls align with the rendered panel geometry, copy errors remain visible through the existing toast flow, and the added tests cover the principal interaction and backend-selection paths.

Important Files Changed

Filename Overview
strix/interface/tui/internal/app/model.go Adds environment-aware native, tmux, and OSC 52 clipboard backends with error propagation to the existing copy-result message flow.
strix/interface/tui/internal/app/selection.go Adds a viewer URL copy command that trims the snapshot URL and reuses existing clipboard feedback handling.
strix/interface/tui/internal/app/update.go Routes viewer-panel clicks among expansion, collapse, Copy, and Open while preserving independent button behavior.
strix/interface/tui/internal/app/view.go Renders collapsible viewer details and explicit padded Open and Copy controls with layout-aware URL wrapping.
strix/interface/tui/internal/app/model_test.go Adds coverage for action hit-testing, raw URL copying, collapse transitions, missing URLs, and clipboard backend selection.
strix/interface/tui/go.mod Promotes the already-present OSC 52 module from an indirect dependency to a direct dependency.

Reviews (1): Last reviewed commit: "fix(tui): add viewer copy action" | Re-trigger Greptile

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