Skip to content

refactor(agent_panel): 2d stage-2 — retire the cli_chat panel (DRAFT, gated on parity)#214

Merged
BunsDev merged 1 commit into
mainfrom
chore/unified-agent-panel-2d-cleanup
Jul 18, 2026
Merged

refactor(agent_panel): 2d stage-2 — retire the cli_chat panel (DRAFT, gated on parity)#214
BunsDev merged 1 commit into
mainfrom
chore/unified-agent-panel-2d-cleanup

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 18, 2026

Copy link
Copy Markdown
Member

Description

DRAFT — do not merge until parity is dogfooded (specs/castcodes-unified-agent-panel/PARITY-2d.md).

This is stage 2 of 2d (plan #208): retire the standalone cli_chat chat panel now that the unified agent panel (2b–2c, default-enablable via #213) replaces it.

What this deletes (Task 3):

  • app/src/cli_chat/view/* (the whole ChatPanelView + its 10 view modules).
  • The panel wiring: WorkspaceAction::{ToggleCliChatPanel, SubmitChatPrompt}, CustomAction::ToggleCliChatPanel + cmd/ctrl-shift-H keystroke, the workspace field / construction / render block / handlers, is_cli_chat_panel_open state, the mod.rs keybinding, the app_menus item, and the TOGGLE_CLI_CHAT_PANEL_BINDING_NAME const.
  • Now-dead cli_chat::feature_flag (CastCodesChatPanel accessor) and cli_chat::strings (only the deleted view consumed them).

What this keeps: the entire cli_chat model layer (model, store, store_schema, conversation, entry, history_migration, paths) — the unified panel depends on it — and the shared actions OpenChatSession / CliChatNewChat (reused by the agent panel; OpenChatSession now opens the agent panel).

Load-bearing fix: ChatModel's singleton registration was gated on CastCodesChatPanel; since the unified panel (gated by UnifiedAgentPanel) is now the only consumer, this repoints it to the unified flag — otherwise enabling the unified panel without the old flag panics on ChatModel::handle (registered singleton).

Deliberately NOT in this PR

PLAN-2d Task 4 (remove the ai_assistant coven-stream section) is intentionally excluded. Investigation showed the plan's premise is wrong: under #[cfg(feature = "cast-agent")], AIAssistantPanelView::issue_primary_request routes every prompt through send_via_coven_gateway — i.e. the coven-stream is the Familiar panel's entire agent path in this fork (there is no non-coven agent path; the hosted path is stubbed). Removing it doesn't trim a "section," it retires the Familiar agent panel wholesale. That's a larger product decision than the plan assumed and needs its own scoped PR + sign-off. See the note added to PLAN-2d / this PR thread.

Linked Issue

Stage 2 of the 2d plan (#208). Roadmap: design #204; 2a #205, 2b #209, 2c #210, 2d stage-1 #213; Phase 1 #201.

Testing

  • cargo check -p warp-app --bin cast-codes --features gui,cast-agent (unified OFF) + …,unified_agent_panel (unified ON) both link.
  • cargo clippy … --features cast-agent and …,unified_agent_panel (all-targets, -D warnings) both clean; cargo fmt -- --check clean.
  • ./script/check_cli_chat_boundary, check_ai_attribution, check_rebrand pass.
  • Parity dogfooding (PARITY-2d.md) is the merge gate — needs manual ./script/run --features …,unified_agent_panel against a CLI agent + a live coven-code daemon, confirming the unified panel fully covers the retired cli_chat panel before this merges.

Agent Mode

@BunsDev
BunsDev marked this pull request as ready for review July 18, 2026 13:42
Copilot AI review requested due to automatic review settings July 18, 2026 13:42
@BunsDev
BunsDev merged commit d9c55b7 into main Jul 18, 2026
18 checks passed

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

Stage-2 of the unified agent panel 2d rollout: removes the legacy cli_chat panel UI surface (view modules + workspace/menu/keybinding wiring) while keeping the cli_chat model layer for reuse by the unified agent panel, and repoints ChatModel singleton registration to the unified panel’s feature flag.

Changes:

  • Removed cli_chat panel UI (app/src/cli_chat/view/*) and all related workspace/menu/keybinding actions/wiring.
  • Updated workspace actions and bindings to use only ToggleUnifiedAgentPanel + SubmitAgentPrompt.
  • Gated ChatModel singleton registration on FeatureFlag::UnifiedAgentPanel so unified-panel enablement doesn’t panic on ChatModel::handle.

Reviewed changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
app/src/workspace/view.rs Removes legacy panel view storage/rendering/handlers; keeps unified panel integration; updates OpenChatSession to open unified panel.
app/src/workspace/util.rs Removes is_cli_chat_panel_open workspace state.
app/src/workspace/mod.rs Removes legacy keybinding/menu binding for the retired cli_chat panel.
app/src/workspace/action.rs Deletes ToggleCliChatPanel/SubmitChatPrompt; retains unified panel actions.
app/src/util/bindings.rs Removes CustomAction::ToggleCliChatPanel mapping and keystroke.
app/src/lib.rs Registers cli_chat::ChatModel singleton behind the unified agent panel flag.
app/src/cli_chat/view/transcript.rs Deleted (legacy panel transcript UI).
app/src/cli_chat/view/tool_call_card.rs Deleted (stub).
app/src/cli_chat/view/settings_section.rs Deleted (legacy panel settings placeholder).
app/src/cli_chat/view/permission_card.rs Deleted (stub).
app/src/cli_chat/view/model_picker.rs Deleted (legacy panel header UI).
app/src/cli_chat/view/mod.rs Deleted (legacy panel view root + ChatPanelView).
app/src/cli_chat/view/info_bar.rs Deleted (stub).
app/src/cli_chat/view/error_banner.rs Deleted (legacy panel banner UI).
app/src/cli_chat/view/empty_state.rs Deleted (legacy panel empty-state UI).
app/src/cli_chat/view/conversation_list.rs Deleted (legacy panel list UI).
app/src/cli_chat/view/composer.rs Deleted (legacy panel composer UI).
app/src/cli_chat/strings.rs Deleted (legacy panel strings).
app/src/cli_chat/mod.rs Stops exporting legacy UI modules; keeps model/store layer exports.
app/src/cli_chat/feature_flag.rs Deleted (legacy panel feature-flag accessor).
app/src/app_menus.rs Removes legacy “toggle chat panel” menu item.
app/src/agent_panel/view/composer.rs Updates docs to reference SubmitAgentPrompt.
app/src/agent_panel/mod.rs Updates module docs to reference SubmitAgentPrompt.
app/src/agent_panel/feature_flag.rs Updates docs referencing prior accessor pattern.
Comments suppressed due to low confidence (1)

app/src/workspace/mod.rs:748

  • This PR removes a user-visible panel + menu item + keybinding and shifts session-opening behavior to the unified agent panel. Manual parity dogfooding is called out as the merge gate in the PR description, but there’s no attached screen recording/screenshots demonstrating end-to-end parity (toggle/open session/submit prompt for both CLI + daemon). Please attach that evidence (or link to it) once the PARITY-2d checklist is completed.
        #[cfg(not(target_family = "wasm"))]
        EditableBinding::new(
            "workspace:toggle_unified_agent_panel",
            BindingDescription::new(crate::agent_panel::strings::TOGGLE_MENU_ITEM)
                .with_custom_description(
                    bindings::MAC_MENUS_CONTEXT,
                    crate::agent_panel::strings::TOGGLE_MENU_ITEM,
                ),
            WorkspaceAction::ToggleUnifiedAgentPanel,
        )
        .with_context_predicate(id!("Workspace"))
        .with_group(bindings::BindingGroup::Navigation.as_str())
        .with_enabled(crate::agent_panel::feature_flag::is_enabled)
        .with_custom_action(CustomAction::ToggleUnifiedAgentPanel)
        .with_mac_key_binding("cmd-shift-U")
        .with_linux_or_windows_key_binding("ctrl-shift-U"),

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

Comment thread app/src/workspace/view.rs
Comment on lines 19253 to 19257
@@ -19268,24 +19255,6 @@ impl Workspace {
// resource center visible at the same time. Phase 2 places the
// panel at a fixed minimum width; later phases (Phase 7+) wire
// up resizing and richer chrome.
Comment on lines 3 to 6
//! In 2b the composer is active only for a live CLI conversation (submit routes
//! to the terminal PTY via the shared `WorkspaceAction::SubmitChatPrompt`);
//! to the terminal PTY via `WorkspaceAction::SubmitAgentPrompt`);
//! daemon and unbound conversations render a disabled placeholder. Per-backend
//! routing (daemon send) arrives in 2c.
@@ -1,5 +1,4 @@
//! Convenience accessor for the `UnifiedAgentPanel` feature flag. Mirrors
//! `crate::cli_chat::feature_flag`.
//! Convenience accessor for the `UnifiedAgentPanel` feature flag. Mirrors the `cli_chat` feature-flag accessor pattern.
Comment on lines +268 to 273
/// Opens a past conversation in the agent panel transcript. Dispatched from
/// the conversation-list sidebar when a user clicks a row.
#[cfg(not(target_family = "wasm"))]
OpenChatSession {
session_id: String,
},
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