docs: Add a note regarding the unreadable QR code caused by font limi…#72762
docs: Add a note regarding the unreadable QR code caused by font limi…#72762yinghao-Chen wants to merge 5 commits into
Conversation
Greptile SummaryThis PR adds a WSL font-rendering hint before QR code output in both the Feishu and WhatsApp extensions. The changes are purely additive and non-breaking, but the note is printed unconditionally for every user regardless of environment, and the actual message text differs from what the PR description advertises (font change instruction vs. URL/Token copy fallback). Confidence Score: 4/5Safe to merge — changes are additive and do not affect functional behaviour. Only P2 style/UX findings: the note is shown to all users unconditionally and the message text doesn't match the PR description. No logic, security, or correctness issues. Both changed files share the same two P2 concerns (unconditional display and message mismatch with PR description). Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/feishu/src/app-registration.ts
Line: 255-258
Comment:
**Note shown unconditionally to all users**
This message is printed on every QR code render, regardless of the user's environment. Mac, native Linux, and Windows (non-WSL) users will always see a WSL-specific font warning that is irrelevant to them. Consider gating the note on a WSL detection check (e.g. checking for `WSL_DISTRO_NAME` or `WSL_INTEROP` in `process.env`) so it only appears when actually running inside WSL.
```typescript
if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) {
process.stdout.write(
"\nNote: If using WSL and the QR code cannot be scanned successfully, " +
"please change the WSL terminal font to MS Gothic and try again.\n\n",
);
}
```
The same pattern applies to `extensions/whatsapp/src/session.ts`.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/feishu/src/app-registration.ts
Line: 256-257
Comment:
**Implementation differs from PR description**
The PR description states the fallback message will instruct users to "copy the URL or Token provided below and open it in your browser to log in." The actual message only tells users to change their font to MS Gothic — it does not mention copying a URL/Token as an alternative. If the URL/Token fallback is intended (which would be the more robust UX improvement), it should be included in the message, otherwise the PR description is misleading.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "docs: Add a note regarding the unreadabl..." | Re-trigger Greptile |
| process.stdout.write( | ||
| "\nNote: If using WSL and the QR code cannot be scanned successfully, " + | ||
| "please change the WSL terminal font to MS Gothic and try again.\n\n", | ||
| ); |
There was a problem hiding this comment.
Note shown unconditionally to all users
This message is printed on every QR code render, regardless of the user's environment. Mac, native Linux, and Windows (non-WSL) users will always see a WSL-specific font warning that is irrelevant to them. Consider gating the note on a WSL detection check (e.g. checking for WSL_DISTRO_NAME or WSL_INTEROP in process.env) so it only appears when actually running inside WSL.
if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) {
process.stdout.write(
"\nNote: If using WSL and the QR code cannot be scanned successfully, " +
"please change the WSL terminal font to MS Gothic and try again.\n\n",
);
}The same pattern applies to extensions/whatsapp/src/session.ts.
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/feishu/src/app-registration.ts
Line: 255-258
Comment:
**Note shown unconditionally to all users**
This message is printed on every QR code render, regardless of the user's environment. Mac, native Linux, and Windows (non-WSL) users will always see a WSL-specific font warning that is irrelevant to them. Consider gating the note on a WSL detection check (e.g. checking for `WSL_DISTRO_NAME` or `WSL_INTEROP` in `process.env`) so it only appears when actually running inside WSL.
```typescript
if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) {
process.stdout.write(
"\nNote: If using WSL and the QR code cannot be scanned successfully, " +
"please change the WSL terminal font to MS Gothic and try again.\n\n",
);
}
```
The same pattern applies to `extensions/whatsapp/src/session.ts`.
How can I resolve this? If you propose a fix, please make it concise.| "\nNote: If using WSL and the QR code cannot be scanned successfully, " + | ||
| "please change the WSL terminal font to MS Gothic and try again.\n\n", |
There was a problem hiding this comment.
Implementation differs from PR description
The PR description states the fallback message will instruct users to "copy the URL or Token provided below and open it in your browser to log in." The actual message only tells users to change their font to MS Gothic — it does not mention copying a URL/Token as an alternative. If the URL/Token fallback is intended (which would be the more robust UX improvement), it should be included in the message, otherwise the PR description is misleading.
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/feishu/src/app-registration.ts
Line: 256-257
Comment:
**Implementation differs from PR description**
The PR description states the fallback message will instruct users to "copy the URL or Token provided below and open it in your browser to log in." The actual message only tells users to change their font to MS Gothic — it does not mention copying a URL/Token as an alternative. If the URL/Token fallback is intended (which would be the more robust UX improvement), it should be included in the message, otherwise the PR description is misleading.
How can I resolve this? If you propose a fix, please make it concise.|
While configuring the Feishu chat client, I encountered an issue where the displayed QR code could not be scanned successfully. I later discovered that changing the WSL window font to MS Gothic resolved the problem. Therefore, I have updated the documentation hints to reflect this solution. |
|
Thanks for the context here. I did a careful shell check against current Close as implemented: current main fixes the underlying Feishu/WhatsApp terminal QR scannability problem with the shared full-block QR renderer, making this PR's WSL-specific hint and public SDK export obsolete. So I’m closing this as already implemented rather than keeping a duplicate issue open. Review detailsBest possible solution: Keep the shipped shared full-block QR renderer and Feishu manual fallback instead of adding WSL-specific runtime hints or expanding the public Plugin SDK for this bundled-channel message. Do we have a high-confidence way to reproduce the issue? No high-confidence current-main reproduction remains: Feishu and WhatsApp no longer use the compact default QR path that motivated the report. I did not rerun a live WSL terminal scan with the affected font. Is this the best way to solve the issue? No for this PR as submitted. Current main solves the root QR-rendering problem more directly with shared full-block output and avoids a WSL-only hint plus public SDK surface expansion. Security review: Security review cleared: The PR diff only adds local terminal guidance and a runtime-env re-export; it does not change dependencies, workflows, secrets, package resolution, downloads, or executable scripts. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against ae9b7041ef8b; fix evidence: release v2026.5.12-beta.1, commit 0ac483787813. |
️ Fix: Add WSL font guidance for terminal QR codes (Feishu & WhatsApp)
Summary
This PR addresses an issue where QR codes rendered in the terminal for Feishu and WhatsApp authentication appear garbled or unreadable when running inside Windows Subsystem for Linux (WSL). This is typically caused by the default WSL console font lacking the necessary character support.
Instead of leaving the user stuck at the login screen, this update detects the WSL environment and provides a specific instruction to switch the terminal font to MS Gothic, which resolves the rendering issue.
Changes
Feishu & WhatsApp Extensions: Added a check for the WSL environment (isWSLEnv) before rendering the QR code.
User Guidance: If WSL is detected, the CLI now outputs a helpful hint advising the user to change their terminal font to "MS Gothic" to view the QR code correctly.
Scope: This applies to both the Feishu app registration flow and the WhatsApp session login flow.
Context
Currently, if a user runs the CLI in a default WSL environment, the QR code often renders as "grit" or illegible characters because the default font does not support the specific block characters used by the QR library.
Screenshots (Example Output)
=>