Aller au contenu
Toutes les versions

v0.3.2

Terminal Threads, editable rename, auto-titled threads

Sortie le .

Paneflow v0.3.2 — Terminal Threads, editable rename, auto-titled threads

Third drop in the Agents view (cmux-port-2026-Q2). Three coherent pieces:

Terminal Thread surface

The project context menu now ships a "New terminal thread" action that opens a raw PTY surface in the main area instead of a chat. Run claude, codex, amp, opencode, pi, gh dash, lazygit, htop — anything CLI — and it lives as a first-class sidebar entry next to your ACP-backed agent threads.

  • OSC 0/2 title updates from the running process flow into the sidebar row label, so a claude auto-summary (or any process that sets its terminal title) replaces the generic Terminal placeholder live.
  • Closing a thread tears down the PTY immediately (alacritty Msg::Shutdown in Drop); closing a project cascades cleanup for all its terminal threads.
  • The thread row's kind is persisted in session.json via a new kind discriminant in ThreadSession — older sessions round-trip byte-identically (#[serde(default)]), so a downgrade after upgrading doesn't corrupt anything.

Mirrors Zed's AgentPanelEntryKind::Terminal semantics with Paneflow's own PTY stack (portable-pty + alacritty_terminal 0.26).

Editable rename for project and thread rows

Renamed the rename. The old {text}| fake-shimmer in the sidebar is gone — both project headers and thread rows now use a real TextArea entity, the same widget the composer uses, with full editing affordances:

  • Cursor + selection.
  • IME, clipboard, system shortcuts.
  • Click-to-position, double-click word select, triple-click line select.
  • Submit on Enter, cancel on Escape, commit-on-blur when you click away.

Thread rows were previously not user-renameable — they relied on either an agent-pushed SessionInfoUpdate.title (Claude Code) or the client-side auto-derive on the first prompt. That left Codex threads stuck with whatever the auto-derive produced. With this release, every thread is renameable via context menu Rename thread or by double-click on the row label, and the rename is mirrored into threads.db (set_summary) so the new title survives a session.json wipe.

Per-thread agent icons (the small claude-color.svg / codex-color.svg next to each thread title) are now hidden in favor of an invisible 14px placeholder that keeps the title's X-position aligned with the project header above it. The agent kind is already conveyed by the project header — the per-thread glyph was visual noise that also broke down for Terminal Threads (no agent kind to display).

Background thread-title summarizer (Zed parity)

After the first clean turn of a thread, Paneflow now generates a sharp 3-7 word title and applies it to the sidebar row — spiritual port of Zed's Thread::generate_title flow. Specifically for Codex threads (and any future agent that doesn't push titles via ACP):

  • The composer captures the title at the moment of the first user prompt.
  • On the first EndTurn, it shells out to claude -p --dangerously-skip-permissions --model haiku with the user/assistant pair and a short summarization prompt (verbatim from Zed's summarize_thread_prompt.txt).
  • The result lands as a new TitleSuggested event, gated by a new TitleReplacePolicy::OnlyIfStillEqualTo(snapshot) policy — if the user renamed the thread or the agent pushed a SessionInfoUpdate.title during the (~1-3 s) subprocess round trip, the summarizer's result is silently dropped.

Key divergence from Zed's literal implementation: Zed drives summarization through an Arc<dyn LanguageModel> HTTP backend. We use the user's existing claude CLI to avoid managing any provider credentials of our own — works out of the box for Claude Max subscribers (OAuth keychain) and API users (ANTHROPIC_API_KEY).

Claude Code threads still get titles directly from the agent's own ACP push; the summarizer no-ops there.

Title hygiene

New clean_sidebar_title helper that strips leading CLI-status decoration glyphs from sidebar titles, applied at three sites:

  • Background summarizer output (in case the model hallucinates a Title: prefix).
  • ACP-pushed SessionInfoUpdate.title (Claude Code's spinner, Codex's braille spinner, generic /, zero-width characters).
  • Session restore (thread_from_session), so threads cleaned up in this release stay clean across launches.

The strip is whitelist-based — letters, digits, and the legitimate title-leading punctuation are kept, everything else is stripped from the front in one pass. Future CLI status glyphs are caught without code changes.

Replace-policy enum

TitleSuggested now carries a tri-state TitleReplacePolicy instead of a single boolean, modeled after Zed's Thread::set_title / generate_title guards:

Policy When Behavior
Always ACP push (SessionInfoUpdate.title) Replaces unconditionally — the agent's authoritative summary wins.
OnlyIfDefault Client-side auto-derive on first prompt Replaces only if the current title is still "New thread".
OnlyIfStillEqualTo(snapshot) Background summarizer Replaces only if the title still matches the snapshot captured at trigger time.

Compatibility

  • session.json format is forward-compatible. Older sessions restore as ThreadKind::Agent (the legacy chat path). Restoring a v0.3.2 session in v0.3.1 will silently drop the kind field — Terminal Threads come back as Agent threads (broken until you delete them). One-way upgrade for sessions with Terminal Threads.
  • threads.db is unchanged.
  • Cross-platform: full parity across Linux (Wayland + X11), macOS (Intel + Apple Silicon), Windows (x64).

Commits

  • feat(threads): add ThreadKind discriminant + clean_sidebar_title helper (266db74)
  • feat(agents): Terminal Thread surface + editable rename for sidebar rows (0503d62)
  • feat(agents): background thread-title summarizer (Zed parity) (b9c5b49)
  • chore(release): v0.3.2 -- Terminal Threads, editable rename, title summarizer (0362287)

Full Changelog: https://github.com/ArthurDEV44/paneflow/compare/v0.3.1...v0.3.2