Skip to content

feat: built-in remote Action opens the git remote (ctrl+g) #65

Closed

Description

@hammadmajid

Part of #61. Covers feature 4 (open the git remote with a keystroke).

What

A built-in remote Action, bound to ctrl+g, that opens the Project's remote in the browser. It is detached, so the Picker stays open.

  • Remote choice: origin, else the first remote listed by git remote.
  • URL rewrite to the https home page:
    • git@host:owner/repo.git → https://host/owner/repo
    • ssh://git@host[:port]/owner/repo.git → https://host/owner/repo
    • https://host/owner/repo.git → .git stripped
  • Opens the repo home page, not the current branch.
  • Opens with xdg-open on Linux, open on macOS.
  • With no remote, or when the Project is not a git repo (an added directory, see feat(cli): cdd add and cdd forget for non-git Projects #68), it shows a one-line error in the Picker footer and the Picker stays open.

Acceptance

  • URL rewriting is table-tested, including GitLab subgroups (owner/group/repo), ports and .git-less URLs.
  • The no-remote and not-a-repo cases show the footer error.

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an AFK agentwayfinder:taskWayfinder ticket: implementation task

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions