Skip to content

Harden loaded-thread pagination - #690

Merged
GraciousGazelles merged 10 commits into
mainfrom
successor/loaded-thread-pagination-20260831
Aug 31, 2026
Merged

GraciousGazelles merged 10 commits into
mainfrom
successor/loaded-thread-pagination-20260831

Conversation

@GraciousGazelles

Copy link
Copy Markdown
Collaborator

Summary

  • bound loaded-thread discovery to finite cursor-paginated pages
  • reject malformed, duplicate, oversized, cyclic, and unbounded page results
  • restrict picker backfill to valid thread-spawn lineage

Testing

  • cargo fmt --manifest-path codex-rs/Cargo.toml --all -- --check
  • hosted validation requested for the TUI test target

Execution-heavy validation is expected to run in GitHub Actions.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements bounded cursor-paginated scanning for loading subagent threads in the TUI, replacing the previous unpaginated full fetch. It introduces page size limits, total thread budgets, and validation checks to prevent cycles or oversized payloads, accompanied by comprehensive unit tests. The review feedback suggests optimizing the spawn-tree traversal in loaded_threads.rs from O(D * N) to O(N) using an adjacency list to prevent potential UI lag, and using Vec::contains in session_lifecycle.rs for a more idiomatic duplicate check.

Comment thread codex-rs/tui/src/app/loaded_threads.rs Resolved
@GraciousGazelles

Copy link
Copy Markdown
Collaborator Author

Addressed the review suggestions in 14c3d71: lineage traversal now indexes children by parent for linear discovery, and duplicate detection uses the direct vector membership check. Page validation remains bounded and transactional.

@GraciousGazelles
GraciousGazelles force-pushed the successor/loaded-thread-pagination-20260831 branch from b943ff9 to d5c7c25 Compare August 31, 2026 18:44
@GraciousGazelles
GraciousGazelles added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit 0269b59 Aug 31, 2026
108 of 112 checks passed
@GraciousGazelles
GraciousGazelles deleted the successor/loaded-thread-pagination-20260831 branch August 31, 2026 22:20
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.

1 participant