Keep the Content sidebar interactive after deletions - #2536
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
PR #2536 centralizes Content deletion confirmation in the stable DocumentSidebar instead of allowing ordinary, database, and nested row components to own dialogs. The afterBodyPointerUnlock requestAnimationFrame loop serializes dropdown-to-dialog transitions, while the confirmation ref captures the selected document before dialog cleanup and starts the existing optimistic deletion only after Radix releases its body pointer lock. The three new end-to-end scenarios and the layout ownership guard cover the primary regression surface without changing actions, permissions, persistence, or navigation semantics.
Risk: Standard. Three independent balanced reviews found no confirmed bugs in the dialog lifecycle, callback/state handling, destructive flow, or test cleanup. The implementation also preserves the existing database and nested-row callback paths while removing obsolete row-local dialog code.
🧪 Browser testing: Attempted full verification, but all planner executors were blocked by an environment-wide Chrome MCP/browser-tool outage; no UI evidence was produced. The dev server and /content proxy were healthy, so this is an infrastructure limitation rather than a PR failure. The grounded test plan should be rerun when browser tooling is restored.

Problem
Deleting an active page from Content could leave the entire sidebar unable to receive pointer input until the browser was refreshed. The failure affected ordinary pages, database pages, and nested page subtrees.
The delete command started in a modal dropdown and immediately opened a row-owned confirmation dialog. Radix modal layers could overlap their body pointer locks, and optimistic deletion could then unmount the row that owned the dialog, stranding the page with pointer events disabled.
Approach
Keep confirmation ownership in the stable sidebar root and sequence each modal transition only after the previous body pointer lock has cleared. The existing optimistic cache updates, navigation, and document/database delete actions remain unchanged.
What changed
Safety and operations
This changes only client-side dialog ownership and timing. It adds no schema, action, API, permission, credential, migration, or data-retention change. Rollback is the single commit; no persisted data needs reversal.
Verification
Review focus