Files
dsh-context/tests/host
Bowen Liang b13ad55501 fix(host): serve the timeline detail for cold sessions (viewed, never entered)
The detail endpoint resolved sessions through the live store's
`sessions.get()` only — but a session that is merely VIEWED never enters
it (`SessionStore.prepare` with a persistence seed deliberately does not
register), so every cold session answered the typed null and the Context
tab parked on the retryable failure note. On a gappy durable log this was
unrecoverable by construction.

The handler now follows the harness's own ladder: live sessions still read
the registry's current fold state via `stateOf`; a store miss observes the
session through `ctx.sessionQuery.observeSession()` (the observation
carries the complete immutable log) and folds the detail from init —
cheap, since a cold log is static and the client's per-session store reads
it once per page view. The lease disposes promptly; an absent sessionQuery
face, an unobservable session, or a rejecting read keep the typed-null /
failure-envelope degradation.
2026-09-06 12:03:34 +08:00
..