refactor: move guides from left toolbar to settings
- Remove guides from LeftToolbar pane type buttons - Remove 'guides' from PaneType union and PANE_LABELS - Remove GuidesPane from pane exports and ThreePanelLayout rendering - Add migration to reset persisted slots that had type 'guides' - Guides remain accessible via Settings modal (GuidesViewer tab) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d723212ed3
commit
c23b743580
@@ -25,8 +25,8 @@ type AgentDelegation = {
|
||||
import LeftToolbar from './LeftToolbar';
|
||||
import SplitHandle from './SplitHandle';
|
||||
|
||||
// Pane components (ChatPane removed in rah-light)
|
||||
import { NodePane, GuidesPane, DimensionsPane, MapPane, ViewsPane } from '../panes';
|
||||
// Pane components (ChatPane removed in rah-light, GuidesPane moved to settings)
|
||||
import { NodePane, DimensionsPane, MapPane, ViewsPane } from '../panes';
|
||||
import QuickAddInput from '../agents/QuickAddInput';
|
||||
import type { PaneType, SlotState, PaneAction } from '../panes/types';
|
||||
|
||||
@@ -47,6 +47,16 @@ export default function ThreePanelLayout() {
|
||||
// SlotB width as percentage (when open)
|
||||
const [slotBWidth, setSlotBWidth] = usePersistentState<number>('ui.slotBWidth', 50);
|
||||
|
||||
// Migration: if a slot was persisted with type 'guides' (now moved to settings), reset it
|
||||
useEffect(() => {
|
||||
if (slotA && (slotA.type as string) === 'guides') {
|
||||
setSlotA({ type: 'views' });
|
||||
}
|
||||
if (slotB && (slotB.type as string) === 'guides') {
|
||||
setSlotB(null);
|
||||
}
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
// Track which pane is active (last interacted with)
|
||||
const [activePane, setActivePane] = useState<'A' | 'B'>('A');
|
||||
|
||||
@@ -806,17 +816,7 @@ export default function ThreePanelLayout() {
|
||||
);
|
||||
|
||||
// case 'chat' removed in rah-light
|
||||
|
||||
case 'guides':
|
||||
return (
|
||||
<GuidesPane
|
||||
slot={slot}
|
||||
isActive={isActive}
|
||||
onPaneAction={slot === 'A' ? handleSlotAAction : handleSlotBAction}
|
||||
onCollapse={onCollapse}
|
||||
onSwapPanes={slotB ? handleSwapPanes : undefined}
|
||||
/>
|
||||
);
|
||||
// case 'guides' removed — moved to settings modal
|
||||
|
||||
case 'dimensions':
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user