Skip to content

feat(recording): rig improvements for Tranche 2 demo - #82

Merged
AquiGorka merged 6 commits into
mainfrom
feat/recording-rig-improvements
May 5, 2026
Merged

feat(recording): rig improvements for Tranche 2 demo#82
AquiGorka merged 6 commits into
mainfrom
feat/recording-rig-improvements

Conversation

@AquiGorka

Copy link
Copy Markdown
Contributor

Summary

  • Click-highlight overlay (fixtures/click-highlight.ts): pre-click telegraph ring so the viewer's eye lands on the target before the click fires
  • Windowed mode + 80% zoom (contexts.ts, wallet-context.ts): drop --start-fullscreen (creates new macOS Space) for --start-maximized + explicit window-size; pages stay on the recording desktop
  • Browser-wallet polish: bringToFront() on every helper, balance-gated deposit/withdraw, new closeReceiveConfirmation so Bob's home view is visible while the transfer settles
  • Spec 03 consolidation: 03a/b/c merged into a single 03-private-transfer.spec.ts that runs Bob + Alice in one continuous flow
  • Spec polish: rename "Moonlight Demo Council" → "Moonlight Demo", wire click-highlight into specs 01/02, drop hardcoded dimensions in spec 04
  • setup-recording-keys.sh: now runs down.sh + up.sh first so each recording starts from an empty stack (skip with SKIP_STACK_RESET=1)

Test plan

  • bash recording/setup-recording-keys.sh resets stack and provisions keys
  • All 4 specs (01/02/03/04) pass against the local stack
  • Windows spawn on the current macOS desktop (no new Space)
  • Click-highlight ring is visible during recording

@AquiGorka
AquiGorka force-pushed the feat/recording-rig-improvements branch from 28e49d2 to 0c2bcf5 Compare May 5, 2026 15:04
@AquiGorka
AquiGorka merged commit 12c56d3 into main May 5, 2026
6 checks passed
@AquiGorka
AquiGorka deleted the feat/recording-rig-improvements branch May 5, 2026 15:09
AquiGorka added a commit that referenced this pull request May 6, 2026
Run the existing reusable invite-gate workflow on every local-dev PR with
local_dev_ref pointed at the PR head. Catches regressions in shared playwright
fixtures, docker-compose.invite-gate.yml, the test-runner image, etc. before
they reach consumer repos. PR #82's contexts.ts breakage would have failed CI
here on its own PR instead of on every cc/mp/pc PR opened afterwards.

The reusable workflow's local-dev checkout ref was hardcoded to main; now
parameterized via the new local_dev_ref input (defaults to main, so existing
consumer-repo callers are unchanged).
AquiGorka added a commit that referenced this pull request May 6, 2026
…ate local-dev PRs on invite-gate spec (#85)

## Summary

Two related changes:

1. **Fix the regression** — restore CI-safe defaults in the shared
`playwright/fixtures/contexts.ts`; push recording-only overrides to the
recording specs.
2. **Prevent recurrence** — gate local-dev PRs on the invite-gate spec
so this failure class is caught at the source.

## 1. The regression

PR #82 ([`feat(recording): rig improvements for Tranche 2
demo`](#82)) added
macOS-specific browser launch args + `viewport: null` + 80% page zoom
directly into the **shared** `playwright/fixtures/contexts.ts`. That
file is also imported by the invite-gate playwright spec, which runs in
CI Docker xvfb at `1280x960`.

The `--window-size=1728,1080` override (larger than the xvfb display)
causes Chromium's GPU process to fail initialization in CI:

```
TimeoutError: browserType.launch: Timeout 180000ms exceeded.
[err] [...:ERROR:components/viz/service/main/viz_main_impl.cc:189]
       Exiting GPU process due to errors during initialization
```

This has broken every council-console / moonlight-pay / provider-console
PR opened since 2026-05-05 (PR #82's merge). Recording itself was
unaffected because it runs on macOS host with a real display.

### Fix (commit 1)

- **`playwright/fixtures/contexts.ts`**: restore CI-safe defaults (no
`--start-maximized`, no `--window-size`, viewport `1280x800`, no zoom).
Add a third `options` parameter (`CreateUserContextOptions`) for
per-call overrides.
- **`recording/playwright/fixtures/recording-context.ts`** (new):
exports `RECORDING_CONTEXT_OPTIONS` with the recording-host args +
`viewport: null` + `applyZoom: true`.
- **`recording/playwright/specs/01-council-onboard.spec.ts`** +
**`02-provider-create-join-approve.spec.ts`**: pass
`RECORDING_CONTEXT_OPTIONS` to `createUserContext`.

`invite-gate.spec.ts` and `full-flow.spec.ts` are unchanged — they call
`createUserContext` without overrides and now get the CI-safe shape.

## 2. Why local-dev's own CI didn't catch it

The invite-gate spec only runs from consumer-repo PRs via the reusable
workflow (`invite-gate-reusable.yml`), and that workflow's local-dev
checkout was hardcoded to `main`. local-dev's own E2E pipeline runs the
`e2e/` Docker stack, not playwright. PR #82 went green on local-dev CI
while silently breaking every downstream PR.

### Fix (commit 2)

- **`invite-gate-reusable.yml`**: new `local_dev_ref` input (defaults to
`main`, so existing consumer-repo callers are unchanged).
- **`.github/workflows/invite-gate.yml`** (new): triggers on local-dev
PRs and calls the reusable with `local_dev_ref: ${{ github.head_ref }}`.
PR #82-class regressions now fail CI here on the source PR.

Trade-off: adds ~8 min to every local-dev PR run, plus playwright flake
risk. Worth it given recent infra churn (PRs #82, #83, #84 all touched
test infra in 10 days).

## Test plan

- [ ] After merge, re-run the four open hardening PRs on the consumer
repos (council-console #34, moonlight-pay #26, provider-console #25,
network-dashboard #11) and confirm `invite-gate / invite-gate` goes
green.
- [ ] This PR's own `Invite Gate` CI run (newly added) should pass.
- [ ] Run a recording spec locally (`bash
recording/setup-recording-keys.sh` + `npx playwright test
--config=recording/playwright/playwright.config.ts`) and confirm
Chromium still launches maximized with 80% zoom and click-highlight
intact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant