Repository navigation
refactor(session)!: log in by QR through cli-core's loginQr, add --qr-file, drop the browser fallback - #736
Merged
Merged
Conversation
leemour
force-pushed
the
feat/shared-login-qr
branch
from
October 18, 2026 22:11
b3ea0f1 to
54e1657
Compare
…le, and no browser fallback max drew its own QR code and, on a terminal too narrow for it, served it from 127.0.0.1 and opened the default browser. tg and wa draw cli-core's code and take --qr-file. max now matches them through loginQr (cli-core 0.347.0, already pinned on main): - session start qr and setup take --qr-file <png>; the image is a temporary file created 0600 and renamed over the path (WC-SECR-10), and is removed after the login, also when the command is cut - a narrow terminal draws nothing and says to widen it or pass --qr-file; nothing is opened implicitly, so the same behaviour lives in cli-core for all three - without a terminal, qr gets the shared refusal; qr-chrome and sms keep theirs, and a cloud password still needs a terminal Removed: src/session/qr-terminal.ts, serveQrPage and the browser door's open(), and the qrcode-generator dependency, all used only by that path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leemour
force-pushed
the
feat/shared-login-qr
branch
from
October 18, 2026 22:27
1d34382 to
9f876b4
Compare
… in the test matrix The test matrix check found setup --qr-file with no test. A login without a terminal now writes the code to a mode-600 PNG that is removed after, and --qr-file is refused for qr-chrome before MAX is contacted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…he image goes on a cut login - `max <profile> setup` with no terminal and no --qr-file now throws cli-core's qrNeedsTerminal, the same refusal `session start qr`, tg and wa give; qr-chrome and sms keep a browser-only one. - --qr-file is checked against undefined in setup as in `session start`, so an empty value is not silently ignored. - New test: a --qr-file login aborted while MAX is polled leaves no image behind. - Changelog says why the browser fallback is gone and that setup's refusal changed too. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged
leemour
added a commit
that referenced
this pull request
Oct 19, 2026
Version and the dated changelog for 0.64.0: «Не выпущено» → `0.64.0 — 19.10.2026`, package.json, src/version.ts. Nothing else. `pnpm release:check` passes 15/15 on this commit. Since v0.63.0: #736 (QR login through cli-core's `loginQr`, `--qr-file`, no browser fallback), #740 (cli-core 0.348.0 / cli-base 0.47.0), #742 and #743 (cli-core 0.350.0; the scan line only after a drawn QR code; setup's login step headed "Link this device"). Live: `pnpm smoke:live` and the other live checks are **skipped** — no live connection to the owner's MAX account was allowed. The owner will run them in the morning. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
tg, max and wa now share cli-core 0.347.0's
loginQr(cli-core #1595), under the owner's rule that theCLIs never diverge. max had its own drawer, opened the code in a browser on a narrow terminal, and had no
--qr-file.session start qrandsetuptake--qr-file <png>, as tg and wa do. The image is written with mode0600 through a temporary file renamed over the path (WC-SECR-10). The login's
finallyremoves it; it isalso tracked, so the runner closes it on
--timeoutor Ctrl+C even if thatfinallynever runs. A testaborts a login mid-poll and finds no file; it passes with or without the tracking, so it does not isolate it.
session start qrandsetupgive the shared refusal ("shows a QR code to scan —run it in a terminal, or pass --qr-file ");
qr-chromeandsmskeep their own. A MAX cloudpassword still needs a terminal.
interactivecheck (stdin and stderr are terminals,--no-inputrespected) still decideswhether there is a terminal; it is stricter than cli-core's
atTerminal, and the tests inject it.the terminal or pass
--qr-file. A browser that opens by itself could not move into cli-core for allthree CLIs, and WC-CMD-15 already turns browser logins off when nobody is at the terminal. The cost is
real for max: MAX issues one code per run, so a narrow-terminal user presses Ctrl+C and runs again,
wider or with
--qr-file. tg and wa renew their codes, so a widened window draws the next one.src/session/qr-terminal.ts,serveQrPage, the browser door'sopen(), and theqrcode-generatordependency.docs/sessions.md,docs/commands.md, the skill and thetest matrix updated. Pins
@wirecat/cli-core0.347.0 exactly.🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com