Skip to content

fix: route all URL opens through configured opener#72

Merged
gavin-jeong merged 1 commit into
masterfrom
fix/opener-config-in-openinbrowser
Jul 16, 2026
Merged

fix: route all URL opens through configured opener#72
gavin-jeong merged 1 commit into
masterfrom
fix/opener-config-in-openinbrowser

Conversation

@gavin-jeong

Copy link
Copy Markdown
Collaborator

Problem

open.command_template (예: tmux-chrome open {{url}}) 설정이 References preview·URL 액션 메뉴에서 안 먹던 문제.

PR #70에서 URL opener를 추가했지만 conversation.go/urls.goopener.Open 으로 바꿨고, 가장 흔한 open 경로인 App.openInBrowser(refs preview에서 PR 여는 경로)는 하드코딩된 exec.Command("open", url) 그대로였다. 그래서 config가 conversation artifact page browser 외에는 적용되지 않았다.

Fix

  • openInBrowseropener.Open(a.config.Open, url) 로 폴백 (테스트용 a.openURL override는 유지).
  • conversation.go/urls.goopener.Open 직접 호출 대신 openInBrowser 를 거치게 통일 → 테스트 hook + config 처리가 한 곳에 모임.

Test

  • 신규 회귀 테스트 TestOpenInBrowserUsesConfiguredOpener
  • go build ./..., go vet ./..., go test ./... 전부 통과

Note

이 수정 후 make install 로 새 바이너리를 설치하고 ccx를 재시작해야 적용됨. (실행 중인 옛 바이너리는 open: 섹션 자체를 모름)

The References preview and URL action menu open URLs via App.openInBrowser,
which hardcoded exec.Command("open", url) and ignored open.command_template.
So a configured opener (e.g. "tmux-chrome open {{url}}") never applied to the
most common open paths — only the conversation artifact page browser used it.

- openInBrowser now falls through to opener.Open(a.config.Open, url) (still
  overridable via a.openURL for tests).
- conversation.go / urls.go route through openInBrowser instead of calling
  opener.Open directly, so the test hook + config handling live in one place.

Regression test: TestOpenInBrowserUsesConfiguredOpener.

@jinsekim jinsekim left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@jinsekim jinsekim added the auto-review/approved Auto-approved by the Slack auto-reviewer bot label Jul 16, 2026

@jinsekim jinsekim left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@gavin-jeong
gavin-jeong merged commit e61cc32 into master Jul 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-review/approved Auto-approved by the Slack auto-reviewer bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants