Skip to content

improve(ui): rebuild agent GitHub identity panel on settings primitives - #125472

Merged
steipete merged 1 commit into
mainfrom
steipete/settings-ui-polish-45d701
Aug 18, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/settings-ui-polish-45d701

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The per-agent GitHub identity panel that landed in #125199 broke the Control UI settings design language. It rendered raw wire enums (system-detected, rate_limited, github-api; write permissions are not remotely verified) in <code> tags, used bespoke form-grid/field/form-control markup whose styles the agents page never loads (the scope select, PAT input, and author fields rendered as bare, unstyled full-width inputs outside the card surface), referenced non-existent avatar avatar--sm classes (unconstrained avatar <img>), placed callouts inside the settings group, and led the Tools tab with the identity section ahead of Tool Access.

Why This Change Was Made

Rebuilds the section on the canonical settings primitives (ui/docs/design-system/settings-design.md, connection-page precedent):

  • Status facts become settings rows: Account (avatar + @login, with a friendly source description), Status (dot status — Verified / Not verified / Rate limited / No credentials / Configured, but unavailable — with the evidence detail as row description), and Git Author (Not set fallback instead of — · —).
  • The scope select becomes a System | This Agent segmented control whose row description explains the active scope.
  • The PAT field uses the settings secret input (gains a disabled prop, the one primitive extension); author fields are standard input rows.
  • Errors render as a danger status row instead of a callout inside the group; the unsupported-gateway state uses the standard empty-state row.
  • Action row: quiet Use Native Credentials / Remove Override plus primary Save Identity, with the remote-credentials note as the row description (the old two-sentence broker paragraph is trimmed).
  • Section title becomes "GitHub Identity"; it now sits after Tool Access and Available Right Now instead of leading the Tools tab. Docs pointer updated (docs/gateway/config-tools.md).
  • New .settings-account primitive in settings.css sizes the avatar (20px, round).

No controller/RPC behavior changes; github-identity-controller.ts is untouched.

User Impact

Operators configuring per-agent GitHub identities get a panel that reads like the rest of Settings: human labels instead of wire enums, working form styling, a visible verification status, and clearer save/inherit actions.

Evidence

  • Browser tests: pnpm test ui/src/pages/agents/panels-tools-skills.browser.test.ts (10 passed, incl. new settings-language assertions: no form-grid, no callouts in the group, no raw enums, dot status, avatar class), pnpm test ui/src/pages/agents/github-identity-controller.test.ts (15 passed).
  • pnpm check:changed green; pnpm ui:i18n:baseline regenerated.
  • Live test on an isolated dev gateway (own OPENCLAW_STATE_DIR, port 19097, real gh credentials in the gateway env): auto-verify resolved the native account via the GitHub API (Verified + @steipete + avatar), segmented scope switch updates description and inherit button label, empty-token Save surfaces the inline danger error row, scope switch back restores the system description. Script: Playwright against the served production bundle (asset hash verified changed after pnpm ui:build).
  • Configure-with-real-token was not exercised live (agent policy: no credential entry); that path is covered by the existing controller unit tests and was live-verified in feat(agents): configure per-agent GitHub identities #125199.

Before

GitHub identity section before

Agent settings before

After

GitHub identity section after

GitHub identity error row after

Agent settings after

The panel from #125199 rendered raw wire enums in code tags, used
form-grid/field markup whose styles the agents page never loads (bare
unstyled inputs outside the card), referenced non-existent avatar
classes, and put callouts inside the settings group. Rebuild it on the
canonical settings primitives: status rows with dot status and friendly
source/evidence labels, a System/This Agent segmented scope control,
the settings secret input (gains a disabled prop), a danger status row
for errors, and a quiet-inherit + primary-save action row. Retitle to
"GitHub Identity" and move it below Tool Access and Available Right
Now. Add a .settings-account primitive for the 20px round avatar.

Live-tested on an isolated dev gateway: native-credential verify via
the GitHub API, segmented scope switching, and the empty-token error
row. Controller behavior unchanged.
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime labels Aug 18, 2026
@steipete
steipete marked this pull request as ready for review August 18, 2026 00:25
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 18, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 8:31 PM ET / August 18, 2026, 00:31 UTC.

ClawSweeper review

What this changes

This PR rebuilds the per-agent GitHub identity panel with shared settings rows, friendly status labels, disabled secret inputs, and an updated documentation label.

Regression provenance

Possible regression — probable (reviewed change; known regression link). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: current main still renders the raw-enum, bespoke GitHub identity panel, while this PR moves that presentation onto the established settings system without changing Gateway or credential-controller behavior. No actionable patch defect found; the maintainer label and current base drift require normal maintainer landing review.

Priority: P3
Reviewed head: e2d5356d21cee201f0553440ca9a11c59fcbfe91

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, coherent UI repair with browser coverage and no identified correctness or security defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR describes isolated-Gateway browser validation; the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR describes isolated-Gateway browser validation; the external-contributor proof gate does not apply.
Evidence reviewed 8 items Current-main defect: Current main still renders raw source, credential-state, and evidence values in code elements alongside bespoke form-grid/form-control markup.
Closed status mapping: The branch maps every protocol credential state and evidence value to localized settings status text instead of exposing wire values.
Gateway contract: The Gateway status owner derives available only after a successful GitHub API account probe, matching the UI’s Verified label.
Findings None None.
Security None None.

How this fits together

The Control UI requests GitHub identity status from the Gateway and lets an operator configure system-wide or per-agent credentials. This panel translates that closed status into settings controls while the existing controller sends mutations back to the Gateway.

