# Quick Pane v1 Implementation Plan ## 1. Define persisted configuration - Add Quick Pane settings types, defaults, validation, serialization, and migration-safe native storage. - Fields: default workspace, quick model, follow-up model, supplemental prompt, maximum seconds, maximum read-only tool calls. - Preserve current configuration when validation or save fails. ## 2. Add native window and launch contract - Extend Tauri configuration and Rust window management with a dedicated Quick Pane window label. - Add command-line action used by external WM hotkey to create/show/focus pane, including cold launch. - Keep `--toggle` and ordinary `--new` behavior unchanged. ## 3. Build Quick Pane React surface - Add isolated state/component logic for request, selected model/workspace, progress, full ordered transcript, current-turn partial answer, escalation, extension UI, and errors. Clear prior answer/handoff state before every follow-up while retaining transcript messages. - Keep pane transcript and exact raw-prompt-to-visible-request mappings in component memory only. Hide unknown reflected Quick Pane advisory prompts rather than delimiter-parsing them. - Make `Esc` and **Close** native hide actions. Preserve idle runtime, draft, catalog, and transcript when reopened within three minutes; renew stale idle chats on focus. - Add `Ctrl+N` reset semantics: abort active work, close with cleanup retry, clear draft/transcript/prompt mappings, and prepare a fresh catalog/runtime. - Open native window at 640×360 with a 520×360 minimum; use ResizeObserver/RAF content measurement to request native growth only up to 520px tall, then use internal scrolling. - Add visible Retry recovery for settings-startup and model-catalog preparation failures. Finish failed-runtime cleanup before replacement preparation, and keep model/Send disabled until ready. - Add Settings controls and copyable WM launch command. ## 4. Add constrained bridge runtime mode - Extend runtime creation with Quick Pane metadata and ephemeral session lifecycle. - Build immutable advisory quick-agent instructions around supplemental custom prompt. - Use advisory tool-call guidance only; document that current Pi RPC cannot trusted-enforce read-only/no-subagent policy or memory-only runtime sessions. - Instruct preflight escalation for mutation, subagent, multi-step, or complex requests. ## 5. Route interaction and handoff - Reuse existing extension request/response protocol for inline Quick Pane permission and clarification dialogs. - After first completed assistant answer, show manual continuation with valid handoff configuration; never open a session automatically. - Prefill normal session with transcript-derived current-chat context, workspace, and follow-up model. ## 6. Test and document - Add unit tests for settings validation/persistence and guardrail classification. - Add component tests for pane states, full transcript and exact prompt reflection, picker behavior, inline prompts, hide/renew/reset behavior, runtime and extension errors, stale-created cleanup retry, and handoff. - Add Rust/bridge tests for window command routing, bounded content resizing, ephemeral cleanup, and handoff payload. - Add manual WM hotkey/cold-launch instructions and smoke checklist. ## Sequencing Land configuration/runtime contract first, then native window and UI, then handoff and test coverage. Preserve existing normal-session paths throughout.