/** * Combines the local and remote status tiers at read time. Lives apart from * the collectors because an external monitor reimplements this step against * the published documents, and the text renderer consumes its output. */ import type { PullRequestSummary } from "./pullRequests.ts"; import type { LocalStatusDocument, RemoteStatusDocument, StatusBlockedIssue, StatusBoardIssue, StatusQueueIssue, StatusTask, StatusWorktree } from "./statusSnapshot.ts"; import type { CanonicalStatus } from "./taskSource.ts"; export interface JoinedWorktree extends StatusWorktree { pullRequests: PullRequestSummary[]; } export interface JoinedTask extends Omit { boardStatus: CanonicalStatus | undefined; worktrees: JoinedWorktree[]; } interface JoinedSlots { used: number; maximum: number; } export interface JoinedStatus { tasks: JoinedTask[]; /** In-progress board issues with no local worktree. */ inProgressWithoutWorktree: StatusBoardIssue[]; queueReady: StatusQueueIssue[]; queueBlocked: StatusBlockedIssue[]; /** Undefined when no board fetch has ever succeeded. */ slots: JoinedSlots | undefined; } export interface JoinStatusInput { local: LocalStatusDocument; remote: RemoteStatusDocument | undefined; } /** * The board lists arrive unsubtracted, so this is where the local worktree set * is removed from them. Doing it here rather than at fetch time is what keeps * a fast local poll paired with a slow board poll from reporting a * just-dispatched task as still queued. */ export declare function joinStatus(input: JoinStatusInput): JoinedStatus; export {}; //# sourceMappingURL=statusJoin.d.ts.map