Skip to content

Setup: GitHub is connected as Projects reads it, and Disconnect lets go of the reader's own link (0.3.10) - #21

Merged
Darkhorse7stars merged 1 commit into
mainfrom
fix/setup-github-follows-link
Oct 31, 2026
Merged

Darkhorse7stars merged 1 commit into
mainfrom
fix/setup-github-follows-link

Conversation

@Darkhorse7stars

Copy link
Copy Markdown
Member

On hanzo.ai, Quick setup said 1. Connect GitHub (0/3) while Projects said GitHub connected as @Darkhorse7stars for the same person.

Why

  • Setup read a connectors list from GET /v1/connection. The cloud has answered connections since its views were folded together (hanzo-inc/cloud 15ada8cfb), so that read found nothing.
  • Setup never counted the person's own GitHub link (github-user), which Projects counts.

Change (pkg/app/src/Setup.tsx)

  • linked(providers, connections): GitHub is the org's App (GET /v1/provider) or the person's own link. With both answers in, GitHub follows them both ways, so a Disconnect on Projects shows in Quick setup too. A partial answer can only mark GitHub connected, never disconnected.
  • Disconnect drops the person's own link first (POST /v1/provider/github/user/disconnect), else the org's App accounts (POST /v1/provider/github/disconnect, org admin only). The "only an admin" message applies to the org case only.
  • @hanzo/app 0.3.10, plus an LLM.md note.

Tests

  • Setup.test.tsx covers the shapes hanzo.ai answered for this account, the org App case, nothing connected, partial answers, that a connectors list is not read, Google addresses, and both Disconnect routes.

Not in this PR: Directory.tsx:276 and bots/api.ts:192 read the same stale connectors key.

…go of the reader's own link (0.3.10)

Quick setup said "1. Connect GitHub" while Projects said "GitHub connected as
@login". Setup read a `connectors` list from GET /v1/connection, which has
answered `connections` since the cloud's views were folded together, so that
half of its reading was dead; and it never counted the reader's own link
(`github-user`), which Projects counts.

`linked` reads both answers: GitHub is the org's App (GET /v1/provider) or the
reader's own link. With both answered it follows them both ways, so a
Disconnect on Projects reads in Setup; a half answer only ever adds it.
Disconnect lets go of the reader's own link first (`leaving`), else the org's
App accounts, an org admin's.
@Darkhorse7stars
Darkhorse7stars merged commit 836dee8 into main Oct 31, 2026
5 of 6 checks passed
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