Adds IContentCrudService registration to UmbracoBuilder alongside IContentService. Both services are now resolvable from DI. Includes integration test verifying successful resolution. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
4.7 KiB
date, researcher, git_commit, branch, repository, topic, tags, status, last_updated, last_updated_by, type
| date | researcher | git_commit | branch | repository | topic | tags | status | last_updated | last_updated_by | type | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2025-12-13T06:23:36+00:00 | Claude | a1184533860623a1636620c78be6151490b0ea77 | refactor/ContentService | Umbraco-CMS | ContentService Refactoring Design Review and Revision |
|
complete | 2025-12-13 | Claude | implementation_strategy |
Handoff: ContentService Refactoring Design Review
Task(s)
| Task | Status |
|---|---|
| Review design document for major issues | Completed |
| Identify architecture/codebase mismatches | Completed |
| Make decisions on 9 major issues | Completed |
| Revise design document with corrections | Completed |
| Commit updated design | Completed |
The session focused on critically reviewing docs/plans/2025-12-04-contentservice-refactoring-design.md and identifying major issues where the design conflicted with the actual codebase structure.
Critical References
docs/plans/2025-12-04-contentservice-refactoring-design.md- The revised design document (primary artifact)src/Umbraco.Core/Services/ContentService.cs- The 3,823-line god class being refactoredsrc/Umbraco.Core/CLAUDE.md- Core architecture guide with patterns
Recent Changes
docs/plans/2025-12-04-contentservice-refactoring-design.md- Complete revision addressing 9 major issues
Learnings
Critical Architecture Discovery
The original design assumed implementations go in Umbraco.Infrastructure, but the actual codebase has:
ContentService.csinUmbraco.Core/Services/(not Infrastructure)ContentEditingService.csinUmbraco.Core/Services/ContentPublishingService.csinUmbraco.Core/Services/
Existing Service Complexity
ContentPublishingService already has:
- Background task handling via
ILongRunningOperationService - Schedule management with
ContentScheduleCollection IUmbracoContextFactoryintegration
ContentEditingService uses inheritance from ContentEditingServiceWithSortingBase, not delegation.
Return Type Patterns
Three incompatible patterns exist in the codebase:
- Legacy
OperationResult/PublishResult(IContentService) - Modern
Attempt<TResult, TStatus>(IContentEditingService) - Proposed new types (design) - rejected in favor of reusing existing
Pagination Patterns
- Legacy:
pageIndex/pageSizewithout long totalRecords - Modern:
PagedModel<T>containing items and total - Design should use
PagedModel<T>for new services
Artifacts
Primary artifact produced:
docs/plans/2025-12-04-contentservice-refactoring-design.md- Revised design document
Key sections added/updated:
- Lines 22-36: Design Decisions Log (new section documenting all 8 decisions)
- Lines 39-123: Revised Architecture section with corrected layer structure
- Lines 203-253: Updated
IContentQueryServicewithPagedModel<T>and complete method list - Lines 255-338: Simplified pipeline components using existing types
- Lines 342-389: Corrected file locations (all in Umbraco.Core)
Action Items & Next Steps
-
Begin Phase 1 Implementation - Introduce pipeline components:
- Create
IPublishingValidator,IPublishingExecutor,IPublishingStrategy,IPublishingNotifier - Location:
src/Umbraco.Core/Services/Publishing/ - Components only depend on repositories (one-way dependencies)
- Create
-
Create Phase 1 Implementation Plan - Run
/superpowers:write-planto generate detailed task breakdown for Phase 1 -
Set Up Benchmarks - Create
tests/Umbraco.Tests.Benchmarks/ContentPublishingBenchmarks.csto establish baseline before changes -
Integration with ContentPublishingService - Modify
ContentPublishingServiceto use new components internally while keeping public API unchanged
Other Notes
Key Design Decisions Made
| # | Issue | Decision |
|---|---|---|
| 1 | Architecture | Implementations in Umbraco.Core (match existing) |
| 2 | Service relationships | Gradual extraction - components are helpers |
| 3 | Dependencies | One-way only - components depend on repositories |
| 4 | Async/sync | Query service stays sync |
| 5 | Return types | Reuse existing PublishResult |
| 6 | Pagination | Use PagedModel<T> |
| 7 | DI registration | Add to existing UmbracoBuilder.Services.cs |
| 8 | Query capabilities | Pragmatic split |
Removed from Original Design
IContentMutationService- keep in facadesIContentTreeService- keep in facadesIContentPublishingPipeline- use individual components instead- New status enums - reuse existing types
Important File Locations
- Existing services:
src/Umbraco.Core/Services/ - DI registration:
src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs - Test location:
tests/Umbraco.Tests.UnitTests/Umbraco.Core/Services/