Skip to content

[Bug?]: Transition makes it impossible to show loading screen for long-running backend processes #1870

Open
@danieltroger

Description

@danieltroger

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Context 🔦

I have a very long-running process on the backend (it involves starting up a browser at an arbitrary URL and collecting some data from the page, then asking an LLM about it) which takes roughly 10-30s.

I would like to keep using the super-simple backend/frontend integration that solid start provides (which blew my mind). Right now it works great in the initial pageload, however, when the user changes their input, solid's router inadvertently starts a transition around my app, which leads to my loading screen not being displayed.

A workaround is to also displaying my loading screen when useIsRouting() is true, but my loading screen shows the user exactly what steps is in progress and therefore I need to be able to know which createAsync/createResource is loading.

Due to the cursed transition this is impossible. I can't use individual <Suspense>s nor can I use .loading of a resource, as everything is lying during a transition.

Steps to reproduce 🕹

Steps:

  1. Go to https://stackblitz.com/edit/github-3j8b6an5-tc2z1ort?file=src%2Froutes%2Findex.tsx using a chromium based browser
  2. Wait for "We are loading…" to complete
  3. Enter something into the input field and press submit

Current behavior 😯

After the user presses "submit", NOTHING happens until the result is displayed after 10s.

Expected behavior 🤔

"We are loading…" is displayed again until the next response shows up


Yet unanswered thread in discord: https://discord.com/channels/722131463138705510/910635844119982080/1353843298019835986

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions