Skip to content

[codex] fix Feishu login QR rendering#97087

Merged
Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
NianJiuZst:codex/fix-feishu-login-qr
Jun 26, 2026
Merged

[codex] fix Feishu login QR rendering#97087
Patrick-Erichsen merged 1 commit into
openclaw:mainfrom
NianJiuZst:codex/fix-feishu-login-qr

Conversation

@NianJiuZst

@NianJiuZst NianJiuZst commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw channels login --channel feishu can render an oversized and distorted terminal QR code during the scan-to-create setup path. The Feishu registration URL is long enough that the default full terminal QR renderer becomes roughly twice as wide as the compact renderer, which can wrap in normal terminal windows and make the QR code unscannable.

Why This Change Was Made

Feishu's app-registration QR print path was calling renderQrTerminal(url) without compact mode. The shared media runtime already supports compact half-block QR rendering, and WhatsApp login already uses that mode for terminal QR display. This change routes Feishu scan-to-create QR output through the same compact renderer by passing { small: true }.

The regression test locks the Feishu print path to compact rendering and keeps the stdout newline behavior intact.

User Impact

Users who choose QR scanning in openclaw channels login --channel feishu should now see a QR code that fits normal terminal widths and remains scannable instead of a huge wrapped block.

Evidence

Automated checks:

  • pnpm test extensions/feishu/src/app-registration.test.ts -- --reporter=verbose
  • pnpm test src/media/qr-terminal.render.test.ts -- --reporter=verbose
  • pnpm exec oxfmt --check --threads=1 extensions/feishu/src/app-registration.ts extensions/feishu/src/app-registration.test.ts
  • pnpm changed:lanes --json
  • pnpm test:changed
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local reported no accepted/actionable findings.

Manual terminal behavior proof:

  • Before: simulated Feishu registration URL length 402 rendered with default qrcode terminal mode as 75 rows and max 150 visible columns.

  • After: the same URL rendered through Feishu printQrCode as 38 rows and max 75 visible columns, using compact half-block QR output.

Real behavior screenshots:

  • Before fix screenshot:
截屏2026-06-27 02 48 08
  • After fix screenshot:
截屏2026-06-27 02 50 44

@openclaw-barnacle openclaw-barnacle Bot added channel: feishu Channel integration: feishu size: XS labels Jun 26, 2026
@NianJiuZst
NianJiuZst marked this pull request as ready for review June 26, 2026 18:55
@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 3:03 PM ET / 19:03 UTC.

Summary
The PR changes Feishu app-registration QR printing to call renderQrTerminal(url, { small: true }) and adds a regression test for the Feishu print path.

PR surface: Source 0, Tests +18. Total +18 across 2 files.

Reproducibility: yes. from source inspection: current main routes Feishu scan setup through printQrCode(), which calls the full terminal QR renderer, and the contributor's before screenshot shows the oversized/wrapped terminal output. I did not run the live Feishu login flow in this read-only review.

Review metrics: none identified.

Root-cause cluster
Relationship: partial_overlap
Canonical: #86070
Summary: This PR is a candidate fix for the QR-rendering half of the canonical mixed Feishu regression, but it does not address the separate gateway startup timeout reported there.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • [P2] No repair lane is needed; the remaining action is ordinary maintainer review and merge/CI gating for a clean external PR.

Security
Cleared: The diff only changes a QR renderer option and a mocked unit test, with no dependency, credential, network, install, or code-execution surface added.

Review details

Best possible solution:

Land this focused Feishu QR print-path fix after normal maintainer and CI gates; keep the broader Feishu startup-timeout work tracked separately.

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

Yes, from source inspection: current main routes Feishu scan setup through printQrCode(), which calls the full terminal QR renderer, and the contributor's before screenshot shows the oversized/wrapped terminal output. I did not run the live Feishu login flow in this read-only review.

Is this the best way to solve the issue?

