Cancel pending timers when a child is closed (#6)

Co-authored-by: Harry Bayliss <harry@hjb.dev>
Co-committed-by: Harry Bayliss <harry@hjb.dev>
This commit was merged in pull request #6.
This commit is contained in:
2026-05-18 12:46:50 +01:00
committed by harry
parent de60b93bc6
commit 412b1167a2
7 changed files with 278 additions and 4 deletions

View File

@@ -837,6 +837,13 @@ func (st *uiState) OnChildStateChanged(string, IdleState) {
st.drawSidebar()
}
// OnChildClosed is the explicit-removal hook (close_process or the
// terminal-corpse cleanup in reapChild). The UI already reflects
// removals via the OnChildExited path and the children-map view, so
// this is a no-op here — the timerManager is the consumer that
// cares.
func (st *uiState) OnChildClosed(string) {}
// OnChildExited drops focus and shows the empty state if it was the
// focused child.
func (st *uiState) OnChildExited(c *Child) {