Skip to content

app: fix workspace flicker when switching directories#18207

Merged
nexxeln merged 10 commits intodevfrom
brendan/fix-workspace-flicker
Mar 19, 2026
Merged

app: fix workspace flicker when switching directories#18207
nexxeln merged 10 commits intodevfrom
brendan/fix-workspace-flicker

Conversation

@Brendonovich
Copy link
Collaborator

@Brendonovich Brendonovich commented Mar 19, 2026

  • Navigating between sessions in different directories (workspaces, projects) causes DirectoryLayout to tear down and remount its children as it uses <Show keyed>
  • Remounted children load a bunch of new async data via createResource
  • This is expected to pause the navigation via a Transition, but instead navigation was happening and the Session route Suspense was showing its fallback
  • This occurs due to DirectoryLayout's resolved being set after an async operation outside of the reactive graph (in this case in an effect)
    • Navigation creates transition -> Updates location -> Transition ends (unaware of async in DirectoryLayout) -> Effect runs -> Components remount + route switches -> Async resources fetched outside of transition (causes Suspense flicker)
  • The fix is to source resolved from its own createResource, so that Solid knows that fetching resolved should participate in transitions, causing async resources created by children when remounting to also participate in the transition
    • Navigation creates transition -> Updates location -> Resource runs -> Components remount -> Async resources fetched -> Transition ends + Route switches (no flicker!)

@nexxeln nexxeln merged commit 84f60d9 into dev Mar 19, 2026
6 checks passed
@nexxeln nexxeln deleted the brendan/fix-workspace-flicker branch March 19, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants