Repository navigation
fix(combos): PUT/DELETE error-shape standardization + stable flow node IDs (refs #4774, closes #4874) - #4875
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
@diegosouzapw - pinging for review on this one. Targets release/v3.8.34 and fixes the combo 400 + FlowCanvas 'Node cannot be found' bugs from your console log. Closes #4871 + #4874. Tests: 116/116 vitest assertions pass. tsc: 0 errors. The DAG sanitization removes the user-string echo that gemini flagged on prior review items. If anything in the COMBO_001..008 code list should be re-shaped, please flag in the inline review - happy to iterate. |
|
Thanks Diego for the review on #4871 — your pointer to #4774 (the transform-based auto-promote in I've updated the PR:
If you'd prefer the error-shape piece be split out (e.g. wait for #4774 to land and see if it's still needed), or if the flow canvas fix should be its own PR, let me know — happy to refactor. Otherwise, this is ready for review on the FlowCanvas half and a sanity check on whether the COMBO_001..008 codes are useful for the live tree. |
|
Closing as duplicate — upstream v3.8.35 ships Tracking continues on the 6 other still-unique PRs (#4880, #4881, #4888, #4902, #4903, #4904), which address gaps upstream hasn't filled yet. |
What
Closes two follow-ups to the combo 400 / flow-canvas issue:
Why (per Diego's review on #4871)
Diego confirmed:
POST /api/combos/{id}is not a defined handler — only GET/PUT/DELETE are.759265877feaa01f11d8ee50651ae24b07b5ba96) — a transform-based auto-promote insrc/shared/validation/schemas/combo.tslines 189-209.{ "error": ... }bodies on the current code, not raw strings.This PR now keeps the shape of the structured error consistent with the rest of the v3.8.34 API surface (canonical
{ error: { code, message, requestId, details } }) and adds the run-scoped node-ID fix for the flow canvas.Changes
src/shared/constants/errorCodes.ts— +8 stable codes COMBO_001..COMBO_008src/lib/api/comboErrorResponse.ts(new) —createComboErrorResponse(code, ...)helper withx-request-idpassthrough and DAG-message sanitizationsrc/app/api/combos/[id]/route.ts— uses helper for all 4xx paths; DAG messages no longer echo raw user stringssrc/app/api/combos/route.ts— same helper for the collection routesrc/shared/components/flow/FlowCanvas.tsx— ref-generation counter incremented on every react-flow update;rfInstance.current = nullon unmount; ref type widened toMutableRefObject<ReactFlowInstance | null>src/app/(dashboard)/dashboard/combos/live/comboFlowModel.ts— namespace every node/edge id withr<startedAt>-<sanitizeId(comboName)>:so two runs of the same combo are disjoint graphstests/unit/api/combo-error-response.test.ts(new) — 116 assertions covering all 8 codes, requestId passthrough, DAG sanitizationvitest.config.ts— includetests/unit/**/*.test.ts(was.tsx-only)Tests
Result: all 116 assertions pass.
Result: 0 type errors in modified files.
Acceptance
/api/combos/*matches the canonical error shaperequestIdis thex-request-idheader (or a generated UUID)Related
plans/2026-06-23-omniroute-v3.8.34-deep-audit.md