Skip to content

feat(spoolman): diagnose blocked live updates - #1929

Merged
pedrolamas merged 3 commits into
fluidd-core:developfrom
pedrolamas:feat/spoolman-live-update-diagnostics
Aug 11, 2026
Merged

feat(spoolman): diagnose blocked live updates#1929
pedrolamas merged 3 commits into
fluidd-core:developfrom
pedrolamas:feat/spoolman-live-update-diagnostics

Conversation

@pedrolamas

@pedrolamas pedrolamas commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Spoolman 0.26 added browser origin checks that silently break Fluidd's direct browser-to-Spoolman WebSocket (used for live spool/filament/vendor updates) unless SPOOLMAN_CORS_ORIGIN is set — the Moonraker proxy connection keeps working, so the dashboard card looked "connected" with no live data
  • Generalizes the existing HTTP endpoint diagnostics util (diagnoseHttpEndpoint) with a configurable probe path, and reuses it to probe Spoolman directly when the live-update WebSocket fails to open
  • Surfaces the diagnosed cause (CORS, mixed content, unreachable) as a warning in the Spoolman dashboard card, and reworks the card's connected/tracking-inactive/not-connected states into v-alerts for consistency with the new warning
  • Documents the SPOOLMAN_CORS_ORIGIN fix in the multi-material, third-party integrations, and FAQ docs pages
  • Drops a couple of dead icon branches in the dashboard card left over from that template rework

Closes #1928

Test plan

  • pnpm run lint — clean
  • pnpm run type-check — clean
  • pnpm run test:unit — 404/404 passing (incl. new diagnoseHttpEndpoint probe-path case)
  • pnpm run circular-check — no circular dependencies
  • markdownlint / codespell on changed docs — clean
  • Manual verification against a real Spoolman ≥ 0.26 instance with SPOOLMAN_CORS_ORIGIN unset/set

🤖 Generated with Claude Code

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>
@pedrolamas
pedrolamas requested a lite review from Copilot August 11, 2026 11:43
@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Aug 11, 2026
@pedrolamas pedrolamas added this to the 1.37.4 milestone Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 diagnoseHttpEndpoint to support a configurable probe path and add unit coverage for it.
  • When the direct Spoolman WebSocket fails to open, probe Spoolman’s /api/v1/info and surface the diagnosed cause as an in-card warning state.
  • Document the Spoolman 0.26+ SPOOLMAN_CORS_ORIGIN requirement 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.

Comment thread src/components/widgets/spoolman/SpoolmanCard.vue Outdated
Comment thread src/store/spoolman/actions.ts
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@pedrolamas
pedrolamas merged commit 7cc466f into fluidd-core:develop Aug 11, 2026
6 checks passed
@pedrolamas
pedrolamas deleted the feat/spoolman-live-update-diagnostics branch August 11, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FR - Enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spoolman 0.26 not working with fluidd

2 participants