From 95e08956eb45f2ec2ca4ed28eb70a0e67004db36 Mon Sep 17 00:00:00 2001 From: Hare Date: Fri, 29 May 2026 18:17:35 +0900 Subject: [PATCH] ticket: close multi-pod polling --- .../artifacts/.gitkeep | 0 .../item.md | 50 ------------------- .../review.md | 32 ------------ .../thread.md | 7 --- 4 files changed, 89 deletions(-) delete mode 100644 work-items/open/20260529-083829-tui-multi-pod-polling/artifacts/.gitkeep delete mode 100644 work-items/open/20260529-083829-tui-multi-pod-polling/item.md delete mode 100644 work-items/open/20260529-083829-tui-multi-pod-polling/review.md delete mode 100644 work-items/open/20260529-083829-tui-multi-pod-polling/thread.md diff --git a/work-items/open/20260529-083829-tui-multi-pod-polling/artifacts/.gitkeep b/work-items/open/20260529-083829-tui-multi-pod-polling/artifacts/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/work-items/open/20260529-083829-tui-multi-pod-polling/item.md b/work-items/open/20260529-083829-tui-multi-pod-polling/item.md deleted file mode 100644 index a8078940..00000000 --- a/work-items/open/20260529-083829-tui-multi-pod-polling/item.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: 20260529-083829-tui-multi-pod-polling -slug: tui-multi-pod-polling -title: Poll Pod list updates in tui --multi -status: open -kind: feature -priority: P2 -labels: [tui, pod, multi-pod] -created_at: 2026-05-29T08:38:29Z -updated_at: 2026-05-29T08:38:29Z -assignee: null -legacy_ticket: null ---- - -## Background - -`tui --multi` currently loads the Pod list once and refreshes only on explicit `r` or after a direct send. The dashboard is meant to show multiple live/stopped Pods, but statuses can become stale while the user is watching the screen: running Pods may finish, paused Pods may resume elsewhere, newly-created/restored Pods may appear, and stopped/unreachable entries may need to move sections. - -Add lightweight polling so the multi-Pod dashboard remains current without requiring manual refresh. - -## Requirements - -- Add periodic Pod-list refresh while `tui --multi` is open. - - Poll only in the multi-Pod dashboard, not while a nested single-Pod view is active. - - Reuse the existing `MultiPodApp::reload` / Pod list discovery path unless a smaller refactor is clearly needed. - - Keep manual `r` refresh behavior. -- Preserve local UI state across automatic refreshes. - - Keep the selected Pod stable by Pod name when possible. - - Preserve per-Pod composer contents. - - Preserve scroll/selection in a predictable way when the selected Pod disappears or changes section. - - Do not clear notices unless the existing notice semantics already do so. -- Poll without blocking terminal input. - - Replace the current blocking `crossterm::event::read()` loop with a bounded poll/tick pattern or equivalent async-friendly structure. - - Terminal resize, paste, key handling, and direct send behavior must continue to work. -- Avoid excessive filesystem/socket work. - - Use a modest interval, e.g. 1-2 seconds, and do not start overlapping reloads. - - If a reload fails, surface a non-fatal notice and keep the previous list visible. -- Do not introduce hidden Pod protocol behavior. - - Polling should be a TUI dashboard concern; it should not require new Pod methods/events unless existing discovery APIs are insufficient. - -## Acceptance criteria - -- `tui --multi` automatically updates Pod list/status after live Pods appear, stop, finish, pause, or become unreachable, without pressing `r`. -- Manual `r` refresh still works and shares the same state-preserving reload behavior. -- Selection is retained by Pod name across reload when possible. -- Composer text for each Pod survives automatic polling. -- Automatic reload failure does not exit the dashboard and produces a visible diagnostic. -- Tests cover state preservation across automatic reload, selection fallback when a selected Pod disappears, and non-overlapping/error handling for poll-triggered refresh. -- `cargo fmt --check` -- Focused TUI tests/checks pass, including multi-Pod tests. diff --git a/work-items/open/20260529-083829-tui-multi-pod-polling/review.md b/work-items/open/20260529-083829-tui-multi-pod-polling/review.md deleted file mode 100644 index 4613656f..00000000 --- a/work-items/open/20260529-083829-tui-multi-pod-polling/review.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: 20260529-083829-tui-multi-pod-polling-review -slug: tui-multi-pod-polling -title: Review for tui --multi Pod list polling -status: reviewed -kind: review -created_at: 2026-05-29T08:38:29Z -updated_at: 2026-05-29T09:12:00Z -reviewer: insomnia-system ---- - -## Review summary - -Reviewed implementation branch `work/tui-multi-pod-polling` in worktree `/home/hare/Projects/insomnia/.worktree/tui-multi-pod-polling`. - -The implementation adds a modest dashboard polling interval, avoids overlapping reloads with a single pending reload handle, shares the state-preserving reload application path with manual refresh, and aborts the polling task while a nested single-Pod view is active. Reload failures keep the previous list visible and surface a notice. - -The implementation is scoped to the TUI dashboard and does not introduce Pod protocol changes. Selection, composer state, and notices are preserved across successful reloads as required. - -## Validation - -Reviewer ran: - -- `cargo fmt --check` -- `cargo test -p tui multi_ -- --nocapture` -- `git diff --check develop...HEAD` - -All passed. The only compiler warning observed was the pre-existing `llm-worker` `end_scope` dead-code warning. - -## Judgment - -Approved. diff --git a/work-items/open/20260529-083829-tui-multi-pod-polling/thread.md b/work-items/open/20260529-083829-tui-multi-pod-polling/thread.md deleted file mode 100644 index 61fedc47..00000000 --- a/work-items/open/20260529-083829-tui-multi-pod-polling/thread.md +++ /dev/null @@ -1,7 +0,0 @@ - - -## Created - -Created by tickets.sh create. - ----