|
tui: /terminals command + modal to view and force-close terminals (Etap 5)
The final piece of the terminals plan: a modal to list the session's open persistent terminals and force-close one. - screens/terminals_picker.py: a modal (mirror of sessions_picker). Seeds the list from api.list_terminals on open, kept live by refresh_from_model — the app calls it as terminal_opened/closed events arrive while the modal is open (closed ones drop out, newly opened append). Each row shows status emoji + name (bold) + description + pid + uptime. Up/Down navigate, Enter force-closes the highlighted terminal via api.close_terminal (in a worker), Escape cancels. Empty list is a no-op for Enter (no crash, no close call). - commands/builtin.py: TerminalsCommand (/terminals) opens the picker for the active session. Registered in the command registry. - tui_app._open_terminals_picker pushes the screen; on_ws_event's terminal branch now also refreshes the picker live if it is the active screen. Tests: list seed, Enter closes the highlighted terminal (api.close_terminal called, drops from list), Escape cancels (dismiss None), live refresh filters closed + adds opened, empty list Enter is a no-op. Input-box hint tests adjusted for the new /t match order (terminals, thinking, themes). Full suite: 993 passed, 1 skipped. Plan docs/terminal_tool_plan.md — Etap 5 of 5 (complete). |
|---|
|
|
| clients/terminal/tui/commands/builtin.py |
|---|
| clients/terminal/tui/commands/registry.py |
|---|
| clients/terminal/tui/screens/terminals_picker.py 0 → 100644 |
|---|
| clients/terminal/tui/tui_app.py |
|---|
| tests/clients/test_input_box.py |
|---|
| tests/clients/test_terminals_picker.py 0 → 100644 |
|---|