fix: synchronize read state across web and native clients

Track readable content revisions and durable read cursors in the hub. Acknowledge only rendered foreground tails, persist offline read operations, and preserve newer manual unread choices across devices.

Migrate existing history to a read baseline and cover pagination receipts with shared native conformance fixtures.
This commit is contained in:
weishu
2026-11-01 09:52:51 +08:00
parent ee4ac238cb
commit 5ef4304a4a
139 changed files with 2352 additions and 1053 deletions
@@ -73,6 +73,7 @@ public enum OlderLoadOutcome: Sendable {
/// type) — deliberately mirroring the web's instance-based change detection,
/// not deep equality.
public struct MessageWindowState: Equatable, Sendable {
public var readThroughRevision: Int?
public let sessionId: String
/// Window rows in position order (queued rows re-merged after each trim).
public var messages: [WindowMessage] = []