diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-28 10:12:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-28 10:30:44 -0300 |
| commit | 7df45a1586568476fb7f3fc5ffe8d644bbe13c93 (patch) | |
| tree | e7a602ee30ae432d99a602b065b2d411fb6e8312 /src/web | |
| parent | 337c2c66f40a08b67aa7ce4c73d01c335b9ae829 (diff) | |
| download | pardes-7df45a1586568476fb7f3fc5ffe8d644bbe13c93.tar.gz pardes-7df45a1586568476fb7f3fc5ffe8d644bbe13c93.zip | |
gui: the headless grid host keeps the core's own clipboard, so paste works there
`Shell.host()` hands the headless `PARDES_TEST_GRID` harness `grid_vtable`, which
inherited `push_set_clipboard` and `pull_read_clipboard` from the windowed
vtable. Both of those functions opened with `if (s.gui == null) return;` — and
in grid mode `s.gui` is null by definition, so the pair were methods that could
never answer. host.zig says what a NULL method means in as many words: "Null
answers immediately from the in-process clipboard instead, so a request never
goes unanswered." A method present and mute is the one case that contract does
not cover: `SPC y` went nowhere and `SPC p` waited for a reply nobody was going
to send, so paste was dead in the only mode of this shell a test can drive —
which is also why the SDL shell's clipboard had no coverage at all.
Null them, and the grid harness runs on the same in-process clipboard
`pardes-isolate` does. The two SDL functions then have no reachable
`gui == null` path left, so the dead guards go with them.
The regression is the round trip through the real seam: build the Shell the
harness builds, take the host off `Shell.host()`, assert it picked
`grid_vtable`, then `SPC y` and `SPC p` and check the bytes came back. It fails
on the old vtable at `clip_pending == null` — the paste that never arrived.
Verified end to end as well: `PARDES_TEST_GRID` with `x`, `SPC y`, `SPC p`
duplicates the line and marks the buffer dirty; the shipped binary does
nothing. The windowed shell is unchanged and still reads the desktop
clipboard (checked on wayland and x11, keys injected at evdev level, against
a real focused window).
Diffstat (limited to 'src/web')
0 files changed, 0 insertions, 0 deletions
