mirror of
https://github.com/Hmbown/DeepSeek-TUI.git
synced 2026-09-03 06:50:13 +08:00
* feat(tui): automation visibility slice 1 — band slot, projection, typed receipts AUTOMATION-VISIBILITY-SPEC §6 Slice 1 (backlog #24), TUI only, no engine change: - `AutomationPanelState` (tui/automation_panel.rs): the single owner of "how much scheduled work is live" — Active automations, Queued|Running runs, and failures not yet acknowledged. `fold_scan` returns a `ScanDelta` so an unchanged scan never forces a redraw and each run the session watched go live settles exactly once (Canceled drops silently, the first scan never replays history). - Activity band slot `⏱ N scheduled · M running` on the merged footer: zero-suppressed, dropped at Compact, Info/Active/Attention ink with a reservation test that no automation ink resolves to `error_fg` in any preset. The slot ranks below the cost ledger and posture chips (it paints only when they still fit whole behind it) and above the key chorus, so lighting it never clips the ledger; `footer_automation_{w}x{h}` goldens at the blocker sizes plus a width-budget test (spec §7.2) pin that. - `HistoryCell::Automation(AutomationCell)` typed receipts replace automation_routing's `String` returns (pause/resume/delete/run); settled runs post `completed in background 42s · run r-8f19` / Failed cards from the same scan that repaints the band. Receipt goldens at 80x3/40x3. - The store scan (every definition + newest 25 runs each) runs on a blocking thread via `spawn_blocking`; the task-panel tick folds a finished scan and starts the next, so the async UI loop never parks behind the automation store's disk. Startup awaits one scan so the first frame carries the count. - `⏱` → `@` ASCII fallback; 10 new MessageIds (3 retired) across 15 locales; grammar doc gains the automation-slot ink row; acceptance scenarios can observe automation receipts through `plain_summary`. Signed-off-by: CodeWhale Bot <bot@codewhale.net> * fix(tui): automation visibility — review fixes - The run <id> receipt branches on the returned run status; a refused enqueue no longer claims 'started in background'. - Scheduled-work count moves to the TOP strip (TUI band contract: work in the top strip; the merged footer owns phase/cost/detail). New TopbarSegmentId::Automation reads the AutomationPanelState projection; Compact keeps the abbreviated live count (⏱ N·M) instead of dropping it. - activity_slot stays up while either count is nonzero: a paused automation's already-enqueued runs remain visible. - acknowledge_failures rides a watermark: the ~2.5s fold re-sees the same persisted Failed runs and no longer re-lights acknowledged failures. - The cadence scan re-fetches runs this session watched go live even past the newest-25 window (get_runs_by_ids); startup takes one full pass so a long-running task behind newer runs is visible from the first frame. - The startup blocking scan retries the manager lock briefly instead of blanking the band on contention. - Automation pager titles localize via AutomationNoun. Full local suite: 11722 passed; 0 failed (13 ignored). * style: cargo fmt --------- Signed-off-by: CodeWhale Bot <bot@codewhale.net> Co-authored-by: CodeWhale Bot <bot@codewhale.net>