implement editor-above-Claude split in workspace
Editor opens above Claude via Ctrl+E with a draggable divider at 35% height (clamped 15-70%). Ctrl+W or Escape closes it. The workspace no longer renders a tab bar — Claude is the always-visible primary surface per D-047/D-048; the editor is a split overlay per D-049, not a tab. The _WorkspaceSlot separates editor from primary content tabs and renders them as a vertical split when the editor is open. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,9 @@ class LayoutArrangement extends ChangeNotifier {
|
||||
Map<SlotId, _SlotState>? _focusModeSnapshot;
|
||||
SlotId? _focusModeSlot;
|
||||
|
||||
bool _editorOpen = false;
|
||||
double _editorRatio = 0.35;
|
||||
|
||||
void applyPreset(LayoutPresetContribution preset) {
|
||||
_state.clear();
|
||||
_focusModeSnapshot = null;
|
||||
@@ -37,6 +40,8 @@ class LayoutArrangement extends ChangeNotifier {
|
||||
bool isCollapsed(SlotId id) => _state[id]?.collapsed ?? false;
|
||||
bool get isInFocusMode => _focusModeSlot != null;
|
||||
SlotId? get focusModeSlot => _focusModeSlot;
|
||||
bool get editorOpen => _editorOpen;
|
||||
double get editorRatio => _editorRatio;
|
||||
|
||||
void setSize(SlotId id, double size) {
|
||||
final s = _state[id];
|
||||
@@ -100,6 +105,30 @@ class LayoutArrangement extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
void openEditor() {
|
||||
if (_editorOpen) return;
|
||||
_editorOpen = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void closeEditor() {
|
||||
if (!_editorOpen) return;
|
||||
_editorOpen = false;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void toggleEditor() {
|
||||
_editorOpen = !_editorOpen;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void setEditorRatio(double ratio) {
|
||||
final clamped = ratio.clamp(0.15, 0.70);
|
||||
if (_editorRatio == clamped) return;
|
||||
_editorRatio = clamped;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void registerSlotsInto(PanelRegistry registry, LayoutPresetContribution preset) {
|
||||
for (final slot in preset.slots) {
|
||||
registry.registerSlot(SlotDefinition(
|
||||
|
||||
Reference in New Issue
Block a user