dx serve: "Serving your app" banner prints before the build is ready
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- build-system, cli
Research direction
Start in packages/cli/src/serve/mod.rs, especially serve_all(), and trace the current ordering of WebServer::start(), the readiness banner, builder.initialize(), and BuilderUpdate::BuildReady. Move the banner's readiness point to the first completed build and verify that it no longer precedes build completion or bundle availability.
Written by the indexing model from the issue text.
Description
Problem
dx serve prints the "ready" banner (Serving your app: {bin}! 🚀 ...) as soon as the dev server socket is up, before the first build has even started, let alone completed. The message text implies the app is ready to use, but at the point it's printed, builder.initialize() hasn't been called yet and no BuilderUpdate::BuildReady has been received - so the compiled bundle doesn't exist on disk yet.
This is more than cosmetic: any script or workflow that treats the banner as a readiness signal (e.g. tailing CLI output before copying/reading target/dx/.../public/) can race the actual build and find nothing there. In one repro, the banner printed ~27s before the build finished.
Root cause: in serve_all() (packages/cli/src/serve/mod.rs), the banner is a plain statement that runs before builder.initialize():
let mut builder = AppServer::new(args).await?;
let mut devserver = WebServer::start(&builder)?; // devserver socket up
let mut screen = Output::start(builder.interactive).await?;
tracing::info!(r#"... Serving your app: {binname}! 🚀 ..."#); // fires here
builder.initialize(); // build only starts here
loop {
// BuilderUpdate::BuildReady arrives later, in this loop
...
}
Steps To Reproduce
- Run
dx serve --web(or any platform) on a project with a non-trivial build time. - Note the timestamp of the "Serving your app" banner vs. the timestamp of "Build completed successfully ... launching app! 💫".
- Observe the banner prints first, well before the build/launch line - and before any bundle exists on disk.
Expected behavior
The readiness banner should only print once the app has actually been built and opened for the first time (i.e. alongside/after "Build completed successfully ... launching app!"), not before the build has started.
Environment:
- Dioxus version: main @ 710f46d150e60686ae8d1b2498d17a3b5bcdc9b3 (post-0.8.0-alpha.1)
- Rust version: 1.93.1
- OS info: macOS 26 (Darwin 25.1.0)
- App platform: web (reproduced with a minimal
dioxus::launchapp), but the ordering bug is platform-independent
Questionnaire
I would like to fix and I have a solution.
- Dominant language
- Rust
- Stars
- 39.2k
- Forks
- 1.9k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DioxusLabs/dioxus
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DioxusLabs/dioxus#5835 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
DioxusLabs/dioxus#5821 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
DioxusLabs/dioxus#5792 · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DioxusLabs/dioxus#5710 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DioxusLabs/dioxus#5709 · 1 reaction ·
All issues in DioxusLabs/dioxus
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100