diff --git a/src/servers/plugins/install.ts b/src/servers/plugins/install.ts index bef88e3b..281e3f03 100644 --- a/src/servers/plugins/install.ts +++ b/src/servers/plugins/install.ts @@ -41,11 +41,16 @@ import type { DiscoveredPlugin } from './manifest'; export type OnStep = (step: string) => void | Promise; /** - * A beat between steps, so the log reads rather than blinks. + * A beat between steps. Deliberate, and not decoration — do not remove it as a pointless sleep. * - * Cosmetic, and worth being honest about: `pm2 start` genuinely takes a moment, but writing a row and - * rebuilding the router do not, and four lines arriving in the same frame look like a stall followed by a - * jump. This is small enough not to matter to a script and long enough for a person to follow. + * Some of this work is genuinely slow (`pm2 start` measures ~770ms) and some is not: writing a row and + * rebuilding the router are effectively instant. Without a pause the fast steps arrive in a single frame, + * so the log jumps from empty to finished and the reader cannot tell "it worked" from "nothing happened". + * The interval IS the feedback — it is what makes each step something you saw occur rather than something + * you found already done. + * + * Small enough that a script does not care, long enough that a person can follow it. Only applied when + * something is listening: `onStep` absent means no beat, so the JSON path runs at full speed. */ const STEP_BEAT_MS = 220;