From 566e19d4eabcd913e31e067871bbc5f8b8215833 Mon Sep 17 00:00:00 2001 From: 0thernet <894119+0thernet@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:50:15 -0400 Subject: [PATCH 1/2] docs: compare Direct with Playwright built-ins, MSW, and Storybook The When to use Direct section compared Direct only with browser drivers. A dated table now names the tools people weigh for repeatable app states, what each replaces, the app changes it needs, and when each is the better choice, including the cases where Direct is not. Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 5ee03ba..31f6b81 100644 --- a/README.md +++ b/README.md @@ -655,6 +655,15 @@ You can read the same results through the TypeScript package, or from the page i [agent-browser]() gives coding agents a compact command-line interface for opening pages, reading accessibility snapshots, and interacting with elements. Playwright and other browser drivers do the same job with different APIs. Direct doesn't drive the browser; it hands the browser tool a known page state to start from. +Other tools already cover many fast-setup cases (checked 2026-09-28): + +| Tool | What it replaces | App changes | Best when | +| --- | --- | --- | --- | +| Playwright [route mocking](https://playwright.dev/docs/mock), [saved auth state](https://playwright.dev/docs/auth), and [clock](https://playwright.dev/docs/clock) | Network responses, sign-in, and the browser clock | None | Those already reach the state quickly | +| [Mock Service Worker](https://mswjs.io) | HTTP and GraphQL responses, in the browser or Node | A worker file and a start call in development | Network responses are the only setup to replace | +| [Storybook](https://storybook.js.org) | A component's props and context | One story per state | The subject is one component, not the whole app | +| Direct | Product-owned ports such as sign-in, records, device permissions, native modules, and model calls | A small port for each replaced system | Setup sits below the network or in native code, and the agent needs a named app state with a readiness signal | + - Use browser automation alone when the state you need is already quick to reach, or when the live backend and browser assembly are part of the check. - Pair Direct with agent-browser or Playwright when setup and reset dominate the loop: repeated sign-in, slow seed requests, empty or error states that are hard to create, native modules that aren't available, paid model calls, or device permissions that automation can't reset cleanly. - Use unit or component tests when the subject is isolated logic or rendering that doesn't need the full app. From e78b9816f407637d5a28a54efe3ab7e6843ddebc Mon Sep 17 00:00:00 2001 From: 0thernet <894119+0thernet@users.noreply.github.com> Date: Mon, 28 Sep 2026 16:27:07 -0400 Subject: [PATCH 2/2] docs: note that MSW needs a worker file only in the browser Mock Service Worker in Node starts with a setup call and no worker file, so the comparison row now says the worker file applies to the browser. Co-Authored-By: Claude Opus 5.5 (1M context) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 31f6b81..c5728eb 100644 --- a/README.md +++ b/README.md @@ -660,7 +660,7 @@ Other tools already cover many fast-setup cases (checked 2026-09-28): | Tool | What it replaces | App changes | Best when | | --- | --- | --- | --- | | Playwright [route mocking](https://playwright.dev/docs/mock), [saved auth state](https://playwright.dev/docs/auth), and [clock](https://playwright.dev/docs/clock) | Network responses, sign-in, and the browser clock | None | Those already reach the state quickly | -| [Mock Service Worker](https://mswjs.io) | HTTP and GraphQL responses, in the browser or Node | A worker file and a start call in development | Network responses are the only setup to replace | +| [Mock Service Worker](https://mswjs.io) | HTTP and GraphQL responses, in the browser or Node | A start call in development, plus a worker file in the browser | Network responses are the only setup to replace | | [Storybook](https://storybook.js.org) | A component's props and context | One story per state | The subject is one component, not the whole app | | Direct | Product-owned ports such as sign-in, records, device permissions, native modules, and model calls | A small port for each replaced system | Setup sits below the network or in native code, and the agent needs a named app state with a readiness signal |