Commit Graph

12 Commits

Author SHA1 Message Date
benedikt-bartscher
f27eae7655
fix AppHarness reloading (#2916)
* move AppHarness tests to module scope

* fix AppHarness reloading

* add test

* docstrings and formatting

* fix benchmarks not reloading state module
2024-03-26 11:09:46 -07:00
Masen Furer
eb18ce90d5
[REF-2172] Add DECORATED_PAGES before compiling in thread (#2841) 2024-03-12 10:28:37 -07:00
Masen Furer
756bf9b0f4
[REF-1885] Shard Substates when serializing to Redis (#2574)
* Move sharding internal to StateManager

Avoid leaking sharding implementation details all over the State class and
breaking the API

* WiP StateManager based sharding

* Copy the state __dict__ when serializing to avoid breaking the instance

* State tests need to pass the correct substate token for redis

* state: when getting parent_state, set top_level=False

ensure that we don't end up with a broken tree

* test_app: get tests passing with redis by passing the correct token

refactor upload tests to suck less

* test_client_storage: look up substate key

* state.py: pass static checks

* test_dynamic_routes: working with redis state shard

* Update the remaining AppHarness tests to pass {token}_{state.get_full_name()}

* test_app: pass all tokens with state suffix

* StateManagerRedis: clean up commentary
2024-02-21 01:50:25 -08:00
Nikhil Rao
05d1be2182
Move core components to radix namespace (#2506) 2024-02-02 14:26:46 -08:00
jackie-pc
7388617b72
apps should no longer call "app.compile()" (#2291) 2023-12-18 16:06:21 -08:00
Elijah Ahianyo
e3ee98098a
RED-1052/rx.State as Base State (#2146) 2023-11-29 09:43:33 -08:00
Masen Furer
f6a7eed359
Fix AppHarness tests (#1987)
* test_client_storage: remove race conditions for cookie assignment

Poll for default timeout for cookies to appear in the controlled browser.

* Remove use of deprecated get_token and get_sid in core

Both reflex.app and reflex.state were still using deprecated methods, which
were throwing unsolvable warnings for end users.

* Remove deprecated router functions from integration tests

Mostly removing custom "token" var and replacing with
router.session.client_token.

Also replacing `get_query_params` and `get_current_page` usage as well.

* fix upload tests

Cannot pass substate as main app state, since it blocks us from accessing
"inherited vars"

* state: do NOT reset `router` to default

When calling `.reset` to reset state vars, do NOT reset the router data, as
that could mess up internal event processing.
2023-10-18 01:46:13 +02:00
Masen Furer
024cb5fa9b
Var field cleanup (#1943) 2023-10-13 14:53:55 -07:00
Masen Furer
351611ca25
rx.background and StateManager.modify_state provides safe exclusive access to state (#1676) 2023-09-21 11:42:11 -07:00
Masen Furer
cc89f2b6e7
Proper serialization for chained Event payloads (#1725) 2023-08-31 09:50:15 -07:00
Masen Furer
2392c52928
Implement on_mount and on_unmount for all components. (#1636) 2023-08-30 09:50:39 -07:00
Masen Furer
2ff823e89a
Event Loop Refactor (#1590) 2023-08-15 15:17:08 -07:00