Skip to content

Commit 2817f4e

Browse files
authored
Merge pull request #64 from UiPath/fix/show-entrypoint-load-error
fix: show entrypoint load error and highlight root on success
2 parents 38f71bc + acfff01 commit 2817f4e

8 files changed

Lines changed: 136 additions & 82 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-dev"
3-
version = "0.0.44"
3+
version = "0.0.45"
44
description = "UiPath Developer Console"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath/dev/server/frontend/src/components/graph/GraphPanel.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,11 +713,22 @@ export default function GraphPanel({ entrypoint, runId, breakpointNode, breakpoi
713713
failedRootId = nds.find((n) => !n.parentNode && n.type !== "startNode" && n.type !== "endNode" && n.type !== "groupNode")?.id;
714714
}
715715

716+
// When run completed and root node is not already highlighted, mark it as completed
717+
let completedRootId: string | undefined;
718+
if (runStatus === "completed") {
719+
const rootId = nds.find((n) => !n.parentNode && n.type !== "startNode" && n.type !== "endNode" && n.type !== "groupNode")?.id;
720+
if (rootId && !completedIds.has(rootId)) {
721+
completedRootId = rootId;
722+
}
723+
}
724+
716725
return nds.map((n) => {
717726
let status: string | undefined;
718727

719728
if (n.id === failedRootId) {
720729
status = "failed";
730+
} else if (n.id === completedRootId) {
731+
status = "completed";
721732
} else if (completedIds.has(n.id)) {
722733
status = "completed";
723734
} else if (n.type === "startNode") {

src/uipath/dev/server/frontend/src/components/runs/NewRunPanel.tsx

Lines changed: 72 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export default function NewRunPanel() {
88
const entrypoints = useRunStore((s) => s.entrypoints);
99
const [selectedEp, setSelectedEp] = useState("");
1010
const [chatSupported, setChatSupported] = useState(true);
11+
const [entrypointError, setEntrypointError] = useState<string | null>(null);
1112

1213
useEffect(() => {
1314
if (!selectedEp && entrypoints.length > 0) {
@@ -18,13 +19,17 @@ export default function NewRunPanel() {
1819
useEffect(() => {
1920
if (!selectedEp) return;
2021
setChatSupported(true);
22+
setEntrypointError(null);
2123
getEntrypointSchema(selectedEp)
2224
.then((schema) => {
2325
const props = (schema.input as any)?.properties;
2426
setChatSupported(!!props?.messages);
2527
})
26-
.catch(() => {
27-
setChatSupported(true); // don't block on schema fetch errors
28+
.catch((err: any) => {
29+
const detail = err.detail || {};
30+
setEntrypointError(
31+
detail.error || detail.message || `Failed to load entrypoint "${selectedEp}"`
32+
);
2833
});
2934
}, [selectedEp]);
3035

@@ -41,7 +46,7 @@ export default function NewRunPanel() {
4146
<div className="flex items-center justify-center gap-2 mb-2">
4247
<div
4348
className="w-1.5 h-1.5 rounded-full"
44-
style={{ background: "var(--accent)" }}
49+
style={{ background: entrypointError ? "var(--error)" : "var(--accent)" }}
4550
/>
4651
<span
4752
className="text-[10px] uppercase tracking-widest font-semibold"
@@ -50,9 +55,11 @@ export default function NewRunPanel() {
5055
New Run
5156
</span>
5257
</div>
53-
<p className="text-xs" style={{ color: "var(--text-muted)" }}>
54-
{entrypoints.length > 1 ? "Select an entrypoint and choose a mode" : "Choose a mode"}
55-
</p>
58+
{!entrypointError && (
59+
<p className="text-xs" style={{ color: "var(--text-muted)" }}>
60+
{entrypoints.length > 1 ? "Select an entrypoint and choose a mode" : "Choose a mode"}
61+
</p>
62+
)}
5663
</div>
5764

5865
{/* Entrypoint */}
@@ -83,29 +90,65 @@ export default function NewRunPanel() {
8390
</div>
8491
)}
8592

86-
{/* Mode cards */}
87-
<div className="grid grid-cols-2 gap-4">
88-
<ModeCard
89-
title="Autonomous"
90-
description="Run the agent end-to-end. Set breakpoints to pause and inspect execution."
91-
icon={<BoltIcon />}
92-
color="var(--success)"
93-
onClick={() => handleModeSelect("run")}
94-
disabled={!selectedEp}
95-
/>
96-
<ModeCard
97-
title="Conversational"
98-
description={
99-
!chatSupported
100-
? "Requires a \"messages\" property in the input schema."
101-
: "Interactive chat session. Send messages and receive responses in real time."
102-
}
103-
icon={<ChatIcon />}
104-
color="var(--accent)"
105-
onClick={() => handleModeSelect("chat")}
106-
disabled={!selectedEp || !chatSupported}
107-
/>
108-
</div>
93+
{/* Mode cards or error */}
94+
{entrypointError ? (
95+
<div
96+
className="rounded-md border overflow-hidden"
97+
style={{
98+
borderColor: "color-mix(in srgb, var(--error) 25%, var(--border))",
99+
background: "var(--bg-secondary)",
100+
}}
101+
>
102+
<div
103+
className="px-3 py-2 flex items-center gap-2"
104+
style={{
105+
borderBottom: "1px solid color-mix(in srgb, var(--error) 15%, var(--border))",
106+
background: "color-mix(in srgb, var(--error) 4%, var(--bg-secondary))",
107+
}}
108+
>
109+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" style={{ flexShrink: 0 }}>
110+
<path
111+
d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM7.25 4.75h1.5v4h-1.5v-4zm.75 6.75a.75.75 0 110-1.5.75.75 0 010 1.5z"
112+
fill="var(--error)"
113+
/>
114+
</svg>
115+
<span className="text-[11px] font-medium" style={{ color: "var(--error)" }}>
116+
Failed to load entrypoint
117+
</span>
118+
</div>
119+
<div className="overflow-auto max-h-48 p-3">
120+
<pre
121+
className="text-[11px] font-mono whitespace-pre-wrap break-words leading-relaxed m-0"
122+
style={{ color: "var(--text-muted)" }}
123+
>
124+
{entrypointError}
125+
</pre>
126+
</div>
127+
</div>
128+
) : (
129+
<div className="grid grid-cols-2 gap-4">
130+
<ModeCard
131+
title="Autonomous"
132+
description="Run the agent end-to-end. Set breakpoints to pause and inspect execution."
133+
icon={<BoltIcon />}
134+
color="var(--success)"
135+
onClick={() => handleModeSelect("run")}
136+
disabled={!selectedEp}
137+
/>
138+
<ModeCard
139+
title="Conversational"
140+
description={
141+
!chatSupported
142+
? "Requires a \"messages\" property in the input schema."
143+
: "Interactive chat session. Send messages and receive responses in real time."
144+
}
145+
icon={<ChatIcon />}
146+
color="var(--accent)"
147+
onClick={() => handleModeSelect("chat")}
148+
disabled={!selectedEp || !chatSupported}
149+
/>
150+
</div>
151+
)}
109152
</div>
110153
</div>
111154
);

src/uipath/dev/server/static/assets/index-6F6REBFy.css

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

src/uipath/dev/server/static/assets/index-bgnPbWdx.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/uipath/dev/server/static/assets/index-BOmQobls.js renamed to src/uipath/dev/server/static/assets/index-oogYitGy.js

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

src/uipath/dev/server/static/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>UiPath Developer Console</title>
77
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
8-
<script type="module" crossorigin src="/assets/index-BOmQobls.js"></script>
9-
<link rel="stylesheet" crossorigin href="/assets/index-bgnPbWdx.css">
8+
<script type="module" crossorigin src="/assets/index-oogYitGy.js"></script>
9+
<link rel="stylesheet" crossorigin href="/assets/index-6F6REBFy.css">
1010
</head>
1111
<body>
1212
<div id="root"></div>

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)