Files
lumbridge-code/docs/decisions/0010-panel-lifecycle-detach-before-terminate.md
T
karti 3409cabb80
CI / rust (push) Successful in 2m10s
feat: add persistent dynamic panels
2026-08-31 18:43:36 -07:00

37 lines
2.1 KiB
Markdown

# 0010: Removing a panel detaches its session before termination
Status: accepted for implementation.
A workspace panel is a view attachment, not the lifetime owner of a PTY, agent,
browser, or remote session. The normal remove action is therefore **Detach
panel**. It removes the panel from the visible layout, keeps its stable pane and
session identities, preserves output and decision state, and exposes the item in
a Detached sessions tray. Reattaching it is a Configure-capability operation and
must not launch a second process.
Termination is a separate Execute-capability operation. It is presented as
**Terminate session**, never as an ambiguous close icon, and will require a
confirmation that names the process, target machine, and any dirty or waiting
state. Detaching the selected panel chooses its next attached sibling, falling
back to the previous sibling. A workspace retains at least one attached panel.
The add affordance opens a chooser for Terminal, Browser, Markdown, Review, and
Reattach running session. The deterministic comparison model still uses six
seed fixtures and starts with five attached. The GPUI slice no longer inherits
that fixture limit: Add Panel creates a new persistent panel identity beside the
selection or reattaches the exact detached identity without relaunching it.
The typed command plane retains detached pane definitions separately from the
layout tree. `ClosePane(Detach)` moves a definition into that registry,
`AttachPane` restores it without a launch intent, and `ClosePane(Terminate)`
requires Execute authority whether the pane is attached or detached. The future
runtime registry remains the process owner throughout these layout transitions.
This interaction vocabulary was informed by behavior study of cmux at
`fc36aea87e3b4152637597443d7aa7c22e4ec9f8` and Orca at
`02a7742406a5a84fb372d6255d5a4367421990bd`. cmux is GPL-3.0-or-later and was
used only to study workspace/split shortcuts and close-versus-detached process
behavior. Orca is MIT-licensed and was used to study worktree-first navigation,
durable terminal state, and mixed surface density. No implementation code or
visual asset was copied from either project.