Files
VoelinClient/docs
faumarayandClaude Sonnet 5.5 efc7db57a3 voelin-gpui: closing the window gives the engine time to send the session closes
The window's close sends CloseSession for every session (AppState::shutdown)
and ended the app straight into runtime.shutdown_timeout(2 s), which waits for
blocking tasks only and drops the engine's async tasks: the commands could go
with the runtime and leave ghost clients on the servers until they time out.
voelin-ui sleeps 500 ms in that case before shutting its runtime down
(app.rs after ui.run()); run() does the same now. shutdown() returns how many
sessions it told the engine to close, the close handler keeps that number for
run() (the App and its entities are gone once GPUI's loop has returned), and
run() waits CLOSE_GRACE only when it is not zero. A comment in run() tells the
slices that add another way to end the app to call shutdown() too.

The GPUI window cannot open a session in this slice, so the wait is not seen
end to end; the tests pin the count: with an engine a state holding a session
answers 1 and a state with none 0, without an engine 0.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 09:42:10 +03:00
..
2026-10-04 19:15:42 +03:00
2026-10-04 19:11:37 +03:00
2026-10-14 15:01:24 +03:00