refactor(ai_assistant): retire the Familiar agent panel (DRAFT — needs focus dogfood)#218
Merged
Merged
Conversation
Move TranscriptPart and its supporting AI-dialogue data types (FormattedTranscriptMessage, AssistantTranscriptPart, MarkdownSegment, CodeBlockIndex, TranscriptPartSubType, CodeBlockMouseStateHandles, markdown_segments_from_text) out of the Familiar panel's utils/transcript UI knot into a new UI-free module, ai_assistant::dialogue_types. This lets server_api/ai.rs and ai_assistant::requests depend on the dialogue data layer without pulling in the AIAssistantPanelView, which is being retired. utils re-exports the types for the still-present panel UI. Tests move to dialogue_types_tests.rs.
Remove the AIAssistantPanelView wiring from the workspace ahead of deleting the panel itself: the ToggleAIAssistant/ClickedAIAssistantIcon actions and their warm-welcome siblings, the Familiar EditableBinding (keeping the NewPaneInAgentMode binding on the shared workspace:toggle_ai_assistant id), the panel::init call, and every ai_assistant_panel field, event handler, focus/state site, the legacy tab-bar entry-point button, and the warm-welcome onboarding popup. The panel is now treated as permanently closed; the AskAIType flow is preserved (Agent Mode path is unaffected) and ask_ai_assistant is a no-op for the retired legacy path. WorkspaceState::is_ai_assistant_panel_open is removed.
Delete the AIAssistantPanelView (panel.rs), the Transcript view (transcript.rs) and its tests, the orphaned coven_stream_persist.rs, and the now-orphaned utils.rs (its UI-free dialogue types already moved to dialogue_types; its render_* helpers and AIAssistantAction were panel-only). Drop the panel/transcript/coven_stream_persist/utils module declarations. Gate the now-unused OPENCOVEN_SUCCESS/OPENCOVEN_WARNING brand colours (previously the panel's Coven Gateway status pills) with allow(dead_code), matching OPENCOVEN_MUTED.
Remove the ai_assistant_panel_view() integration getter and the Familiar panel integration test (test_ask_warp_ai_keybinding_for_selected_block, its module, registration, and nextest wrapper), the Familiar focus-panel assertions in workspace view_tests, and the panel.rs source-include from the CastCodes public-surface rebrand guard (the panel file is deleted).
Contributor
There was a problem hiding this comment.
Pull request overview
Retires the legacy ai_assistant “Familiar” panel UI and related workspace wiring, while extracting the still-needed AI dialogue data types into a UI-free module so server_api / auth paths no longer depend on the removed panel code.
Changes:
- Removed Familiar panel UI (panel/transcript), its workspace state/focus paths, warm-welcome onboarding, actions, and integration-test fixtures.
- Extracted AI dialogue/transcript data types into
ai_assistant/dialogue_types.rsand repointedrequests.rs+server_api/ai.rsto the new module. - Updated fork-local public-surface guards to target the unified
agent_panelsources instead of the retired Familiar panel source.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/integration/tests/integration/ui_tests.rs | Drops the ignored Familiar keybinding test from the integration test list. |
| crates/integration/src/test/ai_assistant.rs | Deletes the Familiar “Ask AI from selected block” integration test implementation. |
| crates/integration/src/test.rs | Removes the ai_assistant integration-test module and re-exports. |
| crates/integration/src/bin/integration.rs | Unregisters the removed Familiar integration test. |
| app/src/workspace/view.rs | Removes Familiar panel state/render/focus and makes legacy ask_ai_assistant a no-op. |
| app/src/workspace/view_tests.rs | Removes focus-switching assertions that depended on the Familiar panel/warm-welcome. |
| app/src/workspace/util.rs | Removes is_ai_assistant_panel_open and related mouse state from workspace state. |
| app/src/workspace/mod.rs | Removes the non-Agent-Mode “Toggle Familiar” binding and leaves only the Agent Mode entrypoint binding. |
| app/src/workspace/action.rs | Removes Familiar toggle/warm-welcome actions from WorkspaceAction. |
| app/src/server/server_api/ai.rs | Switches transcript type imports to ai_assistant::dialogue_types. |
| app/src/lib.rs | Stops initializing the retired Familiar panel. |
| app/src/integration_testing/view_getters.rs | Removes the integration-testing getter for the deleted Familiar panel view. |
| app/src/castcodes_public_surface_tests.rs | Moves fork-local Coven wiring/label guards from ai_assistant/panel.rs to unified agent_panel sources. |
| app/src/ai/coven_brand.rs | Adds #[allow(dead_code)] to brand colors that became unused after panel retirement. |
| app/src/ai_assistant/transcript.rs | Deletes the Familiar transcript view implementation. |
| app/src/ai_assistant/transcript_tests.rs | Deletes transcript navigation unit tests tied to the removed view. |
| app/src/ai_assistant/test_util.rs | Repoints test utilities to dialogue_types types. |
| app/src/ai_assistant/requests.rs | Repoints transcript types + markdown segmentation helpers to dialogue_types. |
| app/src/ai_assistant/panel.rs | Deletes the Familiar panel implementation (including coven stream UI plumbing). |
| app/src/ai_assistant/mod.rs | Removes the retired UI modules and exports the new dialogue_types module. |
| app/src/ai_assistant/dialogue_types.rs | New UI-free transcript/markdown segment data types extracted from the old UI knot. |
| app/src/ai_assistant/dialogue_types_tests.rs | Renames/ports the old utils tests to target dialogue_types. |
| app/src/ai_assistant/coven_stream_persist.rs | Deletes now-orphaned coven stream history persistence (previously tied to the Familiar panel). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
1209
to
1210
| // We use the same binding name for the AI Assistant and block list AI to preserve custom | ||
| // keybindings between them. |
Comment on lines
+16076
to
+16080
| fn ask_ai_assistant(&mut self, _ask_type: &AskAIType, _ctx: &mut ViewContext<Self>) { | ||
| // The legacy Familiar (AI assistant) panel has been retired. The unified | ||
| // agent panel is now the default agent surface, so this legacy | ||
| // non-agent-mode entry point is a no-op. The `AskAIType` flow itself is | ||
| // preserved for the Agent Mode path handled elsewhere. |
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 — needs live dogfooding of workspace focus before merge.
Retires the
ai_assistant"Familiar" agent panel, perspecs/castcodes-unified-agent-panel/PLAN-2d-task4-familiar-retirement.md(v2, scope A). The unifiedagent_panel(default since #216) is now the agent surface; this removes the superseded Familiar UI.Approach — data-vs-UI extraction, not a plain deletion. The Familiar panel was a circular knot (
panel.rs ↔ transcript.rs ↔ utils.rs) fused to the AI server-API data layer. So:TranscriptPart& friends,markdown_segments_from_text,CodeBlockMouseStateHandles) into a new UI-freeai_assistant/dialogue_types.rs; repointserver_api/ai.rs+requests.rsto it.dialogue_types.rsimports onlywarpui/markdown_parserleaf types — nopanel/transcript/AIAssistantAction.panel.rs,transcript.rs,coven_stream_persist.rs(orphaned), and the UI half ofutils.rs(which became fully orphaned → removed).AIAssistantActiondeleted.ToggleAIAssistant+ClickedAIAssistantIconactions, the!AgentModekeybinding (theNewPaneInAgentModebinding on the same id stays),is_ai_assistant_panel_openstate,panel::init, ~25 focus sites, and the test fixtures.Kept (used app-wide):
execution_context,coven_entry(unified panel uses it),requests.rs(server_api/auth),AskAIType+AI_ASSISTANT_*constants. Agent Mode untouched.Scope expansions (cascade of deleting the panel — call out for review)
utils.rsdeleted entirely (renamed todialogue_types.rsafter extraction; the leftover UI helpers were orphaned).ask_ai_assistantis now a no-op in the non-Agent-Mode path (the old panel entry). Agent Mode is default-on, so the block/selection "Ask AI" Agent-Mode path (terminal::view::ask_ai) is unchanged; the legacy non-agent affordance no longer does anything.castcodes_public_surface_tests.rsinclude_str!'d the deletedpanel.rs; its 4 Coven-wiring assertions (COVEN_CODE_HARNESS,send_via_coven_gateway_with_prompt, …) were removed with it. Follow-up: add equivalent fork-local guards on the unifiedagent_panel.#[ignore]'d) Familiar integration test + its registration.Testing (independently verified, not just the author's claim)
cargo clippy -p warp-app --features cast-agent --all-targets -- -D warnings— cleancargo clippy -p warp-app --features cast-agent,unified_agent_panel --all-targets -- -D warnings— cleancargo nextest … -E 'test(ai_assistant|workspace|agent_panel|server|cli_chat|dialogue_types|castcodes_public_surface)'— 427 passed, 0 failed./script/bundle --channel oss --nouniversal --check-only) —release-ltoFinished,server_apicompiles./script/check_cli_chat_boundary/check_ai_attribution/check_rebrand— pass. No dangling panel references remain.Needs your dogfood (an agent can't verify these)
ctrl-shift-space) is now a no-op — confirm that's intended.workspace:toggle_ai_assistantnow binds onlyNewPaneInAgentMode(Agent-Mode-gated) — confirm no keybinding regression with Agent Mode disabled.Linked Issue
Executes the v2 plan (in main via #217). Roadmap: #204/#205/#209/#210/#213/#214/#216.
Agent Mode