web: open Agent at recent history and load older pages on demand
This commit is contained in:
@@ -605,6 +605,28 @@ durable entries and can advance without visible messages. Use returned cursors;
|
||||
do not derive them from message IDs. `limit` bounds source entries, not displayed
|
||||
messages.
|
||||
|
||||
The web Agent starts with one cursorless `limit=100` window and renders it in
|
||||
chronological order, initially positioned at its newest end. `hasMore` on this
|
||||
window or a `before` page means **older** source entries exist; on an `after`
|
||||
page it means **newer** entries remain. Each **Load older messages** action fetches
|
||||
one `before=<beforeCursor>&limit=100` page, even if that page has no visible rows.
|
||||
Older pages do not advance the live replay/read cursor or overwrite newer copies
|
||||
of the same message. Initial loading never walks forward from zero or drains
|
||||
older history. Reconnect recovery still follows `after` from the accepted live
|
||||
cursor. Aborted/replaced room sessions discard late responses.
|
||||
|
||||
Web unread counts cover loaded public replies. A `+` suffix (or a dot when no
|
||||
loaded reply is known unread) indicates that earlier messages may also be unread;
|
||||
the API does not supply an exact total for unloaded history. Observing the latest
|
||||
end in a focused visible conversation marks it read through that rendered cursor,
|
||||
including earlier unloaded history. Fetching or reading older pages does not
|
||||
acknowledge newer replies. An internal-only window with no rendered public
|
||||
messages does not acknowledge history; older loading remains an explicit action.
|
||||
Initial source-entry/network work is bounded; retained
|
||||
messages/DOM grow with explicit older loads and live updates. Offscreen web rows
|
||||
use CSS `content-visibility: auto`, which skips rendering work while retaining
|
||||
chronological DOM, selection, find and accessibility; it is not DOM virtualization.
|
||||
|
||||
### `POST /v1/agent/messages`
|
||||
|
||||
Body: `{ "content": "Check the oven", "requestId": "client-generated-uuid" }`.
|
||||
|
||||
Reference in New Issue
Block a user