Repository navigation
Conversation
pi-wechat-assistant's /wechat login sends a qrcode-terminal QR code (█ ▀ ▄ and runs of spaces) through ctx.ui.notify(). The toast's pre-line collapsed the runs of spaces, its UI font gave spaces and blocks different widths and its 1.5 line height opened gaps between rows, so the code came out garbled. Lines drawn with block characters now render as pi's TUI shows them: spaces kept, rows touching, one monospace font for spaces and blocks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pi-wechat-assistant's/wechat loginbuilds its QR code withqrcode-terminal's small mode (█ ▀ ▄and runs of spaces, no ANSI) and sends it throughctx.ui.notify(), which pi-web shows as a toast inNoticeShelf. Three things in the toast's styling garbled it:white-space: pre-linecollapsed the runs of spaces, the UI font gave spaces and blocks different widths, and the 1.5 line height opened gaps between rows. pi's TUI shows the same text on a terminal grid, so it lines up there.lib/notice-text.ts(new):splitNoticeText()separates lines containing block elements (U+2580–259F) from the rest of the notice.components/ChatWindow.tsx: those lines render with spaces kept (pre), rows touching (line-height: 1), andMenlo, Consolas, 'DejaVu Sans Mono', monospace(the bundled Noto mono subset has no block glyphs, so spaces and blocks would come from fonts of different widths). Prose in the same notice is unchanged.Checked by rendering a real
qrcode-terminalQR inside the toast markup in headless Chrome: garbled before, a clean code after. Test:lib/notice-text.test.mjs.tsc, eslint,npm testpass.Left as is: notices still expire after 5 s unless hovered (short for scanning a code); in light mode the code shows inverted, as on a light terminal in pi's TUI.
Closes #755
🤖 Generated with Claude Code