feat(app-server): list descendant threads by ancestor - #29591
Merged
Conversation
Contributor
Author
|
@codex review |
btraut-openai
marked this pull request as ready for review
June 23, 2026 08:26
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f3e121ad2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
force-pushed
the
btraut/thread-list-descendants
branch
from
June 23, 2026 10:46
81a0d9d to
6073bbb
Compare
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
force-pushed
the
btraut/thread-list-descendants
branch
from
June 23, 2026 16:50
6073bbb to
a623e2f
Compare
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
added a commit
that referenced
this pull request
Jun 23, 2026
btraut-openai
force-pushed
the
btraut/thread-list-descendants
branch
from
June 23, 2026 21:38
a623e2f to
6d3b942
Compare
jif-oai
approved these changes
Jun 24, 2026
jif-oai
left a comment
Contributor
There was a problem hiding this comment.
Pre-approving but my comment stays valid
| relation_filter: crate::ThreadRelationFilter, | ||
| filters: ThreadFilterOptions<'_>, | ||
| ) -> anyhow::Result<crate::ThreadsPage> { | ||
| self.list_threads_matching(page_size, filters, Some(relation_filter)) |
Contributor
There was a problem hiding this comment.
Can we include thread_id in relation-list cursors/order for every sort key and add a tie-across-pages test or so?
btraut-openai
force-pushed
the
btraut/thread-list-descendants
branch
from
June 24, 2026 19:51
80a96b9 to
9d0cf94
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
thread/listcan filter direct children withparentThreadId, but clients cannot request an entire spawned subtree. Discovering every descendant requires repeated client-side requests and gives up the database's existing filtering and pagination path.What changed
Experimental clients can use
ancestorThreadIdto return strict descendants at any depth whileparentThreadIdretains its direct-child meaning. The filters are mutually exclusive, the ancestor is excluded, and every result preserves its immediateparentThreadIdso callers can reconstruct the tree.How it works
parentThreadId.Verification
Ran 550 tests across the protocol, state, rollout, and thread-store crates, then reran the four focused state, store, and app-server descendant-listing tests after the final diff reduction. Scoped Clippy and formatting checks passed. Stable and experimental schema generation was checked; the stable fixtures remain unchanged while the experimental schema includes the new field.