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:
“BeeRad”
2026-02-15 09:10:38 +11:00
co-authored by Claude Opus 4.6
parent d723212ed3
commit c23b743580
4 changed files with 19 additions and 26 deletions
+3 -6
View File
@@ -7,7 +7,6 @@ import {
LayoutList,
Map,
Folder,
FileText,
Settings,
} from 'lucide-react';
import type { PaneType } from '../panes/types';
@@ -22,23 +21,21 @@ interface LeftToolbarProps {
slotBType: PaneType | null;
}
// Map pane types to their icons (chat removed in rah-light)
// Map pane types to their icons (chat removed in rah-light, guides moved to settings)
const PANE_TYPE_ICONS: Record<string, typeof LayoutList> = {
views: LayoutList,
map: Map,
dimensions: Folder,
guides: FileText,
};
const PANE_TYPE_LABELS: Record<string, string> = {
views: 'Feed',
map: 'Map',
dimensions: 'Dimensions',
guides: 'Guides',
};
// Pane types shown in the toolbar (excludes 'node' which is opened via Feed, chat removed in rah-light)
const TOOLBAR_PANE_TYPES: PaneType[] = ['views', 'map', 'dimensions', 'guides'];
// Pane types shown in the toolbar (excludes 'node', 'chat', and 'guides' which is in settings)
const TOOLBAR_PANE_TYPES: PaneType[] = ['views', 'map', 'dimensions'];
interface ToolbarButtonProps {
icon: typeof Search;
+13 -13
View File
@@ -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 (
-1
View File
@@ -1,5 +1,4 @@
export { default as NodePane } from './NodePane';
export { default as GuidesPane } from './GuidesPane';
export { default as DimensionsPane } from './DimensionsPane';
export { default as MapPane } from './MapPane';
export { default as ViewsPane } from './ViewsPane';
+3 -6
View File
@@ -14,8 +14,8 @@ export type AgentDelegation = {
updatedAt: string;
};
// The five pane types (chat removed in rah-light)
export type PaneType = 'node' | 'guides' | 'dimensions' | 'map' | 'views';
// The four pane types (chat removed in rah-light, guides moved to settings)
export type PaneType = 'node' | 'dimensions' | 'map' | 'views';
// State for each slot
export interface SlotState {
@@ -68,8 +68,6 @@ export interface HighlightedPassage {
// ChatPaneProps removed in rah-light
// GuidesPaneProps - just uses BasePaneProps (guides are self-contained)
// DimensionsPane specific props
export interface DimensionsPaneProps extends BasePaneProps {
onNodeOpen: (nodeId: number) => void;
@@ -103,7 +101,6 @@ export interface PaneHeaderProps {
// Labels for pane types
export const PANE_LABELS: Record<PaneType, string> = {
node: 'Nodes',
guides: 'Guides',
dimensions: 'Dimensions',
map: 'Map',
views: 'Feed',
@@ -117,5 +114,5 @@ export const DEFAULT_SLOT_A: SlotState = {
};
export const DEFAULT_SLOT_B: SlotState = {
type: 'guides',
type: 'views',
};