diff --git a/memory/ui/page.tsx b/memory/ui/page.tsx index b516126fe..12fb2b5e0 100644 --- a/memory/ui/page.tsx +++ b/memory/ui/page.tsx @@ -6,11 +6,13 @@ * the console mounts and link-swaps it, styles-before-scripts on boot. * * `setup(host)` registers one contribution: - * - src/page/ — the `#/ext/memory` page: banks in a left rail, the selected - * bank's memories (pin/edit/tombstone in place), a schematic graph, the - * always-injected markdown rules, and a turn-preview dry run. Everything - * re-reads live off `memory::item-changed` / `memory::bank-changed` - * (poll fallback while the bindings are unavailable). + * - src/page/ — the `#/ext/memory` page: banks in a navigation rail, the + * selected bank's workspace (always-injected markdown rules, memories with + * pin/edit/tombstone in place, a schematic graph, and a turn-preview dry + * run) behind one segmented control; a drill-in flow when the pane is + * narrow. Everything re-reads live off `memory::item-changed` / + * `memory::bank-changed` (poll fallback while the bindings are + * unavailable). * * No config-form override: memory's configuration is a flat list of typed * scalars, which the console's schema-generated form already renders from @@ -28,6 +30,6 @@ export default function setup(host: Host) { host.pages.register({ id: 'memory', title: 'memory', - render: () => , + render: (props) => , }) } diff --git a/memory/ui/src/page/BankRail.tsx b/memory/ui/src/page/BankRail.tsx index 96f936e60..917156383 100644 --- a/memory/ui/src/page/BankRail.tsx +++ b/memory/ui/src/page/BankRail.tsx @@ -1,17 +1,20 @@ +/** + * Navigation column: the bank list (first-class named memory scopes) plus + * an inline create form. Selecting a bank scopes the rules/memories/graph/ + * preview workspace; sessions pick their bank via session metadata + * `memory_bank`. In the narrow drill-in flow this list is the first pane. + */ + import { useState } from 'react' import { Button, Input } from '@iii-dev/console-ui' import { Plus } from './icons' import type { MemoryBank } from './memory-data' -/** - * Left rail: the bank list (first-class named memory scopes) plus an - * inline create form. Selecting a bank scopes the memories/rules/recall - * panels; sessions pick their bank via session metadata `memory_bank`. - */ - interface BankRailProps { banks: MemoryBank[] selected: string | null + /** True while the page-level refresh is in flight (skeleton on first load). */ + loading: boolean onSelect: (bank: string) => void onCreate: (name: string) => Promise creating: boolean @@ -20,36 +23,67 @@ interface BankRailProps { export function BankRail({ banks, selected, + loading, onSelect, onCreate, creating, }: BankRailProps) { const [draft, setDraft] = useState('') const valid = /^[a-z0-9][a-z0-9_-]{0,63}$/.test(draft) + const initialLoad = loading && banks.length === 0 return ( -