diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-02-25 00:37:33 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-02-26 01:54:44 -0500 |
| commit | f788ea84e25a4f7216ca0604aeb216346403b6ef (patch) | |
| tree | db62f5d1e15d871f8a73ce20b40cd53053d12f85 /src/main.rs | |
| parent | f1b124a0423cdaf4d8a6bd62a2059722e9afdf2b (diff) | |
Track state on a per-session basis, rather than via globals.
Sorry about the thousand-line omnibus change; this is functionally a rewrite of the client's state tracking, flavoured to resemble the existing code as far as is possible, rather than something that can be parted out and committed in pieces.
Highlights:
* No more `store.writeable()`s. All state is now tracked using state runs or derivatives. State is still largely structured the way it was, but several bits of nested state have been rewritten to ensure that their properties are reactive just as much as their containers are.
* State is no longer global. `(app)/+layout` manages a stateful session, created via its load hook and started/stopped via component mount and destroy events. The session also tracks an event source for the current state, and feeds events into the state, broadly along the same lines as the previous stores-based approach.
Together these two changes fix up several rough spots integrating state with Svelte, and allow for the possibility of multiple states. This is a major step towards restartable states, and thus towards better connection management, which will require the ability to "start over" once a connection is restored.
Diffstat (limited to 'src/main.rs')
0 files changed, 0 insertions, 0 deletions
