Skip to content

fix: blob-cell freeze, per-tab crash isolation, search highlighting, JSON tree, switcher UX - #17

Merged
broisnischal merged 6 commits into
masterfrom
issue/optimizations-fixes
Jul 3, 2026
Merged

broisnischal merged 6 commits into
masterfrom
issue/optimizations-fixes

Conversation

@broisnischal

Copy link
Copy Markdown
Collaborator

Closes #1 (via public repo issues: app freeze on large blob cells), implements #2 (JSON wrap/unwrap) and #3 (switcher search box focus).

Critical fixes

  • App freeze on tables with huge cells (stroke#1). Multi-MB file buffers stored in jsonb/text/blob columns shipped whole through IPC, then got parsed, stringified, and pretty-printed on the main thread. Cells above 256 KB are now replaced at the source (Postgres / MySQL / SQLite / MCP server) with a sentinel carrying a 16 KB preview. The grid shows a truncation marker, the JSON lightbox shows the preview under a size banner, copy/export mark the truncation, and editing/filtering on truncated cells is blocked so a preview can never be written back. Verified against a real table with 18 MB jsonb cells; values ≤ 256 KB are byte-for-byte unchanged.
  • One tab can no longer take down the app. The canvas draw loop and pointer handlers run outside Svelte's effect tree, so a crash there bypassed the per-tab <svelte:boundary> and froze the grid with no error UI. Errors are now captured and rethrown from an effect — the tab shows the existing "Reload this view" card; sidebar, other tabs, and status bar stay alive.

Features

  • Search highlighting — the toolbar search paints where each match falls inside visible cell text (case-insensitive, matches server ILIKE; zero cost when idle).
  • JSON tree (stroke#2) — expanded rows default to a collapsible tree: fold/unfold any nested value, per-field copy and open-in-Monaco-viewer, Tree/Raw toggle persisted. Only expanded children mount; arrays paginate at 200 children.

Fixes & polish

  • DB switcher (stroke#3): filter input always rendered and focused on open (takes over bits-ui's open-autofocus); ⌘D / ⇧⌘C shortcuts; arrows/Tab/Enter from the search box.
  • Sidebar scroll hotfix (column-expansion rows removed), trial licensing fail-open, SQL-result sort no longer re-stringifies JSON cells per comparison, AI chat reading-width polish, "View structure" rename.

Release plumbing

  • Branch is merged up with master's chore: release 1.1.0 (versions correctly at 1.1.0 so auto-release bumps to 1.2.0).
  • [1.1.0] CHANGELOG section enriched with the real notes (it shipped with only the PR title because the changeset was on an unmerged branch); that changeset retired.
  • New changeset stability-json-search-1-2.md will fold into [1.2.0] on merge.

Merging this PR auto-cuts v1.2.0 (version bump, changelog fold, tag, build, publish to the public repo + changelog sync).

Supersedes #16 — every commit from that PR is contained here; it can be closed.

🤖 Generated with Claude Code

broisnischal and others added 6 commits July 3, 2026 10:17
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… public repo on release

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lain virtualized scrolling

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ON tree (#2), switcher focus (#3)

Critical fixes:
- Cap per-cell payloads at 256KB in Postgres/MySQL/SQLite cell serializers
  (and the MCP server's pg_cell): multi-MB file buffers stored in jsonb/text/
  blob froze the app end-to-end (IPC, webview parse, grid stringify, Monaco
  pretty-print). Oversized cells now ship as a sentinel with a 16KB preview;
  the grid shows a truncation marker, the JSON lightbox shows the preview
  under a size banner, copy/export render the truncation explicitly, and
  editing/filtering on truncated cells is blocked so a preview can never be
  written back over real data.
- Contain canvas crashes to their tab: the draw loop and canvas event
  handlers run outside Svelte's effect tree, so exceptions bypassed the
  per-tab <svelte:boundary> and froze the grid with no error UI. First error
  is now captured and rethrown from an effect, landing in the existing
  "Reload this view" card while the rest of the app stays alive.

Features:
- Search-match highlighting in the data grid: toolbar search now paints where
  each match falls inside visible cell text (case-insensitive, matches ILIKE).
- JsonTree.svelte: collapsible JSON tree in expanded rows with per-node copy
  and open-in-Monaco-lightbox; Tree/Raw toggle persisted; children paginate
  at 200 so huge arrays can't blow up the DOM.

Fixes & polish:
- DB switcher: filter input always rendered and autofocused on open via
  onOpenAutoFocus (bits-ui no longer steals focus); ⌘D / ⇧⌘C keybindings and
  arrows/Tab/Enter list navigation from the input.
- Trial licensing fails open: only a definitive TrialExpired locks Pro;
  transient license-check errors keep the last known status.
- SQL console: cached sort keys — object cells no longer re-stringify on
  every comparison.
- AI chat: conversation column matches composer width; roomier message rhythm.
- Sidebar: "View data structure" → "View structure".

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Fill the [1.1.0] section with the real release notes (pin tabs, Graphite,
  license page, SQL result sorting, pinned-column fix, reconnect perf,
  settings redesign, public-repo release pipeline) — it shipped with only
  the PR title because the changeset was still on an unmerged branch.
- Retire .changeset/quality-pass-1-1.md (content now lives in [1.1.0]).
- New .changeset/stability-json-search-1-2.md for the next release: blob
  freeze fix (#1), per-tab crash isolation, search highlighting, JSON tree
  (#2), db-switcher focus + shortcuts (#3), sidebar scroll hotfix, trial
  licensing fail-open, AI chat polish.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01f3a38

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@broisnischal broisnischal added the release:minor Bump minor version (0.x.0) label Jul 3, 2026
@broisnischal broisnischal self-assigned this Jul 3, 2026
@broisnischal
broisnischal merged commit e8f7fcb into master Jul 3, 2026
1 check passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release:minor Bump minor version (0.x.0)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant