get_today/get_anytime: drop top-level duplicates of nested project children - #65
Open
ggfevans wants to merge 1 commit into
Open
get_today/get_anytime: drop top-level duplicates of nested project children#65ggfevans wants to merge 1 commit into
ggfevans wants to merge 1 commit into
Conversation
…ildren These views returned each project child twice: nested in the project entry's items[] and again top-level. Counts and pagination included the duplicates. Skip top-level entries whose parent project is already present in the result; grouping is preserved.
jrelgin
added a commit
to jrelgin/things-mcp
that referenced
this pull request
Aug 9, 2026
CLAUDE.md gains a conflict-resolution table for merging upstream, and a three-way split of the fork's commits: PR-able (create_structured_project, tag management), never-PR (fork branding and the manifest git URL), and already-upstream (the three cherry-picked PRs). Calls out the non-obvious case: when hald merges hald#64/hald#65/hald#66, our cherry-picks conflict and should yield to upstream's version — but get_logbook contains a hand-merged region where hald#64 and hald#66 both rewrote the same call, so taking both wholesale lets one clobber the other. README points at it from the Development section.
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.
Fixes #61.
things.today()/things.anytime()return matching projects and those projects' child tasks as separate rows; withinclude_items=Truethe children are also nested in the project row'sitems[], so each child was rendered, counted, and paginated twice.New
dedupe_nested_project_children()drops top-level entries whose parent project is present in the same result set, keeping the nested (grouped) copy. Tasks under headings resolve to their parent project the same way the existing Someday filtering does, and only when an entry actually needs it. Runs before pagination, socount/totalreflect the deduplicated list. Only these two views change.Tests: 5 new in test_mcp_server_filtering.py — 4 fail on unpatched master (reproducing the bug) and all pass with the fix. Cover: children rendered once (nested), standalone todos preserved, counts on the deduplicated list, heading-child resolution, children of non-included projects kept top-level, pagination header. Suite: 178 passed; only the pre-existing environmental url_scheme failure remains (identical on master).