Avoid root dirty delta for shared state events - #6841
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThe PR prevents temporary router dependency resolution from contaminating regular linked/shared-state event deltas and adds regression coverage for normal and exceptional cleanup.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the current exception path restores the snapshotted dirty bookkeeping for the root and loaded descendants before propagating the resolution error.
|
| Filename | Overview |
|---|---|
| reflex/istate/shared.py | Preserves regular-event dirty state and restores all snapshotted descendants on exceptional delta resolution, addressing both prior review threads. |
| tests/units/test_state.py | Adds focused regression tests for ordinary root cleanup and exceptional root and descendant cleanup. |
| news/6841.bugfix.md | Accurately documents the linked/shared-state dirty-delta fix. |
Reviews (7): Last reviewed commit: "Remove unrelated Pillow news fragment" | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Summary
Tests
uv run --frozen pytest tests/units/test_state.py::test_linked_state_event_does_not_dirty_root_state -quv run --frozen pytest tests/units/test_state.py::test_linked_state_event_does_not_dirty_root_state tests/units/test_state.py::test_router_var_dep tests/units/test_state.py::test_computed_var_depends_on_parent_non_cached tests/units/test_state.py::test_async_computed_var_get_state -quv run --frozen pytest tests/units/test_state.py -quv run --frozen pre-commit run --files reflex/istate/shared.py tests/units/test_state.py news/6841.bugfix.mdCloses #6392