singularity-forge/packages/pi-coding-agent/src/modes/interactive
Claude 33d9a26dd7 fix(tui): keep AUTO-mode widgets alive and drop duplicate health panel
InteractiveMode.renderWidgets() called Container.clear() on the
widgetContainerAbove/Below render mounts, which disposed every mounted
extension widget and then re-added the now-dead components. In AUTO mode
updateProgressWidget re-registers gsd-progress on every unit dispatch,
so gsd-notifications and gsd-health had their refresh timers and store
subscriptions killed after the first dispatch. Renders kept returning
the widgets' frozen cachedLines, making them look alive but never update
(/gsd notifications clear appeared to do nothing, belowEditor last-commit
went stale while the top-of-screen dashboard stayed correct).

Split detach from dispose: add Container.detachChildren() and use it from
the two widget-mount call sites. clear() still disposes for every other
caller (chat, editor, status, pinned-message containers). The
extensionWidgets* maps remain the single owner of widget disposal via
removeExisting() and clearExtensionWidgets().

While in AUTO, gsd-progress duplicates gsd-health on last commit, cost/
budget, and the health signal. Make gsd-progress the single source of
truth: hide gsd-health from auto-start and re-register it from every
exit point in auto.ts (lock-lost stop, cleanupAfterLoopExit !paused
guard, stopAuto, pauseAuto). gsd-notifications stays visible — it is
independent state and, with the detach fix, its subscription + 5s
refresh actually work again.

Tests: Container.detachChildren()/clear() contract guards added to
packages/pi-tui/src/__tests__/tui.test.ts. health-widget,
notification-{store,widget,overlay}, notifications-handler, notifications,
and auto-paused-ui-cleanup suites all pass.
2026-04-13 23:30:25 +00:00
..
components Merge pull request #4100 from jeremymcs/claude/cleanup-mcp-stream-output-9uCeK 2026-04-13 00:54:38 -05:00
controllers Merge pull request #4121 from jeremymcs/fix/4120-pinned-output-duplication 2026-04-13 08:30:08 -05:00
theme fix(tui): comprehensive TUI review — layout, flow, rendering, and state fixes 2026-03-29 09:04:56 -05:00
utils refactor: deduplicate toPosixPath, ZERO_USAGE, and shortenPath utilities 2026-03-19 14:55:30 -03:00
interactive-mode-state.ts fix(tui): restore pinned output above editor during tool execution 2026-04-11 15:53:29 -04:00
interactive-mode.ts fix(tui): keep AUTO-mode widgets alive and drop duplicate health panel 2026-04-13 23:30:25 +00:00
slash-command-handlers.ts feat(tui): improve gsd overlays, shortcuts, and notification flows 2026-04-12 09:13:46 -05:00