From 88c51b75bf8e916cc707a22a714b62b35f8ff137 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sat, 28 Mar 2026 22:20:34 +0100 Subject: [PATCH] docs: mark design system update instructions as done in v0.1.19 Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/design-system-update-instructions.md | 121 +--------------------- 1 file changed, 5 insertions(+), 116 deletions(-) diff --git a/docs/design-system-update-instructions.md b/docs/design-system-update-instructions.md index ee2a2153..d25813da 100644 --- a/docs/design-system-update-instructions.md +++ b/docs/design-system-update-instructions.md @@ -1,122 +1,11 @@ # Design System Update Instructions -These changes are needed in `@cameleer/design-system` to replace workarounds in cameleer3-server's UI. +Status: Both changes below were implemented in `@cameleer/design-system` v0.1.19 and consumed by cameleer3-server. -## 1. Sidebar: Add `onNavigate` callback prop (HIGH PRIORITY) +## 1. Sidebar: `onNavigate` callback prop — DONE (v0.1.19) -### Problem +Sidebar now accepts `onNavigate?: (path: string) => void`. When provided, sidebar calls `onNavigate(path)` instead of using internal `` navigation. The server UI translates paths to its own URL structure. -The Sidebar component navigates internally using React Router `` components with hardcoded paths (`/apps/:appId`, `/apps/:appId/:routeId`, `/agents/:appId/:instanceId`). The consuming app (cameleer3-server) now uses a different URL structure (`/exchanges/:appId`, `/runtime/:appId/:instanceId`) and needs to intercept and re-route sidebar navigation. +## 2. DataTable: `fillHeight` prop — DONE (v0.1.19) -The current workaround wraps Sidebar in a `
` that intercepts anchor clicks via event delegation and prevents default navigation. This is fragile — it depends on the Sidebar rendering `` elements and breaks if the internal markup changes. - -### Required Change - -Add an optional `onNavigate` callback to `SidebarProps`: - -```typescript -interface SidebarProps { - apps: SidebarApp[]; - className?: string; - onNavigate?: (path: string) => void; // NEW -} -``` - -**Behavior:** -- When `onNavigate` is NOT provided: Sidebar works exactly as today (internal `` navigation). No breaking change. -- When `onNavigate` IS provided: Instead of using `` or `navigate()`, call `onNavigate(path)` with the path that would have been navigated to. The consuming app decides where to actually navigate. - -**Example paths passed to `onNavigate`:** -- App click: `onNavigate('/apps/order-svc')` -- Route click: `onNavigate('/apps/order-svc/process-order')` -- Agent click: `onNavigate('/agents/order-svc/agent-1')` - -The consuming app can then translate these paths to its own URL structure. - -**Implementation hint:** In the Sidebar component, wherever you have `` or `navigate(path)`, check if `onNavigate` is defined. If yes, render a `