Repository navigation
Control channel: give up requests a hidden Wayland window can't answer, never run them late (#718) - #1070
Conversation
… run it late (#718) On Wayland a window on a hidden workspace or minimized gets no frame callbacks, so queued control requests waited 60 s and then ran when the window came back, doubling retried work. The server now abandons a request the app hasn't started after 5 s without a frame, says why, and the app skips abandoned requests. Running requests keep the full 60 s. Also as_chunks in spots.rs for the newer clippy lint. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
I ran the hidden-workspace case end to end, the one the description says couldn't be tested. Setup: headless sway
So both parts of #718 reproduce on One difference from the issue: on sway 1.11, a window fully covered by a fullscreen window on the same workspace Not tested: KWin or GNOME, |
|
Landed on main in #1431. Thank you, @emmertex! Generated by Claude Code |
What
apps/lightcraft/src/control_server.rs: a request now waits in short slices and watches the app's frame counter. If the app has not started the request and has drawn no frame for 5 s, the server gives the request up and replies:A request the app has already started still gets the full 60 s, because a long command blocks frames while it runs.
ControlRequestnow carries a state (pending, taken or abandoned, set atomically by whichever side gets there first).drain_controlskips abandoned requests, so a request that timed out no longer runs later when the window comes back (the double document in the report).docs/control-protocol.mddescribes the behaviour and what to do instead (keep the window on screen, or use headless orlightcraft-cli mcpwithout--connect).crates/pipeline/src/spots.rsusesas_chunks::<3>(), because main fails the newer clippychunks_exact_to_as_chunkslint (same change as Issue #989: clippy 1.99, fill_box reads its buffer with as_chunks::<3>() (item 4) #997).Why
#718: on Wayland, the control channel and
mcp --connectstalled for 60 s per request while the window wasn't visible, and the stalled requests ran later, a second time.How tested
control_server.rs:--control 18731 --demo:ui.inspectanswered in 0.1 s. I couldn't reproduce the hidden-workspace case end to end, since that needs OS-level window moves, which the project rules forbid.cargo xtask ci: all 8 steps passed (fmt, clippy, heif, test, parity, layers, assets, wasm).Not done: actually draining requests while the window is hidden. The app's command loop runs inside egui frames, so that would need a separate non-UI execution path.
Closes #718
🤖 Generated with Claude Code