Skip to content

fix(notifications): name FlowGuard clog/tangle, keep ws alive on callback errors - #351

Merged
gmmcosta15 merged 5 commits into
devfrom
fix/notification-mmu-noise
Oct 16, 2026
Merged

gmmcosta15 merged 5 commits into
devfrom
fix/notification-mmu-noise

Conversation

@gmmcosta15

@gmmcosta15 gmmcosta15 commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Feature
  • Bug Fix
  • Code Refactor
  • Documentation

Fixes two Happy Hare and connection problems seen on AMU printers: FlowGuard clogs being reported as tangles, and the screen getting stuck on "Klipper down" after Klipper had recovered.

Changes

  • FlowGuard rule split by the type Happy Hare reports, which is the same word Mainsail's Clog/Tangle Detection meter shows:
    • FlowGuard detected a clog / A clog has been detected on ... -> "Filament Clog Detected"
    • FlowGuard detected a tangle / A tangle has been detected on ... -> "Filament Tangle Detected"
    • A clog/tangle has been detected (encoder setups, HH can't tell which) -> "Filament Clog or Tangle"
  • moonrakerComm.on_error: now only logs; removed the unused self.disconnected

Motivation

  • Release-2.0 matched every message containing flowguard to "Filament Tangle Detected", so a real clog showed as a tangle. dev only matched the tangle text, so a clog had no specific message.
  • websocket-client (1.9.0) passes exceptions raised inside our callbacks to on_error without closing the socket and without calling on_close. The old on_error set connected=False, after which every send_request, including the server.info poll, was dropped and reconnect() never retried because the ws thread was still alive. The "shutdown" notification kept arriving but the "ready" that clears it never came, so the screen stayed on "Klipper down" until BlocksScreen was restarted (seen on an RF50 running 8408a6e on 10-13, 10-14 and 10-15). A real drop always ends in teardown() -> on_close, which already sets connected=False; KlipperScreen's on_error also only logs.

Tests

  • New unit tests:
    • FlowGuard clog, tangle and clog/tangle messages
    • a raising callback leaves the socket open and usable

@gmmcosta15 gmmcosta15 added bug Something is broken, or a fix for it ui Touchscreen UI labels Oct 16, 2026
@gmmcosta15 gmmcosta15 self-assigned this Oct 16, 2026
@gmmcosta15 gmmcosta15 changed the title fix(notifications): drop MMU toolchange noise, fix clog label, keep ws alive on callback error fix(notifications): hide HH toolchange popups, name FlowGuard clog/tangle, keep ws alive on callback errors Oct 16, 2026

@RobeMartins RobeMartins left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

happy hare m117 filter is not needed since happy hare has a flag to disable them

@gmmcosta15 gmmcosta15 changed the title fix(notifications): hide HH toolchange popups, name FlowGuard clog/tangle, keep ws alive on callback errors fix(notifications): name FlowGuard clog/tangle, keep ws alive on callback errors Oct 16, 2026
@gmmcosta15
gmmcosta15 merged commit 89d3030 into dev Oct 16, 2026
11 checks passed
@gmmcosta15
gmmcosta15 deleted the fix/notification-mmu-noise branch October 16, 2026 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something is broken, or a fix for it ui Touchscreen UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants