Skip to content

Commit 80b1cc9

Browse files
Resolve config inconsistencies (#115)
* Fix UI nomenclature and flow class -> blueprint * Working through impact on UI
1 parent 17a0bf7 commit 80b1cc9

29 files changed

+379
-379
lines changed

package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"@msgpack/msgpack": "^3.1.1",
2121
"@tanstack/react-query": "^5.80.3",
2222
"@tanstack/react-table": "^8.21.3",
23-
"@trustgraph/client": "^1.1.2",
24-
"@trustgraph/react-provider": "^1.1.0",
25-
"@trustgraph/react-state": "^1.1.0",
23+
"@trustgraph/client": "^1.2.1",
24+
"@trustgraph/react-provider": "^1.2.0",
25+
"@trustgraph/react-state": "^1.2.0",
2626
"@types/dagre": "^0.7.53",
2727
"compute-cosine-similarity": "^1.1.0",
2828
"dagre": "^0.8.5",

src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import EntityPage from "./pages/EntityPage";
1111

1212
// Lazy load GraphPage since it includes heavy 3D visualization library (react-force-graph/Three.js)
1313
const GraphPage = lazy(() => import("./pages/GraphPage"));
14-
// Lazy load FlowClassesPage since it includes reactflow library
15-
const FlowClassesPage = lazy(() => import("./pages/FlowClassesPage"));
14+
// Lazy load FlowBlueprintsPage since it includes reactflow library
15+
const FlowBlueprintsPage = lazy(() => import("./pages/FlowBlueprintsPage"));
1616
// Lazy load less frequently used pages
1717
const OntologiesPage = lazy(() => import("./pages/OntologiesPage"));
1818
const StructuredQueryPage = lazy(() => import("./pages/StructuredQueryPage"));
@@ -128,10 +128,10 @@ const App = () => {
128128
/>
129129
<Route path="/flows" element={<FlowsPage />} />
130130
<Route
131-
path="/flow-classes"
131+
path="/flow-Blueprint"
132132
element={
133133
<Suspense fallback={<CenterSpinner />}>
134-
<FlowClassesPage />
134+
<FlowBlueprintsPage />
135135
</Suspense>
136136
}
137137
/>

src/components/Sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ const Sidebar = () => {
119119
<NavItem to="/entity" icon={Waypoints} label="Relationships" />
120120
<NavItem to="/graph" icon={Rotate3d} label="Graph Visualizer" />
121121
<NavItem to="/library" icon={LibraryBig} label="Library" />
122-
{settings.featureSwitches.flowClasses && (
123-
<NavItem to="/flow-classes" icon={ScrollText} label="Flow Classes" />
122+
{settings.featureSwitches.flowBlueprints && (
123+
<NavItem to="/flow-Blueprint" icon={ScrollText} label="Flow Blueprints" />
124124
)}
125125
<NavItem to="/flows" icon={Workflow} label="Flows" />
126126
<NavItem to="/kc" icon={BrainCircuit} label="Knowledge Cores" />

src/components/flow-classes/FlowClassActions.tsx renamed to src/components/flow-blueprints/FlowBlueprintActions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import React from "react";
22
import { Check, Trash, Eye } from "lucide-react";
33
import { ActionBar, Portal, Button } from "@chakra-ui/react";
44

5-
interface FlowClassActionsProps {
5+
interface FlowBlueprintsActionsProps {
66
selectedCount: number;
77
onEdit?: () => void;
88
onDelete?: () => void;
99
}
1010

11-
const FlowClassActions: React.FC<FlowClassActionsProps> = ({
11+
const FlowBlueprintsActions: React.FC<FlowBlueprintActionsProps> = ({
1212
selectedCount,
1313
onEdit,
1414
onDelete,
@@ -68,4 +68,4 @@ const FlowClassActions: React.FC<FlowClassActionsProps> = ({
6868
);
6969
};
7070

71-
export default FlowClassActions;
71+
export default FlowBlueprintsActions;
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import React from "react";
22
import { Plus } from "lucide-react";
33
import { Button, Box } from "@chakra-ui/react";
4-
import { generateFlowClassId } from "@trustgraph/react-state";
4+
import { generateFlowBlueprintId } from "@trustgraph/react-state";
55

6-
interface FlowClassControlsProps {
6+
interface FlowBlueprintsControlsProps {
77
onNew?: (id: string) => void;
88
}
99

10-
const FlowClassControls: React.FC<FlowClassControlsProps> = ({ onNew }) => {
10+
const FlowBlueprintsControls: React.FC<FlowBlueprintControlsProps> = ({ onNew }) => {
1111
const handleCreate = () => {
12-
const newId = generateFlowClassId("flow-class");
12+
const newId = generateFlowBlueprintId("flow-blueprint");
1313
onNew?.(newId);
1414
};
1515

@@ -23,10 +23,10 @@ const FlowClassControls: React.FC<FlowClassControlsProps> = ({ onNew }) => {
2323
colorPalette="primary"
2424
onClick={handleCreate}
2525
>
26-
<Plus /> Create Flow Class
26+
<Plus /> Create Flow Blueprints
2727
</Button>
2828
</Box>
2929
);
3030
};
3131

32-
export default FlowClassControls;
32+
export default FlowBlueprintsControls;

src/components/flow-classes/FlowClassEditPanel.tsx renamed to src/components/flow-blueprints/FlowBlueprintEditPanel.tsx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ import {
1212
Fieldset,
1313
} from "@chakra-ui/react";
1414
import { Save, X, FileCode } from "lucide-react";
15-
import { FlowClassDefinition } from "@trustgraph/react-state";
15+
import { FlowBlueprintDefinition } from "@trustgraph/react-state";
1616

17-
interface FlowClassEditPanelProps {
18-
flowClass: FlowClassDefinition;
19-
onSave?: (flowClass: FlowClassDefinition) => void;
17+
interface FlowBlueprintsEditPanelProps {
18+
flowBlueprints: FlowBlueprintDefinition;
19+
onSave?: (flowBlueprints: FlowBlueprintDefinition) => void;
2020
onCancel?: () => void;
2121
isLoading?: boolean;
2222
}
2323

24-
const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
25-
flowClass,
24+
const FlowBlueprintsEditPanel: React.FC<FlowBlueprintEditPanelProps> = ({
25+
flowBlueprints,
2626
onSave,
2727
onCancel,
2828
isLoading = false,
2929
}) => {
30-
const [description, setDescription] = useState(flowClass.description || "");
31-
const [tags, setTags] = useState((flowClass.tags || []).join(", "));
30+
const [description, setDescription] = useState(flowBlueprints.description || "");
31+
const [tags, setTags] = useState((flowBlueprints.tags || []).join(", "));
3232

3333
useEffect(() => {
34-
setDescription(flowClass.description || "");
35-
setTags((flowClass.tags || []).join(", "));
36-
}, [flowClass]);
34+
setDescription(flowBlueprints.description || "");
35+
setTags((flowBlueprints.tags || []).join(", "));
36+
}, [flowBlueprints]);
3737

3838
const handleSave = () => {
39-
const updatedFlowClass: FlowClassDefinition = {
40-
...flowClass,
39+
const updatedFlowBlueprints: FlowBlueprintDefinition = {
40+
...flowBlueprints,
4141
description: description.trim() || undefined,
4242
tags: tags
4343
.split(",")
@@ -46,16 +46,16 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
4646
.slice(0, 10), // Limit to 10 tags
4747
};
4848

49-
onSave?.(updatedFlowClass);
49+
onSave?.(updatedFlowBlueprints);
5050
};
5151

5252
const hasChanges =
53-
description !== (flowClass.description || "") ||
54-
tags !== (flowClass.tags || []).join(", ");
53+
description !== (flowBlueprints.description || "") ||
54+
tags !== (flowBlueprints.tags || []).join(", ");
5555

56-
const classCount = Object.keys(flowClass.class || {}).length;
57-
const flowCount = Object.keys(flowClass.flow || {}).length;
58-
const interfaceCount = Object.keys(flowClass.interfaces || {}).length;
56+
const blueprintCount = Object.keys(flowBlueprints.blueprint || {}).length;
57+
const flowCount = Object.keys(flowBlueprints.flow || {}).length;
58+
const interfaceCount = Object.keys(flowBlueprints.interfaces || {}).length;
5959

6060
return (
6161
<Box
@@ -78,7 +78,7 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
7878
<HStack gap={3}>
7979
<FileCode size={20} />
8080
<Text fontSize="lg" fontWeight="semibold">
81-
Edit Flow Class: {flowClass.id}
81+
Edit Flow Blueprints: {flowBlueprint.id}
8282
</Text>
8383
</HStack>
8484
<HStack gap={2}>
@@ -121,7 +121,7 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
121121
<Textarea
122122
value={description}
123123
onChange={(e) => setDescription(e.target.value)}
124-
placeholder="Enter flow class description..."
124+
placeholder="Enter flow blueprint description..."
125125
rows={3}
126126
resize="none"
127127
/>
@@ -148,12 +148,12 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
148148
{/* Right Column - Statistics */}
149149
<VStack gap={4} align="stretch" minW="300px">
150150
<Fieldset.Root>
151-
<Fieldset.Legend>Flow Class Statistics</Fieldset.Legend>
151+
<Fieldset.Legend>Flow Blueprints Statistics</Fieldset.Legend>
152152
<Fieldset.Content>
153153
<VStack gap={3} align="stretch">
154154
<HStack justify="space-between">
155-
<Text fontSize="sm">Class Processors:</Text>
156-
<Badge colorPalette="blue">{classCount}</Badge>
155+
<Text fontSize="sm">Blueprints Processors:</Text>
156+
<Badge colorPalette="blue">{blueprintCount}</Badge>
157157
</HStack>
158158

159159
<HStack justify="space-between">
@@ -169,21 +169,21 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
169169
<HStack justify="space-between">
170170
<Text fontSize="sm">Total Components:</Text>
171171
<Badge colorPalette="gray">
172-
{classCount + flowCount + interfaceCount}
172+
{blueprintCount + flowCount + interfaceCount}
173173
</Badge>
174174
</HStack>
175175
</VStack>
176176
</Fieldset.Content>
177177
</Fieldset.Root>
178178

179179
{/* Preview of current tags */}
180-
{flowClass.tags && flowClass.tags.length > 0 && (
180+
{flowBlueprints.tags && flowBlueprint.tags.length > 0 && (
181181
<Box>
182182
<Text fontSize="sm" fontWeight="medium" mb={2}>
183183
Current Tags
184184
</Text>
185185
<HStack gap={1} flexWrap="wrap">
186-
{flowClass.tags.map((tag, index) => (
186+
{flowBlueprints.tags.map((tag, index) => (
187187
<Badge
188188
key={index}
189189
colorPalette="gray"
@@ -203,4 +203,4 @@ const FlowClassEditPanel: React.FC<FlowClassEditPanelProps> = ({
203203
);
204204
};
205205

206-
export default FlowClassEditPanel;
206+
export default FlowBlueprintsEditPanel;

0 commit comments

Comments
 (0)