experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs(v1-removal-plan): note partial Phase 2 progress and bare-Electron reproducer next

+10
+10
docs/v1-removal-plan.md
··· 71 71 72 72 If the unit test reproduces the failure, fix it in product code. If the unit test passes but Playwright still fails, the bug is in something specific to how Playwright launches Electron / how the test fixture interacts with the cmd/hud/page renderers. 73 73 74 + ##### Status (2026-04-18) 75 + 76 + **Partial progress** — landed in commit `745af1f5`: 77 + - `ensureTileIpcHandlers()` exported from `tile-compat.ts` and called at top of `main.ts::initialize()` so the `tile:*` IPC handlers exist before ANY BrowserWindow is created (was lazy-registered from `loadV2Tile()` previously). 78 + - Failing reproducer test at `tests/desktop/v2-pubsub-reproducer.spec.ts` — cmd publishes `repro:v2-v2-hello` GLOBAL, hud subscribes. Both report `published: true` / `subscribed: true`, but hud never receives. Documents the bug as a regression test. 79 + 80 + **Next probe needed:** something IPC-based or main-process-side that confirms whether `ipcRenderer.send('tile:pubsub:publish')` from cmd's tile-preload actually reaches the main-process handler. Window-level probes from preload don't reach the test's main-world `evaluate` (`contextIsolation` blocks them). File-based probes from main-process work but require running tests from the correct cwd (`/Users/dietrich/misc/mpeek`, not an agent worktree — yarn/tsc respects cwd). 81 + 82 + **Next angle to try (recommended):** build a bare-bones standalone Electron app (NOT Peek) — `main.ts` + `preload.cjs` + two HTML pages — that does the same v2-style flow: renderer A publishes via `ipcRenderer.send` → main `ipcMain.on` handler → broadcast via `webContents.send` → renderer B's `ipcRenderer.on` fires. If the standalone repro works, the bug is in Peek's specific orchestration (interaction with `extensionHostWindow`, capability tokens, multiple windows on the same `peek://` protocol, etc.). If it fails the same way, the bug is fundamental to the pattern and we have a 200-line reproducer to ship to Electron upstream or fix in our IPC plumbing. 83 + 74 84 #### Next attempt — Option A2: keep test fixture out of v1 cleanup 75 85 76 86 Phase 3 can proceed *almost* fully: delete `loadExtInHost` for cmd/hud/page (already done in Phase 1), delete the legacy IPC channels NOT used by the test fixture, but **preserve** `extensionHostWindow` + `IPC_CHANNELS.SUBSCRIBE/PUBLISH` + `app/background.html` solely as the test fixture path. Defer Phase 4 until the test fixture is migrated. Cost: a sliver of v1 plumbing stays. Benefit: unblocks the rest of cleanup, isolates the test-fixture problem.