Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat(tui): rebuild the Workers view as a fleet console
The Workers view listed four static columns and a flat detail pane, so a
running fleet gave no sense of capacity, velocity, or health. Rebuild it
around what an operator asks between polls: how much of the host is in
use, which Worker is moving, and what each one just did.

- Header carries the host capacity meters (slots, memory) and the
  snapshot age; meters drop off as the terminal narrows.
- Table gains a phase bar, heartbeat freshness, and token/tool counters,
  groups by project in host scope, and drops columns instead of wrapping.
- Detail pane derives throughput rates and a token sparkline from
  client-side history, and keeps a per-Worker activity feed built from
  phase, step, failure, and log-line transitions.
- enter expands one Worker, o opens its issue, R refreshes, g/G jump.
- The tab badge counts the fleet and flags failed Workers.

OpenTUI overlaps cells when a flex subtree asks for more rows than the
terminal has, so every section is a fixed count of single lines and both
panes get explicit sizes.
  • Loading branch information
filipeforattini committed Aug 15, 2026
commit 4fb10028f382733b6c722e1e2041f271d382b152
5 changes: 5 additions & 0 deletions .changeset/workers-page-observability.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"opencode": minor
---

Rebuild the Workers view as a live fleet console: capacity meters for slots and memory, a sortable-by-project table with phase bars, heartbeat freshness and token counters, and a detail pane with throughput rates, a token sparkline, and a per-Worker activity feed. Adds enter to expand one Worker, o to open its issue, R to refresh, g/G to jump, and a tab badge that counts failed Workers.
12 changes: 10 additions & 2 deletions packages/tui/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ function App(props: { onSnapshot?: () => Promise<string[]>; pluginHost: TuiPlugi
const tuiConfig = useTuiConfig()
const redskilled = useRedskilled()
const [primaryView, setPrimaryView] = createSignal<"session" | "workers">("session")
const workerCount = createMemo(() => redskilled.status()?.payload?.workers.length ?? 0)
const failedWorkers = createMemo(
() => redskilled.status()?.payload?.workers.filter((item) => item.display?.failed).length ?? 0,
)
const route = useRoute()
const dimensions = useTerminalDimensions()
const renderer = useRenderer()
Expand Down Expand Up @@ -1177,8 +1181,12 @@ function App(props: { onSnapshot?: () => Promise<string[]>; pluginHost: TuiPlugi
attributes={primaryView() === "workers" ? TextAttributes.BOLD : undefined}
onMouseUp={() => setPrimaryView("workers")}
>
Workers{" "}
{redskilled.status()?.payload?.workers.length ? `(${redskilled.status()?.payload?.workers.length})` : ""}
Workers
<Show when={workerCount() > 0}>
<span style={{ fg: failedWorkers() ? theme.error : theme.textMuted }}>
{` (${workerCount()}${failedWorkers() ? ` ✗${failedWorkers()}` : ""})`}
</span>
</Show>
</text>
</box>
<Show when={primaryView() === "session"} fallback={<Workers />}>
Expand Down
Loading
Loading