fix: expose descendant log dates in calendar month (#984) - #671
Merged
Merged
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the complete API change, regression tests, and shared web/mobile calendar consumers.
- Descendant log exposure:
BuildLogsDictnow includes all loaded habit IDs, preserving existing log fields, inclusive range filtering, descending ordering, and top-level entries. - Regression coverage: Tests cover flexible and completed children/grandchildren with empty instances, exact log DTOs, range boundaries, ordering, and zero-valued skips. The targeted calendar handler suite passed all 19 tests.
- Client compatibility: The shared
logsrecord accepts descendant keys without a contract change. Rendering these dates still depends on the planned consumer ticket #985; this API-first change does not regress the existing client path.
openai/gpt-6.1-sol | 𝕏
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Flexible and completed sub-habits have empty
Instances, so the calendar could not identify their logged days.GetCalendarMonthQuery.csnow includes every loaded habit ID, including descendants, in the existingLogsdictionary. This reuses the existing log DTO and range filtering without changing schedule mapping or existing top-level entries. Old clients can continue reading only top-level IDs.GetCalendarMonthQueryHandlerTests.cscovers flexible, completed one-time, and completed recurring children and grandchildren. Recurring fixtures complete through real domain logging, then move their due date back throughHabit.Updatewhile retaining completion. Tests also preserve exact log fields, descending order, inclusive range boundaries, and zero-valued skip entries. No DTO fields, routes, validators, domain rules, database schema, or minimum client version change.Closes thomasluizon/orbit-tickets#984. The consumer change remains in its blocked UI ticket #985.
Test evidence
Command for each regression observation:
dotnet test tests/Orbit.Application.Tests --filter FullyQualifiedName~GetCalendarMonthQueryHandlerTests.Handle_LoggedChild_KeepsParentInMonth.Handle_LoggedChild_KeepsParentInMonthfailed at the new descendant dictionary-key assertion. All six cases ofHandle_LoggedFlexibleOrCompletedDescendant_ReturnsExactLogsfailed because their descendant ID was missing, after asserting the real completed/flexible state and empty instances.Handle_DescendantLogs_PreservesRangeOrderingAndTopLevelLogsfailed because the child dictionary key was missing.dotnet build Orbit.slnx: passed with zero errors; existing dependency and obsolete API warnings remain.dotnet test: passed all 7,033 tests with zero failures and zero skips (Application 3,746; Domain 640; Infrastructure 2,615; Analyzers 32).