Skip to content

fix(connection): show ConnectionPage on startup and all non-ready Klipper states#237

Merged
HugoCLSC merged 2 commits into
devfrom
bugfix/con-window-fix
Jun 19, 2026
Merged

fix(connection): show ConnectionPage on startup and all non-ready Klipper states#237
HugoCLSC merged 2 commits into
devfrom
bugfix/con-window-fix

Conversation

@gmmcosta15

Copy link
Copy Markdown
Collaborator

Description

- [x] Bug fix

ConnectionPage was not shown during startup or while Klipper was initializing, causing the main UI tabs to be exposed before the printer was ready.

  • Removed _AUTO_SHOW_STATES guard from ConnectionPage._set_state - the page now auto-shows for every non-KLIPPER_READY state when it is hidden and conn_toggle is True.
  • Added self.conn_window.show() at the end of MainWindow.init so the page is visible from the moment the window opens, before the first WebSocket state signal arrives.
  • Updated TestVisibility in test_connection_page.py: replaced test_auto_show_states_call_show with test_all_non_ready_states_auto_show (iterates all ConnectionState members except KLIPPER_READY) and removed test_non_auto_show_does_not_show (behavior is now inverted by design).

Motivation

On boot the app went through CONNECTING → MOONRAKER_CONNECTED → KLIPPER_STARTUP without showing ConnectionPage, so the user could interact with print/control/filament tabs while the printer was still initialising. The fix makes the page visible for the entire startup sequence and hides it only once Klipper reports ready.

Tests

All 1193 tests pass (make test-fast). TestVisibility now covers all eight non-ready ConnectionState values.

@gmmcosta15 gmmcosta15 added the enhancement New feature or request. label Jun 19, 2026
@gmmcosta15 gmmcosta15 self-assigned this Jun 19, 2026
@HugoCLSC HugoCLSC merged commit 3b0cbfe into dev Jun 19, 2026
6 checks passed
@HugoCLSC HugoCLSC deleted the bugfix/con-window-fix branch June 19, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants