feat: redesign pane layout system (@superset/panes)
Merged
SA
7mo ago+4222+4222+0123456789012345678901234567890123456789-3220-3220-0123456789012345678901234567890123456789
Summary
- Redesigned the pane layout data model from a 3-tier hierarchy (Root → Group → Pane) to a simpler Tab → Split → Pane model
- Renamed package from
@superset/pane-layoutto@superset/panes - New store with all actions (tab CRUD, pane CRUD, split/resize/equalize, openPane, replacePane)
- N-ary weighted splits (FlexLayout-inspired) with
react-resizable-panelsfor resize UI - React component tree: Workspace → TabBar → Tab → Pane with PaneHeader
- Configurable pane header actions via
PaneActionConfig(split + close with hotkey tooltips) - Slots API:
renderTitle,renderHeaderExtras,renderToolbar(full eject) onPaneDefinition PaneContextandTabContexttypes with enriched layout info (parentDirection,position)- 57 store tests passing
- Wired up in desktop app's v2 workspace with proper pane registry, empty state, and command palette
Test plan
- Open v2 workspace → empty state with action buttons renders
- Click + → dropdown shows Terminal/Chat/Browser options
- Add terminal tab → tab appears with pane header (icon + title + split/close)
- Click split → new terminal pane appears (direction auto-picks based on layout)
- Click close → pane closes, last pane closes tab
- Resize split handles → weights update
- Tab rename (double-click) → inline input works
- Tab context menu → Rename/Close/Close Others/Close All
- Hover pane header actions → tooltips with hotkey labels
-
bun testinpackages/panes→ 57 tests pass -
bun run typecheckinpackages/panes→ clean
Summary by cubic
Redesigned the pane layout to a simpler Tab → Split → Pane model using the new @superset/panes package. Integrated into the desktop v2 workspace with weighted splits, resize, a streamlined Add Tab menu (with Show Preset Bar toggle), and a cleaner empty state.
-
New Features
- N‑ary weighted splits via
react-resizable-panelswith resize/equalize. - Store with actions for tab/pane CRUD and split/resize/equalize; open/replace supported.
- Slots on
PaneDefinitionand configurable headers viaPaneActionConfigwith hotkey tooltips. - Add Tab dropdown (Terminal, Chat, Browser) wired to the command palette; includes “Show Preset Bar”.
- 57 store tests added.
- N‑ary weighted splits via
-
Refactors
- Removed legacy
PaneViewer; empty state renamed toWorkspaceEmptyState. - Chat components moved under the pane registry and renamed to
ChatPane. - Renamed
@superset/pane-layoutto@superset/panes; host-service CORS now respectsDESKTOP_VITE_PORTforlocalhost/127.0.0.1; downgraded@mastra/core(1.17.0 → 1.16.0) and@pierre/diffs(1.1.7 → 1.1.3) to satisfy CI policy.
- Removed legacy