flowchart LR
  Gateway[Gateway GitHub status] --> Controller[Identity controller]
  Controller --> Panel[Agent Tools panel]
  Panel --> Settings[Shared settings primitives]
  Settings --> Operator[Operator actions]
  Operator --> Gateway
Loading

Before merge

  • Resolve merge risk (P1) - The branch is behind current main; refresh the merge result and exact-head checks before landing, though no three-way conflict is reported.
  • Resolve merge risk (P1) - Production UI code is net +106 lines; the explicit closed-state translations and shared disabled secret-input behavior appear justified, but maintainers should retain only that necessary presentation surface.
  • Complete next step (P2) - The protected maintainer label and stale base require maintainer landing review and exact-head validation; no mechanical repair is needed.
Agent review details

Security

None.

PR surface

Source +141, Tests +39, Docs 0. Total +180 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 5 249 108 +141
Tests 1 40 1 +39
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 290 110 +180

Review metrics

Metric Value Why it matters
Production versus test LOC production +213/-107; tests +40/-1; generated baseline +35 The presentation rewrite adds explicit closed-state labels and settings rows; the focused browser test protects the visible settings contract.
Credential contract surface 0 Gateway/controller files changed The diff preserves persisted identity, secret-handoff, and RPC behavior while changing only Control UI presentation.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Rebase and validate the exact head, then retain the shared status/input primitives and unchanged credential-controller boundary when landing.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Rebase and validate the exact head, then retain the shared status/input primitives and unchanged credential-controller boundary when landing.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main source directly renders raw protocol values and unsupported bespoke form markup; the focused browser fixture exercises the repaired rendering path.

Is this the best way to solve the issue?

Yes: reusing the existing settings primitives is the narrowest maintainable repair, while changing the controller or Gateway would unnecessarily expand the credential boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7e998a367f6a.

Labels

Label changes:

  • add P3: This is a bounded Control UI consistency repair with no changed credential, Gateway, or protocol behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR describes isolated-Gateway browser validation; the external-contributor proof gate does not apply.

Label justifications:

  • P3: This is a bounded Control UI consistency repair with no changed credential, Gateway, or protocol behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR describes isolated-Gateway browser validation; the external-contributor proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • steipete: Authored the merged per-agent GitHub identity feature and this focused Control UI repair. (role: feature owner and recent area contributor; confidence: high; commits: 6e458d84bfc1, e2d5356d21ce; files: ui/src/pages/agents/panels-tools-skills.ts, ui/src/pages/agents/github-identity-controller.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready verification for e2d5356d21cee201f0553440ca9a11c59fcbfe91:

  • Codex gpt-5.6-sol autoreview: clean; no accepted/actionable findings.
  • pnpm check:changed: passed.
  • pnpm test ui/src/pages/agents/panels-tools-skills.browser.test.ts: 10/10 passed.
  • pnpm test ui/src/pages/agents/github-identity-controller.test.ts: 15/15 passed.
  • Isolated dev-gateway browser proof covered native-account verification/avatar/status, scope switching, inherit labeling, and the inline danger error row. The PR body contains the before/after screenshots. Configure-with-real-token was not repeated because this task did not authorize credential entry; existing controller coverage and feat(agents): configure per-agent GitHub identities #125199 provide that path's proof.
  • Exact-head CI: run 32084446718, attempt 2 succeeded (109 jobs successful, 10 intentionally skipped), including checks-ui, 12/12 UI E2E shards, real-gateway UI E2E, build, lint, types, docs, security, and openclaw/ci-gate. Attempt 1 had unrelated tunnel diagnostic-tail and missing-ResizeObserver flakes; both passed on the failed-job retry.
  • Native prepare: OPENCLAW_TESTBOX=1 scripts/pr prepare-run 125472 passed with gates_mode=hosted_exact_or_recent_parent, reusing the successful exact-head hosted gate; no separate Testbox run was dispatched.

ClawSweeper found no actionable patch defect. Its three pre-merge items are handled as follows:

  1. Branch/base merge risk: the branch was cleanly rebased before publication, GitHub reports it mergeable, exact-head CI is green, and native prepare refreshed the current merge context. Later behind-main drift is advisory under the repository landing policy.
  2. Positive production UI LOC: maintainer review accepts the necessary closed-state translations and shared disabled secret-input/settings presentation surface; no Gateway/controller/credential contract changed.
  3. Protected maintainer label/stale-base review: the explicitly authorized maintainer landing review and native artifacts are complete; ClawSweeper itself says no mechanical repair is needed.

@steipete
steipete merged commit fab7fa9 into main Aug 18, 2026
308 of 312 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the steipete/settings-ui-polish-45d701 branch August 18, 2026 01:09
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 18, 2026
…es (openclaw#125472)

The panel from openclaw#125199 rendered raw wire enums in code tags, used
form-grid/field markup whose styles the agents page never loads (bare
unstyled inputs outside the card), referenced non-existent avatar
classes, and put callouts inside the settings group. Rebuild it on the
canonical settings primitives: status rows with dot status and friendly
source/evidence labels, a System/This Agent segmented scope control,
the settings secret input (gains a disabled prop), a danger status row
for errors, and a quiet-inherit + primary-save action row. Retitle to
"GitHub Identity" and move it below Tool Access and Available Right
Now. Add a .settings-account primitive for the 20px round avatar.

Live-tested on an isolated dev gateway: native-credential verify via
the GitHub API, segmented scope switching, and the empty-token error
row. Controller behavior unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant