Skip to content

dsh-voice 0.4.1

Latest

Choose a tag to compare

@GooDAnDReaDY GooDAnDReaDY released this 20 Aug 10:33

The settings card sometimes opened blank — chains with no rows, empty numbers, empty paths — and stayed that way until the page was reloaded. The fields were editable, so it looked like a working form with nothing in it.

Why

Two things outside this plugin had to line up.

The Host answers HTTP about 1.4 seconds after start, while plugin registration keeps going for roughly fifteen more. A page loaded inside that window reads settings.describe and gets a view without the namespaces that have not registered yet.

The browser's settings mirror then never re-reads it. It refreshes on exactly two signals — a document commit and a (re)connect — and a namespace registering is neither: settings.register adds the registration and does not emit settings/document-updated, which only a value change or a commit does.

In that state the bound scope reports status: "unavailable" with no value, while writable still comes from the document and stays true. The card read the value, ignored the status, and seeded its draft from the first snapshot that arrived — so an empty one was frozen for good.

What changed

The card reads the status now. It seeds the draft only from a ready snapshot, renders an honest line instead of a fake empty form while it is not ready, and asks the mirror to re-read (once a second, at most fifteen times) for as long as the namespace is missing. The mirror is shared, so that also refreshes every other settings surface.

Verified by reproducing the state rather than waiting for it: with registration disabled in the installed host copy, the old card rendered the blank editable form and the new one renders the message and no fields; once the namespace appeared the card seeded itself without a page reload.

The real fix belongs upstream: either open the port after registration finishes, or invalidate the mirror when a namespace registers.

Install

dsh plugin --profile web add @goodandready/dsh-voice