The KRILL_DEMO_CONTROL file-channel hook (added in #580) understands
select / view / center / fit / reset — all canvas operations. There
was no way to ask the app to change screen. Reaching the Swarm Work screen
from an automation pipeline required clicking the 🧠 rail toggle at a
calibrated pixel position derived from layout constants, which breaks
silently (wrong click target, no error) the moment the rail toggles are
added to, reordered, or resized.
Not a bug — a missing capability. ScreenCore only exposed
toggleSwarmScreen(), a flip, so even a code-level fix couldn’t drive the
Swarm Work view to a known state — two toggles from an unknown starting
state can land on either side.
ScreenCore.setSwarmScreen(show: Boolean) — an idempotent
explicit setter alongside the existing toggleSwarmScreen() (which now
delegates conceptually to the same backing state but keeps flip semantics
for the rail button).ScreenCore.scrollToFleetRequest / scrollToFleet(), a bumped
counter following the existing fitRequest pattern, so SwarmWorkScreen
can scroll itself to the bottom (the Fleet section is always last) on
request.composeApp desktopMain main.kt’s DemoControl poller now understands
screen:swarm, screen:canvas, and scroll:fleet, routing through the
new ScreenCore methods — the same label-free, deterministic style as
select:<id>.When a ScreenCore flag is meant to be driven from outside the UI (a demo
hook, a test, a future scripting surface), expose an idempotent setter next
to any toggle from the start — a toggle-only API silently assumes the only
caller is a button that already knows the current state.