Skip to content

feat(preview): open the previewed file on GitHub#329

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

feat(preview): open the previewed file on GitHub#329
jongio wants to merge 1 commit into
mainfrom
idea/preview-open-file-on-github

Conversation

@jongio

@jongio jongio commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Adds an O keybinding to the preview panel that opens the current file on github.com in the browser, pinned to the current HEAD commit and anchored to the selected line range (or the top visible line).

It reuses the existing permalink builder and the shared browser launcher, so behavior matches the Y copy-permalink action. When the preview is not showing an on-disk file, or the repo has no github remote, it shows a clear toast instead of doing nothing.

What's included:

  • O handler in the preview panel that opens the file's github.com blob URL.
  • Binding registered in the panel, keybindings.json, the generated docs/keybindings.md, and the help overlay (which reads the manifest).
  • Unit tests for the no-file and github-mode guards.

Closes #324

Add an O keybinding to the preview panel that opens the current file on
github.com, pinned to the current HEAD commit and anchored to the selected
line range (or the top visible line). It reuses the existing permalink
builder and the browser launcher, and shows a clear toast when the preview
is not an on-disk file or the repo has no github remote.

Registers the binding in the panel, the keybindings manifest, the generated
docs, and the help overlay. Adds unit tests for the no-file and github-mode
guards.

Closes #324

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 previewed file on GitHub

1 participant