fix: lots of desktop stability, better e2e error logging#18300
fix: lots of desktop stability, better e2e error logging#18300thdxr merged 19 commits intoanomalyco:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Normalizes workspace identity handling in the app layout by separating the URL slug (params.dir) from the canonical workspace directory used for state, comparisons, and session-route remembering—aimed at fixing inconsistent workspace/session routing and associated E2E failures.
Changes:
- Introduces a
routememo that derives{ slug, dir }, using the slug for URL identity and a canonicalized directory for internal layout logic. - Updates
currentDirand session-prefetch preservation logic to compare directories viaworkspaceKey(...)rather than mixing slug/path forms. - Adjusts active route tracking to use
route().slugfor session URL identity andcurrentDir()(canonical directory) for internal state and route remembering.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| createEffect(() => { | ||
| params.dir | ||
| route() |
There was a problem hiding this comment.
The prefetch-reset effect now depends on route(), which also reacts to globalSync.child(...).path.directory. When the directory store finishes bootstrapping and updates path.directory, this effect will rerun even if the URL slug didn’t change, clearing prefetchQueues/inflight and bumping prefetchToken mid-session. If the intent is to reset only on URL/workspace changes, consider depending on route().slug (or params.dir) instead of the full route() object (or split slug vs resolved-dir dependencies).
| route() | |
| const { slug } = route() |
|
/review |
|
lgtm |
The pain
The solution
Fixes
workspace-new-session,projects-switch, andsession-model-persistenceby removing invalid test assumptions and fixing the real races/crashes they exposed.