Repository navigation
fix(ui): manage agent GitHub accounts in Profile - #196200
hannesrudolph merged 13 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: ready, awaiting a maintainer decision. What this changesThis PR lists every agent’s GitHub account in Profile, adds inline account management, and waits for saved configuration to apply before replying. Example: Give PR Irrigator @daniel-lxs while Main uses @lamp-connection-test.
Review scores
ProductKind: Preference · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision Keep this PR open: it provides a demonstrated usability improvement absent from current main, with no actionable introduced defects found, but consolidating account management in Profile still needs an owner decision. Priority: P2 Decision needed
Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI account views consume agent and configuration snapshots, invoke existing scoped GitHub RPCs, and display Gateway-owned credential status. flowchart TD
A[Profile account roster] --> B[Scoped identity owners]
B --> C[GitHub account RPCs]
C --> D[Managed credentials and config]
D --> E[Runtime config application]
E --> B
B --> F[Agent account status]
Technical reviewBest possible solution: Use the existing credential owners to present inheritance and inline agent actions together in an owner-approved management surface. Do we have a high-confidence way to reproduce the issue? Current-main source confirms the selected-agent-only Profile view and separate advanced editor; no target code was executed during this read-only review. Is this the best way to solve the issue? The patch coherently reuses scoped identity owners, removes duplicate editing, and fixes response ordering at the Gateway owner; management placement remains a product choice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d24b84d43eaf. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +161, Tests +236, Docs +3, Other +6. Total +406 across 36 files. Added test files: 1. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed November 12, 2026, 8:51 PM ET / November 13, 2026, 01:51 UTC (Revision 5). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
c588292 to
8c0d2f1
Compare
…ofile Settings → Profile → GitHub accounts separates My GitHub from the agents' accounts, renames System GitHub to Shared agent account with a count of agents a change affects, lists every agent with the account it uses and whether it is shared or its own, and opens an agent's own-account setup inline under its row. Agents → Tools shows the account read-only, and the reconnect hints point to Profile. Refs openclaw#196136
The chat Publish PR account picker labels the shared account "Shared agent account", matching Settings → Profile → GitHub accounts. Refs openclaw#196136
…ish PR The Publish PR account picker and the publication report in chat name an agent's own account "Own account" and the shared one "Shared agent account", matching Settings → Profile → GitHub accounts. Refs openclaw#196136
The shared agent account also serves authenticated dashboard data and Publish PR unless My GitHub is chosen. Its row, the agents section, help and setup hint, and the docs now say so. Refs openclaw#196136
…e Profile cutover
…pplied Clients re-read every agent that inherits a changed GitHub identity as soon as the configure reply arrives. The reply went out before the config hot reload applied the write, so those reads answered from the previous identity and Profile kept showing stale agent rows. Attach the existing config-write application receipt to the identity write and reply once the Gateway runs on the written config.
The reconnect screen action is rare, so its Profile destination now loads on demand instead of shipping in the shared boot chunk. Drop the startup "For me" and "For the system" strings: no view uses them since setup opens under the account it changes. Chat and new-session boot JS end below main.
8c0d2f1 to
f51e204
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
The reconnect command loaded a one-line helper through a dynamic import, and the import's preload wrapper cost more boot JS than the helper it deferred. Navigate to Profile directly; Profile itself stays outside the boot graph.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
* improve(ui): show each agent's GitHub account and set it inline in Profile Settings → Profile → GitHub accounts separates My GitHub from the agents' accounts, renames System GitHub to Shared agent account with a count of agents a change affects, lists every agent with the account it uses and whether it is shared or its own, and opens an agent's own-account setup inline under its row. Agents → Tools shows the account read-only, and the reconnect hints point to Profile. Refs openclaw#196136 * improve(ui): name the shared account the same in the Publish PR picker The chat Publish PR account picker labels the shared account "Shared agent account", matching Settings → Profile → GitHub accounts. Refs openclaw#196136 * improve(ui): call an agent's own GitHub account "Own account" in Publish PR The Publish PR account picker and the publication report in chat name an agent's own account "Own account" and the shared one "Shared agent account", matching Settings → Profile → GitHub accounts. Refs openclaw#196136 * improve(ui): say what the shared agent account serves besides agents The shared agent account also serves authenticated dashboard data and Publish PR unless My GitHub is chosen. Its row, the agents section, help and setup hint, and the docs now say so. Refs openclaw#196136 * fix(ui): describe each agent's effective GitHub account and finish the Profile cutover * fix(gateway): reply to tools.github.configure after the identity is applied Clients re-read every agent that inherits a changed GitHub identity as soon as the configure reply arrives. The reply went out before the config hot reload applied the write, so those reads answered from the previous identity and Profile kept showing stale agent rows. Attach the existing config-write application receipt to the identity write and reply once the Gateway runs on the written config. * perf(ui): keep the GitHub accounts reconnect out of the boot bundle The reconnect screen action is rare, so its Profile destination now loads on demand instead of shipping in the shared boot chunk. Drop the startup "For me" and "For the system" strings: no view uses them since setup opens under the account it changes. Chat and new-session boot JS end below main. * fix(ui): load the GitHub accounts destination with a plain utility import * perf(ui): open GitHub accounts from the boot shell with plain navigation The reconnect command loaded a one-line helper through a dynamic import, and the import's preload wrapper cost more boot JS than the helper it deferred. Navigate to Profile directly; Profile itself stays outside the boot graph.
Allow initial guest PR preparation from the recorded project's published history while preserving unpublished work and original PR identity. (cherry picked from commit 2757947) Stable adaptation: preserve the existing linked-identity fixture; expand its options type and allocate exactly 89 regression LF instead of 84. Production and documentation patches are unchanged from the source. Companions: #188785 is present-equivalent. Later #188784, #190223, #190576, #190542, #195413, #197229, #197243, #199717, #195787, #197510, #193664, #199851, #199864, #197656, #198851, #193873, #197594, #189006, #188904, #194025, #196200, #192283, #189010, #188816 and e0466ff are not prerequisites to this scoped repair; retain their separate intake dispositions. No later PR-number mentions. Proof: baseline 4 failed/20 passed through registered agent action; fixed 41/41 across preparation, refresh and base-action suites. Type-aware lint4, formatting5, docs MDX1419 and diff check pass. No live GitHub or full release qualification claim. Co-authored-by: RomneyDa <[email protected]>
Closes #196136
What Problem This Solves
In Settings → Profile → GitHub accounts it is hard to see which GitHub account each agent uses, what changing "System GitHub" affects, or how to give one agent its own account (for example a token limited to a fork): only the selected agent is shown, and its own account sits behind "Advanced: agent GitHub override" in Agents → Tools.
User Impact
Profile → GitHub accounts lists My GitHub, the shared agent account and every agent with the account it uses, and every account change happens there:
agents.entries.<id>.tools.github).tools.github.configurereplies once the Gateway runs on the saved account, so every agent that inherits a changed shared account shows the new account right away.screenactiongithub_identity_settings, thegithub_identity_statushint, the publication-failure next step) open Settings → Profile → GitHub accounts. The Publish PR picker and the chat publication report line use the same names ("Shared agent account", "Own account").Permissions and account behavior are unchanged: agent rows and their actions need
operator.admin; saving uses the sametools.github.configurecalls (scope: "agent",managedorinherit); the "Use the shared agent account for new replies?" confirmation stays, and changes apply to new replies.Why This Change Was Made
The roster reuses the existing scoped identity owners (
tools.github.statuswithselectedScope: "agent"per agent,tools.github.configure), so there is no new Gateway method, record or config shape. Profile becomes the one place to view and change every agent's GitHub account, and Agents → Tools only shows it. That product choice, which ClawSweeper's review of #196136 also raises, needs a maintainer's yes.Clients re-read every inheriting agent as soon as the configure reply arrives, while the config hot reload applies the write a few hundred milliseconds later.
tools.github.configuretherefore attaches the existing config-write application receipt (the oneagents.*methods already wait on) and replies after the Gateway runs on the written config. A saved identity that is not applied immediately still replies with its saved status and logs a warning.The reconnect screen action loads its Profile destination on demand (
ui/src/app/github-accounts.ts), so the boot bundle does not carry it. The unused startup strings "For me" and "For the system" are removed.Relationship to #192350 (open; moves GitHub repository integration into the bundled
github-repositoriesplugin): this PR changes presentation and where an agent's account is set, not owners, records, methods or config shape, so both can coexist, but they conflict mechanically (17 of these 37 files are also changed in #192350). If #192350 lands first, this rebases onto the plugin: the Profile component, strings and tests move toextensions/github-repositories/browser/, the agent count readsplugins.entries.github-repositories.config.agents.<id>, and the read-only Agents → Tools change goes into the plugin's Agent tools contribution. If this lands first, #192350 carries the presentation along and points the count at the plugin config path.Evidence
Real Gateway with real GitHub accounts
Isolated Gateway started from this branch, built Control UI, three made-up agents, read-only fine-grained PATs for two GitHub accounts. Tokens never appear in screenshots or logs; Gateway profile IDs are shown as
<profile-A/B/C>.The shared agent account is set up with a PAT for
@lamp-connection-test. Onlytools.githubis written (<profile-A>); no agent entry changes. Main, PR Irrigator and Release Notes show@lamp-connection-test· "Uses the shared agent account", and the shared button reads "Change for 3 agents".Give its own account for PR Irrigator, saved with a PAT for
@daniel-lxs. Onlyagents.entries.pr-irrigator.tools.githubis written (<profile-B>);tools.githubstays<profile-A>and the other agents have no entry. PR Irrigator shows@daniel-lxs· "Own account · Personal access token", Main and Release Notes keep@lamp-connection-test, and the shared button reads "Change for 2 agents".The shared agent account is replaced with a new PAT.
tools.githubmoves to a new profile (<profile-C>);agents.entries.pr-irrigator.tools.githubis still<profile-B>. Main and Release Notes use the replaced shared account; PR Irrigator still shows@daniel-lxs· "Own account".Saved config after each step:
Inheriting rows update without a reload
Real Gateway with a stubbed shared profile (no credentials). Main and PR Irrigator start on the shared account ("Configured, but unavailable"). After Use GitHub CLI on the shared account, both rows read "No account" in the same page, with no reload. The Gateway log shows the reply after the reload is applied:
src/gateway/server-methods/tools-github.test.ts"replies only after the Gateway applies the written identity" fails when the reply is sent before the write is applied and passes with this change.Other real-Gateway checks (no credentials)
A PAT that GitHub rejects: the Gateway answers
tools.github.configurewith "GitHub identity setup failed", the row shows the error, and the saved config is unchanged for every agent and the shared account:Agents → Tools shows the agent's own account read-only and links to Profile:
Use shared account for an agent removes only that agent's
agents.entries.<id>.tools.github, and the count goes up by one:Control UI boot size
scripts/check-control-ui-performance-base.mtsagainstorigin/maina7eb4eb, with this branch merged into it: passes. JavaScript is smaller thanmainon every boot route:mainTests
ui/src/e2e/github-accounts-agents.e2e.test.ts(mock Gateway): gives PR Irrigator its own account (tools.github.configureonly forpr-irrigator), returns it to the shared account (inherit), then changes the shared account; Main and PR Irrigator follow and Release Notes keeps its own. Passes.ui/src/e2e/screen-requester-routing.e2e.test.ts: thegithub_identity_settingsscreen action opens/settings/profileon the requesting browser, at that agent's row, and nowhere else. Passes.src/gateway/server-methods/tools-github.test.ts: 16/16, including the apply-before-reply regression above.github-connections,github-identity-view,panels-tools-skills,app-shell-gateway.ui-command,settings-targets) pass; the chat publication picker, publication transcript andgithub_identity_statustests assert the new names and Profile destination.tsgo:core,tsgo:ui,ui:i18n:verify, formatting, the Control UI controller guard and the line-cap ratchet are clean.config/test-lines-allocations/196200-github-accounts-by-agent.txt.ui/src/e2e/session-sources.e2e.test.tsfails two cases onmainitself since fix(ui): Appearance settings stay loading for guests #196516 (c5d53d0): it passes before that commit and fails at it, with and without this branch. This branch alone (before that commit) passes 6/6. The remainingchecks-ui-e2efailures also fail onmain's scheduled CI.