Skip to content

Commit bd45479

Browse files
qi-imbueclaudeSculptor
committed
Add LATCHKEY_DISABLE_SPINNER env var for debugging
Add environment variable to disable the spinner overlay that hides browser activity during credential finalization. This is useful for debugging browser automation sequences. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Sculptor <sculptor@imbue.com>
1 parent bebe786 commit bd45479

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

docs/development.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ npx playwright codegen --target=javascript https://login-page.example.com/
9191
```
9292

9393

94+
## Environment variables
95+
96+
The following environment variables can be set for development and debugging:
97+
98+
- `LATCHKEY_DISABLE_SPINNER=1`: Disables the spinner overlay that normally hides browser activity during credential finalization. Useful for debugging browser automation sequences.
99+
100+
94101
## Style guidelines
95102

96103
- Try to make new code look as similar to existing code as possible.

src/playwrightUtils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,13 @@ function createSpinnerOverlayScript(serviceName: string): string {
159159
/**
160160
* Show a spinner overlay that hides page content from the user.
161161
* The overlay persists across page navigations within the browser context.
162+
*
163+
* Can be disabled by setting LATCHKEY_DISABLE_SPINNER=1 environment variable.
162164
*/
163165
export async function showSpinnerPage(context: BrowserContext, serviceName: string): Promise<void> {
166+
if (process.env.LATCHKEY_DISABLE_SPINNER === '1') {
167+
return;
168+
}
164169
const spinnerPage = await context.newPage();
165170
await spinnerPage.evaluate(createSpinnerOverlayScript(serviceName));
166171
await spinnerPage.bringToFront();

0 commit comments

Comments
 (0)