Repository navigation
Description
Feature Summary
When a Python UDF raises, Texera surfaces the traceback in the console and stops there. The user has to read the traceback, map it back to a column name or a type in the input schema, scroll up to the operator's code, edit it by hand, and re-run.
For the most common failure modes this round-trip is mechanical, and it is the part of the loop new users get stuck on: the traceback names a symptom (KeyError: 'genre') while the information actually needed to fix it (the input schema says the column is genres) lives in a different panel.
This proposes a panel in the result area that reads the error and the operator's own context, proposes a concrete edit, and lets the user apply it with one click.
Scope is deliberately narrow: four recognizable error classes, no new backend endpoints, no engine changes.
Proposed Solution or Design
A new "AI Fix" tab appears in the result panel when the selected operator has an error, alongside the existing Console and Result tabs. It is gated on the existing workflowWorkspace.copilotEnabled GUI config flag, so deployments without an LLM configured see no change.
Flow:
- The user clicks Analyze (explicit — nothing is sent anywhere until they do).
- The panel gathers the operator context that already exists client-side: the error text from the console messages, the input port schema from the compilation service, and the operator's current code/properties.
- It classifies the error against four patterns and sends a targeted prompt to the existing LiteLLM proxy (
/api/chat/completions) — the same route the Copilot feature already uses. No new endpoint. - The response is shown as a diff against the current code or property value. Nothing is written to the workflow yet.
- Apply writes the change through
WorkflowActionService(so it is undoable and syncs to collaborators like any other edit) and re-runs the workflow. Discard returns the panel to idle.
The four classes it handles, chosen because each has a fix derivable from context already on the client:
| Error | Context used |
|---|---|
KeyError: '<col>' |
input port schema — suggests the closest real column |
TypeError: unsupported operand |
attribute types — suggests the explicit cast |
ValueError: Input contains NaN / NullPointerException |
suggests the guard / dropna |
model-not-found / 404 |
the configured model list |
Anything else is reported as unsupported rather than guessed at.
Safety properties worth calling out:
- The suggestion is checked against the live operator state before it is applied; if the code or field changed since the suggestion was generated, the apply is refused rather than silently overwriting the newer value.
- If the deployment requires a warehouse and none is selected, the fix is applied but no run is claimed, since
ExecuteWorkflowServicewould refuse it.
Affected Area
Workflow UI
Activity
github-actions commentedon Sep 24, 2026
👋 Thanks for your first contribution to Texera, @pedroreyesalavrado!
If you're looking for a good place to start, browse issues labeled
starter-task; they're scoped to be approachable for newcomers.You can drive common housekeeping yourself by commenting one of these commands on its own line:
/taketo assign an open issue to yourself, or/untaketo release it. You can find unclaimed work with the search filteris:issue is:open no:assignee./sub-issue #5166 #5222on the parent to attach those children (or/unsub-issue #5166 #5222to detach them). From a child issue, comment/parent-issue #5166to set its parent, or/unparent-issueto clear it (the current parent is detected automatically). References may be written as#5166or as a bare5166; cross-repository references are not supported./request-review @userto request a review from someone, or/unrequest-review @userto withdraw that request.Each command must match exactly:
/take thiswill not work, only/takedoes. For the full contribution flow, see CONTRIBUTING.md.feat(frontend): add AI workflow fixer with LLM-powered diff panel (ap…