/** * dsh-widgets — the right-rail slot body. * * Hosted in `conversation.input.overlay`; the registration in `client/index.ts` * records why that seat and not `shell.overlay`. One component draws the whole * right-rail group as ONE sliding surface: * * drawer wrapper ── RailWave ── resting deck (grid of cards + the add tile) * ├─ the magnify overlay (inside RailWave) * └─ the add panel (settings pages, portaled to
) * * Moved out of `client/index.ts` (Phase 2.9) with its body unchanged; the * indentation is kept on purpose so the move stays byte-auditable. It receives the * bridge handles instead of closing over them: `useBridge` / `setPrefs` / * `runCommand` are stable, while `prefs` and `railBudget` are LIVE bindings, so * those arrive as getters and every EVENT-HANDLER read goes through them (a * captured value would go stale between the emit and the re-render). */ import * as React from 'react'; import { type BridgeSnapshot } from '../runtime/bridge'; import { type Prefs } from '../runtime/prefs'; /** What the rail view needs from the composition root that owns the bridge. */ export interface RailViewDeps { /** Subscribe to the bridge (re-renders the rail on every emit). */ useBridge: () => BridgeSnapshot; /** The LIVE prefs binding — read it once per render, never capture it. */ getPrefs: () => Prefs; /** Merge a patch into the live prefs, persist, then emit. */ setPrefs: (patch: Partial