Repository navigation
fix(macos): proper provider brand icons + softer contrast in onboarding AI setup - #120907
Conversation
|
Codex review: needs changes before merge. Reviewed August 9, 2026, 3:46 AM ET / 07:46 UTC. ClawSweeper reviewWhat this changesThe PR improves macOS AI-onboarding provider artwork and styling, and allows setup to continue without a login Keychain while changing pending-activation resume handling. Merge readiness⛔ Blocked by patch quality or review findings - 9 items remain Keep open: ownerless concurrent activations can complete or clear each other’s receipt, and one shipped third-party icon lacks its required MIT notice. Likely related people: steipete (high confidence). Priority: P1 Review scores
Verification
How this fits togethermacOS onboarding receives provider metadata and activation results from the Gateway, renders setup choices, and persists a pending activation for a safe connection handoff. The new artwork layer displays local or remote provider icons, while activation state decides whether a setup result may complete. flowchart LR
A[Gateway provider metadata] --> B[macOS onboarding]
B --> C[Provider artwork selection]
C --> D[Visible AI setup choices]
B --> E[Activation request]
E --> F[Pending activation receipt]
F --> G[Connection handoff or fresh setup]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The new packaged LobeHub MIT asset lacks the required provenance and license notice. PR surfaceOther +278. Total +278 across 15 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep resume trust unbound when Keychain access fails, but retain a distinct per-attempt receipt identifier for live completion and clearing; add candidate and manual-key overlap regressions, then record the xAI asset’s exact LobeHub provenance and MIT notice before merge. Do we have a high-confidence way to reproduce the issue? Yes, from source: start two Keychain-unavailable activations for the same route, allow the later one to replace the pending record, then deliver the earlier response. The current nil owner matches the later record; a focused concurrent harness regression should establish it directly. Is this the best way to solve the issue? No: blocking relaunch from an ownerless receipt is necessary but does not preserve live-attempt identity. A separate unbound per-attempt ID retains race safety without making the receipt resumable after restart. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 499d81cdbdad. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
All three ClawSweeper findings are addressed in 586c0fc:
Proof: |
17ac263 to
89db17a
Compare
|
Both P1 findings from the updated review are addressed in b58e585471c:
Also in this push: the Proof: 93+4 focused tests green, repo-config SwiftLint clean, Codex autoreview (gpt-5.6-sol, high) clean on the full branch diff (0.94). |
A missing/locked login keychain made GatewayActivationBindingKeyStore unable to mint the activation binding key, and onboarding refused every candidate and manual-key activation with 'Secure storage is unavailable'. The fingerprint only protects the crash/relaunch resume receipt, so degrade instead of refusing: write an ownerless pending record (still matched exactly, never as a wildcard), keep the full activation-ambiguity window, and skip only restart reconciliation, which needs fingerprint proof by design. A relaunch then repeats activation rather than trusting the receipt. Reported by Peter Steinberger.
Nearly every provider icon URL the gateway sends is a simpleicons.org SVG, which AsyncImage cannot decode, so the Connect your AI page fell back to generic symbols for every tool and provider; the two GitHub avatar PNGs that did render clashed as full-color rasters. Bundle nine monochrome template marks (Simple Icons CC0; xAI from LobeHub icons, MIT) and resolve them local-first by brand id/kind, including composed choice ids like xai-oauth. Remote icons now load via NSImage(data:), which decodes SVG, with vector payloads tinted as templates so plugin-supplied icons blend too. Every glyph sits in a uniform rounded well; install cards show host-only links, hover states, and a softer translucent surface shared by all setup sections instead of controlBackgroundColor. Requested by Peter Steinberger.
…anges - Refuse relaunch handoff from ownerless (keychain-unavailable) completed receipts at the reconciliation trust boundary; such receipts can belong to replaced credentials, so setup repeats a fresh activation instead. - Decode and pass the canonical brandId the gateway sends for candidates, auth options, and manual providers so bundled marks resolve for opaque choice ids. - Scan the bounded XML prolog (comments, declarations, doctype) when sniffing remote SVG payloads; comment-prefixed vectors now tint as templates.
…bound leases A nil owner made concurrent unbound attempts indistinguishable: a stale attempt's delayed response could complete or clear a newer attempt's record. Unbound attempts now mint a random per-attempt lease id with a sentinel fingerprint — live matching stays attempt-exact, restart reconciliation's fingerprint guard rejects them, and relaunch verification refuses unbound receipts before any handoff.
Simple Icons (CC0) attribution and the LobeHub Icons MIT license text for the xAI mark now travel inside the bundled ProviderIcons directory.
#120975 changed the baseline generator to hash private types but landed without regenerating the manifest; the check-plugin-sdk-api-baseline lane was gated off on that PR and first failed here. Regenerated via pnpm plugin-sdk:api:gen with no SDK surface change in this branch.
b58e585 to
e8ea990
Compare
…ng AI setup (openclaw#120907) * fix(macos): let AI setup proceed when the login keychain is unavailable A missing/locked login keychain made GatewayActivationBindingKeyStore unable to mint the activation binding key, and onboarding refused every candidate and manual-key activation with 'Secure storage is unavailable'. The fingerprint only protects the crash/relaunch resume receipt, so degrade instead of refusing: write an ownerless pending record (still matched exactly, never as a wildcard), keep the full activation-ambiguity window, and skip only restart reconciliation, which needs fingerprint proof by design. A relaunch then repeats activation rather than trusting the receipt. Reported by Peter Steinberger. * fix(macos): render proper provider brand icons in onboarding AI setup Nearly every provider icon URL the gateway sends is a simpleicons.org SVG, which AsyncImage cannot decode, so the Connect your AI page fell back to generic symbols for every tool and provider; the two GitHub avatar PNGs that did render clashed as full-color rasters. Bundle nine monochrome template marks (Simple Icons CC0; xAI from LobeHub icons, MIT) and resolve them local-first by brand id/kind, including composed choice ids like xai-oauth. Remote icons now load via NSImage(data:), which decodes SVG, with vector payloads tinted as templates so plugin-supplied icons blend too. Every glyph sits in a uniform rounded well; install cards show host-only links, hover states, and a softer translucent surface shared by all setup sections instead of controlBackgroundColor. Requested by Peter Steinberger. * fix(macos): use failable UTF-8 decode in icon vector sniffing (swiftlint) * fix(macos): address ClawSweeper review of onboarding icon/keychain changes - Refuse relaunch handoff from ownerless (keychain-unavailable) completed receipts at the reconciliation trust boundary; such receipts can belong to replaced credentials, so setup repeats a fresh activation instead. - Decode and pass the canonical brandId the gateway sends for candidates, auth options, and manual providers so bundled marks resolve for opaque choice ids. - Scan the bounded XML prolog (comments, declarations, doctype) when sniffing remote SVG payloads; comment-prefixed vectors now tint as templates. * refactor(macos): move setup error enum to support file (swiftlint file length) * chore(i18n): refresh native source inventory * fix(macos): give keychain-unavailable activations attempt-specific unbound leases A nil owner made concurrent unbound attempts indistinguishable: a stale attempt's delayed response could complete or clear a newer attempt's record. Unbound attempts now mint a random per-attempt lease id with a sentinel fingerprint — live matching stays attempt-exact, restart reconciliation's fingerprint guard rejects them, and relaunch verification refuses unbound receipts before any handoff. * chore(macos): ship third-party artwork notices with provider icons Simple Icons (CC0) attribution and the LobeHub Icons MIT license text for the xAI mark now travel inside the bundled ProviderIcons directory. * fix(ci): refresh plugin-sdk API manifest for private-type hashing openclaw#120975 changed the baseline generator to hash private types but landed without regenerating the manifest; the check-plugin-sdk-api-baseline lane was gated off on that PR and first failed here. Regenerated via pnpm plugin-sdk:api:gen with no SDK surface change in this branch.
What Problem This Solves
The macOS onboarding "Connect your AI" page showed broken or clashing provider icons. Nearly every icon URL the gateway sends (plugin manifests and the recommended-installs catalog) points at
cdn.simpleicons.orgSVGs, which SwiftUIAsyncImagecannot decode — so Ollama, LM Studio, Pi, OpenCode, Gemini, Kimi, and all provider sign-in rows silently fell back to generic SF Symbols. The only two icons that did render (OpenAI/xAI GitHub avatar PNGs) were full-color rasters that clashed with the tinted UI. Cards also usedNSColor.controlBackgroundColor, which renders darker than the window background in dark mode and read as murky wells, and each install card printed its full raw URL.Why This Change Was Made
Requested by @steipete with a screenshot of the icon-less install grid ("use proper icons, make them blend in, improve the contrast and the whole experience").
ProviderIcons/: Ollama, LM Studio, Pi, OpenCode, Google Gemini, Kimi (Simple Icons, CC0), xAI (LobeHub icons, MIT), plus the existing Claude and OpenAI marks.OnboardingProviderIconmaps ids/brandIds/kinds (claude-code,codex-cli,grok-build, …) to them, cached per resource, and local icons now win over remote URLs so the page renders instantly, offline, and uniformly tinted.OnboardingRemoteProviderIcondownloads the icon and decodes it viaNSImage(data:)(SVG-capable on macOS 15). Vector payloads are sniffed and rendered as tinted templates so they blend; rasters render as-is. Replaces the silently-failingAsyncImagepath.Color.primary; install cards and section containers use a shared translucent surface (primary-derived fill + hairline border) instead ofcontrolBackgroundColor, with a hover state on install cards. Install cards show just the link host (ollama.com) instead of the full URL.RecommendedInstallnow decodes thebrandIdthe gateway already sends, and composed auth-choice ids (xai-oauth,anthropic-vertex) resolve via their leading brand token.No gateway/TS changes: the catalog URLs stay as-is (the web UI renders them fine); this is purely the macOS client's rendering surface.
Second fix (separate commit): Keychain-unavailable no longer dead-ends AI setup. While reproducing the page in an isolated sandbox, every candidate activation failed with "Secure storage is unavailable, so OpenClaw cannot safely resume this AI setup" — @steipete hit the same detail text and asked for it to just work. Root cause:
GatewayActivationBindingKeyStorecannot mint the HMAC binding key without a usable login keychain, andactivate()/submitManualKey()refused to run without an activation-owner fingerprint. The fingerprint only protects the crash/relaunch resume receipt, so the fix degrades instead of refusing: with no binding key, setup writes an ownerless pending record (the store's pre-v4 shape, still recognized exactly — never as a wildcard). The full activation-ambiguity window and deadline probing are preserved; the only downgrade is that a relaunch repeats activation instead of trusting the receipt. Restart-reconciliation, which requires fingerprint proof by design, is skipped for ownerless activations.User Impact
Fresh-Mac onboarding now shows crisp, recognizable, theme-adaptive brand icons for every recommended tool, provider sign-in row, local-model option, and manual key form — instead of a wall of identical blue download arrows — with card contrast that matches modern macOS surfaces.
Evidence
swift buildgreen;swift test --filter OnboardingProviderIcon(4 new tests: alias mapping incl. composed ids, bundled-asset decodability, vector/raster sniffing, host display) andswift test --filter OnboardingAISetup(90 tests, incl. the rewrittenactivation proceeds ownerless when Keychain binding is unavailableboundary test through the mock gateway transport) pass locally on the Xcode 26 toolchain.Recommended-installs grid (the reported state), after — every tool shows its real brand mark, tinted to the theme, with host-only links (before: every card showed the same generic blue download arrow, full raw URLs, and two clashing color PNG avatars):
Detected candidates, before / after:
Provider sign-in + API-key form, before / after (note xAI OAuth resolving its brand mark via the composed choice id, and ChatGPT Login / the manual-form picker showing the OpenAI mark):
Local model section, after: