Repository navigation
Expose the visible revision for stamping events - #96
Conversation
XFrames::VisibleRevision() returns the native revision of the tree that frames show. It is an atomic stored where the revision advances, under the visibility locks that rendering also holds, so an event raised while a frame is built belongs to exactly that revision, and any thread may read it. The shared C library stamps events with it, so that xframes-core can resolve a widget event against the tree it was drawn from (xframes-core#15). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0186WhMU3KjnmjR7Y4r49GrT
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Why
xframes-core resolves a widget event to a message through the tree installed when the event is delivered. If a publication lands between the frame that processed a click and its delivery, the newer tree interprets it, and an unkeyed widget that moved can produce its neighbour's message (xframes-core#15). To resolve an event against the tree it was drawn from, each event must say which revision that was.
What
XFrames::VisibleRevision(): an atomic copy of the native revision, stored where the revision advances inside the publication's visibility locks.Renderholds the same locks, so every event raised while a frame is built belongs to exactly that revision, and any thread can read it. The shared C library stamps its events with it; the engine itself raises no new events.Tests
VisibleRevisionFollowsAppliedPublicationsOnly: the revision starts at 0, follows applied publications, does not move on a rejected one, and equals the commit state'snativeRevision. All 409 engine tests pass locally.🤖 Generated with Claude Code
https://claude.ai/code/session_0186WhMU3KjnmjR7Y4r49GrT
Summary by CodeRabbit