Addresses a "frozen workbench until reload" bug where adding a new page
sometimes stopped updating the UI and no further changes rendered until
the user reloaded.
- Wrap the workbench-scenes liveQuery `next` handler in try/catch so a
single malformed row can't kill the reactive chain. Re-subscribe on
terminal errors (up to 3× with backoff) so transient Dexie failures
(e.g. DatabaseClosed during a schema upgrade in another tab) recover
automatically instead of requiring reload.
- Rewrite `patchActiveScene` as a Dexie rw-transaction that reads the
row fresh and skips writes that produce the same array reference, so
two rapid writes (add A, then add B before the liveQuery echoes the
first change) can no longer clobber each other with a stale snapshot.
- Restore `viewingAsAgentId` and `scopeTagIds` in `toScene` — they were
silently dropped, breaking the agent-avatar pill in SceneAppBar and
the auto-inferred scope in SceneHeader.
- Surface Dexie write failures from the workbench CRUD handlers. Previous
fire-and-forget calls swallowed quota / structured-clone rejections,
leaving the picker closed but no new page visible.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>