Skip to content

fix: tell the user why a nested queue add did nothing [WTEL-10406] - #1504

Merged
dlohvinov merged 1 commit into
mainfrom
fix/WTEL-10406/queue-nested-add-validation-toast
Sep 14, 2026
Merged

dlohvinov merged 1 commit into
mainfrom
fix/WTEL-10406/queue-nested-add-validation-toast

Conversation

@dlohvinov

@dlohvinov dlohvinov commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

WTEL-10406

Problem

On a new queue, pressing add on the Skills, Buckets, Resources or Hooks tab did nothing and said nothing.

Those tabs cannot add a record before the queue exists, so they first save the queue through the card's own save. That save validates, and useCardSaveAction returns silently when validation fails. The field errors it raises are on the General / Parameters tab, which the nested tab is covering — so from the user's side the button is simply dead.

Fix

A save blocked by validation now raises an error toast: "Fill in the required queue fields before adding records" (translated into all nine locales).

A save blocked by a rejected request stays silent — the api notify transformer already toasts for that, and a second toast would read as two separate faults.

The provider body moved into createEnsureQueueSaved, taking the card's pieces as callbacks. The card page component is untestable under @vue/compat (VTU stubs are inert there), the factory is not.

Verification

Dev server against test.webitel.me, new inbound queue with an empty name:

tab before after
skills no toast "Fill in the required queue fields before adding records"
buckets no toast same
resources no toast same
hooks no toast same

Saved queue (/queues/15/skills) is unaffected: add opens the "Add skill" popup, no toast.

  • npx vitest run src/app/locale src/modules/contact-center/modules/queues — 109 passed (14 new: 5 on the factory, 9 on locale coverage)
  • npm run typecheck — clean
  • npx biome check — clean

🤖 Generated with Claude Code

…tps://webitel.atlassian.net/browse/WTEL-10406)

Adding a skill, bucket, resource or hook to an unsaved queue saves the queue
first, through the card's own validated `save`. When that validation fails the
save returns silently, and the errors it raises render on the General or
Parameters tab — which the nested tab is covering. So the add button did
nothing at all, with no hint as to why.

A failed validation now raises a toast. A rejected request stays silent, since
the api transformer already notifies for it — saying it twice would read as two
separate faults.

The provider body moves into `createEnsureQueueSaved`, taking the card's
pieces as callbacks, so the branch is unit-testable: the card page component
itself is not, under @vue/compat.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dlohvinov
dlohvinov merged commit 94a0c8d into main Sep 14, 2026
12 checks passed
@dlohvinov
dlohvinov deleted the fix/WTEL-10406/queue-nested-add-validation-toast branch September 14, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant