Skip to content

feat(ui): copy a commit's id and web page from the commit menu - #21

Merged
ShortArrow merged 2 commits into
mainfrom
feat/node-menu-hash-url
Oct 15, 2026
Merged

ShortArrow merged 2 commits into
mainfrom
feat/node-menu-hash-url

Conversation

@ShortArrow

@ShortArrow ShortArrow commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Closes #15.

The commit menu, on a row or a graph node, now copies the full commit id. When the origin is on github.com or gitlab.com, it also copies the commit's web page URL and opens that page in a new tab. Other origins show only the id item.

Which hosts get a web page

commit_url_base knows github.com (/commit/<id>) and gitlab.com (/-/commit/<id>, with nested groups) by name. A self-hosted GitLab or GitHub Enterprise cannot be told from other hosts by its name alone, so it gets no web page; the forge section of the roadmap now lists the setting that would cover it.

Only remote.origin.url is read, as for the existing GitHub permalinks. A URL with credentials, http://, a port, or an insteadOf alias gets no web page.

Stricter URL parsing, shared with the GitHub permalinks

repo_path_on now strips a trailing slash before .git, and accepts only plain path segments. It rejects wiki remotes. github_web_url goes through it too, so an origin such as https://github.com/o/r.git/ now yields a working permalink base instead of one ending in .git.

…ommit menu

The web page covers github.com and gitlab.com, the hosts known by name (#15).
…ove the menu's links

A ".git/" suffix, a wiki remote, or a query or extra path in the origin URL
no longer yields a broken page; the e2e test now opens the page in a new tab.
@ShortArrow
ShortArrow marked this pull request as ready for review October 15, 2026 08:22
@ShortArrow
ShortArrow merged commit 1f2a55a into main Oct 15, 2026
11 checks passed
@ShortArrow
ShortArrow deleted the feat/node-menu-hash-url branch October 15, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copy and open a commit's hosting URL from the node menu

1 participant