You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dev server sends duplicate clientNavigated inspector events on successful SetUrl #32080
The HMR socket's SetUrl handler notifies the inspector's BunFrontendDevServer.clientNavigated twice for a successful navigation to a new route bundle:
Inline, right after route_to_bundle_index_slow, with routeBundleId set to the found index (or -1).
Again via notify_inspector_client_navigation(pattern, Some(rbi)) after SetUrlResponse is sent.
Both events carry the same connection id, pattern, and route bundle id. The failed-lookup path correctly sends a single event with routeBundleId: -1, and the same-route early return also sends one.
Code: src/runtime/bake/DevServer/HmrSocket.rs (SetUrl arm and the notify_inspector_client_navigation helper). The .zig reference (src/runtime/bake/DevServer/HmrSocket.zig) has the identical structure, and both calls date to the original inspector support in 570e6b7 (#19340), so this is long-standing shipped behavior that the Rust port reproduced faithfully.
What is the expected behavior?
Presumably one clientNavigated event per navigation, unless the duplicate is intentional (for example, an attempt event followed by a confirmation after SetUrlResponse). If the duplication is removed, the failure path's single -1 event should be preserved.
Surfaced during review of #32076, which is a behavior-preserving refactor and deliberately does not change this.
✅ Reproduced: one SetUrl over /_bun/hmr emitted two identical BunFrontendDevServer.clientNavigated events; fixed in #32081 (rebased on #32076).
The PR is ready for review: the new test passes on every CI lane; the remaining CI red is unrelated runner flake (Docker daemon down for S3 tests, PTY timeouts), not the diff.
Activity
robobun commentedon Jun 10, 2026
✅ Reproduced: one SetUrl over
/_bun/hmremitted two identicalBunFrontendDevServer.clientNavigatedevents; fixed in #32081 (rebased on #32076).The PR is ready for review: the new test passes on every CI lane; the remaining CI red is unrelated runner flake (Docker daemon down for S3 tests, PTY timeouts), not the diff.
Fix duplicate clientNavigated inspector events on successful SetUrl (#…