Skip to content

feat(channels,tui,a2a): migrate leaf spawns to TaskSupervisor, add TUI task registry#2979

Merged
bug-ops merged 2 commits intomainfrom
task-supervisor-leaf-tui
Apr 14, 2026
Merged

feat(channels,tui,a2a): migrate leaf spawns to TaskSupervisor, add TUI task registry#2979
bug-ops merged 2 commits intomainfrom
task-supervisor-leaf-tui

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 14, 2026

Summary

Test plan

  • cargo nextest run --workspace --features full --lib --bins — 8263 tests pass
  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full -- -D warnings — clean
  • TUI: start with --tui, type /tasks — panel renders supervised tasks with spinner for Running state
  • TUI: /tasks with no supervisor wired — shows "Task supervisor not available." placeholder
  • Telegram reconnect: supervisor restarts dispatcher, restart count increments in panel
  • A2A: a2a_server task visible in /tasks panel
  • Indexer launch: indexer task appears briefly in /tasks during startup indexing
  • Live testing playbook: .local/testing/playbooks/task-supervisor-leaf-tui.md

Follow-up

…I task registry

Closes #2961, #2962.

TelegramChannel gains a with_supervisor() builder that migrates the
dispatcher loop from bare tokio::spawn to supervisor.spawn_restartable
with RestartPolicy::Retry { max: 5, base_delay: 2s }. Reconnect retries
are now logged and visible in the supervisor registry.

spawn_a2a_server in daemon.rs wraps A2aServer::serve() via supervisor
with RestartPolicy::RunOnce. spawn_background_indexer in agent_setup.rs
routes the indexer launch through supervisor when present. Per-file
chunk supervision in zeph-index is deferred to #2978 due to a
zeph-core -> zeph-index crate cycle.

RunOnce factories use parking_lot::Mutex (infallible lock) and emit
tracing::warn! when the factory cell is already consumed.

TaskRegistryWidget added in crates/zeph-tui/src/widgets/task_registry.rs.
Displays a live table of supervised tasks (name, origin crate, state,
uptime-since-last-restart, restart count) with a spinner for Running
tasks. Toggled via the /tasks command in the TUI command palette.
Shows a placeholder when TaskSupervisor is not wired. Refreshes at the
existing 10 fps render interval with no additional timer.
@github-actions github-actions Bot added enhancement New feature or request size/XL Extra large PR (500+ lines) documentation Improvements or additions to documentation channels zeph-channels crate (Telegram) rust Rust code changes dependencies Dependency updates and removed enhancement New feature or request size/XL Extra large PR (500+ lines) labels Apr 14, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 14, 2026 00:31
@github-actions github-actions Bot added enhancement New feature or request size/XL Extra large PR (500+ lines) labels Apr 14, 2026
@bug-ops bug-ops merged commit cd99903 into main Apr 14, 2026
30 checks passed
@bug-ops bug-ops deleted the task-supervisor-leaf-tui branch April 14, 2026 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channels zeph-channels crate (Telegram) dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tui): task registry status panel using TaskSupervisor.list_tasks() feat(index,channels,a2a): migrate leaf crate spawns to TaskSupervisor

1 participant