Skip to content

fix(connection): show Klipper's error reason after an E-stop reboot - #354

Merged
gmmcosta15 merged 4 commits into
devfrom
fix/connection-error-messages
Oct 19, 2026
Merged

gmmcosta15 merged 4 commits into
devfrom
fix/connection-error-messages

Conversation

@gmmcosta15

Copy link
Copy Markdown
Collaborator

Description

  • Feature
  • Bug Fix
  • Code Refactor
  • Documentation

After an E-stop and a reboot, the ConnectionPage now shows the reason Klipper gives instead of a generic error.

Changes

  • mainWindow: pass the printer.info reply to the ConnectionPage (it was dropped at a TODO)
  • ConnectionPage: handle error states with the existing shutdown-reason pipeline
  • Add reasons for: MCU still halted (Can not update MCU, Command request), Unable to connect, failed MCU reset, MCU Protocol error
  • Strip the Previous MCU '<name>' shutdown: and mcu '<name>': prefixes so the map keys don't depend on the MCU name
  • Any other error shows Klipper's first line + "Press 'Firmware Restart' to recover."

Motivation

The MCU stays shut down across a host reboot, so Klipper boots into error. The subscription only exists once Klipper is ready, so printer.info is the only source of the message, and its reply was being dropped. The approach follows KlipperScreen state_error and Fluidd onServerInfo, which prefers the printer.info message.

Tests

  • New TestErrorMessages in tests/widgets/test_connection_page.py

Future work

  • Single source of Klipper state for the ConnectionPage (4 racing sources -> one (state, message) pair)

@gmmcosta15 gmmcosta15 added the bug Something is broken, or a fix for it label Oct 16, 2026
@gmmcosta15 gmmcosta15 self-assigned this Oct 16, 2026
@gmmcosta15
gmmcosta15 requested a review from HugoCLSC October 16, 2026 15:57
@gmmcosta15 gmmcosta15 changed the title fix: fix(connection): show Klipper's error reason after an E-stop reboot fix(connection): show Klipper's error reason after an E-stop reboot Oct 16, 2026
@gmmcosta15
gmmcosta15 merged commit fe878cc into dev Oct 19, 2026
9 checks passed
@gmmcosta15
gmmcosta15 deleted the fix/connection-error-messages branch October 19, 2026 10:00
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants