You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Heads-up: shiny session cleanup will affect teal_slice tests (temporarily deferred for 1.14.0) #682
Hi! A heads-up from the shiny team, and a request for your thoughts since some of this is still in flight.
In shiny's upcoming 1.14.0 we added module-scoped reactive cleanup (rstudio/shiny#4372): a reactiveValues now registers with the active reactive domain when it's created and is torn down when that session is destroyed. teal_slice() builds its object with reactiveValues() (R/teal_slice.R:140, :163), so a slice created while a session is active becomes bound to that session.
We caught this in our reverse-dependency checks: in your tests (e.g. test-FilterStates.R "Selecting a new variable…", "Adding 'var_to_add'…") a FilterStates object is created outside testServer(), mutated inside it, then read after the block via get_filter_state(). Since testServer() closes its session on exit, the slices get destroyed and the later read errors with "its module session has been destroyed."
You don't need to do anything for 1.14.0. We've temporarily disabled this cleanup inside testServer() for the release so your current tests keep passing — see rstudio/shiny#4396. We do plan to re-enable it in a later release (timing not yet fixed), so we wanted to flag it early.
When you're ready, the fix we'd suggest — which also makes things more robust in real apps — is to create the slice's reactiveValues outside any reactive domain, since a teal_slice is meant to be session-independent:
That said, we're still feeling out the long-term story here, so if this binding behavior is awkward for teal.slice's design we'd genuinely like to hear it — it may influence how/whether we re-enable.
Activity
donyunardi commentedon Jun 1, 2026
Appreciate the heads up @cpsievert!
Fix test after changes in shiny package (#684)
Fixes reactive errors with newer version of shiny (#462)
Fix reactiveVal bug with latest shiny release (#688)