@@ -92,7 +92,7 @@ replacement and supplies the page-block reading used to start directional walks;
9292` runtime/geometry.js ` owns the shared readings of visible boxes and clipping;
9393` runtime/navigation.js ` owns reader travel and scroller selection;
9494` runtime/anchors.js ` owns anchor resolution, paint, and anchor-specific travel;
95- ` runtime/conversation/model.js ` owns the thread fold ;
95+ ` runtime/conversation/model.js ` adapts server-projected threads to browser callers ;
9696` runtime/conversation/messages.js ` owns message rendering;
9797` runtime/conversation/replies.js ` owns reply drafts, mirrored send state, and delivery;
9898` runtime/conversation/inline.js ` owns conversation seats rendered into the page;
@@ -103,7 +103,8 @@ replacement and supplies the page-block reading used to start directional walks;
103103` runtime/conversation/reconcile.js ` composes panel reconciliation;
104104` runtime/projection/authored.js ` owns captured authored state and restore
105105statements; ` runtime/projection/data.js ` owns keyed runtime-data DOM
106- reconciliation; ` runtime/projection/fold.js ` owns canonical action and report state;
106+ reconciliation; ` runtime/projection/fold.js ` adapts canonical action and report state
107+ to live DOM nodes and the local outbox;
107108` runtime/projection.js ` owns projection reconciliation and undo. The entry module
108109composes their mutually dependent callbacks.
109110
@@ -293,11 +294,11 @@ accepted event because its rendering failed.
293294
294295A recorded action may be optimistic because its gesture has already changed the
295296DOM. Drag and edit are examples. ` stageOutboxAction ` gives that local value the
296- same semantic coordinate as logged state and commits it on the exact widget and
297- unit nodes that carry it. ` stateProjection ` overlays all surviving recorded
298- outbox actions after logged winners in ` outboxOrder ` . Until a complete read
299- accounts for an attempt, its local winner outranks any older log winner on the
300- same coordinate.
297+ same semantic coordinate as the server view and commits it on the exact widget
298+ and unit nodes that carry it. The browser projection adapter overlays all
299+ surviving recorded outbox actions after authoritative winners in ` outboxOrder ` .
300+ Until a complete read accounts for an attempt, its local winner outranks any
301+ older log winner on the same coordinate.
301302
302303A press whose result has not changed the DOM waits for the log. Recordless
303304settlements and completion presses do not enter the optimistic overlay. The
@@ -322,11 +323,11 @@ represents the DOM. Delivery may continue while that correction waits for a
322323live drag or editor to finish.
323324
324325` accountOutbox ` runs only after ` receiveState ` has installed and rendered a
325- complete state. It links accepted events to entries, resolves readers waiting on
326+ complete state. It links receipt events to entries, resolves readers waiting on
326327those events, removes non-action entries whose delivery is complete, and calls
327- ` releaseProjectedOutbox ` for actions. Never remove an action merely because a
328- POST returned 200 or because an attempt appears in an event array that failed
329- partway through rendering.
328+ ` releaseProjectedOutbox ` for actions. Never remove an action merely because a POST
329+ returned 200 or because an attempt appears in a receipt list that failed partway
330+ through rendering.
330331
331332` unaccountedGesture ` is true while undo is in flight, the outbox is nonempty, or
332333a widget is visibly dragging. Navigation and undo both consult it. Navigating
@@ -358,7 +359,7 @@ therefore survives its response.
358359The DOM is a projection of three ordered inputs:
359360
3603611 . the authored state captured from this version;
361- 2 . standing actions and reports in the authoritative log window ;
362+ 2 . standing actions and reports in the server's transaction-consistent browser view ;
3623633 . surviving optimistic recorded actions in the outbox.
363364
364365The semantic coordinate is
@@ -377,16 +378,24 @@ projections. `x-awaits.answers` says which actions actually close the request;
377378orthogonal actions do not, and neither does a conversation standing in the widget's
378379declared ` x-conversation ` seat — that takes the request off the reader's list without
379380answering it, which is why this gate reads the projection with no seats in
380- it. ` x-awaits.rollup ` derives a nested request from direct
381- interventions and child roll-ups, using the same reducer in the browser and file
382- projection.
383-
384- ` stateProjection(upto) ` is the pure derived view. It classifies every action and
385- report, applies version and retraction windows, drops withdrawn actions and
386- answered reports, folds the last action for each coordinate, retains report
387- winners, overlays unresolved local records, and gives a reader action precedence
388- over a provisional report on the same coordinate. Winners on independent
389- coordinates compose in event order through ` compareProjected ` .
381+ it. ` x-awaits.rollup ` derives a nested request from direct interventions and child
382+ roll-ups in Python; the browser receives the resulting ids and awaiting values.
383+
384+ Python's ` state_projection ` is the durable derived view. Under the same page
385+ transaction as ` /api/state ` , ` browser_state ` serializes its classified events and
386+ winners, asks, conversations, updates, undo candidates, receipts, and coverage at
387+ one ` through_seq ` . A normal response projects the revision the tab shows and the
388+ active revision it may install next. A version comparison requests its older base
389+ from ` /api/view ` at the exact ` through_seq ` already applied to the live DOM, so every
390+ view used together has the same sequence basis without every state read parsing all
391+ historical revisions. Page coordinates use that revision's document window;
392+ conversation coordinates use the unbounded frozen-markup window.
393+
394+ The browser's ` stateProjection ` is a DOM adapter. It resolves those declared
395+ coordinates back to current widget modules and overlays unresolved local records.
396+ It does not derive retractions, settlements, thread structure, asks, updates, or
397+ undo eligibility from raw events. Winners on independent coordinates still
398+ compose in event order through ` compareProjected ` .
390399
391400The two durable channels share the coordinate model but retain their meaning:
392401
@@ -400,8 +409,8 @@ The two durable channels share the coordinate model but retain their meaning:
400409` stateProjection ` is uncached because registry declarations resolve through the
401410live DOM. Thread construction and recordless restoration can replace node
402411identities. Its result has four views: ` actions ` , ` reports ` , ` classified ` , and
403- ` desired ` . Add a consumer to one of these views instead of building another fold
404- over raw ` events ` .
412+ ` desired ` . Add a browser consumer to one of these views or extend the Python wire
413+ view instead of building another fold over raw ` events ` .
405414
406415` committedProjection ` is not a second state authority. It is a checkpoint of
407416what node identities and semantic winner the DOM currently represents. Each
@@ -412,11 +421,11 @@ its authored baseline stands.
412421
413422` projectionCommitted ` compares the desired coordinate with that checkpoint.
414423Terminal events count as committed because this version has no applicable state
415- to paint. ` projectionCoverage ` converts coordinate commits back to event
416- coverage for ` data-lf-applied ` : superseded actions and answered reports are
417- covered when the coordinate that represents them is committed, and an undo is
418- covered when its target's coordinate has moved to the prior winner or authored
419- baseline.
424+ to paint. The server supplies coverage records and ` projectionCoverage ` checks
425+ their coordinates against DOM commits for ` data-lf-applied ` : superseded actions
426+ and answered reports are covered when the coordinate that represents them is
427+ committed, and an undo is covered when its target's coordinate has moved to the
428+ prior winner or authored baseline.
420429
421430### Reconciliation
422431
@@ -524,9 +533,9 @@ documents written after this version. A widget instantiated inside frozen thread
524533markup is in chrome and reads the whole action sequence because the conversation,
525534not a page version, owns it.
526535
527- Threads also read the whole log. ` retractionFloors(Infinity) ` keeps a
528- conversation current on a pinned page even when the document projection remains
529- historical. Registry-declared ` x-conversation ` seats show an exact-section
536+ The server projects threads from the whole log, so a conversation stays current
537+ on a pinned page even when the document projection remains historical.
538+ Registry-declared ` x-conversation ` seats show an exact-section
530539textual view while the owner exists in the current document; the Comments panel
531540keeps the complete thread and its interactive replies. A root declared with
532541` response: {kind: version, verb: <answer>} ` keeps that exact-section view
@@ -535,8 +544,9 @@ response. Dropping the owner drops only the inline seat.
535544
536545` restated ` and answered-report relations persist through version notes. The note
537546records the version floor for each affected id or report event; silence in a
538- later version does not revive retracted state. ` retractedIds ` uses containment,
539- not a global id lookup, when deciding which detailed parts an action rests on.
547+ later version does not revive retracted state. Python's projection uses
548+ containment, not a global id lookup, when deciding which detailed parts an action
549+ rests on.
540550
541551### Event sequences for modules
542552
@@ -578,12 +588,12 @@ field, verb, or widget name. Claims use their required detail as `detail.text`
578588and ` text ` . The state boundary performs this normalization once, before
579589downstream code sees private status storage.
580590
581- ` sequence ` is the action traversal. It applies widget, optional verb, version
582- window, and liveness in one place, then returns structured clones so modules
583- cannot mutate the private event list . ` watchActions ` and ` watchUpdates ` subscribe
584- the two public readings to ` lf-actions ` and invoke the callback immediately. The
585- same rendering function therefore handles a module connected before the first
586- state and one constructed by a later thread reconcile.
591+ ` actionSequence ` traverses the classified events in the installed server view,
592+ then returns structured clones so modules cannot mutate the reading.
593+ ` updateSequence ` filters the server-normalized update feed . ` watchActions ` and
594+ ` watchUpdates ` subscribe the two public readings to ` lf-actions ` and invoke the
595+ callback immediately. The same rendering function therefore handles a module
596+ connected before the first state and one constructed by a later thread reconcile.
587597
588598` lf-actions ` fires after a complete state has reconciled, including a read whose
589599event list did not grow and the heartbeat's re-application of the state the page
@@ -602,7 +612,7 @@ assertion is as old as its revision.
602612` actionStands ` answers whether one accepted action is still the reader's winner
603613for its semantic coordinate. It treats a newly accepted event as standing when
604614the tab has not yet installed an event list containing its id, then asks
605- ` stateProjection ` once authoritative history contains it. Modules use this
615+ the installed projection once an authoritative receipt contains it. Modules use this
606616after a send whose visible choreography depends on whether the accepted action
607617survived later events.
608618
0 commit comments