Skip to content

Bug: Clearing a customer's name in the edit dialog is a silent no-op but still shows success (and lacks the Vendor's required-name parity) #2060

Closed

Description

@yannickmonney

Area / route
Knowledge → Customers → Customer EDIT dialog. customer-edit-dialog.tsx, backend convex/customers/update_customer.ts. Vendor edit dialog is the correct reference. Two findings, one root cause (missing required-name validation), preserved below.

Sites

  • [74] Clearing a customer's name in the edit dialog is a silent no-op but still shows "Customer updated successfully"
    • Evidence: customer-edit-dialog.tsx:55 (name: z.string().trim()) + customer-edit-dialog.tsx:102-109 (name: trimmedName || undefined; toast updateSuccess) + convex/customers/update_customer.ts:86-90 (Object.fromEntries(... value !== undefined) then ctx.db.patch).
  • [76] Customer edit dialog accepts an empty Name while the sibling Vendor edit dialog requires it (validation parity)
    • Evidence: customer-edit-dialog.tsx:55 + Input at :142-149 (no required) vs vendor-edit-dialog.tsx:43-46 (.min(1)) + Input at :122-130 (required).

Notes
Fix: change the customer schema Name to z.string().trim().min(1, tCommon('validation.required',{field:tCustomers('name')})) and add required to the Input (matching vendor-edit-dialog.tsx:43-46/122-130); the || undefined coalesce then becomes unnecessary and the misleading success toast no longer fires on a no-op. Distinct from #1991 (max-length/trim on create forms) — this is min/required parity between the Customer and Vendor EDIT dialogs.


Filed by an automated manual-review pass (live browser QA + a 25-agent code-grounded audit, each finding adversarially verified). Deduped against open issues (incl. #1972–#1999, settings/forms epic #1941–#1966, audit cluster #1842–#1846) and recently-closed issues.

Activity

  1. added
    priority: medium
    bug
    service: platform
    automated
    on Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    automatedbugpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions