Skip to content

OPE-82 Stream message.part.delta and harden Session Chat display - #78

Closed
ivanfenenko wants to merge 10 commits into
mainfrom
fix/ope-82-message-part-delta
Closed

ivanfenenko wants to merge 10 commits into
mainfrom
fix/ope-82-message-part-delta

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Jul 28, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Wire SSE message.part.delta into Android and iOS MessageSync so assistant text streams live during replies, with coalesced display publishes and lighter markdown while streaming.
  • Harden the assistant message pipeline (latest-wins prep, plain-first open for large histories, dual-lane decoration, stable block IDs, TimelineFrame projection) so long sessions stay responsive on both platforms.
  • Smooth Session Chat streaming UI updates and iOS end pinning (content vs layout applies, row reuse, absolute bottom offset) so opens and scroll-to-end land cleanly.

Docs

  • docs/features/message-store/
  • docs/features/session-chat/
  • docs/features/message-repository/
  • docs/features/foreground-event-stream/

Checks

  • Android unit tests covering delta streaming, display pipeline, timeline projection, and scroll behavior
  • iOS unit tests covering MessageSync, display pipeline, warm reopen, and timeline hosts

Linear

Risks / Follow-ups

  • Phase 7b message-display rendering coverage remains a follow-up (OPE-86/87)
  • Local uncommitted WIP (.xcodebuildmcp/config.yaml, Android HOLD_READY_UNTIL_NEWEST_MARKDOWN) is not included in this PR

Made with Cursor


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need. Autofix is disabled.

ivanfenenko and others added 8 commits July 26, 2026 21:03
Apply incremental SSE text deltas on both platforms, coalesce display
publishes at a flat cadence, and skip heavy markdown while large
replies are still streaming.

Co-authored-by: Cursor <[email protected]>
… pill

Paint session history before TextMate enrich so opens stay responsive, and show
the Android scroll-to-end pill as soon as the bottom anchor leaves the viewport.

Co-authored-by: Cursor <[email protected]>
Cache prepared markdown across leave/reopen and avoid MainActor stalls from
layoutIfNeeded and per-row enrich publishes so big histories open and scroll
like Android without reprinting messages.

Co-authored-by: Cursor <[email protected]>
Ship generation-gated prep modes, two-batch enrichment, bounded event staging
and iOS warm cache on both platforms, with verification and docs closeout.

Co-authored-by: Cursor <[email protected]>
Ship dual-lane plain-first decoration, stable block IDs, TimelineFrame
projection, and declared-ID hosts on both platforms; close the hardening
plan with soak docs and lock Phase 7b as coverage-only follow-up (OPE-86/87).

Co-authored-by: Cursor <[email protected]>
Separate content vs layout timeline applies, coalesce Android scroll-time updates, reuse unchanged rows, and pin iOS lists with absolute bottom offset plus unanimated self-sizing so opens and scroll-to-end land cleanly.

Co-authored-by: Cursor <[email protected]>
@linear-code

linear-code Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
OPE-82 Stream assistant text from message.part.delta

OPE-82: Wire SSE message.part.delta into Android + iOS MessageSync so Session Chat streams assistant text live.

Remaining:

  • ☑ Handle message.part.delta in Android + iOS MessageSync (session filter, field=text, append via store)
  • ☑ Extend InMemoryMessageStore / MessagePatch with PartDelta (delta-by-partID without full part payload)
  • ☑ Mark streaming text with isStreaming: true; clear on final message.part.updated / REST reload
  • ☑ Add message.part.delta to event recognition (OpencodeEvent message-refresh sets)
  • ☑ Replace tests that put delta on message.part.updated with real message.part.delta fixtures; cover append + UI isStreaming
  • ☑ Update docs: docs/features/message-store/, docs/features/message-repository/parity-gaps.md

Acceptance

  • While an assistant reply is in progress, Session Chat text grows incrementally on iOS and Android (not only after completion).
  • Final part update / idle still leaves a non-streaming complete message.
  • Missing part / wrong session / non-text field deltas are ignored safely.

Docs

  • docs/features/message-store/
  • docs/features/message-repository/
  • docs/features/foreground-event-stream/

Branch

fix/ope-82-message-part-delta

Review in Linear

ivanfenenko and others added 2 commits July 28, 2026 21:22
Default TextMate off behind a Settings toggle, fix Final upgrade after streaming placeholders, and close ```markdown fences on the first bare fence like CommonMark/web.

Co-authored-by: Cursor <[email protected]>
Adopt ConnectionEpoch on reconnect so MessageSync does not latch Recovering, and debounce Android SSE stop across photo/document pickers.

Co-authored-by: Cursor <[email protected]>
@ivanfenenko

Copy link
Copy Markdown
Collaborator Author

Superseded by #80, which now targets main and includes this branch plus the stacked TextMate / structure-first work from #79 and #80.

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