Skip to content

feat: add browse command - #176

Merged
yusukebe merged 1 commit into
nextfrom
feat/browse
Oct 15, 2026
Merged

yusukebe merged 1 commit into
nextfrom
feat/browse

Conversation

@yusukebe

Copy link
Copy Markdown
Member

HTTP checks miss client-side bugs. In a Void benchmark, no agent could check that a form clears after a submit, 1/5 apps in every condition shipped a delete that lands on /?delete, and agents reached for Chrome DevTools MCP or installed Playwright. hono browse loads the page in happy-dom, runs its JavaScript, and fills and clicks:

hono browse / --fill Title=milk --click 'button[type=submit]'
  • Every request the page makes goes to the app like request and batch (app.request(), Vite, or workerd). No server, no Chrome. Redirects are followed; another origin gets 403.
  • happy-dom is not a dependency. It resolves from the project, like vite, and is missing → HAPPY_DOM_NOT_FOUND. @babel/parser is loaded only by browse, so dist/cli.js stays the same size.
  • happy-dom misreads a regex literal after !, ||, ?, - or return in a module. browse rewrites regex literals to new RegExp() until it is fixed upstream (report drafted, not filed yet).
  • Vite's HMR client is replaced with a stub, since a one-shot run does not need HMR.

On the Void app it found both bugs: the form keeps its values after a submit, and the URL after a delete is /?delete. About 4 seconds a run. The experiment is in docs/agent-dx-log.md.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • pnpm run check:fix to format and lint the code
  • Add TSDoc/JSDoc to document the code

@yusukebe
yusukebe merged commit 881fd60 into next Oct 15, 2026
4 checks passed
@yusukebe
yusukebe deleted the feat/browse branch October 15, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant