Skip to content

feat: open session working directory in file manager#204

Merged
jongio merged 1 commit into
mainfrom
idea/open-cwd
Jul 3, 2026
Merged

feat: open session working directory in file manager#204
jongio merged 1 commit into
mainfrom
idea/open-cwd

Conversation

@jongio

@jongio jongio commented Jul 2, 2026

Copy link
Copy Markdown
Owner

What

Adds an O keybinding that opens the selected session's working directory in the system file manager.

Once you spot a session in the list, you often want to jump straight to its files on disk. Today that means copying the path and opening a file manager by hand. This wires the directory open into a single keystroke.

How

  • internal/platform/open.go: extracted the per-OS command builder into openCommand and added OpenDir(path), which validates the path is a non-empty, existing directory before spawning the opener. Uses explorer on Windows, open on macOS, and xdg-open elsewhere.
  • internal/tui/keys.go: added the O binding (open directory) to the key map, short help, and full help.
  • internal/tui/model.go: added the key case and openDirCmd, which resolves the selected session's working directory and returns a dirOpenedMsg.
  • internal/tui/handlers.go / messages.go: added dirOpenedMsg and handleDirOpened, which reports success or failure on the status line and clears it after two seconds.

Testing

  • go build ./...
  • go vet ./...
  • gofumpt -l . (clean)
  • golangci-lint run --timeout 15m (0 issues)
  • go test ./... -count=1 (all packages pass)

New tests: per-OS command assertions and directory validation in internal/platform/open_test.go, plus success and error paths for handleDirOpened in internal/tui/handlers_test.go.

Closes #197

@jongio jongio self-assigned this Jul 2, 2026
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 2, 2026
Add an `O` keybinding that opens the selected session's working directory in the system file manager. Reuses the platform opener (explorer, open, xdg-open) with a new OpenDir helper that validates the path is an existing directory before spawning, and reports the result through the status line.

Closes #197

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jongio jongio merged commit 7976f19 into main Jul 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

idea Feature idea from the idea pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open the session working directory in the system file manager

1 participant