Frontend addresses flows and dashboards by id: routes /flows/$flowId, /dashboards/$id and /view/$id, query keys, saves, lists, device pickers, search, brain and endpoint links and generated results dashboards go by id, while live values, issues, pauses and message names keep the key; tabs take the title from the document; creating uses POST and opens the issued id; the flow and dashboard panels show key and id with a copy button and a served HTTP or WebSocket node shows its hook URL under the flow id; specs create by POST and ids.spec.ts exercises issued ids

This commit is contained in:
2026-11-02 19:57:43 +01:00
parent fd637e0f1e
commit fa15522cb0
65 changed files with 1380 additions and 784 deletions
+8 -2
View File
@@ -4,7 +4,7 @@ import { Bird, Bot, MessageCircle, Send, Square, Trash2 } from "lucide-react"
import { lazy, Suspense, useEffect, useRef, useState } from "react"
import { AiService, type ChatItem } from "@/client"
import { flowKeys } from "@/components/Flow/queries"
import { flowKeys, flowsQueryOptions } from "@/components/Flow/queries"
import { SidePanel } from "@/components/Flow/SidePanel"
import { Button } from "@/components/ui/button"
import { FluksioLoader } from "@/components/ui/fluksio-loader"
@@ -182,7 +182,13 @@ export function ChatPanel() {
const node = nodes.find((n) => n.id === nodeId) ?? nodes[0]
const control = useControl(node)
const pathname = useRouterState({ select: (s) => s.location.pathname })
const flow = FLOW_PATH.exec(pathname)?.[1]
// The address holds the flow's id; the assistant is told its key.
const flowId = FLOW_PATH.exec(pathname)?.[1]
const { data: flowList } = useQuery({
...flowsQueryOptions(),
enabled: Boolean(flowId),
})
const flow = flowList?.data.find((one) => one.id === flowId)?.name
const [items, setItems] = useState<Item[]>([])
const [loaded, setLoaded] = useState(false)