import type { State } from './app-reducer.js'; import type { AgentSwarmPanelMode, Settings } from './app-settings-type.js'; import type { StatuslineItem } from './components/statusline-picker.js'; import { type PanelId, type PanelPositionMap } from './ui-contracts.js'; export declare function mergeStatuslineHiddenItems(hookHidden: StatuslineItem[], reducerHidden: StatuslineItem[]): StatuslineItem[]; /** * True when any of the legacy picker overlays is open. Note: panel flags * like `state.sessionsPanelOpen` are intentionally NOT included here so * the local `overlayOpen` gate in app-view.tsx can apply its per-panel * routing guard (`!anyRoutedToSidebar(id)`) and let the sidebar twin * render. Adding a new panel-open flag to this list would silently * collapse the sidebar to width 0 and prevent the twin from mounting. */ export declare function isPickerOverlayOpen(state: State): boolean; /** Coerced form of {@link effectivePanelPositionsInput} for direct map reads. */ export declare function effectivePanelPositions(state: State, liveSettings: Settings | undefined): PanelPositionMap; /** * Pure dual-source read for the legacy tri-state swarm panel mode: the * picker draft wins while the settings picker is open, the persisted value * (defaulting to 'bottom') otherwise. Prefer * {@link effectiveAgentSwarmPanelMode} at call sites that hold `State`. */ export declare function resolveAgentSwarmPanelVisibility(settingsOpen: boolean, pickerValue: AgentSwarmPanelMode, persistedValue: AgentSwarmPanelMode | undefined): AgentSwarmPanelMode; /** {@link resolveAgentSwarmPanelVisibility} bound to app state + live settings. */ export declare function effectiveAgentSwarmPanelMode(state: State, liveSettings: Settings | undefined): AgentSwarmPanelMode; /** * Pure dual-source read for the right-sidebar master switch: the picker * draft wins while the settings picker is open, the persisted value * (defaulting to true) otherwise. Boolean mirror of {@link * resolveAgentSwarmPanelVisibility}. */ export declare function resolveShowSidebarVisibility(settingsOpen: boolean, pickerValue: boolean, persistedValue: boolean | undefined): boolean; /** {@link resolveShowSidebarVisibility} bound to app state + live settings. */ export declare function effectiveShowSidebar(state: State, liveSettings: Settings | undefined): boolean; /** * Open flags for each routable panel — which twins are candidates for a * sidebar slot. Shared by the dispatcher and the renderer so the * scroll-clamp reservation in `resolveSidebarLayout` and the actual twin * mounting in `app-view.tsx` can never disagree about which panels are * open. The agents slot honors the legacy `showAgentSwarmPanel: 'off'` * tri-state (an explicitly hidden swarm panel must not occupy a slot), and * the coordinator slot stays reachable from both entry points: Ctrl+P * (goalRunMonitorToggle) opens the phase monitor WITHOUT setting * `coordinator.monitorOpen` — `closePanels` resets the latter. */ export declare function buildSidebarOpenFlags(state: State, liveSettings: Settings | undefined): Partial>; /** * The one way to compute the sidebar layout from app state. Bundles the * dual-source panel-position read, the shared open-flags map, and the * legacy swarm-mode flag so the dispatcher (`app.tsx`) and the renderer * (`app-view.tsx`) call `resolveSidebarLayout` with byte-identical inputs. * Before this wrapper existed the two sites drifted: the dispatcher never * saw the picker draft and the renderer never passed the open flags. */ export declare function resolveAppSidebarLayout(state: State, termCols: number, liveSettings: Settings | undefined, mailboxPanelOpen: boolean): SidebarLayoutState; export interface SidebarLayoutState { panelPositions: PanelPositionMap; overlayOpen: boolean; sidebarWidth: number; /** Width AppView must pass to nested routed sidebar panel frames. */ sidebarContentWidth: number; mainColumnWidth: number; /** * Whether the swarm panel (`AgentSwarmPanelMode === 'sidebar'`) is * effective on the right sidebar using the dual source: picker draft * when `state.settingsPicker.open`, persisted `liveSettings.panelPositions` * otherwise. Mirrors the renderer-side read in `app-view.tsx` so the * scroll-clamp reducer can reserve the mission-queue rows even when * the persisted config never went through the picker UI. */ effectiveSwarmOnSidebar: boolean; /** * Approximate row count for routed sidebar twin panels mounted above * `SidebarContent` inside `RightSidebar`. The reducer subtracts this * from `viewportHeight` when computing the sidebar scroll clamp so the * user can't scroll past the end into blank space when one or more * routed twins are mounted. Each twin contributes a per-panel * `ESTIMATED_HEIGHT` constant; over-estimation is safe (existing * convention — see `SIDEBAR_MISSION_MAX_WRAP_LINES` docstring). */ sidebarTwinRowCount: number; } //# sourceMappingURL=app-ui-state.d.ts.map