Fix install wizard channel rendering
Summary
- render gateway console QR output as a fixed-width, no-wrap block so WhatsApp QR codes remain scannable
- decode gateway log tail output as UTF-8 and strip ANSI control sequences before displaying live wizard output
- wrap long gateway wizard docs links instead of clipping them at the card edge
- refresh companion Chat sessions when channel events arrive for unknown threads and eagerly load cached connected session history
Validation
- exercised gateway-driven channel setup for Discord, WhatsApp, Telegram, Teams, and iMessage
- verified WhatsApp QR rendering after the wizard output fixes
- ran Hanselman-style adversarial dual-model review; no blocking/high-consensus issues found
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --logger 'console;verbosity=minimal'.\build.ps1
Notes
- Windows still only hosts gateway-provided wizard steps; this does not add channel-specific setup logic to Windows.
Codex review: needs maintainer review before merge. Reviewed June 22, 2026, 1:32 PM ET / 17:32 UTC.
Summary
The branch renders WhatsApp gateway QR console output as a fixed-width no-wrap block, normalizes wizard log text, wraps wizard links, and parses shared gateway session.message string-content events with regression tests.
Reproducibility: yes. source inspection gives a high-confidence path: current main wraps console output line-by-line and only emits chat messages from the existing chat event array-content path. I did not run the WSL wizard locally in this read-only review.
Review metrics: 1 noteworthy metric.
- Changed files: 5 files: 3 runtime, 2 test. The diff is focused but spans setup UI and shared gateway message parsing, so both QR rendering and delivery behavior need review.
Merge readiness Overall: π platinum hermit Proof: π¦ diamond lobster β¨ media proof bonus Patch quality: π platinum hermit Result: ready for maintainer review.
Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.
Rank-up moves:
- [P2] Maintainers should confirm the
session.messagewire contract before merge.
Risk before merge
- [P1] The shared gateway change treats top-level
session.messageas a chat message source and emits live chat notifications, so maintainers should confirm that this is the intended gateway wire contract for all affected channels before merge.
Maintainer options:
- Confirm And Merge (recommended)
If maintainers confirm top-levelsession.messageis the intended live channel message event, the branch can land with the existing regression tests and proof. - Split Shared Parsing Out
If that wire contract is still unsettled, split theOpenClawGatewayClientsession.messagechange into a separate protocol PR and keep this branch to setup-wizard QR rendering.
Next step before merge
- No automated repair lane is needed; the remaining action is maintainer review of the shared gateway message-delivery contract and normal merge readiness.
Security Cleared: The diff does not add dependencies, workflow changes, secret handling, package execution, or broader permissions; the QR proof is redacted and logging remains content-minimizing.
Review details
Best possible solution:
Land the focused QR rendering and message parsing fix after maintainer confirmation that session.message is the canonical live-channel message event shape.
Do we have a high-confidence way to reproduce the issue?
Yes, source inspection gives a high-confidence path: current main wraps console output line-by-line and only emits chat messages from the existing chat event array-content path. I did not run the WSL wizard locally in this read-only review.
Is this the best way to solve the issue?
Yes, the proposed path is narrow: keep Windows hosting gateway-provided wizard steps, render QR console output safely, and reuse the shared chat event parser. The only remaining check is maintainer confirmation of the session.message wire contract.
AGENTS.md: found and applied where relevant.
Codex review notes: model internal, reasoning high; reviewed against f057db768192.
Label changes
Label justifications:
P2: This fixes a normal-priority setup and live-message delivery problem with limited channel/setup blast radius.merge-risk: π¨ message-delivery: The PR changes shared gateway event routing for livesession.messageframes, which could affect whether channel messages are emitted, dropped, or notified.rating: π platinum hermit: Overall readiness is π platinum hermit; proof is π¦ diamond lobster and patch quality is π platinum hermit.status: π ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (recording): The PR includes inspected redacted screenshot proof for the QR rendering path and a downloaded WhatsApp-session recording artifact for live message delivery proof.proof: sufficient: Contributor real behavior proof is sufficient. The PR includes inspected redacted screenshot proof for the QR rendering path and a downloaded WhatsApp-session recording artifact for live message delivery proof.proof: π₯ video: Contributor real behavior proof includes video or recording evidence. The PR includes inspected redacted screenshot proof for the QR rendering path and a downloaded WhatsApp-session recording artifact for live message delivery proof.
Evidence reviewed
What I checked:
- Repository policy read: AGENTS.md was present and read fully; its setup/gateway guidance and required validation list were relevant to this setup wizard and gateway-client review. (
AGENTS.md:1, f057db768192) - QR rendering path: The PR head detects terminal QR art before splitting lines and appends it as a white fixed-width no-wrap block inside a horizontal ScrollViewer. (
src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs:644, 0371d82b9950) - Console normalization: The PR head reads WSL tail output as UTF-8, strips ANSI control sequences, and classifies QR-like block glyph output without surfacing unrelated subsystem logs. (
src/OpenClaw.SetupEngine.UI/WizardConsoleTail.cs:59, 0371d82b9950) - Shared message parsing: The PR head routes top-level
session.messageevents through the chat parser, rejects malformed non-object messages, extracts string or block content, and emits chat notifications for final assistant messages. (src/OpenClaw.Shared/OpenClawGatewayClient.cs:2525, 0371d82b9950) - Regression coverage: The PR adds shared gateway tests for
session.messagestring content, content blocks, malformed payloads, and final-assistant notifications, plus tray tests for ANSI stripping, UTF-8 QR glyphs, QR detection, and non-QR console output. (tests/OpenClaw.Shared.Tests/OpenClawGatewayClientTests.cs:776, 0371d82b9950) - Proof artifacts: The redacted screenshot was inspected and visibly shows the Windows setup wizard rendering the WhatsApp QR area as a fixed-width block; the linked WhatsApp proof was downloaded as a 19.8s MP4 recording.
Likely related people:
- Ranjesh: Local blame points the current wizard console-tail parser and much of the shared gateway event parser to the grafted current-main commit that introduced these surfaces in this checkout. (role: introduced behavior / adjacent owner; confidence: medium; commits: 9a3a7a6131a8; files:
src/OpenClaw.SetupEngine.UI/WizardConsoleTail.cs,src/OpenClaw.Shared/OpenClawGatewayClient.cs) - RΓ©gis Brid: Recent commits changed shared gateway chat/session handling and native chat event delivery near the affected
OpenClawGatewayClientcode path. (role: recent area contributor; confidence: high; commits: 5505a85da7df, 3fdfbfad837f; files:src/OpenClaw.Shared/OpenClawGatewayClient.cs) - ζ½ζΈ
θ: A current-main commit recently changed chat session routing and notification session-key handling in the same shared gateway message-notification area. (role: recent adjacent contributor; confidence: medium; commits: 6283fb174ead; files:
src/OpenClaw.Shared/OpenClawGatewayClient.cs) - Barbara Kudiess: Recent setup wizard history includes preserving wizard wire values, adjacent to the gateway-hosted wizard behavior this PR renders. (role: adjacent setup wizard contributor; confidence: low; commits: b90ded9a5eea; files:
src/OpenClaw.SetupEngine.UI/Pages/WizardPage.xaml.cs)
What the crustacean ranks mean
- π¦ challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
- π¦ diamond lobster: very strong readiness with only minor maintainer review expected.
- π platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
- π¦ gold shrimp: useful signal, but proof or patch confidence is still limited.
- π¦ͺ silver shellfish: thin signal; proof, validation, or implementation needs work.
- π§ unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
- π off-meta tidepool: rating does not apply to this item.
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.
How this review workflow works
- 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-reviewcomments, 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-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only. - Maintainers can also comment
@clawsweeper reviewto 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 explainto ask for more context, or@clawsweeper stopto stop active automation.
@clawsweeper re-review
π¦π§Ή ClawSweeper re-review requested.
I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.
Proof update for ClawSweeper:
- A redacted screenshot was captured showing the Windows install wizard rendering the WhatsApp QR output as a fixed-width block without wrapping. The QR itself is intentionally covered because pairing QR codes are sensitive.
- Manual behavior proof: the WhatsApp Linked Devices QR scanning/linking flow was tested successfully with the unredacted QR before redaction.
- Scope update: the chat-provider session refresh/history-loading changes were split out of this PR, so the prior
merge-risk: session-statesurface is no longer in scope. The remaining chat-related change is limited to shared gatewaysession.messagelive-message parsing plus regression tests.
Latest validation:
./build.ps1passed- Shared tests passed: 2265 passed, 29 skipped
- Tray tests passed: 1079 passed
Redacted visual proof: WhatsApp QR output is rendered as a fixed-width block in the Windows install wizard. QR is intentionally covered because pairing QR codes are sensitive; unredacted QR was manually verified via WhatsApp Linked Devices before redaction. @clawsweeper re-review
Video proof of message delivery in WhatsApp session:
https://github.com/user-attachments/assets/049567ed-5ab2-4a1e-a417-9a1d2777d28d