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
hint to the LLM describing how to log in (fragile — depends on the LLM generating correct auth code)
- Bake auth into a custom
startCommand pre-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 —
storageState for simple cases, beforeDemo for complex ones
- TBD: decide which option(s) to implement based on demand
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:
hintto the LLM describing how to log in (fragile — depends on the LLM generating correct auth code)startCommandpre-script (complex, non-obvious)Desired behaviour
A config option that lets users provide either:
Option A —
storageStatepath: Load a saved Playwright browser storage state (cookies + localStorage) before running the demo. The user generates this file once (e.g. via asetupscript or separately) and commits it or produces it in CI.Option B —
beforeDemohook: A path to a TypeScript file exporting an asyncsetup(page)function that runs before the generated demo script. The user can handle login, cookie injection, etc.Notes
storageStatefor simple cases,beforeDemofor complex ones