Skip to content

Keep paged conversation history stable during live replies - #26

Merged
ChanTso merged 5 commits into
mainfrom
codex/client-streaming-diagnostics
Sep 14, 2026
Merged

ChanTso merged 5 commits into
mainfrom
codex/client-streaming-diagnostics

Conversation

@ChanTso

@ChanTso ChanTso commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Older history now loads in bounded pages while a reply continues streaming. Persisted message IDs bind saved history and live events to the same conversation, so an earlier page cannot replace the active reply. Android and iOS retain reading position across prepends, retries and leaving the conversation; returning to the latest message resumes following.

The server keeps the existing recovery endpoint and adds a buyer-scoped pure-read history endpoint. KMP validates page boundaries and merges the history prefix separately from the active tail. Native clients retain request ownership and cancellation; iOS takes row positions from SwiftUI geometry, uses a small scroll-position bridge and waits for an active gesture before applying a prefix. Each new geometry sample can adjust the offset only once; cached offscreen native views cannot become reading anchors. SQLite still reads and saves whole conversation JSON.

Release replay tests compare paced and burst delivery while following the reply or reading history. These establish diagnostic workloads, not an optimization claim. Debug-only touch fixtures exercise pagination without a model, business service or stored credentials; CI also compiles the UI test target.

Validation:

  • Python application and enabled runtime suites: 985 passed, 1 optional SDK test skipped; Ruff check and format passed.
  • Web typecheck, 39 tests and production build passed.
  • KMP JVM: 17 tests passed; native frameworks and Swift interoperability passed.
  • Android: 27 unit tests, 4 API 36 interaction tests and debug builds passed; lint reports 0 errors and 19 warnings.
  • On iPhone 17 Pro Max / iOS 26.5: 33 native tests and all 4 touch scenarios passed together on 083cfb2f899685f4b5dfff71c4f1c047f3f94fe4; ARM64 Release build passed. Touch assertions retain a partially visible message within 2 points and verify the earlier page was applied. These are fixture-based interaction tests, not frame-rate measurements.
  • All four GitHub CI jobs passed on the same revision: Python, Web, Android and Apple core/app/UI test compilation.
  • Independent read-only reviews covered protocol ownership, shared merging, native lifecycle handling and test assertions. Review findings were addressed.

@ChanTso
ChanTso marked this pull request as ready for review September 14, 2026 19:47
@ChanTso
ChanTso merged commit bb74e57 into main Sep 14, 2026
4 checks passed
@ChanTso
ChanTso deleted the codex/client-streaming-diagnostics branch September 14, 2026 19:47
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