InputMsg::Resize is still sent flat, so the gateway drops every resize report #4
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?
Found by cross-checking the
felis-broker.v1JSON contract betweenfelis-web-gateway
follow-felis-105b0899(577138be) and this repo'sfollow-felis-105b0899(edfb8dfa). Both pin felis105b089979369fd310757375af3df7900ae7e523.The mismatch
felis moved
InputMsg::Resize's four loose axes behind adimsfield in thewire reset.
crates/felis-protocol/src/messages/input.rs:RequestedDimsis{rows: u32, cols: u32, pixel_w: u32, pixel_h: u32}, andInputMsgis externally tagged with no serde attributes, so the wire JSON is{"Resize":{"dims":{"rows":…,"cols":…,"pixel_w":…,"pixel_h":…}}}.This component still emits the pre-reset flat shape —
web/felis-terminal.ts:1287:serde_jsonrejects that asmissing field \dims``.Why it breaks a live session
Neither gateway path forwards it, and neither reports the failure to the page:
src/broker.rsparse_client_textdecodes theinputfield withserde_json::from_value::<InputMsg>and returnsErr("bad InputMsg: …");the socket loop's
Errarm only doeseprintln!("dropping unparseable broker message: {err}").src/main.rsdrops anything that does not parse asan
InputMsg, by the same rule stated in its module doc.So every
sendResizethis component makes is silently discarded:(
web/felis-terminal.ts:2714, inconnect) never lands, so the daemonnever learns the renderer's cell pixel metrics.
ws_xpixel/ws_ypixelstay0, which is exactly the case
sendResize's own comment says Kitty-graphicsproducers (yazi's
Dimension::ratio()) need — images scale off a guessedcell size.
resize="fit"is inert end to end:scheduleFit→sendResize(
web/felis-terminal.ts:1311) is dropped, so rotating a phone or resizingthe window never reflows the shell. The element letterboxes against a grid
the daemon never resized.
Fix
Wrap the payload:
There is nothing to change on the gateway: it forwards a decoded
InputMsgverbatim, and
docs/broker.md/src/main.rs's module doc already name the{"Resize":{"dims":{..}}}shape.Not covered by a test
tests/apply.rscovers the daemon→client direction only; the input encoderslive in TypeScript and nothing exercises
sendResizeagainst a real decoder.The follow commit (
edfb8dfa) rewrote the removedSearch/CaptureRegionsenders but left this one.