Skip to content

fix(ui): surface silent validation and rejection errors across editors and modals#5394

Merged
TheodoreSpeaks merged 7 commits into
stagingfrom
fix/surface-silent-validation
Jul 3, 2026
Merged

fix(ui): surface silent validation and rejection errors across editors and modals#5394
TheodoreSpeaks merged 7 commits into
stagingfrom
fix/surface-silent-validation

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • chunk editor: empty/over-length content now toasts the reason ("Content cannot be empty" / "Content exceeds maximum length (10,000 characters)") instead of just "Save failed"/"Create failed"; every failed attempt re-toasts, and the toast is dismissed once content validates
  • version description modal: over-limit description renders a character-count error message instead of a silent red field + disabled Save
  • table cells: invalid JSON/number/date in inline editors and the expanded popover now surface inline error styling + a toast instead of silently discarding or nulling the edit
  • create workspace modal: failed creates fill ChipModalError and keep the modal open instead of closing silently

Type of Change

  • Bug fix

Testing

Tested manually; bun run lint, tsc --noEmit, and check:api-validation:strict pass

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 3, 2026 11:04pm

Request Review

@cursor

cursor Bot commented Jul 3, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Client-only UX around validation and error display; no auth, data model, or API contract changes beyond re-throwing create-workspace failures.

Overview
Editors and modals now show why a save failed instead of discarding input or only showing generic failure states.

Knowledge chunk editor shows toasts for empty content and the 10k character cap (replacing the previous toast on retry). Table inline editors toast and use error styling for invalid dates, numbers, and JSON; blur on bad values cancels the edit instead of saving null. The expanded cell popover shows the same validation messages inline in the footer and blocks save until the value is valid.

Version description modal adds a ChipModalField error with current vs max length when over 50k characters. Create workspace keeps the modal open on API failure: the hook re-throws after logging, and the modal maps the error into ChipModalError (cleared when the name changes or the dialog reopens).

Reviewed by Cursor Bugbot for commit bd9824c. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Surfaces previously silent validation and API errors across six distinct UI surfaces — chunk editor, version description modal, table inline/expanded-cell editors, chat deploy identifier field, create-workspace modal, and profile name editing — replacing silent reverts, disabled buttons, or null cell overwrites with inline error messages and toasts.

  • Table cells (inline-editors.tsx, expanded-cell-popover.tsx): both the single-line inline editor and the expanded popover now guard against cleanCellValue returning null for unparseable numbers/dates and against JSON parse exceptions, surfacing per-type error messages and preventing silent cell clears.
  • Workspace creation (create-workspace-modal.tsx + use-workspace-management.ts): handleCreateWorkspace now re-throws on failure, and the modal catches it to fill ChipModalError, keeping the modal open with a concrete message.
  • Chunk editor, version description modal, chat deploy, profile name: each gains a targeted toast or inline error for the previously-unhandled failure path.

Confidence Score: 5/5

Safe to merge — all changes are additive error-surfacing paths with no alterations to the underlying save logic.

Every change is narrowly scoped to surfacing an existing silent failure: no data paths are altered, no new async flows introduced, and the deduplication guards are correctly wired to their respective closure dependencies.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-editor/chunk-editor.tsx Adds toast deduplication via lastToastedErrorRef so autosave retries don't spam the same error message.
apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx Adds a toast on profile name update failure instead of silently reverting.
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/expanded-cell-popover.tsx Adds parseError state and null-check guards preventing silent cell clears for invalid number/date/JSON input.
apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/inline-editors.tsx Adds invalid state and rejectDraft helper to surface validation errors inline with error text color and deduped toasts.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx Surfaces errors.identifier under the URL field via a new external error prop merged with availabilityError.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/version-description-modal.tsx Replaces silent red-border-only treatment of over-limit descriptions with an explicit character-count error message.
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/create-workspace-modal/create-workspace-modal.tsx Catches onConfirm failures and shows the error in ChipModalError, keeping the modal open.
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/hooks/use-workspace-management.ts Adds throw error in handleCreateWorkspace catch block so the modal can display workspace creation failures.

Reviews (4): Last reviewed commit: "fix(tables): reject invalid date/number ..." | Re-trigger Greptile

…-validation

# Conflicts:
#	apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/inline-editors.tsx
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4476fd3. Configure here.

@TheodoreSpeaks TheodoreSpeaks merged commit d508201 into staging Jul 3, 2026
18 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the fix/surface-silent-validation branch July 3, 2026 23:13
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