feat(tui): add Tasks panel with PanelProvider registry architecture#117
Merged
yishuiliunian merged 2 commits intomainfrom Apr 16, 2026
Merged
feat(tui): add Tasks panel with PanelProvider registry architecture#117yishuiliunian merged 2 commits intomainfrom
yishuiliunian merged 2 commits intomainfrom
Conversation
…113) Structured tasks (TaskCreate/TaskUpdate) are now displayed in a dedicated panel alongside Agents and BgTasks, with a unified PanelProvider registry that drives navigation, rendering, and lifecycle cleanup. Event pipeline: TaskStore → TaskBridge → TasksChanged → SessionState → TUI. Panel system: PanelProvider trait + PanelRegistry replaces per-kind dispatch. Cleanup: session state auto-evicts finished agents, completed bg_tasks, and completed tasks to prevent unbounded growth in long-running sessions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Event pipeline (new)
loopal-protocol:TaskSnapshottype +TasksChangedevent variantloopal-agent:TaskStoresubscribe/notify for change detection (pure persistence, no protocol dep)loopal-agent-server:TaskBridgeconverts store changes →TasksChangedevents via frontendloopal-session:task_state.rshandlesTasksChanged→SessionState.task_snapshotsPanel architecture (refactored)
PanelProvidertrait (kind, max_visible, item_ids, height, render) replaces oldPanelSectiontraitPanelRegistryholds registered providers;panel_opsandrenderiterate over itproviders/directory:AgentPanelProvider,TasksPanelProvider,BgTasksPanelProviderPanelSectionStateunifies focus/scroll per panel (replaces scatteredfocused_agent,focused_bg_task, etc.)Session cleanup (new)
session_cleanup.rs: removes completed bg_tasks from session state each framestate.agentsbg_task_detailsuses merge-and-retain pattern (capped at 50) so log viewer still worksOther fixes
viewingindicator (▶) from agent panel (was unreachable)Test plan
bazel build //...compilesbazel build //... --config=clippyzero warningsbazel test //...— 52/52 pass (includes new task_state, tasks_panel, enter_panel, panel_tab tests)