Skip to content

Make the macro file chain finish, and never hang - #72

Open
f1adang wants to merge 3 commits into
bdring:mainfrom
f1adang:fix/macro-chain-completion
Open

f1adang wants to merge 3 commits into
bdring:mainfrom
f1adang:fix/macro-chain-completion

Conversation

@f1adang

@f1adang f1adang commented Sep 17, 2026

Copy link
Copy Markdown
  • A successful load never cleared the pending request. A later unrelated
    error:N then reported "No Macros" to whatever screen was open.
  • The status listener's file listener now resets per document, so an
    unrelated document can't advance the macro chain.
  • A request that stops receiving data now times out after 5 s instead of
    leaving "Reading Macros" up forever. The clock restarts with every chunk
    received.
  • Refreshing after "No Macros" shows "Reading Macros" again.

f1adang and others added 3 commits September 17, 2026 18:54
A successful $File/SendJSON never cleared s_pending_file_listener. Any later
unrelated error:N, such as the config queries FluidNC rejects after connect,
reached file_request_failed_advance() and advanced the chain anyway. That
reported "No Macros" to whatever scene was open.

Also reset _file_listener at the start of each document. It carried over
from the last $File/SendJSON, so another document ending in an error status
could advance the macro chain.

A file that loads without any macros still falls through to the next source.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The macro chain only advanced on an error status or a bare error:N. If a
response was cut short and neither arrived, the menu stayed on
"Reading Macros" forever.

Give up on a pending request after 5 s without data and move to the next
source. The clock restarts with every chunk received, so a large file that is
still arriving is never abandoned.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
refreshMacros() left the previous error string in place, and reDisplay()
shows an error in preference to the "Reading Macros" placeholder. Refreshing
after "No Macros" kept showing "No Macros" until the reload finished.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant