feat(ui): connect to GitHub from onboarding and the host picker #90

Merged
deadstyle merged 3 commits from feature/86-github-connect into develop 2026-10-09 10:16:31 -05:00
Owner

Summary

GitHub can now be chosen in onboarding, Settings → add host and the host picker.

  • Forge type step: GitHub is selectable. Only GitLab still says "coming soon".
  • Address step: pre-filled with https://github.com, and GitHub Enterprise addresses are accepted. The step checks that the server really is GitHub. A Forgejo server entered as GitHub, or the reverse, gets "That server runs X, not Y".
  • Sign in step: links to GitHub's token page and lists the scopes for a classic token and for a fine-grained token. Failure messages name GitHub's scopes.
  • Connecting: a config host with type = "github" connects to the GitHub adapter from #84/#85. If it has no url, it defaults to github.com.

docs/design.md and the README now say GitHub ships with the public release, which was the PM's call in #83.

Refs #86 (part of #83)

Behavior notes

  • When you change the forge type, the address is replaced only if it's empty or still holds the old prefill, so an address you typed is kept.
  • When nothing answers at the address, the error names the type you chose ("No GitHub API at that address"). It used to say "No Forgejo or Gitea API".
  • The address check asks the Forgejo/Gitea and GitHub probes at the same time, so an unreachable host fails after one 10s timeout instead of two.

Verification

make check after merging develop:

golangci-lint run
0 issues.
(12 test packages ok)
No vulnerabilities found.
go build -ldflags "-X main.version=b8a1089" -o bin/lazyforge ./cmd/lazyforge
/bin/sh: line 1: shellcheck: command not found

shellcheck isn't installed locally. No shell files changed, and CI runs it.

The implementer checked the screens in tmux at 80x24 against real github.com. The Forge type, Address and Sign in steps all fit. Entering codeberg.org as GitHub showed "That server runs Forgejo, not GitHub".

Mutation check: with the probes made serial again, TestProbeConcurrent fails.

Review

Three fresh reviewers ran: standards, comments and spec. Standards and spec passed.

Fixed:

  • the probes now run concurrently (the serial version took 20s worst case)
  • the "can't list" message names both token kinds
  • the probe merge condition has explicit parentheses
  • three comments rewritten

Dismissed:

  • "PRs" in GitHub's sign-in copy: this is pre-connection onboarding text and GitHub's own term, so there's no HostInfo yet.
  • The count of selectable forges: an existing pattern and minor.

Docs

  • design.md: v1 scope and "After v1" record the PM's #83 call. Onboarding step 4 adds GitHub's token page and permissions as facts. No new product behavior.
  • README: updated.
  • architecture.md and ADRs: no change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QhCwUhPRAFrAziCumaEa67

## Summary GitHub can now be chosen in onboarding, Settings → add host and the host picker. - **Forge type step:** GitHub is selectable. Only GitLab still says "coming soon". - **Address step:** pre-filled with `https://github.com`, and GitHub Enterprise addresses are accepted. The step checks that the server really is GitHub. A Forgejo server entered as GitHub, or the reverse, gets "That server runs X, not Y". - **Sign in step:** links to GitHub's token page and lists the scopes for a classic token and for a fine-grained token. Failure messages name GitHub's scopes. - **Connecting:** a config host with `type = "github"` connects to the GitHub adapter from #84/#85. If it has no `url`, it defaults to github.com. `docs/design.md` and the README now say GitHub ships with the public release, which was the PM's call in #83. Refs #86 (part of #83) ## Behavior notes - When you change the forge type, the address is replaced only if it's empty or still holds the old prefill, so an address you typed is kept. - When nothing answers at the address, the error names the type you chose ("No GitHub API at that address"). It used to say "No Forgejo or Gitea API". - The address check asks the Forgejo/Gitea and GitHub probes at the same time, so an unreachable host fails after one 10s timeout instead of two. ## Verification `make check` after merging develop: ``` golangci-lint run 0 issues. (12 test packages ok) No vulnerabilities found. go build -ldflags "-X main.version=b8a1089" -o bin/lazyforge ./cmd/lazyforge /bin/sh: line 1: shellcheck: command not found ``` `shellcheck` isn't installed locally. No shell files changed, and CI runs it. The implementer checked the screens in tmux at 80x24 against real github.com. The Forge type, Address and Sign in steps all fit. Entering codeberg.org as GitHub showed "That server runs Forgejo, not GitHub". Mutation check: with the probes made serial again, `TestProbeConcurrent` fails. ## Review Three fresh reviewers ran: standards, comments and spec. Standards and spec passed. Fixed: - the probes now run concurrently (the serial version took 20s worst case) - the "can't list" message names both token kinds - the probe merge condition has explicit parentheses - three comments rewritten Dismissed: - **"PRs" in GitHub's sign-in copy:** this is pre-connection onboarding text and GitHub's own term, so there's no HostInfo yet. - **The count of selectable forges:** an existing pattern and minor. ## Docs - `design.md`: v1 scope and "After v1" record the PM's #83 call. Onboarding step 4 adds GitHub's token page and permissions as facts. No new product behavior. - README: updated. - `architecture.md` and ADRs: no change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QhCwUhPRAFrAziCumaEa67
GitHub is selectable in onboarding with github.com pre-filled, the
sign-in step links GitHub's token page and lists its scopes, and cmd
routes github hosts to the new adapter. design.md and the README record
that GitHub ships with the public release.

Refs #86

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhCwUhPRAFrAziCumaEa67
Review follow-up: an unreachable address now costs one probe timeout
instead of one per adapter, and the can't-list message covers classic
and fine-grained tokens.

Refs #86

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QhCwUhPRAFrAziCumaEa67
Merge remote-tracking branch 'origin/develop' into feature/86-github-connect
All checks were successful
ci / check (pull_request) Successful in 1m3s
b8a1089931
deadstyle merged commit 350d5a7d18 into develop 2026-10-09 10:16:31 -05:00
deadstyle deleted branch feature/86-github-connect 2026-10-09 10:16:31 -05:00
Sign in to join this conversation.
No description provided.