Skip to content

feat(agent_panel): unified agent panel 2b — view shell (merged list + transcript + composer)#209

Merged
BunsDev merged 6 commits into
mainfrom
feat/unified-agent-panel-2b
Jul 18, 2026
Merged

feat(agent_panel): unified agent panel 2b — view shell (merged list + transcript + composer)#209
BunsDev merged 6 commits into
mainfrom
feat/unified-agent-panel-2b

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 18, 2026

Copy link
Copy Markdown
Member

Description

What: Implements sub-phase 2b of the unified agent panel (plan in #206) — a new, feature-flagged app/src/agent_panel/AgentPanelView: a merged conversation list (CLI + Coven-daemon, each badged) + the shared agent_transcript transcript + a composer shell — reachable via cmd-shift-U / ctrl-shift-U. The two existing panels are left untouched.

Why: After 2a (#205) unified the conversation data model, this gives it a single surface. It's the view shell that 2c (composer routing + live daemon source) and 2d (default entry point + deprecation) build on.

How:

  • New FeatureFlag::UnifiedAgentPanel + agent_panel::feature_flag::is_enabled.
  • AgentPanelView (mirrors cli_chat::ChatPanelView: holds the singleton ChatModel + a SubmittableTextInput), with self-contained render helpers (view/{header,conversation_list,transcript,composer}.rs) that depend only on the cli_chat model layer + the shared agent_transcript renderer — never cli_chat::view (which 2d deletes). List rows carry a backend badge (CLI / Coven).
  • migrate_stream_history_file (from 2a) is wired into ChatModel::new bootstrap, so migrated coven-code daemon conversations join the merged list.
  • Workspace registration: panel field, flag-gated construction, right-dock render (360px), ToggleUnifiedAgentPanel action + handler, keybinding, and menu item.
  • check_cli_chat_boundary extended to cover app/src/agent_panel.

Scope boundary (deferred): the composer is a shell — active for a live CLI conversation (submits via the existing WorkspaceAction::SubmitChatPrompt → terminal PTY), disabled placeholder otherwise. Per-backend routing + the live daemon send/stream + the daemon conversation source are 2c; deleting the old panels / making this the default is 2d.

Linked Issue

Implements the 2b plan (#206). Continues the reconciliation roadmap (design #204; 2a #205; Phase 1 #201).

Testing

  • cargo nextest run -p warp-app --features cast-agent — new agent_panel tests (backend badge; AgentPanelView layout-safety via with_model + an unwired in-memory model) + a cli_chat bootstrap test (migrated daemon conversation surfaces in the model), plus the full pre-existing cli_chat/agent_transcript suites unchanged.
  • cargo check -p warp-app --bin cast-codes --features gui,cast-agent links (full workspace/menu/keybinding wiring).
  • cargo clippy -p warp-app --features cast-agent --all-targets -- -D warnings clean; cargo fmt -- --check clean.
  • ./script/check_cli_chat_boundary (now covering agent_panel), ./script/check_ai_attribution, ./script/check_rebrand pass.

Agent Mode

@BunsDev
BunsDev marked this pull request as ready for review July 18, 2026 07:48
Copilot AI review requested due to automatic review settings July 18, 2026 07:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements sub-phase 2b of the unified agent panel by adding a new feature-flagged AgentPanelView surface that combines a merged conversation list (CLI + migrated daemon conversations), the shared agent_transcript renderer, and a composer shell, with workspace wiring (action, keybinding, menu item) to toggle it.

Changes:

  • Add FeatureFlag::UnifiedAgentPanel plus agent_panel::feature_flag::is_enabled() gating.
  • Introduce app/src/agent_panel/AgentPanelView with split render helpers (header / list / transcript / composer) and basic layout-safety tests.
  • Wire workspace registration (panel handle + toggle action + keybinding + menu item), and hook daemon stream-history migration into ChatModel::new bootstrap.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
script/check_cli_chat_boundary Extends fork-local boundary checks to include app/src/agent_panel.
crates/warp_features/src/lib.rs Adds FeatureFlag::UnifiedAgentPanel.
app/src/lib.rs Registers the new agent_panel module (non-wasm).
app/src/app_menus.rs Adds menu item to toggle the unified agent panel when enabled.
app/src/util/bindings.rs Adds CustomAction::ToggleUnifiedAgentPanel default keystroke mapping (cmd/ctrl-shift-U).
app/src/workspace/action.rs Adds WorkspaceAction::ToggleUnifiedAgentPanel and marks it as non-blocking for restart flows.
app/src/workspace/mod.rs Registers the editable binding/action for toggling the unified agent panel (flag-gated).
app/src/workspace/util.rs Adds persisted workspace state bit is_agent_panel_open.
app/src/workspace/view.rs Constructs/renders the unified agent panel in the right dock and handles the toggle action.
app/src/cli_chat/model.rs Runs daemon stream-history.json migration at ChatModel bootstrap before loading history.
app/src/cli_chat/model_tests.rs Adds test ensuring migrated daemon conversations surface on model bootstrap.
app/src/agent_panel/feature_flag.rs Adds convenience accessor for UnifiedAgentPanel enablement.
app/src/agent_panel/mod.rs Adds AgentPanelView (holds ChatModel + composer input) and panel layout composition.
app/src/agent_panel/strings.rs Adds user-facing strings for the unified agent panel and backend badges.
app/src/agent_panel/view/mod.rs Declares render helper modules for the unified agent panel.
app/src/agent_panel/view/header.rs Implements header label + “New chat” button.
app/src/agent_panel/view/conversation_list.rs Implements merged conversation list with backend badges and row click behavior.
app/src/agent_panel/view/transcript.rs Renders transcript via agent_transcript, with empty-state + skipped-event hinting.
app/src/agent_panel/view/composer.rs Implements composer shell (active only for live CLI binding in 2b).
app/src/agent_panel/view_tests.rs Adds basic tests (badge mapping + layout non-panicking render).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +111 to +115
.on_click(move |ctx, _, _| {
ctx.dispatch_typed_action(WorkspaceAction::OpenChatSession {
session_id: session_id.clone(),
});
})
Comment on lines +63 to +70
if let Some(conv) = conv {
let agent_name = conv.backend.display_name();
let model_name = conv
.last_model
.as_deref()
.unwrap_or(conv.backend.agent_kind().curated_models()[0].display_name);
format!("{} \u{2014} {}", agent_name, model_name)
} else {
Comment on lines +99 to +112
impl View for AgentPanelView {
fn ui_name() -> &'static str {
"AgentPanelView"
}

fn render(&self, app: &AppContext) -> Box<dyn Element> {
let header = view::header::render(self, app);
let list = view::conversation_list::render_list(self, app);
let transcript = view::transcript::render_panel(self, app);
let composer = view::composer::render_composer(self, app);

// Right column: transcript (flex-expanded) + composer pinned at bottom.
let right_column = Flex::column()
.with_main_axis_size(MainAxisSize::Max)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants