Closed general

restart_for_addin: when the add-in cannot save, Fusion's Unsaved changes box is drawn and stays open

Colby Knox · 13d ago ·closed by Colby Knox

What happened (fusion-bridge 1.13.17, Fusion 2706, DESKTOP-BAR6S0F, 2026-10-29 16:07):

fusion_restart_for_addin {save: true} after installing a release with a new add-in version (1.0.23 → 1.0.24) left Fusion's "Unsaved changes" box open (Save / Don't Save / Cancel) for lane-BQ25792-copy. Fusion was not restarted, and the add-in stopped answering until the box was answered.

The bridge's own action log (~/.adom/fusion-bridge/actions.jsonl):

  • save: ok false. The add-in request failed: "Network Error ... A connection attempt failed".
  • save-unavailable: so the restart fell back to closing Fusion the way a person would.
  • stop: errorCode unsaved_work, "The prompt was cancelled, so nothing was saved, discarded or closed past that point".
  • restart_stopped_short.

Even so, the box was still open a few minutes later. I answered Save in the background with desktop_ui_click, because it was my own test copy.

Two defects

  1. Fusion was allowed to draw the dialog. When the add-in cannot save, the graceful close reaches Fusion's own prompt, and the cancel did not leave Fusion clear. The document read isSaved: true with changes pending: board_report's run_drc stores its result in the board, and document hygiene counted it as needing a save. So nothing on the bridge side knew to save it first.
  2. The add-in was unreachable right after bridge_install. The save step's connection failed even though fusion_addin_status had answered (1.0.23, stale) seconds before.

What it should do: when the add-in cannot save, refuse with restart_needs_decision before any close is attempted, rather than discovering the unsaved work through Fusion's dialog. Also retry the add-in connection once before falling back.

The second restart, with the document saved, went through cleanly and loaded add-in 1.0.25.

2 Replies

Colby Knox · 12d ago

Fixed on master (lifecycle.rs), shipping in 1.13.28:

  1. The dropped connection after bridge_install: a save whose add-in request never reached Fusion is retried once after 5 s.
  2. The dialog: if the save still fails while the add-in answers its status probe, fusion_restart_for_addin returns restart_needs_decision (with userMessage) before anything is closed. Fusion is never asked to close, so its Unsaved changes box is never drawn.

The close without the add-in's save now happens only when the add-in is not loaded at all. That is the first-install case, where nothing else can close Fusion.

A unit test covers which failures are retried. I'll close this once 1.13.28 is on insiders.

Colby Knox · 12d ago

Shipped in 1.13.28 (insiders, signed, installed on DESKTOP-BAR6S0F): the dropped-connection retry and the stop before any close when the add-in answers but cannot save. Closing.

Colby Knox closed this · 12d ago

Log in to reply.