Add an App-level event harness for felis-client window lifecycle tests #150
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#150
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What was found
felis-client'sAppcannot be built in a unit test: it holds anEventLoopProxy<AppEvent>, which only a winitEventLoopproduces, andbuilding one needs a display server. Every event handler also takes
&ActiveEventLoop. So the whole window state machine(
crates/felis-client/src/event_handler.rs,crates/felis-client/src/app_methods.rs) is reachable only through freefunctions and the state enums beside it; there is no test that drives an
ordered sequence of
AppEvents into a window.Three behaviors #22 landed have no regression test for exactly this
reason:
applied before the window closes"): the pump forwards
Gridframesand
SessionExitedin order andApp::user_eventapplies them inthat order, but nothing pins it. The test that claimed to
(
the_rows_queued_ahead_of_the_exit_are_the_ones_the_window_closes_on)only exercised
ShadowScreen::applyand was removed rather than leftoverclaiming.
Region::Requestcleared bybegin_reconnectand bycontinue_exit_ladder, asserted throughApp::is_busy().ClosedOutcome::AwaitSwitchstartingthe reconnect ladder once the in-flight landing fails.
Why it is out of scope for #22
#22's deliverable is the lifecycle behavior itself. A harness that can
drive
Appmeans either a headless winit event loop in CI (a new CIdependency and a per-platform question) or extracting the handlers from
the winit types — a refactor of the densest module in the client, with
its own design. Neither fits inside the issue's budget, and both would
land under the release freeze for reasons unrelated to the freeze.
What the follow-up should do
Pick one of the two shapes above, then port the three cases listed
above onto it: a stub pump delivering
RowDelta,RowDelta,SessionExited; a pipe request in flight through both thetransport-loss and shell-exit paths, asserting
is_busy()clears; and aclose during an in-flight switch whose landing then fails, asserting the
reconnect ladder starts.
Split from #22.