Live reload for client plugins

While you work on a plugin's client code in the web development loop, DataMind Oda swaps rebuilt bundles into the open pages: the edited interface appears without a restart and without reloading the page. This page covers how Oda notices an edit, what a swap preserves, and how to recover when one fails.

How an edit reaches the page

What a swap does

When a swap fails

Questions, answered

Do I need to restart the app to see a client edit?

No. With the web development loop running, a rebuilt client bundle is swapped into every open page by itself; nothing restarts and the page is not reloaded. See Building and shipping Oda for running the loop.

How does my edit reach the open page?

The loop rebuilds the browser-side bundle as you edit. Oda checks each bundle for changes and, when one has changed, loads the new copy into every open page and starts it in place of the previous copy. Changes are swapped one at a time.

What makes Oda notice an edited bundle?

The bundle's file details: its modified time, change time and size. Oda does not compare or hash file contents, so a rewrite that keeps the modified time and the size is still noticed (the change time moves), and a bundle deleted and restored is reloaded when it comes back.

How quickly is an edit picked up?

Once the loop has rebuilt your change, the next check picks it up; checks run on a short interval, 500 ms by default. The rebuild is the first step, so the time to the swap is the rebuild plus one check at most.

Does a reload keep my plugin's state?

No. Each swap restarts the plugin with fresh state, so anything it was holding, React state included, is lost. Your session, workspace and connection stay as they are.

Why did reconnecting not replace my plugins?

Bundles are identified by their file details, not their contents. If nothing on disk has changed, there is nothing to replace: opening or reconnecting a page syncs it to the current set, and unchanged bundles are not swapped again.

Why did my client plugin stop after an edit?

A swap tears down the previous copy before the new one starts, and there is no rollback. If the download of the new bundle fails, the running copy is left as it is; if the failure comes later, after the previous copy has been torn down, the plugin stays out until a retry brings it back.

How do I recover a failed swap?

Retry from Settings > Plugins > Plugin list: the retry re-delivers the latest state of the client plugin set even when it has not changed, so a plugin that did not come back is loaded again. A later rebuild also retries the affected plugin; see Settings sections and plugins.

Does a swap touch my conversation?

No. A swap is invisible to the conversation: the model sees no new input or output.

Does live reload of client code apply in the desktop app?

No. This path keeps the web interface's open pages in sync with rebuilt bundles; the desktop app does not swap client code this way. For how changes apply while Oda runs in the app, see Hot reload.