Broker roster rows drop exited / last_exit_code, so a tab picker cannot tell a corpse from a live shell #7
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).Lower severity than the other two cross-check findings: it does not break a
live session — it makes a dead one indistinguishable from a live one.
The mismatch
felis's
SessionInfogrew the post-exit grace fields(
crates/felis-protocol/src/messages/ops.rs):The gateway puts both on every roster row —
src/broker.rssession_info_json, covered by itssession_info_json_reports_the_post_exit_gracetest — anddocs/broker.mdstates the row contract as
with the reason spelled out: "a picker that does not read
exitedcannot tellsuch a row from a working shell."
This component's decoder drops both.
web/felis-broker.ts,SessionEntryandtoEntry, end atforeground— there is noexited/lastExitCodefield,so
web/mobile.html's tab restore has no way to see them.Consequence
Restoring tabs after a reload attaches to a session whose shell is gone and
shows it as an ordinary tab: the final screen paints, keystrokes go nowhere,
and the tab dies whenever the grace expires. The gateway attaches deliberately
precisely so this is possible; reading
exitedis how a picker labels it.Also stale in the same type
SessionEntry.idleSeconds's doc comment still says "Seconds detached; 0 whilesome client is attached." felis now returns
Nonewhile attached — thegateway forwards it as JSON
null, andSome(0)means "detached for under asecond".
toEntryalready maps it correctly (typeof … === "number" ? … : null); only the comment is wrong, and it is the comment an app reads whendeciding what
0means.Fix
Add
exited: booleanandlastExitCode: number | nulltoSessionEntryandtoEntry, correct theidleSecondscomment, and haveweb/mobile.htmlmarkan exited row rather than presenting it as a live shell.