feat(spoolman): diagnose blocked live updates - #1929
Merged
pedrolamas merged 3 commits intoAug 11, 2026
Merged
Conversation
Spoolman 0.26 added browser origin checks, which silently break Fluidd's direct browser-to-Spoolman WebSocket (used for live spool/ filament/vendor updates) unless SPOOLMAN_CORS_ORIGIN is set. Only that WebSocket is affected; the Moonraker proxy connection keeps working, so the dashboard card looked "connected" with no live data. Generalizes the existing HTTP endpoint diagnostics util with a configurable probe path, reuses it to probe Spoolman when the direct WebSocket fails to open, and surfaces the result (CORS, mixed content, unreachable) as a warning in the Spoolman dashboard card. Documents the SPOOLMAN_CORS_ORIGIN fix in the multi-material, third-party integrations, and FAQ docs pages. Closes fluidd-core#1928 Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Spoolman-specific diagnostics to explain why live spool updates stop working with Spoolman ≥ 0.26 (origin/CORS enforcement), while keeping the existing Moonraker-proxy “connected” path intact. This fits into Fluidd’s existing endpoint diagnostics + spoolman store/widget flow by reusing a generalized diagnoseHttpEndpoint probe and surfacing the result in the Spoolman dashboard card and docs.
Changes:
- Generalize
diagnoseHttpEndpointto support a configurable probe path and add unit coverage for it. - When the direct Spoolman WebSocket fails to open, probe Spoolman’s
/api/v1/infoand surface the diagnosed cause as an in-card warning state. - Document the Spoolman 0.26+
SPOOLMAN_CORS_ORIGINrequirement across relevant docs/FAQ pages.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/util/http-endpoint-diagnostics.ts | Adds probePath option and normalizes URL/path joining for diagnostics probes. |
| src/util/tests/http-endpoint-diagnostics.spec.ts | Adds coverage for custom probe paths. |
| src/store/spoolman/types.ts | Extends Spoolman store state with socketDiagnostic. |
| src/store/spoolman/state.ts | Initializes socketDiagnostic in the default state. |
| src/store/spoolman/mutations.ts | Adds mutation to store/clear the socket diagnostic kind. |
| src/store/spoolman/actions.ts | Diagnoses failed direct WebSocket open via HTTP probe to Spoolman info endpoint. |
| src/locales/en.yaml | Adds user-facing messages for live-update failure causes. |
| src/components/widgets/spoolman/SpoolmanCard.vue | Displays diagnostic warnings + reworks disconnected/tracking-inactive states into alerts. |
| docs/docs/features/third-party-integrations.md | Adds warning callout about Spoolman 0.26+ CORS/origin change. |
| docs/docs/features/multi-material.md | Documents “Live updates” behavior and the SPOOLMAN_CORS_ORIGIN fix. |
| docs/docs/faq.md | Adds FAQ entry for Spoolman upgrades breaking live spool weight updates. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Abort the in-flight socket diagnosis probe when the WebSocket opens, so a late-resolving probe can't overwrite a healthy socketDiagnostic state. Key the dashboard card's field columns by their contents instead of loop index, per the project's stable-key convention. Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SPOOLMAN_CORS_ORIGINis set — the Moonraker proxy connection keeps working, so the dashboard card looked "connected" with no live datadiagnoseHttpEndpoint) with a configurable probe path, and reuses it to probe Spoolman directly when the live-update WebSocket fails to openv-alerts for consistency with the new warningSPOOLMAN_CORS_ORIGINfix in the multi-material, third-party integrations, and FAQ docs pagesCloses #1928
Test plan
pnpm run lint— cleanpnpm run type-check— cleanpnpm run test:unit— 404/404 passing (incl. newdiagnoseHttpEndpointprobe-path case)pnpm run circular-check— no circular dependenciesmarkdownlint/codespellon changed docs — cleanSPOOLMAN_CORS_ORIGINunset/set🤖 Generated with Claude Code