Skip to content

minds: actionable guidance when creating from a private GitHub repo#2425

Merged
joshalbrecht merged 14 commits into
mainfrom
preston/minds-inspirations
Jul 15, 2026
Merged

minds: actionable guidance when creating from a private GitHub repo#2425
joshalbrecht merged 14 commits into
mainfrom
preston/minds-inspirations

Conversation

@pseay-imbue

@pseay-imbue pseay-imbue commented Jul 10, 2026

Copy link
Copy Markdown
Contributor
image

What

Creating a workspace from a private (or nonexistent) github.com URL previously surfaced only raw git stderr on the Creating page — and before that, could hang on a credential prompt. Now:

  • The desktop client's local git clone of the workspace source runs with GIT_TERMINAL_PROMPT=0 — no-credential clones fail fast with git's stable error shape (credential helpers like the macOS keychain still work). Mirrors the earlier FCT bootstrap fix.
  • The backend classifies auth-shaped github.com clone failures (could not read Username/terminal prompts disabled/Authentication failed/Repository not found/403) as a new machine-readable error_kind: GIT_AUTH_REQUIRED on the create-operation status API (additive, optional field).
  • The Creating page reveals a static guidance block for that kind, explaining in plain language: the repo looks private (or doesn't exist) and needs GitHub credentials on this computer; the simplest sign-in is gh auth login (linked to the official GitHub CLI quickstart); or clone/download the repo locally and enter that folder's path in the form instead of the URL.

Guidance is gated to github.com URLs only (the gh advice would be wrong elsewhere); other hosts keep the raw error. The copy is static template content gated on the error class — the backend classifies, it never generates prose.

Testing

uv run pytest over the touched desktop_client modules + minds ratchets: 419 passed, 0 failed (classification matrix, a local 401-server clone test proving fast auth-shaped failure, API round-trip of error_kind, and a page-render test asserting the block exists, is hidden by default, and carries the right copy/link). ty check and ruff clean on touched files.

Context: this is the follow-up UX for minds "inspirations" (published snapshot repos are private by default, so creating a mind from one hits this path for anyone without credentials configured) — see FCT PR #243.

🤖 Generated with Claude Code

Cloning a workspace source happens locally on the user's machine; a
private github.com URL previously surfaced only raw git stderr on the
Creating page (and could hang on a credential prompt). Clones now run
with GIT_TERMINAL_PROMPT=0 (fail fast, credential helpers still work),
the backend classifies auth-shaped github.com clone failures as
GIT_AUTH_REQUIRED (new optional error_kind on the create-operation
status API), and the Creating page reveals a static guidance block for
that kind: you need access to this repo with GitHub credentials on this
computer; sign in via 'gh auth login' (linked GitHub CLI quickstart);
or clone it yourself and enter the local path instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same name and one-line body as the per-file copies in the FCT's
bootstrap.manager and runtime_backup.runner, so the intent (never let
git prompt on a terminal) is carried by the function name instead of an
inline dict at the call site.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pseay-imbue pseay-imbue marked this pull request as ready for review July 10, 2026 17:43
Comment thread apps/minds/imbue/minds/desktop_client/agent_creator.py Outdated
pseay-imbue and others added 3 commits July 13, 2026 09:00
…-template

Applied scripts/rename_template_repo.py --apply on this branch after
merging main's rename; --check reports zero live references.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drops the git-output substring markers: substring matching is brittle
across git versions and locales, and a failed github.com clone is
overwhelmingly an access problem the guidance covers -- the raw git
error stays visible right above the guidance for anything rarer. The
classifier is now just: GitCloneError + https github.com URL. Tests
consolidated accordingly; GIT_TERMINAL_PROMPT=0 fail-fast behavior
unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pseay-imbue

Copy link
Copy Markdown
Contributor Author

Noted! Got rid of the string checking and replaced it with error catching.

…tions

# Conflicts:
#	apps/minds/imbue/minds/desktop_client/templates_test.py
Comment thread apps/minds/imbue/minds/desktop_client/agent_creator.py Outdated
…te git with GitHub)

The private-repo create-failure classification is specifically a GitHub
access problem: it fires only for github.com URLs and the guidance
recommends the GitHub CLI. Renaming the error kind (and the DOM id
git-auth-help -> github-auth-help) so it names GitHub, not generic git.
The genuinely-git plumbing (GitCloneError, _git_noninteractive_env,
GIT_TERMINAL_PROMPT) is unchanged -- the clone mechanism is git; the
surfaced problem is GitHub auth. 374 passed, ty clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Code-guardian catch: the per-PR changelog entry still said 'FCT bootstrap',
the deprecated internal codename renamed to default-workspace-template
everywhere else on this branch. (The rename script's --check misses changelog
prose.) The other FCT mentions in apps/libs are pre-existing consolidated
changelog history, unchanged by this branch and left as-is.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The private-repo guidance only covered github.com URLs. A failed clone of
a git URL on another host (or an ssh remote) now classifies as a new
GIT_AUTH_REQUIRED kind and shows the same 'looks private / set up your git
credentials / or clone it locally and use a path' guidance, minus the
'gh auth login' advice (which only fits github.com). classify_creation_error
now: github.com https -> GITHUB_AUTH_REQUIRED; any other remote (URL or
scp-style ssh) -> GIT_AUTH_REQUIRED; local paths / bare input -> None.
Second hidden #git-auth-help block + creating.js reveal; tests cover the
new classifier cases and that the generic block omits gh auth login.
371 passed, ty clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pseay-imbue

Copy link
Copy Markdown
Contributor Author

There's now a github (gh auth login) and a regular git error message providing guidance for any remote installations.

Fixes the test_no_ruff_errors ratchet CI failure -- the new
GIT_AUTH_REQUIRED classifier assertions exceeded the line length.
Formatting only, no logic change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pseay-imbue and others added 2 commits July 14, 2026 09:49
The 2026-07-11 consolidation run on main folded this branch's dev entry into
the consolidated CHANGELOG.md and deleted the per-PR file; merging that made
the branch touch the 'dev' project (via blueprint/) with no entry. Restored.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@joshalbrecht

Copy link
Copy Markdown
Contributor

lgtm, thanks!

@joshalbrecht joshalbrecht merged commit f9d19f8 into main Jul 15, 2026
14 checks passed
@joshalbrecht joshalbrecht deleted the preston/minds-inspirations branch July 15, 2026 01:41
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.

2 participants