base red: webviews vp lint warning in reconnectPrompt.test.ts

LA
7d ago
+1-2

Summary

Fixes TIP RED item 1027 (tip watcher): web-lint is red on feat-cmux-next since 7bda8ef95ecb, "webviews: vp lint (exit 1): Found 1 warning and 0 errors". The webviews check fails on a warning.

The warning is oxlint typescript(no-this-alias) at webviews/src/agent-session/acpmux/reconnectPrompt.test.ts:49 (first = this; in the Silent socket's constructor), added by the direct push 7bda8ef95ec. The fix removes the alias: the socket factory keeps the instance it makes, () => (first = new Silent()) as unknown as WebSocket. Nothing reads first before the factory returns, so the test's behavior is the same. No disable comment.

This is a base-red fix and may merge alone on the red tip.

Check

bunx vp lint in webviews/ (part of bun run check, which scripts/web-lint.sh and the web-lint job run).

  • Base 7bda8ef95ecb: src/agent-session/acpmux/reconnectPrompt.test.ts:49:7: warning typescript(no-this-alias): Unexpected aliasing of 'this' to local variable., exit 1.
  • Head (rebased on bde9b7628485): exit 0, no warnings.

Changelog

none

Observed / Not run

Observed (Linux VM, webviews/): bunx vp lint red on the base file and green on the head; bun run check exit 0 (fmt, lint, type check, protocol check); bun test src/agent-session/acpmux/reconnectPrompt.test.ts 1 pass; scripts/web-lint.sh passed; python3 scripts/cmux-next/prepush-gate.py no new violations.

Not run: no Swift or Rust build or test (the change is one webviews test file); no app build.