Skip to content

[twarp 07] re-spec: terminal-triggered main-pane chat (supersede sidebar)#70

Merged
timomak merged 3 commits into
masterfrom
twarp-07-respec-mainpane
Jun 2, 2026
Merged

[twarp 07] re-spec: terminal-triggered main-pane chat (supersede sidebar)#70
timomak merged 3 commits into
masterfrom
twarp-07-respec-mainpane

Conversation

@timomak
Copy link
Copy Markdown
Owner

@timomak timomak commented Jun 2, 2026

twarp 07 — re-spec: terminal-triggered main-pane chat

This supersedes the sidebar design. The 7b build (PR #69) ported the renderer correctly but put the chat in the left sidebar behind a toolbelt button / ⌘⌥K — the wrong product direction. This re-spec rewrites PRODUCT.md + TECH.md for the corrected, owner-confirmed design. Specs only — no code in this PR.

What changes

  • Trigger: running claude in a terminal is intercepted at submit and opens the rich UI — no sidebar button, no chord for the chat.
  • Surface: the chat is a first-class main-content pane (IPaneType::ClaudeCode, modeled on the code-editor pane) — a tab like an editor/terminal, resizable/splittable/closeable. Not the sidebar.
  • Sidebar: repurposed to a read-only past-sessions list for the cwd, shown only when sessions exist. No chat in the sidebar.
  • Visual bar: match Anthropic's Claude desktop / Claude Code app (docked composer, chat turns, structured cards). This is the acceptance gate.

What's kept vs dropped

  • Kept (placement-agnostic, re-introduced from [twarp 07b] Claude Code panel: panel shell + ported transcript #69): the headless crates/claude_code driver crate (stream-json parser + Transcript model, 19 tests) and the ported markdown renderer (render_message + the markdown splitter, reusing feature 03's stack).
  • Dropped: the left-panel placement (ToolPanelView::ClaudeCode, toolbelt button, sidebar render arm) and the ⌘⌥K toggle.

New TECH content (from a codebase audit)

  • Terminal interception hook: app/src/terminal/input.rs::try_execute_command_from_source — after validation, before the PTY write, detect a top-level claude invocation (parsed conservatively with the existing completer parser) and emit an event that opens the pane instead. When in doubt, run it raw — never swallow a real shell command.
  • Pane host: add IPaneType::ClaudeCode + ClaudeCodePane/ClaudeCodeView modeled on CodePane/CodeView (app/src/pane_group/), wired into PaneId::render(), LeafContents, and restore.
  • The rendering per-file decision matrix is unchanged (the leaves don't care about the host); 7b–7h are re-derived around the pane host.

Load-bearing decisions flagged for review (PRODUCT.md §"Load-bearing decisions")

Provisional, easy to veto: pane opens as a new tab; claude <prompt> forwards the prompt as the first turn; always-on (no feature flag). See the spec.

Follow-up actions

Specs: PRODUCT.md + TECH.md. After merge, impl restarts at the re-derived 7b (pane host + claude-at-submit trigger + re-hosted ported transcript).

🤖 Generated with Claude Code

timomak and others added 3 commits June 2, 2026 12:15
…bar)

The 7b sidebar build (PR #69) was rejected on sight: wrong placement. Re-spec
PRODUCT.md + TECH.md for the corrected, owner-confirmed direction:

- Trigger: running `claude` in a terminal is intercepted at submit and opens a
  dedicated Claude Code MAIN-CONTENT pane (a tab like an editor/terminal), not
  a left-sidebar toolbelt button / ⌘⌥K.
- Surface: the chat is a first-class pane (IPaneType::ClaudeCode, modeled on
  CodePane) — resizable, splittable, closeable.
- Sidebar: repurposed to a read-only past-sessions list, shown only when any
  sessions exist.
- Visual bar: match Anthropic's Claude desktop / Claude Code app.

Kept (placement-agnostic): the headless claude_code driver crate (19 tests) and
the ported markdown renderer from #69. Dropped: the left-panel placement + ⌘⌥K.
TECH.md adds the terminal-interception hook (terminal/input.rs) and the pane
host (pane_group / IPaneType) integration points from a codebase audit, keeps
the rendering per-file matrix, and re-derives 7b–7h. Specs only; no code here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
STATUS.md rewritten for the terminal-triggered main-pane direction; sub-phases
re-derived around the pane host; placement open-decision reversed (sidebar →
main-content pane). ROADMAP row notes the main-pane re-spec PR and the
superseded 7b sidebar PR. Phase stays spec-in-review pending #70.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#69 (the sidebar 7b build) was merged to master, bringing in
crates/claude_code + the ported renderer (in a sidebar host). Merge
master into the main-pane re-spec branch; the only conflicts were the
two roadmap docs, resolved to git reality:

- #69 relabeled from "superseded / to-close" -> "merged": it landed the
  placement-agnostic core; the sidebar host is now obsolete.
- 7b re-scoped from "re-introduce crates/claude_code" -> "relocate the
  merged sidebar surface into a main-content pane (delete sidebar host)".
- Phase stays spec-in-review (gating spec PR #70 still open).

Docs-only resolution; #69's code merged cleanly (17 files, claude_code
crate + app wiring).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@timomak timomak merged commit 6c7618a into master Jun 2, 2026
5 of 16 checks passed
timomak added a commit that referenced this pull request Jun 2, 2026
…mark #70 merged

Co-Authored-By: Claude Opus 4.8 (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