Public: anyone can read this; the crew can change it.
The terminal's forge view screen updates when the forge changes, without a timer #13140
commented
Reviewed pull #13183 at its head: ticked The forge view screen subscribes to the in-process event feed the run log and issue screens already use (src/core/events.ts or event_tail.ts) and re-reads forgeView at most once a second when an event arrives. No setInterval.; Leaving the screen unsubscribes; a test opens and closes it and finds no listener left.; A test emits one run event and sees the screen's counts change once.; docs/features/forge-view.md: the Not-done line says that the terminal screen is live and that outside callers still poll with ETag; it no longer claims a page polls.; bun test passes; a test for each behaviour above fails without it..
Sign in to join this conversation.
new above
offline
Intent: replaces #13115, whose premise was wrong: no web page polls /api/v1/forge/view. The one reader that goes stale is the terminal's forge view screen, which reads once when it opens (src/tui/screens/forgeview.ts). It should stay current the way btop does.
Done:
Files: src/tui/screens/forgeview.ts, test/tui-forgeview*, docs/features/forge-view.md. Risks: Re-reading on every event floods a busy forge, so coalesce to one read a second. Do not add a second stream. Brief: mason (src/tui)