diff --git a/design-system/registry/components.json b/design-system/registry/components.json index 0d9f85b9..5c2d628e 100644 --- a/design-system/registry/components.json +++ b/design-system/registry/components.json @@ -1109,6 +1109,14 @@ "canvas.css" ] }, + "is-sink": { + "classes": [ + "is-sink" + ], + "files": [ + "canvas.css" + ] + }, "is-success": { "classes": [ "is-success" @@ -2236,8 +2244,8 @@ "stats": { "tokens": 58, "darkOverrides": 50, - "blocks": 222, - "classes": 240, + "blocks": 223, + "classes": 241, "canonicalRules": 5, "ghostRules": 5 } diff --git a/design-system/registry/llms.txt b/design-system/registry/llms.txt index 91479dc0..3fc4b215 100644 --- a/design-system/registry/llms.txt +++ b/design-system/registry/llms.txt @@ -72,7 +72,7 @@ ### sidebar --sidebar-width-collapsed: 60px -## Blocks (222 BEM blocks, 240 classes) +## Blocks (223 BEM blocks, 241 classes) actions (shell.css): actions agent-type-select (shell.css): agent-type-select__option alert-row (shell.css): alert-row @@ -179,6 +179,7 @@ is-pulse (base.css): is-pulse is-round (canvas.css): is-round is-selected (base.css, canvas.css): is-selected is-selecting (canvas.css): is-selecting +is-sink (canvas.css): is-sink is-success (shell.css): is-success is-unread (shell.css): is-unread is-unseen (shell.css): is-unseen diff --git a/docs/releases/0.28.1.md b/docs/releases/0.28.1.md new file mode 100644 index 00000000..52a0bd38 --- /dev/null +++ b/docs/releases/0.28.1.md @@ -0,0 +1,9 @@ +# Thinker 0.28.1 + +```bash +docker pull tmsoftbrasil/thinker:0.28.1 +``` + +## Mudanças + +- feat(dashboard): brain icon for Models in the sidebar, Topology destination node with cpu-ai icon and rounder corners, dragged nodes no longer snap back on refresh, Alerts filters inside the Events tab without the intro text diff --git a/package-lock.json b/package-lock.json index 4eaa0a2f..2e19a8e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14768,7 +14768,7 @@ } }, "packages/thinker": { - "version": "0.28.0" + "version": "0.28.1" } } } diff --git a/packages/frontend/src/components/flow/FlowCanvas.tsx b/packages/frontend/src/components/flow/FlowCanvas.tsx index 3e9e4f32..bffd3f4c 100644 --- a/packages/frontend/src/components/flow/FlowCanvas.tsx +++ b/packages/frontend/src/components/flow/FlowCanvas.tsx @@ -70,10 +70,19 @@ function Canvas({ const [selecting, setSelecting] = useState(false); useEffect(() => { - // A data refresh or a saved move keeps the user's selection. + // A data refresh or a saved move keeps the user's selection, and never + // moves a node that is being dragged (it would jump back, then return). setNodes((prev) => { - const selected = new Set(prev.filter((n) => n.selected).map((n) => n.id)); - return graph.nodes.map((n) => (selected.has(n.id) ? { ...n, selected: true } : n)); + const current = new Map(prev.map((n) => [n.id, n])); + return graph.nodes.map((n) => { + const old = current.get(n.id); + if (!old?.selected && !old?.dragging) return n; + return { + ...n, + selected: old.selected, + ...(old.dragging ? { dragging: true, position: old.position } : {}), + }; + }); }); setEdges( validEdges(graph.nodes, graph.edges).map((e) => ({ diff --git a/packages/frontend/src/components/flow/nodes.tsx b/packages/frontend/src/components/flow/nodes.tsx index 5207c737..693bd1d4 100644 --- a/packages/frontend/src/components/flow/nodes.tsx +++ b/packages/frontend/src/components/flow/nodes.tsx @@ -29,6 +29,7 @@ function StepNodeView({ data, selected }: NodeProps) { className={cx( 'n8n-box', data.round && 'is-round', + data.sink && 'is-sink', data.badge ? 'has-badge' : null, data.state && `is-${data.state}`, selected && 'is-selected', diff --git a/packages/frontend/src/components/flow/types.ts b/packages/frontend/src/components/flow/types.ts index a3a9d6da..1a7e9f7b 100644 --- a/packages/frontend/src/components/flow/types.ts +++ b/packages/frontend/src/components/flow/types.ts @@ -43,6 +43,8 @@ export interface FlowNodeData extends Record { state?: 'active' | 'error' | 'idle'; /** For steps: a circle instead of a square (where traffic ends). */ round?: boolean; + /** For steps: the end of the flow (a destination host), with rounder corners. */ + sink?: boolean; /** Where a double-click goes. */ href?: string; } diff --git a/packages/frontend/src/config/navigation.tsx b/packages/frontend/src/config/navigation.tsx index 4ec1356a..db6adfa7 100644 --- a/packages/frontend/src/config/navigation.tsx +++ b/packages/frontend/src/config/navigation.tsx @@ -17,7 +17,7 @@ import { type LucideIcon, Network, BellRing, - Boxes, + Brain, } from 'lucide-react'; import { t, type TranslationKey } from '../i18n/index.js'; @@ -71,7 +71,7 @@ export const NAVIGATION: NavGroup[] = [ icon: CreditCard, match: ['/providers/connections'], }, - { key: 'models', to: '/providers/models', label: 'nav.models', icon: Boxes }, + { key: 'models', to: '/providers/models', label: 'nav.models', icon: Brain }, ], }, { diff --git a/packages/frontend/src/pages/Alerts.tsx b/packages/frontend/src/pages/Alerts.tsx index 82fbe25a..6d5c3753 100644 --- a/packages/frontend/src/pages/Alerts.tsx +++ b/packages/frontend/src/pages/Alerts.tsx @@ -83,50 +83,6 @@ export default function Alerts() {
{t('alerts.pageTitle')} -
-

{t('alerts.subtitle')}

- {view === 'events' ? ( -
- -
- setParam('category', v)} - options={categoryOptions} - label={t('alerts.filter.category')} - /> -
- -
- ) : null} -
- className="mb-4" label={t('alerts.title')} @@ -142,6 +98,47 @@ export default function Alerts() { ]} /> + {view === 'events' ? ( +
+ +
+ setParam('category', v)} + options={categoryOptions} + label={t('alerts.filter.category')} + /> +
+ +
+ ) : null} + {view === 'requests' ? ( ) : events.error ? ( diff --git a/packages/frontend/src/pages/topology-adapter.ts b/packages/frontend/src/pages/topology-adapter.ts index 52a5b400..86f29832 100644 --- a/packages/frontend/src/pages/topology-adapter.ts +++ b/packages/frontend/src/pages/topology-adapter.ts @@ -2,6 +2,7 @@ import { createElement } from 'react'; import { Bot, BrainCircuit, + CpuAi, CreditCard, Globe, GlobeLock, @@ -9,7 +10,6 @@ import { HardDrive, House, KeyRound, - MapPin, Plug, Server, Waypoints, @@ -315,8 +315,9 @@ export function buildTopologyGraph( type: 'node', data: { kind: 'node', - icon: lucide(MapPin), + icon: lucide(CpuAi), title: dest.host, + sink: true, subtitle: t('shell.flow.destination'), tooltip: usageTooltip(`${t('shell.flow.destination')} · ${dest.host}`, dest), state: nodeState(dest), diff --git a/packages/frontend/src/styles/canvas.css b/packages/frontend/src/styles/canvas.css index ef3331b0..6424af9c 100644 --- a/packages/frontend/src/styles/canvas.css +++ b/packages/frontend/src/styles/canvas.css @@ -217,6 +217,10 @@ .n8n-box.is-round { border-radius: 50%; } + /* The end of the flow (a destination host): rounder on every corner. */ + .n8n-box.is-sink { + border-radius: 36px; + } .n8n-box.is-idle { border-style: dashed; } diff --git a/packages/thinker/package.json b/packages/thinker/package.json index 289b5d6a..8c9a6fd8 100644 --- a/packages/thinker/package.json +++ b/packages/thinker/package.json @@ -1,6 +1,6 @@ { "name": "thinker", - "version": "0.28.0", + "version": "0.28.1", "private": true, "description": "Canonical release version for the Thinker Docker image. This package holds no code — the real backend and frontend live in ../backend and ../frontend. See README.md for details." }