// `zz top`: the real-time dashboard. Same building blocks as `zz // work`'s view (TabView/LaneList/LiveLog/LadderView), just without an // activity tab since `zz top` isn't itself running an agent -- it's // purely a watcher over whatever repos are in the local config. import React from "react"; import { TabView } from "./TabView.js"; import { LaneList } from "./LaneList.js"; import { LiveLog } from "./LiveLog.js"; import { LadderView } from "./LadderView.js"; import { useLaneSnapshots } from "./useLaneSnapshots.js"; import { useLadderTrees } from "./useLadderTrees.js"; import { flattenEvents } from "./types.js"; import { laneListText, liveLogText, ladderText } from "./textExport.js"; export function TopApp({ repos }: { repos: { repo: string; repoDir: string; stateDir: string }[] }) { const snapshots = useLaneSnapshots(repos); const ladders = useLadderTrees(repos); return ( , getFullText: () => laneListText(snapshots) }, { label: "ladder", content: (maxRows, scrollOffset) => , getFullText: () => ladderText(ladders) }, { label: "protocol", content: (maxRows, scrollOffset) => , getFullText: () => liveLogText(flattenEvents(snapshots)), }, ]} /> ); }