Skip to content

Open a session's linked PR, issue, or commit in the browser #220

Description

@jongio

Problem

Sessions record external references (pull requests, issues, commits) and list them in the preview pane, but there is no way to jump from a session to the linked PR, issue, or commit on GitHub. Today you read the number off the preview and search for it in the browser by hand.

Proposed solution

Add a key binding (g) that opens the selected session's linked reference in the default browser.

  • Build the URL from the session repository plus the ref type and value: https://github.com/{owner}/{repo}/pull/{n}, /issues/{n}, or /commit/{sha}.
  • When a session has more than one ref, prefer PR, then issue, then commit (or show a short picker).
  • Add a new platform.OpenURL that only accepts http and https URLs and reuses the existing open helper (explorer / open / xdg-open).
  • Surface the target in the preview pane so the action is discoverable.

Acceptance criteria

  • New OpenURL in internal/platform rejects non http/https schemes.
  • A URL builder maps commit / pr / issue ref types to github.com URLs from the session repository.
  • g opens the selected session's linked ref, with a clear status message when there is no ref or no repository.
  • Help overlay, README, and docs/keybindings.md updated.
  • Unit tests cover URL building and scheme validation.

Notes

Similar to gh-dash's o shortcut for opening a PR in the browser. Uses only the data already stored in the session refs table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dx-ideaFeature idea generated by idea-generatorenhancementNew feature or requestidea-generatorGenerated by idea-generator

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions