UI-1: drag-to-dock with drop zones, floating panels, maximize, workspaces save floating

- dock::drop_zone / zone_rect (AE-style center/left/right/top/bottom zones with highlight),
  DockNode::dock_panel (tab next to / split off an anchor), Layout {root, floating} with
  float / unfloat / dock; serde (old workspaces still load).
- Tab drag re-docks; Cmd/Ctrl-release or a drop outside every group floats it; floating
  groups are movable, resizable in-window windows that take tabs; panel menu Undock /
  Maximize (toggle, ` maximizes the panel under the pointer) / Close; window.dockPanel /
  floatPanel / maximizePanel / closePanel for agents; Save Workspace stores floating panels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-02 11:03:06 -04:00
co-authored by Claude Opus 5.5
parent 84f517e6c1
commit 53ce3cc23c
6 changed files with 640 additions and 71 deletions
+12
View File
@@ -434,6 +434,15 @@ pub struct UiState {
/// Saved workspace layouts (Save Changes to this Workspace / Save as New Workspace).
#[serde(default)]
pub saved_workspaces: std::collections::BTreeMap<String, DockNode>,
/// Undocked (floating) panel groups.
#[serde(default)]
pub floating: Vec<crate::dock::Floating>,
/// Floating panels of the saved workspaces.
#[serde(default)]
pub saved_floating: std::collections::BTreeMap<String, Vec<crate::dock::Floating>>,
/// The panel maximized to fill the dock area (`~`), if any.
#[serde(default)]
pub maximized: Option<PanelKind>,
pub focused: PanelKind,
pub viewer: ViewerState,
pub timeline: TimelineState,
@@ -522,6 +531,9 @@ impl Default for UiState {
workspace: "Default".into(),
dock: crate::dock::workspace("Default"),
saved_workspaces: Default::default(),
floating: vec![],
saved_floating: Default::default(),
maximized: None,
focused: PanelKind::Composition,
viewer: ViewerState::default(),
timeline: TimelineState::default(),