Repository navigation
Conversation
A state accessor's attach seeds the widget's current value, so attaching at render (rather than on first read) means an interaction made before the first read -- e.g. a lasso drawn before a chat handler or LLM tool first reads the accessor -- is no longer lost. Event-kind accessors stay lazy by default; eager=None resolves from kind in __post_init__, so both directions remain overridable per spec. The AccessorSpec docstring now documents the warm-up @reactive.effect read idiom for event accessors.
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Non-eager accessors attach on first read. If the first reader is gated — a chat handler, an LLM tool, any effect that runs late — an interaction made before that first read (a lasso, a pan) is silently lost.
Change
AccessorSpec.eagernow defaults toTrueforkind="state"accessors (attach at render; attaching seeds the current value, so pre-first-read changes are not lost) and staysFalseforkind="event"accessors.eageris nowOptional[bool] = None, resolved in__post_init__— a frozen dataclass can't default one field from another, so the sentinel keeps expliciteager=Falseopt-outs possible.All existing explicit
eager=Truedeclarations are on event-kind specs (rerunSELECTION, cytoscapeNODE_CLICKED/EDGE_CLICKED, mols2gridclicked) and remain necessary; noeager=Falseexisted in repo code.For event-kind accessors whose first reader is gated, the docstring now documents the warm-up idiom: a
@reactive.effectthat reads the accessor once, unconditionally, at startup.No state-replay machinery (explicitly out of scope).
Tests
eager=Falseopt-out.make check: ruff + pyright (0 errors) + unit suite green (840 passed).