Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
feat: validate duplicate tool names at deployment review step (#12675)
* feat: validate duplicate tool names at deployment review step Add early detection of duplicate WXO tool names before deployment, preventing users from hitting a 409 error only at deploy time. - Add `GET /snapshots/check-names` endpoint using SDK's `get_drafts_by_names()` for fast server-side lookup - Add `check_tool_names_exist()` to WXO service adapter - Show inline validation error with alert banner on the review step card when a tool name already exists in the provider - Block deploy button while duplicate names exist - Also detect batch duplicates (same name on multiple flows) - Use `keepPreviousData` to prevent error flicker on re-validation * fix: update duplicate tool name error message * refactor: use snapshot list endpoint with name filter instead of dedicated check-names endpoint Replace the dedicated `/snapshots/check-names` endpoint with a `provider_snapshot_names` query parameter on the existing `GET /deployments/snapshots` endpoint. This keeps the API surface smaller and follows the existing list-with-filter pattern. * test: add tests for snapshot name filter and duplicate tool name validation - Add validation on provider_snapshot_names: min_length=1 on Query param, strip whitespace and reject empty entries in SnapshotListParams - Backend unit tests: 5 validation tests + 3 adapter list_snapshots name-filter tests + 1 route handler test - Frontend unit tests: 4 tests for useCheckToolNames hook - Frontend E2E tests: 3 Playwright tests for duplicate tool name detection, unique name acceptance, and error clearing on edit - Fix step-review unit test mock to include new context fields * feat: standardize snapshot name filtering to names query param Rename deployment snapshot filtering from provider_snapshot_names to names across backend and frontend callers. Add trimmed non-empty + dedup validation, enforce deployment_id/name-filter mutual exclusivity, and normalize WXO snapshot names with expanded unit coverage. * chore: restore package-lock.json from release-1.9.0 * fix(frontend): limit deployment creation retry to 1 Reduce usePostDeployment mutation retry from default 3 to 1 to avoid excessive 409 requests when deploying. * feat(frontend): check duplicate tool names on deployment update When editing a deployment, pre-existing flows with renamed tool names are now validated against the provider for duplicates. Previously only new flows were checked, allowing renamed tools to collide silently. Expose initialToolNameByFlow from stepper context so step-review can detect name changes and include them in the provider duplicate check. * fix(frontend): replace nested button with div role=button in flow list Outer button element contained inner detach/undo buttons, causing "button cannot be a descendant of button" console error. --------- Co-authored-by: Hamza Rashid <hzarashid@gmail.com>
V
Viktor Avelino committed
68a8990a1ad260c98045880c42e1e2efd7066348
Parent: 4ddb55b
Committed by GitHub <noreply@github.com>
on 4/14/2026, 2:49:55 PM