Support legacy views for paginated thread history (#34085)

## Why

Clients that use full-history resume or request full items in turn pages should
work consistently across legacy and paginated threads.

## What changed

- Materialize complete turns and items from the paginated projection for
  `thread/resume` and `thread/turns/list` when requested.
- Support `initialTurnsPage` during paginated resume, including merging a live
  active turn while preserving the requested page size and cursors.
- Keep metadata-only resume behavior and backwards cursors available through
  `excludeTurns: true`.

## Testing

- Extend app-server coverage for full paginated history, full item views, and
  initial resume pages on running threads.

GitOrigin-RevId: e340f44d631ce135895c95d7e1baa7bfecd86e71
This commit is contained in:
Owen Lin
2026-07-19 00:01:51 +00:00
committed by copyberry
parent 643de86a19
commit 0fb559f0f6
6 changed files with 479 additions and 156 deletions
+4
View File
@@ -40,6 +40,10 @@ pub(crate) struct PendingThreadResumeRequest {
pub(crate) include_turns: bool,
pub(crate) initial_turns_page:
Option<codex_app_server_protocol::ThreadResumeInitialTurnsPageParams>,
pub(crate) paginated_turns: Option<Vec<Turn>>,
pub(crate) paginated_initial_turns_page: Option<codex_app_server_protocol::TurnsPage>,
pub(crate) paginated_initial_turns_page_with_active_slot:
Option<codex_app_server_protocol::TurnsPage>,
pub(crate) resume_cursor_store: Option<Arc<dyn codex_thread_store::ThreadStore>>,
pub(crate) redact_resume_payloads: bool,
}