fix: CLI picker opens URLs via configured opener#73
Merged
Conversation
The 'ccx urls/refs/...' subcommands run a separate picker (internal/cli) from
the TUI, and its openItems hardcoded exec.Command("open", u) — so
open.command_template never applied there. This was the third scattered URL-open
path (after TUI openInBrowser and the conversation browser); each opener change
had to be duplicated and this one was missed.
Route the picker through the same opener.Open entry point as the TUI:
- pickerModel carries an opener.Config; openItems calls opener.Open.
- cli.Run loads it via loadOpenerConfig (tui.LoadCCXConfig) and threads it
through RunPicker → newPickerModel.
Now every interactive URL-open path (TUI refs/URL menu, conversation browser,
CLI picker) shares one opener honoring open.command_template.
Local image open (openCachedImage) intentionally left on the OS default — it
opens image files in a viewer, not URLs in a browser.
Kairo-Kim
approved these changes
Jul 16, 2026
mitrilmad
approved these changes
Jul 16, 2026
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.
Problem
ccx urls/refs/...서브커맨드는 TUI와 별도의 picker(internal/cli)를 쓰는데, 그openItems가 하드코딩된exec.Command("open", u)였다. 그래서open.command_template(예:tmux-chrome open {{url}})이 이 경로에서 무시됐다. 사용자가 스크린샷에서 겪은 "refs에서 안 먹는다"의 실제 원인.이게 세 번째로 흩어져 있던 URL open 경로였다:
App.openInBrowser(PR #72에서 수정)openItems(이 PR) ← 매번 누락됐던 곳Fix — 단일 진입점으로 통일
picker도 TUI와 동일한
opener.Open을 타게 함:pickerModel이opener.Config를 보유,openItems가opener.Open호출.cli.Run이loadOpenerConfig(=tui.LoadCCXConfig)로 로드해RunPicker → newPickerModel로 전달.이제 모든 interactive URL open 경로(TUI refs/URL 메뉴, conversation browser, CLI picker)가
open.command_template를 존중하는 하나의 opener를 공유한다.로컬 이미지 open(
openCachedImage)은 의도적으로 OS 기본 유지 — URL이 아니라 이미지 파일을 뷰어로 여는 것이라 성격이 다름.Test
go build/vet/test ./...전부 통과loadOpenerConfig가tmux-chrome open {{url}}를 로드하고 picker에 전달됨을 확인