Repository navigation
fix(cli): the picture browser no longer asks the system keychain - #14252
Conversation
…a#14250) `astryx experimental export --pictures` falls back to an installed Chrome or Chromium when the project has no Playwright browser. picture-chrome.mjs started it without --use-mock-keychain and --password-store=basic, so on macOS each browser start opened a keychain dialog. Playwright passes both flags on every Chromium launch; the system-Chrome path now does the same.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approved. CI passes on this head, and your new stand-in-browser test runs and passes there.
The two switches bring the system-Chrome picture path back in line with the CLI's no-prompt rule, and nothing else in the command changes. No changes are requested.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Live title, the picture browser no longer asks the system keychain: verified for what the CLI passes (the new test passes in CI at this head and failed on the base when reproduced locally in an earlier review of this head, and the Chrome picture script is the CLI's only system-browser launch); the macOS no-dialog outcome is reported from your run.
- The export with pictures falls back to an installed Chrome or Chromium when the project has no Playwright browser: verified (
foundation/pictures/pictures.mjs:139-155). - Each browser start opened a keychain dialog on macOS, an agent cannot answer it, and a full local test run showed hundreds: reported.
- The Chrome picture script started the browser with a fresh profile and without either switch: verified (the base's spawn arguments and
render/offline.mjs:40-56). - The CLI runs without a person to answer, and a system dialog stops the run: matches the CLI surface record's first invariant.
- The profile is a throwaway folder in the run's temp folder and stores no secret: verified (
picture-chrome.mjs:62;pictures.mjs:422,:437,:461). - Playwright passes both switches on every Chromium launch, so the Playwright path never prompted: verified for the locked Playwright, whose default Chromium switches include both, with
picture-playwright.mjs:46-49keeping the defaults andpictures.mjs:159-161passing it no browser path; "never prompted" is reported. - The system-Chrome path now gets the same two switches, and nothing else changes: verified (
picture-chrome.mjs:58-59is the only production change, beside its comment at 55-57). - After the change a picture was taken with no keychain prompt, including across a full test run: reported.
- The Playwright picture script is unchanged: verified.
- The new test uses a stand-in browser that records its arguments, so no real browser starts, fails without the switches with the quoted message and passes with them: verified (
picture-chrome.test.mjs:22-54; the failure message reproduced locally on the base in an earlier review of this head, the pass in CI at this head). - Scope is one defect in the CLI's Chrome picture script, with no tagalong, no new public API, default or interaction, and no internal context: verified.
- Testing commands: reported; CI's node tests, lint, typecheck, build and CLI smoke test pass at this head.
- The test skips on Windows because a
#!stand-in cannot run there: verified (picture-chrome.test.mjs:49); Chrome ignoring both switches on Windows is reported. - The linked issue describes the same defect and fix: verified.
- Changeset, the export's installed Chrome or Chromium no longer asks the macOS keychain or the Linux password store, where before each start could open a dialog: verified for what the CLI passes on the only system-Chrome path; the OS outcome is reported.
- File
.changeset/picture-chrome-no-keychain-prompt.md: clear. - File
packages/cli/foundation/render/picture-chrome.mjs: clear. - File
packages/cli/foundation/render/picture-chrome.test.mjs: clear.
|
🤖 (Posted by Cindy's agent.) Welcome, @dante01yoon, and thank you for this fix and the test that proves it! The automated review approved it with no changes requested. The next step is ours: we'll start CI and finish the remaining maintainer checks. Nothing is needed from you right now. We'll post here if anything comes up. |
|
/approve-spec 30e20ec |
PR Analysis Report🔎 Preview ·
|
cixzhang
left a comment
There was a problem hiding this comment.
Approved at this exact head.
|
🤖 (Posted by Cindy's agent.) Merged, thank you @dante01yoon! The CLI's picture browser no longer brings up a macOS keychain or Linux password-store prompt when it uses an installed Chrome, which keeps the CLI's never-asks-a-question promise. It ships in the next release. Thanks for reporting it and fixing it in the same breath, and welcome aboard! |
Fixes #14250
User impact
astryx experimental export --picturesfalls back to an installed Google Chrome or Chromium when the project has no Playwright browser. On macOS, each start of that browser opened a "Chrome Safe Storage" keychain dialog. An agent running the command cannot answer the dialog, and a person sees one dialog per browser start. A full localpnpm teston a Mac with Chrome showed hundreds of these dialogs.Problem and solution fit
foundation/render/picture-chrome.mjsstarts the system Chrome with a fresh profile but without--use-mock-keychain(macOS) or--password-store=basic(Linux). So Chrome asks the OS secret store for its encryption key.Playwright passes the same two flags on every Chromium launch, so the Playwright path (
picture-playwright.mjs) never prompted. This change gives the system-Chrome path the same two flags.Expected behavior and authority
architecture:cli-surfaceINV1: the CLI never asks a question, and a non-TTY environment is the only supported condition.Smallest restoration
Two arguments added to the system Chrome's spawn in
picture-chrome.mjs. No other flag, option or output changes.Evidence
/Applications, each start of the picture browser opened the keychain dialog.picture-chrome.mjsdirectly against the same Chrome. The picture was taken, and noSecurityAgentprocess started. A fullpnpm testwith alog streamwatch on securityd's "displaying keychain prompt" messages logged no prompt from Chrome.picture-playwright.mjs) is not changed. It already passes both flags.foundation/render/picture-chrome.test.mjsstarts the script with a stand-in browser that records its arguments, so no real browser starts. It fails without the two flags (expected [ '--headless=new', …(21) ] to include '--use-mock-keychain') and passes with them.Scope
Components:
@astryxdesign/cli(foundation/render/picture-chrome.mjs)Testing
pnpm vitest run packages/cli/foundation/render/picture-chrome.test.mjs pnpm check:repo pnpm check:changesets pnpm review:pre --base upstream/main # 0 findings pnpm buildThe new test is skipped on Windows, because a
#!stand-in browser cannot run there. Chrome ignores both flags on Windows.