Source
- Mode 2 pre-commit review on the conditional
RebuildDocumentPane fix
- Underlying bug: clicking the same workspace sidebar button (or the
CLI+ sidebar button on return from Settings) called ActivateGroup,
which always called RebuildDocumentPane → terminalDocPane.Children.Clear(),
destroying the user's split-pane Document→Pane mapping. Fix only
rebuilds when the active group index actually changes.
Verdict
Commit approved — 0 must-fix, 0 should-fix, 1 advisory suggestion.
Suggestion
S-1 — Per-group split-layout persistence
File: Project/AgentZeroWpf/UI/APP/MainWindow.xaml.cs:1366-1410
When the user does switch to a different workspace group,
RebuildDocumentPane still runs and the new group's tabs appear in a
single LayoutDocumentPane. If the user previously built a split layout
in that group, it doesn't come back — they have to rebuild it manually
every time they leave and return.
To preserve per-group split layouts across switches, the AvalonDock
state would need to be serialized per group (XmlLayoutSerializer)
on group-switch-out, and deserialized on group-switch-in. Beyond a
single fix; should be a dedicated feature. Possibly tied to
AppWindowState persistence so split layouts survive app restarts.
Closes-when
Source
RebuildDocumentPanefixCLI+ sidebar button on return from Settings) called
ActivateGroup,which always called
RebuildDocumentPane→terminalDocPane.Children.Clear(),destroying the user's split-pane Document→Pane mapping. Fix only
rebuilds when the active group index actually changes.
Verdict
Commit approved — 0 must-fix, 0 should-fix, 1 advisory suggestion.
Suggestion
S-1 — Per-group split-layout persistence
File:
Project/AgentZeroWpf/UI/APP/MainWindow.xaml.cs:1366-1410When the user does switch to a different workspace group,
RebuildDocumentPanestill runs and the new group's tabs appear in asingle
LayoutDocumentPane. If the user previously built a split layoutin that group, it doesn't come back — they have to rebuild it manually
every time they leave and return.
To preserve per-group split layouts across switches, the AvalonDock
state would need to be serialized per group (
XmlLayoutSerializer)on group-switch-out, and deserialized on group-switch-in. Beyond a
single fix; should be a dedicated feature. Possibly tied to
AppWindowStatepersistence so split layouts survive app restarts.Closes-when
docs/decision that group-switch resets the split layout by design)