fix(manual-edit): confirm element deletion - #6070
Conversation
|
🧪 This PR has changes that need a manual QA pass before merge — please hold off self-merging for now; we'll loop QA in once it's merge-ready (and design/product have signed off, where applicable). |
6af0257 to
b3a586f
Compare
|
Rebased onto the latest |
lefarcen
left a comment
There was a problem hiding this comment.
Hey @roian6 — thanks for rebasing this onto #5890 and tightening the shared deletion path.
The updated write-up is already much clearer. Before pool review picks this up, could you add three bits back to the PR body: a short user-facing What users will see summary, the relevant Surface area checkboxes, and the explicit bug-fix verification note that this went red on main and green here? Your existing Verification section already covers Validation as-is.
|
@lefarcen Updated the PR body with the requested template fields: a concise What users will see summary, explicit Surface area checkboxes, and the bug-fix red on |
|
Thanks @roian6 — the PR body now covers the requested template fields, so that part is in good shape. We'll leave the remaining review and validation flow with the assigned reviewers from here. |
b3a586f to
a985d67
Compare
Fixes #3846
Why
While rebasing the original deletion-confirmation fix onto the manual-edit work merged in #5890, I found that users could still bypass confirmation from the selection action bar or the canvas keyboard path. A destructive delete could also outlive a target, file, project, source, or viewer-lifecycle change while an asynchronous save or source verification was pending.
What users will see
Deleting a selected element—whether from the inspector trash action, the selection action bar, or
Delete/Backspaceon the canvas—now opens the same inline warning in the inspector. Cancel keeps the element and any unsaved inspector draft unchanged; Delete element performs the existing guarded, undoable removal.Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-packflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies)Screenshots
Bug fix verification
apps/web/tests/components/FileViewer.manual-edit.test.tsxapps/web/tests/components/ManualEditPanel.test.tsxapps/web/tests/components/ManualEditSelectionOverlay.test.tsxmainand green on this branch? Yes. During the rebase, the focused regressions were first run againstmain's pre-fix deletion path and failed on direct overlay/iframe deletion, dirty-draft preservation, and stale asynchronous deletion authorization. They pass after this change, including held save/source-verification, file/project/source change, same-ID reselection, and unmount cases.Validation
Implementation notes
removeManualEditTarget()run only after final confirmation.