fix: PG cell-edit serialization + recent-connections startup race #6

Merged
adrianbonpin merged 8 commits from fix/pg-serialization-and-recents into prod 2026-09-01 04:23:07 +00:00
Owner

Two backend fixes, combined into one PR.

1. PostgreSQL cell-edit serialization (db_viewer.rs)

The frontend commits edited cell values as plain strings (and PK locators as numbers/booleans), but tokio-postgres String binds only text-ish types and i64 only int8, so editing integer/boolean/uuid/jsonb/… columns failed with `cannot convert between the Rust type and the Postgres type`.

Adds PgText — a ToSql impl that accepts any Postgres type and writes the value as UTF-8 in text wire format so the server parses it into the column's own type (NULL → SQL NULL). Adds the bytes dependency + unit tests.

2. Recent-connections startup race (connectionStore.ts)

The Recent strip was computed from get().connections, which is still empty while loadAll() is in flight on app startup, so cached recent IDs got filtered out and the strip appeared empty/flaky until a remount. loadAll() now refreshes recents after connections populate.

Verification

  • cargo test (db_viewer): 39 passed, 0 failed
  • bun test (desktop frontend): 1076 passed, including 2 new recents regression tests
Two backend fixes, combined into one PR. ## 1. PostgreSQL cell-edit serialization (db_viewer.rs) The frontend commits edited cell values as plain strings (and PK locators as numbers/booleans), but tokio-postgres `String` binds only text-ish types and `i64` only int8, so editing integer/boolean/uuid/jsonb/… columns failed with \`cannot convert between the Rust type and the Postgres type\`. Adds `PgText` — a `ToSql` impl that accepts any Postgres type and writes the value as UTF-8 in text wire format so the server parses it into the column's own type (NULL → SQL NULL). Adds the `bytes` dependency + unit tests. ## 2. Recent-connections startup race (connectionStore.ts) The Recent strip was computed from `get().connections`, which is still empty while `loadAll()` is in flight on app startup, so cached recent IDs got filtered out and the strip appeared empty/flaky until a remount. `loadAll()` now refreshes recents after connections populate. ## Verification - cargo test (db_viewer): 39 passed, 0 failed - bun test (desktop frontend): 1076 passed, including 2 new recents regression tests
adrianbonpin added 2 commits 2026-08-31 21:18:02 +00:00
The Recent strip was computed from get().connections which is still empty
while loadAll() is in flight on app startup, so cached recent IDs got
filtered out and the strip could appear empty/flaky until a remount.

loadAll now refreshes recents after connections populate.
fix: bind edited PG cell values via text wire format
Release / windows (push) Failing after 18m23s
Release / linux (push) Canceled after 22m17s
46e0dc2cee
The frontend commits edited cell values as plain strings (and PK locators as
numbers/booleans), but tokio-postgres' String binds only text-ish types and
i64 only int8, so editing integer/boolean/uuid/jsonb/… columns failed with
'cannot convert between the Rust type and the Postgres type'.

Introduce PgText — a ToSql impl that accepts any Postgres type and writes the
value as UTF-8 in text wire format so the server parses it into the column's
own type. NULL binds as SQL NULL. Adds the bytes crate and unit tests.
adrianbonpin added 1 commit 2026-08-31 22:26:10 +00:00
ci(windows): load MSVC dev environment before building
Release / linux (push) Successful in 16m7s
Release / windows (push) Failing after 31m11s
4ac738e6e9
rustc resolves link.exe via PATH for the windows-msvc target, but Git for
Windows ships GNU coreutils' link.exe which shadows MSVC's linker, breaking
every build-script link. Add ilammy/msvc-dev-cmd@v1 before the tauri build so
PATH/LIB/INCLUDE point at the real MSVC toolchain (and it fails fast if MSVC
is missing instead of at link time).
adrianbonpin added 1 commit 2026-09-01 00:25:24 +00:00
ci(windows): use locally-cached DB tool zips when present
Release / windows (push) Failing after 5m56s
Release / linux (push) Successful in 17m46s
927798417a
archive.mariadb.org / get.enterprisedb.com downloads are extremely slow from
the self-hosted Windows runner (30-40+ min for the MariaDB zip). Check for a
pre-downloaded copy at C:\ci\cache\ first and copy it, falling back to the
network download only when absent.
adrianbonpin added 1 commit 2026-09-01 00:42:06 +00:00
ci(windows): build inside the MSVC developer shell
Release / windows (push) Failing after 17m49s
Release / linux (push) Successful in 19m0s
042d05245e
msvc-dev-cmd sets the env but rustc still resolved link.exe to Git's GNU
coreutils link (C:\Program Files\Git\usr\bin\link.exe), so build-script
linking failed with 'extra operand'. Run the tauri build in a cmd shell that
sources vcvars64.bat so PATH/LIB/INCLUDE point at the real MSVC toolchain in
the same process.
adrianbonpin added 1 commit 2026-09-01 03:18:10 +00:00
ci: use python3-or-python fallback in release upload steps
Release / linux (push) Failing after 3m37s
Release / windows (push) Failing after 17m48s
064e935a60
Windows installs Python as 'python' (python3 is a Store alias), so the upload
step's python3 JSON parsing failed on the Windows runner. Fall back to 'python'
when python3 is absent.
adrianbonpin added 1 commit 2026-09-01 03:42:01 +00:00
ci: extract release id with grep instead of python
Release / linux (push) Successful in 18m27s
Release / windows (push) Successful in 21m53s
71735cc31e
The Windows runner's act_runner service env still lacks python/python3, so the
release-upload step failed to parse JSON. Use grep to pull the release id,
removing the Python dependency from both upload steps.
adrianbonpin added 1 commit 2026-09-01 04:22:56 +00:00
Sync version in desktop/package.json, Cargo.toml, tauri.conf.json, the Astro
landing page, version/bundle-config/docs-coverage tests, and both README
download tables. Add v0.7.12 changelog entry.
adrianbonpin merged commit 7bd4e8d05f into prod 2026-09-01 04:23:07 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adrianbonpin/gridline#6