Learn the family route's absence per connection where the data layer
already invalidates on disconnect. server.connected is delivered after
the connection reports connected, so route effects started family reads
before the old reset and kept using the fallback after reconnecting to
an upgraded server.
Key family membership by the client's own root. The server roots a
family whose top names a missing parent at the top, while resolveRoot
walks to the missing ID, so such a family read showed no members and
dropped its journaled events.
A fallback read invalidated in flight no longer starts member reads that
could complete with pre-reconnect data. Metadata updates and permission
replies now go through the journal, so an in-flight read cannot undo
them, and metadata updates raise time.updated like the projector does.
Test fixtures drop status values that were only needed while status was
required, and the TUI fixture's family route now roots orphan families
and forwards failed sub-reads as the real server does. The spec states
what is implemented and what is still to do.
A client from this branch talking to an older server got a 404 for every
family read, so the TUI closed the session it was opening.
The data layer now learns once per connection whether the server has the
family route. An older server answers it with a 404 that has no typed
error body; a missing Session still returns SessionNotFoundError and
still rejects. On the first untyped 404 the client falls back for the
rest of the connection and tries the route again after every reconnect.
The fallback restores the reads that preceded the family route: the
Session and its paged direct children, merged into the membership
already known, then pending permissions and forms for every known family
member, waiting only for the requested Session's. Status comes only from
/session/active and execution events, since older servers send none. A
stale read neither falls back nor marks the route missing. Delete the
fallback once the oldest supported server has the family route.
A client from this branch talking to an older server receives Sessions
without status and /session/active entries without rootID. The Promise
client never checks, but the Effect client decodes responses, so it
rejected every Session from such a server.
Both fields are now optional on the wire. Servers with this change
always send them; a missing value means the server predates them, not
that the Session is idle. The client data layer then keeps the status it
derives from /session/active and execution events instead of inventing
one.
New endpoints start experimental. The family read moves to
/api/experimental/session/:sessionID/family in the server.experimental
group, beside schedule and media.get, so the generated SDK exposes it
only as client.experimental.sessionFamily.get. In its own session group
the codegen would also emit a deprecated client.session.family alias for
a method that never shipped. The identifier experimental.session.family
collides with the session group's experimental methods in the codegen,
so it follows the persistentPty precedent for routes under
/api/experimental/session.
The spec records the open question of whether status on Session.Info and
rootID on /session/active should start experimental too.
The shared data layer built a family by paging direct children, read
pending permissions and forms per member, re-read a Session after every
terminal and viewed event, and merged every read into what it already
held. A child deleted while disconnected stayed listed until restart,
and a permission.asked that arrived before a permission list response
which missed it was erased by that response.
session.sync(id, { children: true }) now reads /session/:id/family. It
replaces the family's membership, forgets members the server no longer
lists, and takes each member's status and pending requests from the same
response. It also marks every member's Session, family, and pending
request reads complete, so opening a child costs nothing more.
Reads and events travel on different connections, so a journal records
the events that arrive while a read is in flight and replays them on top
of its response. Session field patches, status, membership, and pending
requests all go through it, and every fold is idempotent because replay
reapplies events the response may already include. Terminal and viewed
events fold time.idle, outcome, and time.viewed, and time.updated
follows the events the projector stamps, so the per-event Session
re-reads are gone. A family read invalidated in flight applies nothing,
because a newer read supersedes it.
Reconnect hydration reads one family per running root from the rootID
on /session/active instead of one Session per running child.
Run user shell commands concurrently with model execution, retain their output in one shell entry, and admit non-waking completion messages. Share result capture and notification formatting across shell callers.
Buffer bulk history privately and publish once with a bounded head window. Preserve pending anchor compensation while ensuring newer navigation cancels obsolete Home work. Add atomic-loading and real-App navigation regressions.
Merge session status changes received during activity hydration and ignore superseded reconnect responses. Cover terminal events, starts, deletion, and overlapping connections so idle sessions do not regain stale TUI spinners.