Skip to content

Fix install wizard -- WhatsApp channel QR code rendering#767

Merged
shanselman merged 5 commits into
openclaw:mainfrom
christineyan4:test-channel-setup-wizard
Jun 25, 2026
Merged

Fix install wizard -- WhatsApp channel QR code rendering#767
shanselman merged 5 commits into
openclaw:mainfrom
christineyan4:test-channel-setup-wizard

Conversation

@christineyan4

@christineyan4 christineyan4 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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.

Proof

  • Redacted screenshot captured on Windows shows the install wizard rendering WhatsApp QR output as a fixed-width block without wrapping; the QR itself was intentionally covered because pairing QR codes are sensitive.
  • Manual behavior proof: WhatsApp Linked Devices QR scanning/linking was manually tested successfully with the unredacted QR before redaction.
  • Scope update for ClawSweeper: chat-provider session refresh/history-loading changes were split out of this PR. The remaining chat-related change is limited to shared gateway session.message live-message parsing and regression tests.

Latest validation

  • ./build.ps1 — passed
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore --logger 'console;verbosity=minimal' — passed: 2265 passed, 29 skipped
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --logger 'console;verbosity=minimal' — passed: 1079 passed

Proof note: the QR screenshot is redacted by design; QR pairing was verified locally before redaction.

Render gateway console QR output as a fixed-width block, wrap long wizard links, and refresh chat sessions when channel events arrive before sessions.list catches up.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown

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.message wire contract before merge.

Risk before merge

  • [P1] The shared gateway change treats top-level session.message as 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:

  1. Confirm And Merge (recommended)
    If maintainers confirm top-level session.message is the intended live channel message event, the branch can land with the existing regression tests and proof.
  2. Split Shared Parsing Out
    If that wire contract is still unsettled, split the OpenClawGatewayClient session.message change 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 live session.message frames, 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.message events 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.message string 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 OpenClawGatewayClient code 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-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.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. labels Jun 15, 2026
@christineyan4 christineyan4 changed the title Fix gateway wizard channel rendering Fix install wizard channel rendering Jun 15, 2026
…wizard

# Conflicts:
#	src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs
@clawsweeper clawsweeper Bot removed proof: sufficient Contributor real behavior proof is sufficient. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 15, 2026
@christineyan4 christineyan4 changed the title Fix install wizard channel rendering Fix install wizard -- WhatsApp channel QR code rendering Jun 17, 2026
@ranjeshj ranjeshj marked this pull request as draft June 18, 2026 05:08
@christineyan4

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 18, 2026

Copy link
Copy Markdown

🦞🧹
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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 18, 2026
Handle gateway session.message events with string content so live channel messages surface in the companion. Drop malformed message payloads safely and cover notification behavior.

Remove the chat provider session refresh changes from this PR so the wizard QR fix does not carry the session-state risk surface.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@christineyan4

Copy link
Copy Markdown
Contributor Author

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-state surface is no longer in scope. The remaining chat-related change is limited to shared gateway session.message live-message parsing plus regression tests.

Latest validation:

  • ./build.ps1 passed
  • Shared tests passed: 2265 passed, 29 skipped
  • Tray tests passed: 1079 passed

@christineyan4

christineyan4 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

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
image

@clawsweeper clawsweeper Bot added status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. labels Jun 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jun 22, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@christineyan4

Copy link
Copy Markdown
Contributor Author

Video proof of message delivery in WhatsApp session:

Screen.Recording.2026-06-22.130257.mp4

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. 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. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 22, 2026
@christineyan4 christineyan4 marked this pull request as ready for review June 22, 2026 17:24
@shanselman shanselman merged commit 992da74 into openclaw:main Jun 25, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 message-delivery 🚨 Merging this PR could drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal priority bug or improvement with limited blast radius. proof: sufficient Contributor real behavior proof is sufficient. proof: 🎥 video Contributor real behavior proof includes video or recording evidence. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants