refactor(agent_panel): 2d stage-2 — retire the cli_chat panel (DRAFT, gated on parity)#214
Merged
Merged
Conversation
This was referenced Jul 18, 2026
BunsDev
marked this pull request as ready for review
July 18, 2026 13:42
Contributor
There was a problem hiding this comment.
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_chatpanel 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
ChatModelsingleton registration onFeatureFlag::UnifiedAgentPanelso unified-panel enablement doesn’t panic onChatModel::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 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, | ||
| }, |
This was referenced Jul 18, 2026
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.
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_chatchat 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 wholeChatPanelView+ its 10 view modules).WorkspaceAction::{ToggleCliChatPanel, SubmitChatPrompt},CustomAction::ToggleCliChatPanel+cmd/ctrl-shift-Hkeystroke, the workspace field / construction / render block / handlers,is_cli_chat_panel_openstate, themod.rskeybinding, theapp_menusitem, and theTOGGLE_CLI_CHAT_PANEL_BINDING_NAMEconst.cli_chat::feature_flag(CastCodesChatPanelaccessor) andcli_chat::strings(only the deleted view consumed them).What this keeps: the entire
cli_chatmodel layer (model,store,store_schema,conversation,entry,history_migration,paths) — the unified panel depends on it — and the shared actionsOpenChatSession/CliChatNewChat(reused by the agent panel;OpenChatSessionnow opens the agent panel).Load-bearing fix:
ChatModel's singleton registration was gated onCastCodesChatPanel; since the unified panel (gated byUnifiedAgentPanel) is now the only consumer, this repoints it to the unified flag — otherwise enabling the unified panel without the old flag panics onChatModel::handle(registered singleton).Deliberately NOT in this PR
PLAN-2d Task 4 (remove the
ai_assistantcoven-stream section) is intentionally excluded. Investigation showed the plan's premise is wrong: under#[cfg(feature = "cast-agent")],AIAssistantPanelView::issue_primary_requestroutes every prompt throughsend_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-agentand…,unified_agent_panel(all-targets,-D warnings) both clean;cargo fmt -- --checkclean../script/check_cli_chat_boundary,check_ai_attribution,check_rebrandpass../script/run --features …,unified_agent_panelagainst a CLI agent + a live coven-code daemon, confirming the unified panel fully covers the retired cli_chat panel before this merges.Agent Mode