Conversation
--viewport now takes a list. The command runs once per size with the size appended to each output filename, so checking desktop and phone is one invocation instead of two a person has to keep in sync -- which is exactly what someone using the MCP server was doing by hand. Suffixing happens before the extension, and .spec.ts is treated as the two-part extension it is. path.extname sees only .ts there, which would produce flow.spec-390x844.ts and silently demote a Playwright test into a standalone script. Also: demo printed nothing when not recording, which reads as though it never ran -- especially headless, where there was no window to watch.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully 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.
--viewportnow takes a list and the command runs once per size. It applies to every command, so a responsive regression check is one line:This is not hypothetical. The session that produced the original MCP feedback was verifying a landing page at 1440×900 and 390×844 by running everything twice and keeping the two invocations in sync by hand.
The filename detail that would have bitten
Suffixing goes before the extension, and
.spec.tsis treated as the two-part extension it is:path.extnamewould givetour.giftour-390x844.gifflow.spec.tsflow-390x844.spec.tsflow.spec-390x844.ts✗The wrong one is not a cosmetic problem —
.spec-390x844.tsno longer ends in.spec.ts, so the file stops being recognised as a Playwright test and silently becomes a standalone script.suffixFilenamereuses the same suffix listresolveRecordFormatmatches on, so the two cannot drift apart, and there is a test for each.Single-size behaviour is untouched
One viewport is the overwhelmingly common case and looks exactly as it did: no
── size ──banner, and the output keeps the exact filename requested. The suffix only appears when there is more than one size to disambiguate.Also:
demowas silentRun without
--record, it printed nothing at all — which reads as though it never ran, especially headless where there was no window to watch either. It now closes withtoured https://example.com at 800×600 in 11.2s.Verification
112 unit tests in
@humanjs/cli(was 95): list parsing, duplicate collapsing, whole-list rejection on one bad entry,options.viewportstill pointing at the first size for single-size callers, and suffixing across every supported extension including both two-part ones.End to end: the sweep above wrote
sweep-1440x900.gif(98 KB) andsweep-390x844.gif(84 KB) under per-size banners; a single--viewport 800x600printed the new summary line with no banner and no suffix.Whole suite:
lint,typecheck(11/11),test(10/10),build(8/8),check:exports(15/15).