fix: pipeline only shows compatible tools and displays errors

The pipeline tool picker was showing all tools, but only tools
registered via createToolRoute() support pipeline execution. Tools
with custom routes (remove-background, upscale, ocr, etc.) would
silently fail with "Tool not found" and the empty catch block hid
the error from users.

Add GET /api/v1/pipeline/tools endpoint that returns the IDs of
pipeline-compatible tools. The frontend fetches this list and filters
the tool picker accordingly. Also surface pipeline execution errors
in the UI instead of swallowing them.
This commit is contained in:
Siddharth Kumar Sah
2026-03-28 14:38:48 +08:00
parent 1703dcbcfe
commit 0410bf3461
4 changed files with 47 additions and 3 deletions
+7 -1
View File
@@ -26,6 +26,7 @@ export function AutomatePage() {
processedSize: number;
stepsCompleted: number;
} | null>(null);
const [executionError, setExecutionError] = useState<string | null>(null);
// Load saved pipelines
const loadPipelines = useCallback(async () => {
@@ -96,6 +97,7 @@ export function AutomatePage() {
async (file: File) => {
setExecuting(true);
setExecutionResult(null);
setExecutionError(null);
try {
const formData = new FormData();
formData.append("file", file);
@@ -123,9 +125,12 @@ export function AutomatePage() {
processedSize: data.processedSize,
stepsCompleted: data.stepsCompleted,
});
} else {
const data = await res.json().catch(() => ({}));
setExecutionError(data.error || `Pipeline failed with status ${res.status}`);
}
} catch {
// Error handling
setExecutionError("Connection error. Please try again.");
} finally {
setExecuting(false);
}
@@ -215,6 +220,7 @@ export function AutomatePage() {
saving={saving}
executing={executing}
executionResult={executionResult}
executionError={executionError}
/>
</div>
</div>