fix(releases): show toast when bulk unpublish has no permitted targets - #13785
fix(releases): show toast when bulk unpublish has no permitted targets#13785tpc-faheem wants to merge 7 commits into
Conversation
…es detail Introduce shared detail-layout components and a shared document table, and adopt them on the Releases detail page as the first consumer. Establishes the pattern the variant definition surfaces follow. All behind beta.variants; production unchanged. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1NYrgo5GE7yMePn9mCTb
DetailPropertyRow was re-exported but never imported; make it local. Keep DetailPropertiesSection exported and use it in ReleaseDashboardDetails so it isn't an unused export. Fixes the knip CI check. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01YC1NYrgo5GE7yMePn9mCTb
When beta.variants enables DocumentTable on Release Summary, pass alwaysShowCommandLane so Add document, Activity, Copy, search, and filter tabs stay mounted when rows are empty or search filters to zero. Co-authored-by: Faheem Hasan <[email protected]>
Co-authored-by: Faheem Hasan <[email protected]>
Co-authored-by: Faheem Hasan <[email protected]>
Co-authored-by: Faheem Hasan <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Bundle Stats —
|
| Metric | Value | vs pr/detail-foundation-releases (7fdb9d7) | vs v6.7.0 |
|---|---|---|---|
| Internal (raw) | 4.10 MB | - | +2.2 KB, +0.1% |
| Internal (gzip) | 1.01 MB | +13 B, +0.0% | +606 B, +0.1% |
| Bundled (raw) | 12.38 MB | +366 B, +0.0% | +61.6 KB, +0.5% |
| Bundled (gzip) | 2.90 MB | +46 B, +0.0% | +16.2 KB, +0.5% |
| Import time | 1.68s | -2ms, -0.1% | +67ms, +4.2% |
bin:sanity
| Metric | Value | vs pr/detail-foundation-releases (7fdb9d7) | vs v6.7.0 |
|---|---|---|---|
| Internal (raw) | 7.1 KB | - | - |
| Internal (gzip) | 2.9 KB | - | - |
| Bundled (raw) | 7.1 KB | - | - |
| Bundled (gzip) | 2.8 KB | - | - |
| Import time | 4ms | +0ms, +0.7% | +0ms, +4.0% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
✅ E2E Tests🟢 209 passed • 🟡 1 flaky • (⚪ 90 skipped) • view full report • view run |
📚 TypeDoc Generation Result✅ TypeDoc generated successfully!
The TypeDoc JSON file has been generated and validated. All documentation scripts completed successfully. |
⚡️ Editor Performance ReportUpdated Wed, 29 Jul 2026 11:51:07 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
126b276 to
5bf9eb3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3a4ea4b. Configure here.
|
|
||
| setIsProcessing(false) | ||
| onSuccess() | ||
| onClose() |
There was a problem hiding this comment.
Dialog sticks on permission errors
High Severity
handleConfirm sets isProcessing to true, then awaits permission filtering with no try/finally. If filterDocumentsWithUnpublishPermission rejects, isProcessing never resets. The dialog’s close and cancel handlers are gated on !isProcessing, so the dialog can become permanently stuck with no way to dismiss it.
Reviewed by Cursor Bugbot for commit 3a4ea4b. Configure here.
|
|
||
| setIsProcessing(false) | ||
| onSuccess() | ||
| onClose() |
There was a problem hiding this comment.
Failed bulk action clears selection
Medium Severity
After Promise.allSettled, onSuccess always runs—even when every operation was rejected. That clears the table selection via bulkAction.clear. The empty-targets path correctly skips onSuccess to keep the selection; total failure does not, so users lose their selection and must reselect to retry.
Reviewed by Cursor Bugbot for commit 3a4ea4b. Configure here.
b29c640 to
6cb1537
Compare


Description
Bulk unpublish runs permission checks before calling
unpublishVersion. When every selected document is denied, the early return closed the dialog without feedback, so the selection stayed (correct) but users had no idea why nothing happened.We show an error toast using a new releases i18n string and still skip
onSuccessso the selection is preserved.What to review
ReleaseBulkActionDialog.tsx— emptytargetsbranch after permission filteringresources.ts—dashboard.details.bulk.unpublish-toast.no-permissiononSuccessTesting
pnpm vitest run --project=sanity packages/sanity/src/core/releases/tool/detail/__tests__/ReleaseBulkActionDialog.test.tsxNotes for release
Fixes silent failure when confirming bulk unpublish without permission on any selected documents.