Skip to content

v0.13.0

Choose a tag to compare

@github-actions github-actions released this 30 May 05:47
· 112 commits to main since this release
ea3e617

v0.13.0 β€” Record/replay parity

Three closely-related improvements to how saved specs behave under realistic conditions: UI drift, missing initial navigation, and dirty page state at record time. Each one was a real user complaint or a known sharp edge; together they close out the long-tail of "spec recorded green but failed on re-run because something I didn't think about."

Highlights

1. Visibility prelude in writeSpec emit (#57)

Every interaction step (click / dblclick / hover / fill / selectOption) is now wrapped in a block-scoped:

{
  const el = page.getByRole('button', { name: 'Save' });
  await expect(el).toBeVisible();
  await el.click();
}

instead of a bare await page.getByRole(...).click(). Closes a known gap that an external contributor pointed out on X: getByRole defaults to "visible OR attached", so a button that drifted into a closed <details> / kebab menu / drawer is still in the role tree β€” the locator stays green while the actual flow degraded. Playwright's actionability still catches the case via timeout, but with a generic "element not actionable" message after 30 s; the prelude makes the same case fail in ~3 s with a categorically clear Locator expected to be visible.

Same outcome. Faster + much clearer. The honest framing is in the updated FAQ.

2. Record mode emits page.goto as the first step (#60)

Pressing Record now captures window.location.href as a synthetic browser_navigate step, so the saved spec opens the right page before replaying clicks. Without this, a fresh Playwright run started on about:blank, getByRole(...) resolved to nothing, and the first interaction timed out with element(s) not found. Looked like a Hover bug β€” was really a missing initial goto. Agent-driven sessions never hit this because the agent calls browser_navigate itself; only manual Record needed the synthetic step.

3. "Reload before recording" setting (#61)

New opt-in setting in the widget Settings overlay (default off). When enabled, pressing Record shows a confirm() dialog; on OK the page reloads via a sessionStorage flag and the widget auto-resumes into recording mode.

Closes the symmetric gap to the page.goto fix above: replay always starts from a fresh page load (because page.goto is the first step), but a recording captured from a page with accumulated state β€” logged-in, filled forms β€” can't be reproduced from that fresh load. Users who want strict record/replay parity flip the switch; the default stays off because the common "I logged in, now record the post-login flow" case shouldn't force re-login.

Supporting work

  • Visibility-drift lab in examples/basic-app (#59) β€” ?drift=on URL toggle with three buttons hidden three different idiomatic ways (closed <details>, display: none, visibility: hidden). Paired specs __vibe_tests__/visibility-prelude.spec.ts (NEW emit) and visibility-prelude-old-emit.spec.ts (pre-v0.13 emit) demonstrate the speed + clarity gap side by side.
  • Honest framing in FAQ (#58) β€” the first draft of the prelude FAQ overclaimed ("catches drift Playwright wouldn't"). External reviewer correctly pointed out actionability already catches it, just slowly. Rewrite makes the speed + clarity contribution explicit.
  • 9 new vitest cases in packages/core/tests/specs/writeSpec.test.ts covering the prelude β€” one per element-targeting tool plus three negative cases (no prelude for browser_navigate / browser_press_key, multi-field forms emit one prelude per field, chained interactions don't collide on const el).

Install

npx @hover-dev/cli@latest add        # one command, picks the right shim
# or directly:
pnpm add -D vite-plugin-hover        # Vite
pnpm add -D @hover-dev/astro         # Astro
pnpm add -D @hover-dev/nuxt          # Nuxt
pnpm add -D @hover-dev/next          # Next.js (Turbopack default + webpack)
pnpm add -D webpack-plugin-hover     # webpack 5 / Rspack / Rsbuild

What's next

v0.14 is being scoped β€” likely a sibling repo for the Chrome extension (drops the bundler-plugin dependency so Hover can drive any tab β€” staging URLs, third-party sites β€” at the cost of source attribution). Tracking in the roadmap.


Full PR list

Full Changelog: v0.12.0...v0.13.0