Skip to content

get_today/get_anytime: drop top-level duplicates of nested project children - #65

Open
ggfevans wants to merge 1 commit into
hald:masterfrom
ggfevans:fix/today-anytime-dedupe
Open

get_today/get_anytime: drop top-level duplicates of nested project children#65
ggfevans wants to merge 1 commit into
hald:masterfrom
ggfevans:fix/today-anytime-dedupe

Conversation

@ggfevans

Copy link
Copy Markdown

Fixes #61.

things.today()/things.anytime() return matching projects and those projects' child tasks as separate rows; with include_items=True the children are also nested in the project row's items[], 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, so count/total reflect 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).

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_today / get_anytime return project children twice (nested items[] and top-level)

1 participant