fluidd icon indicating copy to clipboard operation
fluidd copied to clipboard

Action-command prompts cannot be dismissed when Klipper is not ready

Open Solismuchengxue opened this issue 1 week ago • 0 comments

Fluidd Version

v1.37.7-b2edab5, with an ACE Pro UI patch. The affected action-command dialog and history handling were unchanged from upstream in that build. The upstream develop dialog also routes both close controls through sendGcode at the time of reporting.

Browser

Edge

Device

Laptop

Operating System

Windows (browser); Ubuntu (Klipper/Moonraker host)

What happened

The Klipper/Moonraker host has independent power. When the printer electronics are off, I keep the host online for maintenance and use Fluidd to read documentation and configuration. An existing ACE Connection Issue prompt blocks the page. Both Dismiss and the title-bar × send a G-code close command, but the dialog stays open while Klipper is not ready. Moonraker's history shows one action:prompt_show followed by the attempted close commands, with no corresponding // action:prompt_end response.

What did you expect to happen

The browser should close an existing prompt locally when Klipper is unavailable. A dismissed history entry should stay dismissed on refresh in that tab. New prompts should still appear. When Klipper is ready, prompt buttons should continue to use their configured G-code behavior.

How to reproduce

  1. On an idle printer with [respond] enabled and Klipper ready, open Fluidd and issue the following standard action commands. This is a small reproduction for the same generic dialog used by the ACE integration.

    RESPOND TYPE=command MSG="action:prompt_begin Disconnect test"
    RESPOND TYPE=command MSG="action:prompt_text Test prompt"
    RESPOND TYPE=command MSG="action:prompt_footer_button Dismiss|RESPOND TYPE=command MSG=action:prompt_end|secondary"
    RESPOND TYPE=command MSG="action:prompt_show"
    
  2. With the prompt open, power off the printer electronics while keeping the separate Klipper/Moonraker host and browser online. Wait for Fluidd to show Klipper is unavailable.

  3. Click Dismiss, then try the title-bar ×. In the affected build, neither can close the dialog in this state.

Additional information

Fluidd closes the dialog on the action:prompt_end response. The browser can detect Klipper readiness before routing the two close controls. A local patch uses that state to close the active modal and remembers the Moonraker history entry within the tab. It preserves unrelated button commands and the ready-state path. A live notification has a browser-side timestamp, whereas the replayed history has a Moonraker timestamp. For refresh behavior the patch uses the history timestamp once the live prompt is matched to its history entry.

The local regression tests exercise both close controls, original command behavior, refresh and new-prompt behavior, and the live-to-history timestamp difference.

Solismuchengxue avatar Nov 24 '26 17:11 Solismuchengxue