fix(modals): consistent text colors and workspace delete confirmation#4017
fix(modals): consistent text colors and workspace delete confirmation#4017waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Tightens workspace deletion UX in the sidebar Reviewed by Cursor Bugbot for commit f6f601c. Configure here. |
...d]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx
Show resolved
Hide resolved
Greptile SummaryThis 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 Key changes:
Confidence Score: 5/5Safe 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 ( No files require special attention. The core logic change in delete-modal.tsx looks correct. Important Files Changed
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]
Reviews (3): Last reviewed commit: "fix(modal): replace useEffect with rende..." | Re-trigger Greptile |
5277d9c to
d4f43d0
Compare
d4f43d0 to
ca7840b
Compare
ca7840b to
6e10055
Compare
6e10055 to
ea00124
Compare
|
@greptile |
|
@cursor review |
...ceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal.tsx
Outdated
Show resolved
Hide resolved
...ceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal.tsx
Show resolved
Hide resolved
…rmation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ea00124 to
fd29a29
Compare
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.
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ 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.
Summary
text-tertiarycolor from recovery and "cannot be undone" text so it matches basetext-secondarytext-errortext-captionsizing from scheduled task and notification delete modalsType of Change
Testing
Tested manually
Checklist