App: open a chat with one round trip

The thread controller asks chat_subscribe to carry the newest history page
(history: true, limit 200) and applies it from the reply; a server that
leaves the page out is asked with chat_messages as before. Deltas arriving
before the reply are recorded from the start of the subscribe, and settle
against the page's live_seq exactly as for a separate read.

Also documents the subscribe history field and benchmarks the indexed page
at limits 20 and 100.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 15:09:02 +00:00
parent 686690f7b4
commit 608b6b8edb
7 changed files with 201 additions and 61 deletions
@@ -45,7 +45,7 @@ void main() {
'chat_messages',
]);
expect(gateway.calls.first.fields, {
'chat_subscribe': {'session_id': 's'},
'chat_subscribe': {'session_id': 's', 'history': true, 'limit': 200},
});
expect(gateway.calls.last.fields['chat_query'], {
'session_id': 's',