refactor: split lookups and projections out of ContractsService #5

Merged
macoun merged 1 commit from refactor/split-contracts-service into main 2026-10-16 08:59:03 +00:00
Owner

Summary

ContractsService had grown to ~570 lines and mixed several unrelated jobs. No behaviour changes.

  • LookupsService: the lookups bundle (device types, boxes, parameter hints, priorities, flow states);
    LookupsController uses it directly.
  • ContractProjections: contract detail, item and configuration mapping, plus a single PriorityName
    (previously duplicated in GuideService).
  • ContractQuery: sorting (ApplySort, ParseSort) lives next to the filters; removed a duplicated stale doc comment.
  • .context/codebase-map.md updated.

ContractsService is now ~410 lines.

Testing

  • dotnet build (warnings as errors), dotnet test: 237 passed
## Summary ContractsService had grown to ~570 lines and mixed several unrelated jobs. No behaviour changes. - `LookupsService`: the lookups bundle (device types, boxes, parameter hints, priorities, flow states); `LookupsController` uses it directly. - `ContractProjections`: contract detail, item and configuration mapping, plus a single `PriorityName` (previously duplicated in GuideService). - `ContractQuery`: sorting (`ApplySort`, `ParseSort`) lives next to the filters; removed a duplicated stale doc comment. - `.context/codebase-map.md` updated. ContractsService is now ~410 lines. ## Testing - `dotnet build` (warnings as errors), `dotnet test`: 237 passed
refactor: split ContractsService into lookups, projections and query sorting
All checks were successful
Build and publish Docker image / migrations-check (pull_request) Successful in 42s
Build and publish Docker image / frontend (pull_request) Successful in 42s
Build and publish Docker image / test (pull_request) Successful in 1m40s
Build and publish Docker image / build-and-push (pull_request) Has been skipped
90cfeeb380
ContractsService (570 lines) mixed five concerns. Lookups move to LookupsService (only LookupsController uses them), mapping to responses moves to ContractProjections next to the list projection, and sorting moves onto ContractQuery with the other list parameters. The Czech priority names were written twice (ContractsService and GuideService) and now live once in ContractProjections. A duplicated stale summary on ContractQuery is removed. No behaviour change; ContractsService is down to about 400 lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macoun merged commit d067e6dda0 into main 2026-10-16 08:59:03 +00:00
macoun deleted branch refactor/split-contracts-service 2026-10-16 08:59:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
STATOTEST/contract-microservice!5
No description provided.