Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ npx playwright codegen --target=javascript https://login-page.example.com/
```


## Environment variables

The following environment variables can be set for development and debugging:

- `LATCHKEY_DISABLE_SPINNER=1`: Disables the spinner overlay that normally hides browser activity during credential finalization. Useful for debugging browser automation sequences.


## Style guidelines

- Try to make new code look as similar to existing code as possible.
Expand Down
5 changes: 5 additions & 0 deletions src/playwrightUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,13 @@ function createSpinnerOverlayScript(serviceName: string): string {
/**
* Show a spinner overlay that hides page content from the user.
* The overlay persists across page navigations within the browser context.
*
* Can be disabled by setting LATCHKEY_DISABLE_SPINNER=1 environment variable.
*/
export async function showSpinnerPage(context: BrowserContext, serviceName: string): Promise<void> {
if (process.env.LATCHKEY_DISABLE_SPINNER === '1') {
return;
}
const spinnerPage = await context.newPage();
await spinnerPage.evaluate(createSpinnerOverlayScript(serviceName));
await spinnerPage.bringToFront();
Expand Down