Skip to content

Add lazy chat turn paging#300

Merged
connor4312 merged 1 commit into
mainfrom
lazy-turn-history-paging
Jul 2, 2026
Merged

Add lazy chat turn paging#300
connor4312 merged 1 commit into
mainfrom
lazy-turn-history-paging

Conversation

@connor4312

Copy link
Copy Markdown
Member

Adds lazy loading for old turns in chat state.

Summary:

  • Add SubscribeParams.view.turns?: number as advisory initial chat turn windowing.
  • Add ChatState.turnsNextCursor and server-only chat/turnsLoaded for paging older turns into reducer state.
  • Rework fetchTurns to accept cursor and rely on chat/turnsLoaded before responding.
  • Update TypeScript, Rust, Kotlin, Swift, and Go generated types plus handwritten reducers/helpers.
  • Remove 0.5.0 from generated supported protocol versions because the fetchTurns contract changes non-additively.

Fixes #272

Validation:

  • npm run generate
  • cargo fmt
  • cargo check
  • cargo test
  • npm run test
  • TypeScript client npm test
  • Go go test ./...
  • Swift swift test
  • Kotlin via Podman ./gradlew test --no-daemon --console=plain
  • git diff --check

Add subscription view shaping for chat turns, cursor-backed turn history loading, and generated client/schema updates across the protocol clients.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@connor4312 connor4312 merged commit 8888ff9 into main Jul 2, 2026
9 checks passed
@connor4312 connor4312 deleted the lazy-turn-history-paging branch July 2, 2026 19:15
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.

Proposal: client-shaped subscription snapshots — bounded windows (first application: chat turn history)

2 participants