Removed legacy settings dirty and focus contexts#29545
Conversation
no ref Settings was maintaining duplicate dirty and focus providers, which split state between Shade and the legacy design system. A shared Shade confirmation pattern now keeps navigation guards consistent while the legacy settings layer is retired.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (22)
WalkthroughThe changes add a reusable Shade dirty-confirmation hook and dialog with exports, stories, and tests. The design-system provider and public exports are narrowed by removing focus and legacy dirty-confirmation APIs. Design-system modals and settings components now use ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 6m 31s | View ↗ |
nx run-many -t test:unit -p @tryghost/admin-x-d... |
✅ Succeeded | 5m 7s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 2m 56s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 23s | View ↗ |
nx run-many -t lint -p @tryghost/admin-x-design... |
✅ Succeeded | 2m 13s | View ↗ |
nx run @tryghost/admin:build |
✅ Succeeded | 2m 7s | View ↗ |
nx run @tryghost/activitypub:test:acceptance |
✅ Succeeded | 46s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | <1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-22 21:12:31 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29545 +/- ##
==========================================
+ Coverage 74.77% 74.79% +0.01%
==========================================
Files 1611 1611
Lines 141659 141678 +19
Branches 17311 17319 +8
==========================================
+ Hits 105926 105962 +36
+ Misses 34691 34673 -18
- Partials 1042 1043 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

What changed
DirtyConfirmDialogpattern and controller hook, with a Storybook story and unit coverageconfirmIfDirtyhelperadmin-x-design-systemWhy
Settings was nested inside the consolidated Admin Shade provider but the legacy design-system wrapper created a second dirty/focus state tree. That split state between newer Shade controls and legacy modal/form consumers, and left duplicate confirmation implementations to maintain. This slice makes Shade the single owner while preserving the existing Stay/Leave behavior during the design-system retirement.
Validation
Manual validation