Skip to content

feat(hub,ui): Add a stack clones with the users Git client - #629

Merged
7schmiede merged 1 commit into
mainfrom
feat/add-stack-clone-with-git-client
Nov 24, 2026
Merged

7schmiede merged 1 commit into
mainfrom
feat/add-stack-clone-with-git-client

Conversation

@7schmiede

Copy link
Copy Markdown
Member

"Add a stack" offers the Git clients of the path menu for a repository that is not on this machine yet: "Not cloned yet? Clone it with [GitHub Desktop] · Manage programs…". An https:// address pasted into the field opens the client's clone dialog with it filled in.

Review card

Approved by the owner on 2026-11-24, all points (point 3 built now rather than later).

# Category Point What it beats Cost of reversing
1 contract POST /hub/clone {with} starts a program of the kind git from /hub/openers without a folder; /hub/open stays as it is. /hub/open with an optional path (would soften its "only a stack's trees" check) low
2 trust The page sends only the program's id: no path, no command line; the program starts as from the start menu. a URL or command from the page low
3 trust An https:// address in the field: GitHub Desktop starts with openRepo/<url>, its clone dialog filled in. The hub checks the address (https, host, path characters only, no query/fragment); the user confirms the clone in the client. pasting the address into the client again medium
4 concept In "One repository", below the field: "Not cloned yet? Clone it with [client] · Manage programs…"; the same in the note "No folder at …". a third tab "Clone" low
5 concept The Git clients offered are the ones checked in "Programs in the path menu" (same choice, this browser); "Manage programs…" opens that dialog. None found: no line; all unchecked: only "Manage programs…". a choice of its own for cloning low
6 concept The user pastes the folder after cloning; devstack does not learn where the client cloned to. watching or prescribing the target folder low

Decided on my own: the wording, the line below the field, the programs dialog opening over "Add a stack", and that a non-https address (git@…, http://) starts the client without it, with a note.

What changed

  • crates/devstack-hub/src/open.rs: clone(id, url) (kind git only) and clone_url (the address check); route POST /hub/clone in lib.rs.
  • crates/devstack-desktop: github_desktop_start (Windows: the launcher without arguments; macOS: open <bundle>; Linux: none).
  • ui/src/components/CloneWith.vue in AddStackDialog.vue; hub.cloneWith; the mock answers /hub/clone.
  • ADR-0046 amendment 2026-11-24, docs/dashboard-api.md, CHANGELOG.

Tests

  • open::tests::a_clone_url_is_https_and_a_plain_path; tests/hub.rs clone_starts_only_a_git_client_with_a_plain_address (a file manager and an address with a query are refused).
  • AddStackDialog.test.ts: only Git clients offered, started without an address; an https address goes to /hub/clone and is not inspected as a folder; an ssh address is not handed over; an unchecked client leaves "Manage programs…"; no Git client, no line.
  • Seen in the lane against the mock hub: empty field, https address, ssh address, unchecked client, missing folder, the programs dialog over "Add a stack".
  • Not seen: the real GitHub Desktop clone dialog (the mock hub starts nothing); the owner tries it after the release.

🤖 Generated with Claude Code

A repository not on this machine yet has no folder to add. "Add a stack"
now offers the Git clients of the path menu (as checked in "Manage
programs…"): "Not cloned yet? Clone it with [GitHub Desktop] · Manage
programs…", below the folder field and in the note "No folder at …".
An https address pasted into the field is not checked as a folder but
handed to the client's clone dialog (GitHub Desktop:
x-github-client://openRepo/<url>); another address (git@…, http://) is
not handed over, and the dialog says so.

POST /hub/clone {with, url?} starts a program of the kind git without a
folder; /hub/open keeps its check. The hub takes only https://, a host and
the characters of a path: no query or fragment, which the link would read
as its own parameters.

ADR-0046, amendment 2026-11-24 (points approved by the owner that day).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit f212a85 into main Nov 24, 2026
14 checks passed
@7schmiede
7schmiede deleted the feat/add-stack-clone-with-git-client branch November 24, 2026 13:27
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.

1 participant