Conversation
…g checks Brings the library to parity with the human_emulate_media MCP tool added in #112. A primitive available to agents but not to library users is a half-feature, and this is the direction CLAUDE.md asks the surfaces to stay aligned in. The reduced-motion branch is the motivating case: it cannot be exercised without changing an OS setting, so it ships unverified even where it was written carefully -- and it fails silently, because the users who depend on it are the least likely to report it. Documented under its own README section rather than in the Primitives table, which covers humanized actions; this is configuration, like setViewportSize and pdf.
|
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.
Answers one of the open questions from the last batch:
human_emulate_mediashipped as an MCP tool in #112, but library users had no equivalent. A primitive that agents can reach and library users cannot is a half-feature split across the two adapters, which is exactly whatCLAUDE.mdasks us to avoid.Covers
prefers-reduced-motion,prefers-color-scheme,forced-colors,prefers-contrastand print media.nullstops emulating a feature and falls back to the host setting.Why reduced motion is the case worth naming
It cannot be exercised without changing an OS setting, so it tends to ship unverified even in projects that wrote it deliberately. And it fails quietly: the people who depend on it are the least likely to file a bug about it. One line now checks it.
Placement
Implemented as a straight pass-through alongside
setViewportSize,waitForURLandpdf— no plugin events, unaffected byspeed. Documented in its own README section rather than the Primitives table, since that table is for humanized actions.CLAUDE.md's public-API block is deliberately left alone: it lists humanized primitives, andsetViewportSizeandpdfare absent from it for the same reason.Follow-up
human_emulate_mediain@humanjs/mcpcurrently callspage.emulateMediadirectly, matching the other inspection tools. Once #112 and this both land, it can route throughhuman.emulateMediainstead. Left out here so the two PRs stay independently reviewable and mergeable in either order.Verification
4 new tests (114 in
@humanjs/playwright).lint,typecheck(10/10),test(9/9),build(7/7),check:exports(13/13) all pass.