Skip to content

fix(print): keep the cancel loadscreen until the cancel macro finishes - #373

Open
gmmcosta15 wants to merge 2 commits into
devfrom
fix/cancel-loadscreen-stuck
Open

gmmcosta15 wants to merge 2 commits into
devfrom
fix/cancel-loadscreen-stuck

Conversation

@gmmcosta15

@gmmcosta15 gmmcosta15 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Description

  • Feature
  • Bug Fix
  • Code Refactor
  • Documentation

Cancelling a print could leave the UI stuck behind the "Cancelling print" loadscreen. The loadscreen was dropped only on print_stats standby, which is never reached after a cancel until the next job or a manual action.

Changes

  • PrintTab tracks a pending cancel (_cancel_pending) and drops the loadscreen once both conditions hold:
    • print_stats.state is cancelled
    • idle_timeout.state is no longer Printing
  • print_stats turns cancelled partway through the CANCEL_PRINT macro, but idle_timeout stays Printing while the gcode mutex is held and moves are queued. Waiting for both keeps the loadscreen up until the macro and its moves have finished.
  • A Klippy shutdown or E-stop while the cancel is pending also drops the loadscreen, because print_stats never reaches cancelled in that case.
  • Only a cancel started from this screen is tracked. Standby handling (unblocking tabs, saving the Z offset snapshot) is unchanged.

Tests

  • Unit tests: the loadscreen waits for the cancel macro to finish, a cancel from another client leaves it alone, a shutdown during the cancel clears it, and the cancel page no longer touches it.

@gmmcosta15
gmmcosta15 requested a review from a team October 30, 2026 11:30
@gmmcosta15 gmmcosta15 added bug Something is broken, or a fix for it ui Touchscreen UI labels Oct 30, 2026
@gmmcosta15 gmmcosta15 self-assigned this Oct 30, 2026
@gmmcosta15 gmmcosta15 changed the title fix(print): hide the cancelling loadscreen when the cancel page opens fix(print): keep the cancel loadscreen until the cancel macro finishes Nov 5, 2026

This branch has not been deployed

No deployments
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.

1 participant