Skip to content

feat(commits): open the selected commit on GitHub#330

Open
jongio wants to merge 1 commit into
mainfrom
idea/commits-open-commit-on-github
Open

feat(commits): open the selected commit on GitHub#330
jongio wants to merge 1 commit into
mainfrom
idea/commits-open-commit-on-github

Conversation

@jongio

@jongio jongio commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Adds an o keybinding to the commits panel that opens the selected commit on GitHub in the default browser.

The panel could copy a commit hash but had no way to open the commit page directly. Pressing o now resolves the origin remote, builds https://github.com/<owner>/<repo>/commit/<hash>, and opens it. It is a no-op when nothing is selected and shows a toast when the repo has no github remote.

Changes

  • New openCommitOnGitHub() handler plus a pure commitURL builder in internal/panels/commits/github.go
  • Wired the o key into the dispatch switch and KeyBindings()
  • Updated the keybindings manifest (the panel entry already listed o) and regenerated docs/keybindings.md
  • Unit tests for the URL builder and the handler guard paths

Verification

  • go build ./... clean
  • go test ./internal/panels/commits/ ./internal/keybindings/ pass
  • gofumpt and go vet clean

Closes #328

Add an `o` keybinding to the commits panel that opens the selected
commit's github.com page in the default browser. The commits panel
could copy a commit hash but had no way to jump straight to the commit
on GitHub, so reviewers had to build the URL by hand.

The handler resolves the origin remote, converts it to an https
github.com base with the existing RemoteToHTTPS helper, and appends
`/commit/<hash>`. It is a no-op when nothing is selected and shows a
clear toast when the repo has no github remote. The keybindings
manifest already documented `o` for this panel; this wires it up and
regenerates docs/keybindings.md.

Closes #328

Co-authored-by: Copilot App <[email protected]>
@jongio jongio added the idea Feature idea from the idea pipeline label Jul 13, 2026
@jongio jongio self-assigned this Jul 13, 2026
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 selected commit on GitHub

1 participant