Skip to content

zgx: GitHub accounts in Settings → Cloud - #1261

Draft
wingleeio wants to merge 1 commit into
mainfrom
zeron/zgx-github-accounts
Draft

wingleeio wants to merge 1 commit into
mainfrom
zeron/zgx-github-accounts

Conversation

@wingleeio

@wingleeio wingleeio commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Settings → Cloud for several GitHub accounts. The vault, edge and engine side is #1258; this works without it.

What's on the screen

  • Connected accounts: picture, login and status, with Disconnect and, when it's needed, Reconnect.
  • Disconnect asks first and says what happens: chats using that account stop with a message until it's connected again, and other chats keep their accounts. With Cloud: connect several GitHub accounts #1258, its tokens are also revoked with GitHub at once.
  • Connect another runs the usual device flow beside the list and says GitHub connects whichever account the browser is signed in to. If GitHub approves a login that's already connected, the screen says so and what to do.
  • Another account or organization opens GitHub's App install page.
  • Repositories name their account once more than one is connected. With one, nothing changes.

Strings are in en.json and zh-Hans.json. The logic sits in account/github.luau and the view in screens/settings/cloud.luau. It uses ds.Settings, ds.Avatar, ds.Badge, ds.Callout and ds.Dialog, so it should be easy to restyle.

With an older engine or vault

GithubAccounts failing (an engine without it) or listing nothing leaves the one login the status names. It shows as a single row, and Disconnect means all of GitHub, as it does today. Tested with cloud_stub.old_host. Repository fields that an older vault doesn't send read as nil.

GitHubBlock and onboarding are unchanged. The block still handles connecting, and shows when there are no logins or while a flow is under way.

Not on this screen

Picking which login new chats try first. #1258 has the RPC (GithubAccountActivate) but I left the control out to keep this simple. Until then, the most recently connected login comes first.

Rebased onto main. A test merge with #1254 (also on main) conflicts only in the header comment at the top of account/cloud.luau and screens/settings/cloud.luau, where both PRs describe what they add. No code conflicts; resolving means keeping both descriptions.

Tests

Check Result
New cloud_github_accounts.test.luau 8 passed
Full apps/zgx/ui suite 944 passed, 2 failed
Host unit tests (cloud::tests, github::disconnect_tests) 7 passed
cargo check --tests in apps/zgx clean
zgx lint on the edited files 0 errors; 2 token warnings on lines this PR doesn't change

The two failures are About-page tests, link_menus and settings_in_place. Both fail the same way on clean main. I also looked at the page in a fixture window, using a private data dir.

zgx check (type checking) was not run: luau-lsp isn't installed here.

Still to check

  • A real avatar loading from github.com/{login}.png in the app. Test hosts have no fetcher, so the fixture showed the generated stand-in.
  • The whole flow against real GitHub, which needs Cloud: connect several GitHub accounts #1258 deployed somewhere.

🤖 Generated with Claude Code

Each connected login shows its picture, name and status, with Disconnect behind
a confirm that says what happens to its chats, and Reconnect when it needs it.
Connect another runs the device flow beside the list, and says so when GitHub
approved a login that was already connected. Once there is more than one login,
each repository says whose it is.

An engine or vault from before several logins lists none: the one login it names
is shown, and Disconnect means all of GitHub, as it did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wingleeio
wingleeio force-pushed the zeron/zgx-github-accounts branch from 2aa5ac7 to d36627d Compare November 7, 2026 04:14
@wingleeio
wingleeio changed the base branch from zeron/zgx to main November 7, 2026 04:14

This branch has not been deployed

No deployments
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