Yes. The PR uses the existing OpenClaw compact QR renderer on the narrow Feishu print path, avoids the old upstream qrcode small-mode bug, and adds focused Feishu coverage without adding config or a new API.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body now includes GitHub-hosted before/after terminal screenshots showing the oversized full QR and the compact after-fix printQrCode output.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body now includes GitHub-hosted before/after terminal screenshots showing the oversized full QR and the compact after-fix printQrCode output.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body now includes GitHub-hosted before/after terminal screenshots showing the oversized full QR and the compact after-fix printQrCode output.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a normal Feishu channel login usability bug with a narrow fix and limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body now includes GitHub-hosted before/after terminal screenshots showing the oversized full QR and the compact after-fix printQrCode output.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body now includes GitHub-hosted before/after terminal screenshots showing the oversized full QR and the compact after-fix printQrCode output.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body now includes GitHub-hosted before/after terminal screenshots showing the oversized full QR and the compact after-fix printQrCode output.
Evidence reviewed

PR surface:

Source 0, Tests +18. Total +18 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 1 0
Tests 1 20 2 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 21 3 +18

What I checked:

  • Current main Feishu QR path: Current main's printQrCode() still calls renderQrTerminal(url) without compact mode, so the PR addresses behavior that remains present on main. (extensions/feishu/src/app-registration.ts:268, e5123e44b0f5)
  • Runtime entry point: The Feishu scan-to-create setup flow calls printQrCode(begin.qrUrl) after prompting users to scan the QR code, so the changed helper is on the channel login/setup path. (extensions/feishu/src/setup-surface.ts:287, e5123e44b0f5)
  • Shared compact renderer contract: renderQrTerminal(..., { small: true }) uses OpenClaw's own compact block renderer from qrcode.create(text).modules, not upstream qrcode terminal small mode. (src/media/qr-terminal.ts:48, e5123e44b0f5)
  • Sibling compact usage: WhatsApp login/session already use the same compact QR option, which supports this as a consistent QR login display fix rather than a one-off renderer. (extensions/whatsapp/src/session.ts:124, e5123e44b0f5)
  • Compact renderer regression coverage: The existing real-runtime QR test asserts compact output is narrower than full output and decodes back to the same QR matrix; the PR adds Feishu-specific coverage for passing { small: true }. (src/media/qr-terminal.render.test.ts:72, e5123e44b0f5)
  • Dependency contract checked: Pinned qrcode v1.5.4 routes options.small to a separate terminal-small renderer; OpenClaw's compact path avoids that dependency path by calling create() directly.

Likely related people:

  • mazhe-nerd: Merged Feishu scan-to-create onboarding added app-registration.ts, including the QR print path this PR changes. (role: introduced behavior; confidence: high; commits: 9e2ac8a1cb9a; files: extensions/feishu/src/app-registration.ts, extensions/feishu/src/setup-surface.ts)
  • neeravmakwana: Authored the merged shared QR default change that switched Feishu away from compact output while fixing the upstream small-mode ANSI bug. (role: shared QR renderer contributor; confidence: high; commits: 0ac483787813; files: src/media/qr-terminal.ts, extensions/feishu/src/app-registration.ts)
  • liorb-mountapps: Authored the later matrix-backed compact renderer and WhatsApp compact QR usage that this PR reuses for Feishu. (role: compact renderer contributor; confidence: high; commits: ff700e582385, 492105db5a36; files: src/media/qr-terminal.ts, src/media/qr-terminal.render.test.ts, extensions/whatsapp/src/session.ts)
  • steipete: Recently maintained Feishu app-registration tests and merged the shared QR default fix affecting this path. (role: recent area contributor; confidence: medium; commits: b9d7dd4a84b2, 0ac483787813; files: extensions/feishu/src/app-registration.ts, extensions/feishu/src/app-registration.test.ts, src/media/qr-terminal.ts)
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 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. P2 Normal backlog priority with limited blast radius. labels Jun 26, 2026
@NianJiuZst

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
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 proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Jun 26, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit 1089253 into openclaw:main Jun 26, 2026
213 of 227 checks passed
wangmiao0668000666 pushed a commit to wangmiao0668000666/openclaw that referenced this pull request Jun 27, 2026
Co-authored-by: NianJiuZst <180004567+users.noreply.github.com>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 27, 2026
Co-authored-by: NianJiuZst <180004567+users.noreply.github.com>
xydigit-zt pushed a commit to xydigit-zt/xydigit-zt-openclaw that referenced this pull request Jun 28, 2026
Co-authored-by: NianJiuZst <180004567+users.noreply.github.com>
QiuYuang pushed a commit to QiuYuang/openclaw that referenced this pull request Jul 1, 2026
Co-authored-by: NianJiuZst <180004567+users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS 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