Review changes dialog (DataTable):
- Prettify the generated SQL with sql-formatter and render it in an
editable Monaco editor (lazy-loaded) instead of a cramped read-only
block. Editing the SQL switches Apply to run it verbatim via
executeSqlMulti + refetch (onexecutesql), while the unedited path
keeps the safe structured per-cell writes.
- Include a pending inline new-row INSERT in the combined review +
execution, so an added row is no longer silently dropped when
applying edits/deletes together.
Split panes (PaneSnapshot):
- A defocused SQL/Query Editor pane now renders its query text and last
results (read-only) instead of the generic 'click to focus'
placeholder.
Addresses three requests around the Review changes dialog and the split-pane defocus view.
1. Review changes dialog is now editable + prettified
sql-formatter(already a dependency) and shown in an editable Monaco editor (lazy-loaded, so Monaco stays out of the plain table-browsing bundle) instead of the previous cramped, wrapping read-only block. Shiki renders an instant highlighted preview while Monaco mounts.executeSqlMulti+ a page refetch (newonexecutesqlprop wired tohandleExecuteRawDmlinStudioShell). If you don't touch it, Apply still uses the safe structured per-cell writes (onsave/ondelete/oninsertrow) so the parameterized path is unchanged for the common case. An amber hint + a "Reset SQL" affordance make the edited state clear.⌘/Ctrl+Enterapplies.2. Added row was missing from the DML
When a pending inline new-row draft coexists with staged edits/deletes, applying them only built the UPDATE/DELETE statements — the INSERT was dropped. The combined review now includes the INSERT (rendered last so existing row indices stay valid) and executes it.
3. Defocused split panes show real content
A defocused SQL / Query Editor pane rendered a generic "Click this pane to focus it" placeholder.
PaneSnapshotnow renders the pane's query text + last results (read-only), matching how table panes already snapshot their grid.Files
src/lib/components/DataTable.svelte— editable/prettified preview, raw-exec branch, insert-in-reviewsrc/lib/components/StudioShell.svelte—handleExecuteRawDml, wireonexecutesqlsrc/lib/components/PaneSnapshot.svelte— SQL tab snapshotVerification
npm run buildpasses. Runtime not exercised here (Tauri app needs a live DB connection) — worth a manual pass on: editing then applying SQL, applying edits+delete+new-row together, and defocusing a Query Editor pane in a split.Note
Separate from #20 (sidebar scroll perf); disjoint files.