Rename Kill to Close, add New Terminal palette entry, clean up exited terminals
- Palette's per-child "Kill <name>" action is now labelled "Close <name>" (action kind unchanged; still SIGTERM). Matches the existing "Close agent: …" context entry and reads less violent for a graceful term. - New "New Terminal" palette entry spawns a bare interactive $SHELL pane via LaunchTerminal (kind=terminal). Replaces the default "shell" process preset that was seeded on first run. - Exited KindTerminal entries are now dropped from the session in reapChild — terminals have no restart path, so leaving them behind as greyed rows in the Processes sidebar was just clutter. processList also filters defensively.
This commit is contained in:
@@ -403,6 +403,23 @@ func (s *Session) reapChild(c *Child, runID uint64) {
|
||||
if !c.restarting.Load() {
|
||||
c.cleanupOwnedPaths()
|
||||
}
|
||||
// Terminals are ephemeral: unlike command entries (kept around for
|
||||
// restart_process) and agents (which the user clears via close_process
|
||||
// once they're done with the corpse), an exited terminal has nothing
|
||||
// useful left to do. Drop it from the session so it disappears from
|
||||
// the Processes sidebar / switch list immediately.
|
||||
if c.Kind == KindTerminal && !c.restarting.Load() {
|
||||
c.teardownPTY()
|
||||
s.mu.Lock()
|
||||
delete(s.children, c.ID)
|
||||
for i, oid := range s.order {
|
||||
if oid == c.ID {
|
||||
s.order = append(s.order[:i], s.order[i+1:]...)
|
||||
break
|
||||
}
|
||||
}
|
||||
s.mu.Unlock()
|
||||
}
|
||||
}
|
||||
|
||||
// killDescendantsOf terminates every still-live direct child of
|
||||
|
||||
Reference in New Issue
Block a user