import type { Context } from '@wrongstack/core/agent'; import { type KanbanBoard, type KanbanLifecycleStage, type KanbanTask } from '@wrongstack/kanban'; import type React from 'react'; import { type KanbanAuditSummary } from '../kanban-audit.js'; export interface KanbanPanelProps { projectRoot: string; sessionId?: string | null | undefined; sessionContext?: Context | undefined; onClose: () => void; /** * Host terminal width in columns. Used to choose how many columns the * board view shows side-by-side. Defaults to a comfortable 100-col layout. */ terminalWidth?: number | undefined; /** * When the panel opens, the board whose id matches this prefix is * auto-selected. Wired by the App via the `onBoardFocus` ref so * `/kanban use ` and the Goal → Kanban bridge land on the * right board without manual `n`/`p` navigation. */ initialBoardId?: string | undefined; } export declare function KanbanPanel({ projectRoot, sessionId, sessionContext, onClose, terminalWidth, initialBoardId, }: KanbanPanelProps): React.ReactElement; /** * Pure, deterministic layout math for the kanban board's column view. * * Reserves horizontal space for the chrome that surrounds the columns * (board list panel + task detail panel + gaps + outer border), then * picks the largest column count that still keeps every column at least * `minColumnWidth` cols wide, and finally shrinks each column's width to * match the available budget (never below `minColumnWidth`). * * Exported so Sprint 2's regression tests can pin the math down without * mounting Ink. */ export declare function computeBoardColumnLayout(totalColumns: number, terminalWidth: number): { visibleColumnCount: number; columnWidth: number; overflow: number; }; /** * The next stage a managed card may advance to, or null when the card is * already at the terminal `done` stage (or the current stage is unknown). * The domain only allows one-step forward transitions; callers must keep * this in lockstep with `KANBAN_AGENT_STAGES` in `@wrongstack/kanban`. * * Exported so unit tests can pin the stage order without rendering the panel. */ export declare function nextManagedStage(current: KanbanLifecycleStage): KanbanLifecycleStage | null; /** * Look up the lifecycle stage that owns the given column under a managed * Kanban Agent board. Returns null when the board is not managed, or when * the column is not mapped to any of the five canonical stages (treated * as a legacy/custom column by the renderer). */ export declare function stageForColumn(board: Pick, columnId: string): KanbanLifecycleStage | null; /** * Map a lifecycle stage to the visual indicator shown in the column * header. Mirrors the WebUI palette so the same board reads the same in * either surface. */ export declare function stageToIndicator(stage: KanbanLifecycleStage): { glyph: string; color: string; }; /** * Pure success-criteria summary string. Returns null when there are no * checks. Format: "Criteria N/M passed". */ export declare function summarizeSuccessCriteria(task: KanbanTask): string | null; /** * Pure goal-metrics rollup string. Returns null when there are no metrics. * Format: "Metrics 2 met · 1 missed · 0 waived · 0 pending" (zero counts * are skipped to keep the line short). */ export declare function summarizeGoalMetrics(task: KanbanTask): string | null; /** * Inline Kanban Cleaner summary — mirrors the WebUI's `KanbanCleanerAlert` * but pinned to the project root. Shows the headline counts at the top * of the panel and the top-3 issues, scoped per board so users see what * the Cleaner would flag without leaving the TUI. * * The component renders nothing when the audit is empty so a clean * board doesn't add visual noise. */ export declare function AuditAlert({ summary, topN, }: { summary: KanbanAuditSummary; topN?: number | undefined; }): React.ReactElement | null; //# sourceMappingURL=kanban-panel.d.ts.map