{# Write-guard confirmation modal (S-137). Mounted once at the Studio page level (see ``studio.html``). Listens for ``studio:open-write-guard`` window events. The opening flow is: 1. Caller (the Insert button in the Studio toolbar) POSTs ``/api/insert/preview`` with the desired scope. 2. On success it dispatches ``studio:open-write-guard`` with the response body as the event detail. 3. This modal renders the redacted ``target`` + the ``scope`` table + a Confirm button that POSTs ``/api/insert`` with the original ``{tables, confirmation_token}`` body. Failure paths (token expired / scope mismatched / single-use already consumed) bubble up as ``WRITE_GUARD_REJECTED`` from ``/api/insert``; this modal just surfaces the message and stays open so the user can re-preview without losing context. #}
| Table | Row count |
|---|---|
Requires PostgreSQL (psycopg) or MySQL (pymysql).