Skip to content

fix(modals): consistent text colors and workspace delete confirmation#4017

Merged
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/fix-modal-font-color
Apr 7, 2026
Merged

fix(modals): consistent text colors and workspace delete confirmation#4017
waleedlatif1 merged 2 commits intostagingfrom
waleedlatif1/fix-modal-font-color

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

@waleedlatif1 waleedlatif1 commented Apr 7, 2026

Summary

  • Remove text-tertiary color from recovery and "cannot be undone" text so it matches base text-secondary
  • Make "This action cannot be undone." plain text (not red) across all modals — only destructive consequences use text-error
  • Add missing "This action cannot be undone." to 5 modals that were missing it (BYOK, chat, A2A agent, single document, bulk documents)
  • Remove inconsistent text-caption sizing from scheduled task and notification delete modals
  • Add name-typing confirmation for workspace deletion (delete button disabled until name matches)
  • Update workspace delete copy: "workflows, tables, files, logs, and knowledge bases"

Type of Change

  • Bug fix

Testing

Tested manually

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
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 7, 2026 6:34pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 7, 2026

PR Summary

Medium Risk
Mostly UI copy/styling changes, but it also modifies delete confirmation behavior (workspace name-typing gate) and removes the click-action guard in base-card, which could impact navigation/context-menu interactions.

Overview
Standardizes delete/disable confirmation messaging across the app by making recovery/irreversibility text use normal text-secondary styling and keeping only the actual destructive consequences in text-error (plus removing inconsistent text-caption sizing in a couple modals). It also adds missing "This action cannot be undone." text to several deletion dialogs and reduces the tag modals (BaseTagsModal, DocumentTagsModal) from md to sm.

Tightens workspace deletion UX in the sidebar DeleteModal by requiring users to type the workspace name before enabling the Delete button, resets that confirmation input on open/close, and updates the workspace delete warning copy to explicitly include tables and files.

Reviewed by Cursor Bugbot for commit f6f601c. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 7, 2026

Greptile Summary

This PR makes consistent visual and copy improvements across all destructive-action modals in the application. The primary changes are: (1) standardizing "This action cannot be undone." as plain text-secondary text (only true destructive consequences use text-error), (2) adding the missing "cannot be undone" sentence to five modals that lacked it, and (3) adding a workspace-name typing confirmation gate before workspace deletion — the most significant behavior change.

Key changes:

  • Added workspace-name confirmation input to the workspace DeleteModal; the Delete button is disabled until the typed text exactly matches the workspace name
  • Render-time state reset pattern (prevIsOpen guard) used to clear the confirmation input when the modal reopens — consistent with React's derived-state recommendations
  • Workspace delete description updated to enumerate all deleted data: "workflows, tables, files, logs, and knowledge bases"
  • CSS variable fixes applied to the confirmation input: --border, bg-transparent, --border-1 replacing the previously undefined --border-color, --bg-secondary, --border-focus tokens
  • "This action cannot be undone." added to BYOK, chat, A2A agent, single-document, and bulk-document delete modals
  • text-caption sizing removed from scheduled-task and notification delete modal copy for consistency

Confidence Score: 5/5

Safe to merge — the workspace-name confirmation logic is correct, CSS variable tokens have been fixed, and text-color changes are purely visual.

All findings are P2 style suggestions. The new workspace deletion confirmation gate works correctly: the confirmation text is properly cleared on open via the React render-time state reset pattern, and the case-sensitive equality check (confirmationText === workspaceName) is intentional and appropriate for a destructive action.

No files require special attention. The core logic change in delete-modal.tsx looks correct.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal.tsx Adds workspace name-typing confirmation gate and render-time state reset; restorableTypes Set is re-created on every render (minor style issue)
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsx Passes workspace name as itemName to DeleteModal to enable the name-typing confirmation gate
apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok.tsx Adds missing 'This action cannot be undone.' to BYOK key delete modal; text color consistency fix
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx Adds 'This action cannot be undone.' and wraps destructive consequence in text-error in chat delete modal
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx Keeps 'This action cannot be undone.' as plain text-secondary in member and invitation removal modals
apps/sim/app/workspace/[workspaceId]/scheduled-tasks/scheduled-tasks.tsx Removes inconsistent text-caption sizing from scheduled-task delete confirmation modal

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User clicks Delete Workspace] --> B[handleDeleteAction]
    B --> C[setDeleteTarget workspace]
    C --> D[setIsDeleteModalOpen true]
    D --> E[DeleteModal opens]
    E --> F{isWorkspace && workspaceName?}
    F -- No --> G[Show standard confirm only]
    F -- Yes --> H[Show name-typing input]
    H --> I{confirmationText === workspaceName?}
    I -- No --> J[Delete button disabled]
    I -- Yes --> K[Delete button enabled]
    G --> K
    K --> L[User clicks Delete]
    L --> M[onConfirm → handleDeleteWorkspace]
    M --> N[setIsDeleting true]
    N --> O[await onDeleteWorkspace]
    O -- success --> P[setIsDeleteModalOpen false]
    O -- error --> Q[logger.error, isDeleting false]
    P --> R[Modal closes]
    R --> S[Next open: render-time reset clears confirmationText]
Loading

Reviews (3): Last reviewed commit: "fix(modal): replace useEffect with rende..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/fix-modal-font-color branch from 5277d9c to d4f43d0 Compare April 7, 2026 18:06
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/fix-modal-font-color branch from d4f43d0 to ca7840b Compare April 7, 2026 18:08
@waleedlatif1 waleedlatif1 changed the title fix(modals): consistent font colors in delete/confirmation modals fix(modals): consistent text colors and workspace delete confirmation Apr 7, 2026
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/fix-modal-font-color branch from ca7840b to 6e10055 Compare April 7, 2026 18:11
@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/fix-modal-font-color branch from 6e10055 to ea00124 Compare April 7, 2026 18:14
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1 waleedlatif1 force-pushed the waleedlatif1/fix-modal-font-color branch from ea00124 to fd29a29 Compare April 7, 2026 18:26
Replace useEffect anti-pattern for resetting confirmation text with
React's recommended "adjusting state during render" pattern. This
ensures stale text is never painted and avoids an extra render cycle.
@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f6f601c. Configure here.

@waleedlatif1 waleedlatif1 merged commit 04434dd into staging Apr 7, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/fix-modal-font-color branch April 7, 2026 18:41
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