Repository navigation
Fix date scoped habit search through hidden descendants - #648
Merged
Merged
Conversation
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Search traversal and match attribution for date scoped habit schedules, including the regression tests.
- Descendant traversal: Incomplete hidden middle children no longer prevent a due grandchild from satisfying the root search.
- Match metadata: A hidden child's own fields no longer count as matches, while its relevant descendants still appear in ancestor metadata.
- Regression coverage: Positive and negative cases cover skipped flexible and off-date weekly middle children, plus due and overdue attribution.
GPT Sol | 𝕏
thomasluizon
added a commit
that referenced
this pull request
Sep 29, 2026
(cherry picked from commit a624eda)
thomasluizon
added a commit
that referenced
this pull request
Sep 29, 2026
) * Keep flexible skips hidden on their selected dates (#646) * Fix flexible skip visibility in schedule query * fix: retain completed flexible dates with skips * test: cover loaded-log schedule visibility paths (cherry picked from commit 8ccf227) * Fix date scoped search through hidden sub habits (#648) (cherry picked from commit a624eda)
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.




Closes thomasluizon/orbit-tickets#913
Approach
Search now traverses every incomplete child branch even when the child has no visible occurrence in the requested date range. A child contributes its own search match only when it is relevant on that range. This preserves the existing due and overdue rules while allowing a due grandchild to keep its root in the results.
The change is in
src/Orbit.Application/Habits/Queries/HabitScheduleFilters.cs. Regression coverage intests/Orbit.Application.Tests/Queries/Habits/GetHabitScheduleQueryHandlerTests.csexercises skipped flexible and unscheduled weekly middle children, excludes their own title matches, checks the due grandchild metadata, and compares the regular schedule response.Assumptions
Test evidence
env -u LANG LC_ALL=en_US.UTF-8 dotnet test tests/Orbit.Application.Tests/Orbit.Application.Tests.csproj --filter 'FullyQualifiedName~Handle_SearchMatchesDescendantField_PreservesDateAndOverdueGates' --verbosity normalpassed both cases with the defect present.--no-restore --verbosity minimalfailed both cases because the result omitted the root with a due grandchild beneath a future middle child.env -u LANG LC_ALL=en_US.UTF-8 dotnet test tests/Orbit.Application.Tests/Orbit.Application.Tests.csproj --filter 'FullyQualifiedName~Handle_SearchMatchesDescendantField_PreservesDateAndOverdueGates|FullyQualifiedName~Handle_SearchTraversesHiddenMiddleChild|FullyQualifiedName~Handle_SearchMatchesOnlyHiddenMiddleChild' --verbosity minimalpassed all 6 cases.env -u LANG LC_ALL=en_US.UTF-8 dotnet build Orbit.slnx --verbosity quietexited 0 with 0 errors.env -u LANG LC_ALL=en_US.UTF-8 dotnet test --verbosity quietexited 0 with 6,934 passed and 0 failed.