Skip to content

[twarp 07] specs: Claude Code panel#66

Merged
timomak merged 1 commit into
masterfrom
twarp-07-claude-code-panel-specs
May 27, 2026
Merged

[twarp 07] specs: Claude Code panel#66
timomak merged 1 commit into
masterfrom
twarp-07-claude-code-panel-specs

Conversation

@timomak
Copy link
Copy Markdown
Owner

@timomak timomak commented May 26, 2026

What

Spec PR for feature 07 — Claude Code panel. Adds roadmap/07-claude-code-panel/PRODUCT.md and TECH.md, and reconciles the roadmap now that feature 06 is fully merged.

The feature brings back the rendering layer of Warp's Agent Mode — streaming assistant text, collapsible thinking blocks, structured tool-call cards, inline diff cards, todo list — as a panel that hosts only the local claude CLI (spawned with --output-format stream-json). No Warp AI account, no LLM client, no billing, no cloud sync — feature 02's removals stay removed; only the renderer comes back, driven by an external CLI the user already pays for.

Key finding: detangle gate resolved — port-and-adapt, not git restore

7a's audit (folded into this spec PR) found the deleted renderer is fully recoverable from commit fea2f7ea (the feature-02 spec commit, which predates every deletion PR #6#18). But every rendering file still uses deleted service types (crate::ai::skills::…, the Requests/LLMResponse lifecycle, agent-profile context), so a wholesale restore would drag back exactly what feature 02 removed.

Resolution: per-component port-and-adapt — port the leaf rendering primitives onto a new thin twarp-side Transcript/TranscriptEvent model, drop the service-coupled pieces (requests.rs, controller.rs, agent_input_footer/), and rewrite any component whose port costs more coupling than rebuilding. The subprocess driver lives in a new headless crate crates/claude_code (unit-testable against golden transcripts); the UI in app/src/claude_code_panel/.

Panel integration is fully mapped to verified anchors: ToolPanelView (left_panel.rs:193), compute_left_panel_views (view.rs:18083, beside the existing flag gate), the subprocess precedent (util/git.rs:26/91command::r#async::Command + kill_on_drop), UniformList streaming (global_search/view.rs:314), and the feature-05 diff renderer (code_review_view.rs:5984).

Notable spec decisions

  • Keybinding ⌘⌥K assigned via custom_tag_to_keystroke (not with_key_binding) — applying the feature-06 lesson that the latter clobbers Trigger::Custom and panics the menu at startup. Stays a remappable EditableBinding. Conflict-check deferred to impl per the 06 discipline.
  • Panel placement: left-panel tab (provisional). Flagged as the most likely respec point (cf. feature 05's placement respec); the full-pane alternative stays open in PRODUCT §51. Decide for real once 7b renders something.
  • Permissions (7g) build the official surface first--permission-mode selector + --allowedTools. The stdin permission control-protocol is undocumented/unstable, so interactive in-transcript prompts are a version-gated enhancement that degrades gracefully (PRODUCT §42, TECH §Risks).
  • Surfaced external constraint: Anthropic's 2026-06-15 change routes claude -p subscription usage to a separate Agent-SDK credit. The panel meters nothing; it surfaces claude's own auth/limit errors verbatim (PRODUCT §55). Worth a dogfood release note.

Roadmap reconciliation (also in this PR)

Validation

PRODUCT.md ends with a Smoke test organized per sub-phase (7b–7h) to run against a built twarp binary with claude installed. TECH.md maps each Behavior invariant to a concrete unit / integration / manual check, with the defensive-parser tests in crates/claude_code called out as critical and a version-pin + golden-fixture strategy for schema drift. Docs-only PR — no cargo fmt/clippy/presubmit required.

🤖 Generated with Claude Code

Adds PRODUCT.md + TECH.md for feature 07 (resurrect Warp's Agent Mode rendering layer to host the local claude CLI; no service layer). Resolves the 7a detangle gate as per-component port-and-adapt from fea2f7e. Reconciles 06 -> merged and sets active -> 07.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@timomak timomak merged commit c10c6c0 into master May 27, 2026
6 of 17 checks passed
timomak added a commit that referenced this pull request May 27, 2026
Reconcile STATUS to git (spec #66 merged) and record the 7b impl PR. Tick the 7b sub-phase, flip the feature phase to impl-in-review, and note the resolved decisions: ⌘⌥K conflict-free (cmd-alt-k/ctrl-alt-k unbound), FeatureFlag::ClaudeCodePanel dogfood-only, launch-verified no startup panic, and the 7c–7h deferrals.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant