facett-zoneui — per-app default-infra preview (ZonePane::with_default_infra)
design (the chosen shape)
ZonePane (the shared Tools-menu zone-populate Facet every suite app drops in) shows, BEFORE Generate, a preview of the infrastructure the selected zone will bring up. That preview used to be hardcoded to FalkorDB + Spark (korp's infra), so holger / dwarves / ordning / nornir all wrongly previewed korp's two containers.
The chosen fix is a default-infra seam, mirroring the existing ZoneGenerator seam:
- A
DefaultInfratrait —fn preview(&self, zone: Zone) -> Vec<ContainerStatus>— with a blanket impl for anyFn(Zone) -> Vec<ContainerStatus>, so an app passes a plain closure. ZonePane::with_default_infra(infra)(builder) +set_default_infra(..)(post-construction).- The provider is ephemeral wiring, kept OUT of the serializable
ZonePaneState(exactly likegenerator), because adynclosure is not serde. The containers it produces remain inZonePaneStateand round-trip as before. - The provider is consulted at the three preview-seeding points: construction,
SelectZone(re-offset ports for the new zone), andReset. The Generate no-generator fallback also seeds from it (Starting), so "no default infra" (nornir) yields an empty live list, not korp's.
Each app sets its own: korp → FalkorDB + Spark, holger → registry + replica, dwarves → runner, ordning → event-store, nornir → none.
fallback (no regression)
If an app never calls with_default_infra, the crate default is default_containers (korp's FalkorDB + Spark) — the prior behaviour is preserved exactly, so every existing consumer is unchanged.
observable / RED-when-broken
state_json.containers[] carries the previewed names+ports. Tests app_set_default_infra_previews_through_not_the_hardcoded_default (lib) and zonepane_app_set_default_infra_shows_through_robot (robot, headless zone-switch) assert the app-set preview (holger: registry) shows through and is NOT FalkorDB — they go RED if the pane ever reverts to the hardcoded default. unset_default_infra_falls_back_to_falkordb_spark guards the fallback.