From 13d0f83487ea8fb8f81246bfa910dd11ffc5b04b Mon Sep 17 00:00:00 2001 From: Sergio Marcelino Date: Thu, 6 Aug 2026 18:37:31 -0300 Subject: [PATCH] feat(console): new ui improvements --- memory/ui/page.tsx | 14 +- memory/ui/src/page/BankRail.tsx | 88 ++- memory/ui/src/page/MemoriesPanel.tsx | 86 +-- memory/ui/src/page/MemoryGraph.tsx | 50 +- memory/ui/src/page/ModeToggle.tsx | 4 +- memory/ui/src/page/RecallPanel.tsx | 50 +- memory/ui/src/page/RulesPanel.tsx | 81 ++- memory/ui/src/page/icons.tsx | 13 +- memory/ui/src/page/index.tsx | 476 +++++++++----- memory/ui/src/page/widgets.tsx | 48 ++ memory/ui/styles.css | 924 +++++++++++++++++++-------- packages/console-ui/index.d.ts | 7 + pnpm-lock.yaml | 10 +- shell/ui/page.tsx | 4 +- shell/ui/src/page/index.tsx | 50 +- state/ui/page.tsx | 6 +- state/ui/src/lib/widgets.tsx | 82 ++- state/ui/src/page/ItemView.tsx | 205 ------ state/ui/src/page/ItemsView.tsx | 90 --- state/ui/src/page/ScopesView.tsx | 101 --- state/ui/src/page/ValueEditor.tsx | 290 +++++++++ state/ui/src/page/browser.tsx | 358 +++++++++++ state/ui/src/page/index.tsx | 62 +- state/ui/styles.css | 557 +++++++++++++--- 24 files changed, 2520 insertions(+), 1136 deletions(-) create mode 100644 memory/ui/src/page/widgets.tsx delete mode 100644 state/ui/src/page/ItemView.tsx delete mode 100644 state/ui/src/page/ItemsView.tsx delete mode 100644 state/ui/src/page/ScopesView.tsx create mode 100644 state/ui/src/page/ValueEditor.tsx create mode 100644 state/ui/src/page/browser.tsx 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 ( -