mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-12-03 18:43:38 +01:00
WorkloadsSurface built its own workloads state when no `state` prop arrived, and its props type extended every useWorkloadsState option. Both production mounts, the Proxmox and vSphere overviews, already build that state themselves (it also drives their one WorkloadsFilter) and pass it in, so the fallback only ran in tests. The mounts still passed vms, containers, nodes and useWorkloads, and Proxmox passed its app-container exclusion, all of which the surface ignored once it had a state. The surface now requires `state` and accepts only presentation props: forcedPlatform, forcedViewMode, the empty-state copy and tableTitle. The hook's options type is renamed WorkloadsStateOptions so it no longer shares a name with the surface's props. The pages drop the ignored props. Tests that leaned on the fallback build state through a page-owned harness, as the pages do. The Proxmox page contract test pins the exact props its mount passes. The overview guardrails check that each surface repeats the platform and view scope its page gave the state, and that the surface imports only the state's type, so it cannot call the hook again. Because the surface no longer imports the hook at runtime, Rollup now names the chunk the Proxmox and vSphere pages share after its last module, useWorkloadsState, and the bundle check reported the old WorkloadsSurface key as missing. The chunk is the same code at the same size, so the budget key follows it with its baseline and limit unchanged.