-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Problem
Some apps require authentication before any page can be recorded — password-gated staging environments, login-required apps, etc. Currently there's no first-class way to pre-authenticate the Playwright browser context before the LLM-generated demo script runs.
Workarounds today:
- Pass a
hintto the LLM describing how to log in (fragile — depends on the LLM generating correct auth code) - Bake auth into a custom
startCommandpre-script (complex, non-obvious)
Desired behaviour
A config option that lets users provide either:
Option A — storageState path: Load a saved Playwright browser storage state (cookies + localStorage) before running the demo. The user generates this file once (e.g. via a setup script or separately) and commits it or produces it in CI.
app: {
storageState: '.auth/state.json', // loaded into every Playwright context
}Option B — beforeDemo hook: A path to a TypeScript file exporting an async setup(page) function that runs before the generated demo script. The user can handle login, cookie injection, etc.
app: {
beforeDemo: './scripts/glimpse-setup.ts',
}Notes
- Option A is lower friction for simple cookie-based auth (e.g. Shopify dev store password gate)
- Option B is more flexible but requires more from the user
- Both could coexist —
storageStatefor simple cases,beforeDemofor complex ones - TBD: decide which option(s) to implement based on demand