Repository navigation
Description
A Crew's state is its seats' states, summarized from measured facts, and no state is inferred from silence. Both web surfaces drop seats whose thread facts are not loaded instead of showing them as unknown, so a Crew can under-count or vanish.
Where it breaks:
- Sidebar expander:
selectSpawnedChildRows(apps/web/src/j5/squadron/spawnedChildren.logic.ts:18-29) filters out any child whose thread snapshot is not in client state before grouping. The classifier increwState.tssupports an "unknown" state, but it is unreachable for these members; the group count shrinks and a Crew whose seats are all unloaded disappears from the expander. - Fleet page:
fleet.logic.ts:54-78builds live Crew groups from placed participants rather than from the roster the Fleet response already carries (FleetReadsHttp.tsreturns the full member list). A seat that is recorded but not yet placed, and a Crew whose launch failed before any seat was placed, has no row on the Fleet page even though its record is live.
What should change:
- Build the named Crew group and its totals from the roster, attach thread facts where present, and represent a member with no facts as unknown in the summary chips and the row.
- If the spawned-children read does not carry roster seats, extend the J5 read (
SpawnedChildrenHttp.ts,SpawnedChildrenClient.ts, the J5 contract inpackages/contracts/src/j5.ts) so it does. No upstream files. - Keep the existing performance shape: the per-thread stores keep an empty answer loaded, unchanged batches skip renders, and the 30-second Fleet poll re-reads only involved rows.
Tests to ship (spawnedChildren.logic.test.ts, fleet.logic.test.ts, crewState.test.ts):
- one running seat plus one member with no snapshot reports two seats, one unknown
- a Crew with zero placed seats still renders as a named group with its count
- a snapshot arriving later moves the member from unknown to its measured state
- an archived Crew leaves the live groups
- the same thread id in two environments stays distinct
Done when the sidebar expander and the Fleet row show every seat on the roster, with unknown spelled out rather than omitted.
Related criteria: crews.md AC8, AC15, AC22.
Independent of the server issues. If this extends the spawned-children read to carry roster seats, the server change stays inside SpawnedChildrenHttp.ts and the J5 contract; nothing here waits on #224, which handles the same never-created seats on the archive and stop side.
Activity
evidence: #227 before-sidebar
evidence: #227 before-fleet
evidence: #227 after-sidebar
evidence: #227 after-fleet
fix(crews): Crew groups keep seats without thread facts as unknown (#300
fix(crews): a Crew follows its Captain through every lifecycle step (#…
feat(crews): custom seats default to Full access and the roster flags…