Say what went wrong on a node in one line

The bubble opened with the loader's own frame — `exec(compile(...))`
inside `_load_function` — before anything about the user's code, and
then said all of it twice, because a load failure arrives both as the
node's status and as a node_error issue carrying the same text. It is
now `Type: message (line N)`, deduplicated, with the line taken from the
node's own file. Full tracebacks still go to the server log.

Long messages grow the bubble instead of stretching it, and scroll only
past 240px. The tooltip arrow is gone: it read as a rotated square notch
under the bubble, and no better anywhere else it appeared.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkmeRiyeYmVZqJVwuyHq9o
This commit is contained in:
Melvin Strobl
2026-08-15 21:39:59 +02:00
co-authored by Claude Opus 5
parent 3b72d17ca7
commit 2bc9f684e8
3 changed files with 26 additions and 9 deletions
+6 -2
View File
@@ -83,9 +83,13 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
// Whatever is wrong — it failed to load, it failed to run, or the graph
// around it does not add up — is the same red dot with the same explanation.
const problem = [live?.status === "error" ? live.error : null, issueText]
// A load failure arrives twice, as node status and as a validation issue, so
// identical lines collapse into one.
const lines = [live?.status === "error" ? live.error : null, issueText]
.filter(Boolean)
.join("\n")
.split("\n")
const problem = [...new Set(lines)].join("\n")
const status = problem ? "error" : live?.status
const style = STATUS_STYLES[status as keyof typeof STATUS_STYLES]
@@ -126,7 +130,7 @@ function FlowNodeComponent({ data, selected }: NodeProps) {
aria-label={style.label}
/>
</TooltipTrigger>
<TooltipContent className="max-w-xs whitespace-pre-line">
<TooltipContent className="max-h-60 max-w-xs overflow-y-auto whitespace-pre-line break-words">
{problem || style.label}
</TooltipContent>
</Tooltip>