Repository navigation
fix(cli): the picture browser no longer asks the system keychain - #14252
dante01yoon wants to merge 1 commit into
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 pending CI: CI has not run on this head yet, so a maintainer needs to add the ci:run label for it to run.
The two switches bring the system-Chrome picture path back in line with the CLI's no-prompt rule, and your new stand-in-browser test fails without them and passes with them (reproduced locally). No changes are requested.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Title, the picture browser no longer asks the system keychain: verified for what the CLI passes (the new test, run locally, fails on the base and passes here, 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, 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
offline.mjs:40-56). - 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 1.61.1, whose default Chromium switches include both, with
picture-playwright.mjs:46-49keeping the defaults; "never prompted" is reported. - The CLI never asks a question: matches the CLI surface record's first invariant.
- Only two arguments are added, and no other flag, option or output changes: verified (
picture-chrome.mjs:58-59is the only production change). - 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, fails without the switches with the quoted message and passes with them: verified, reproduced locally with the same message.
- Scope is the CLI's Chrome picture script only, with no tagalong, no new public API or default, and no internal context: verified.
- Testing commands: reported; locally the new test, eslint on both changed code files, the changeset check, the CLI structure check and the public text check pass.
- The test skips on Windows because a
#!stand-in cannot run there: verified (picture-chrome.test.mjs:50); Chrome ignoring both switches on Windows is reported. - Changeset, the export's installed Chrome or Chromium no longer asks the macOS keychain or the Linux password store: 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.
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.