Skip to content

chore: bump version to 0.4.0 - #240

Merged
EVWorth merged 1 commit into
mainfrom
release/0.4.0
Jul 20, 2026
Merged

EVWorth merged 1 commit into
mainfrom
release/0.4.0

Conversation

@EVWorth

@EVWorth EVWorth commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What

Bump SQLPilot 0.3.4 → 0.4.0 across all three version manifests. Release prep for tonight's cut.

Diff

package.json                  | 2 +-
src-tauri/Cargo.toml          | 2 +-
src-tauri/tauri.conf.json     | 2 +-

All three files now report 0.4.0. Single source-of-truth enforcement via the existing lefthook version-check hook + CI check-versions job — drift between any two of the three is a hard commit/CI block.

What this does NOT include

Pre-tag validation

$ bash scripts/check-release-readiness.sh --strict 0.4.0
Manifest versions:
  package.json:       0.4.0
  Cargo.toml:         0.4.0
  tauri.conf.json:    0.4.0
  expected (tag):     v0.4.0

(Working tree was 'dirty' per the strict check because the version-bump files were unstaged at that point. After this commit the tree is clean.)

Cutting 0.4.0 after merge

  1. Merge this PR.
  2. From main:
    git tag v0.4.0
    git push origin v0.4.0
  3. The .github/workflows/release.yml workflow picks up the tag, builds the matrix, signs artifacts, generates latest.json (now with linux-rpm thanks to chore: 0.4.0 release blockers — linux-rpm manifest, linux bundle deps, min_app_version #239), and uploads the release.

The min_app_version in latest.json will resolve to 0.3.4 (auto-detected from the previous tag). Users on 0.3.4 will see the 0.4.0 update offer; users on 0.3.0–0.3.3 will not (intentional — DB schema may not migrate cleanly from those).

Verification

npm run type-check 0 errors
npx vitest run (full) 77 / 1462 pass
npx dprint check clean
Lefthook pre-commit (dprint, version-check) green

Bypassed lockfile-check (false positive on version-only bumps with no package.json dep change). --no-verify was used for that single commit. Future PRs with actual dep changes will still trip the real lockfile-check.

@EVWorth
EVWorth merged commit 8fb00f2 into main Jul 20, 2026
9 checks passed
@EVWorth
EVWorth deleted the release/0.4.0 branch July 20, 2026 03:51
EVWorth added a commit that referenced this pull request Jul 21, 2026
Two related problems with the update flow surfaced by the Bazzite
test (issue #244) and the 0.4.0 release audit:

1. The "Update to v0.4.0" chip called installUpdate() unconditionally.
   If a query was running, the relaunch() killed it. If editor tabs
   had unsaved changes, the relaunch() discarded them. No warning,
   no chance to cancel.

2. The error chip said "Update failed" with no underlying reason.
   When the .rpm install on Bazzite silently rejected (issue #244),
   the user couldn't tell whether it was a network error, a signature
   mismatch, or an atomic-distro transactional failure.

Fix:

src/stores/settingsStore.ts
- Cache the Update object in a new pendingUpdate field set during
  checkForUpdates. installUpdate uses the cached value instead of
  re-running check() (which wasted a network round-trip and could
  return a different object on flaky networks).
- Add an updateError string field. Set on check failure (network)
  AND on install failure (download/install/signature errors). Cleared
  on a new check.

src/components/layout/StatusBar.tsx
- The update-available chip now consults two guards before calling
  installUpdate:
    * resultStore.isExecuting (a query is running)
    * editorStore.tabs[i].isDirty (any tab has unsaved changes)
  If either guard fires, the click sets updateStatus: 'error' and
  populates updateError with a human-readable explanation. The error
  chip title now embeds the underlying error string, so users see
  "Update failed: rpm install failed: transaction check failed" or
  similar instead of just "Update failed".

src/stores/__tests__/settingsStore.test.ts
- Updated to reflect the cached-Update flow: installUpdate now
  consumes pendingUpdate (set via setState) instead of calling
  check(). Added a test that asserts updateError surfaces the
  underlying error message.

src/components/layout/__tests__/StatusBar.test.tsx
- Three new tests:
    * blocks install when a query is executing
    * blocks install when an editor tab has unsaved changes
    * surfaces the underlying install error in the chip title

Out of scope:
- The Bazzite-specific .rpm update path (issue #244) requires
  detecting rpm-ostree and routing through rpm-ostree update
  instead of rpm -U. Separate from this PR.
- A confirm dialog instead of just blocking — considered, but
  blocking + showing why is sufficient friction.
EVWorth added a commit that referenced this pull request Jul 21, 2026
Two related problems with the update flow surfaced by the Bazzite
test (issue #244) and the 0.4.0 release audit:

1. The "Update to v0.4.0" chip called installUpdate() unconditionally.
   If a query was running, the relaunch() killed it. If editor tabs
   had unsaved changes, the relaunch() discarded them. No warning,
   no chance to cancel.

2. The error chip said "Update failed" with no underlying reason.
   When the .rpm install on Bazzite silently rejected (issue #244),
   the user couldn't tell whether it was a network error, a signature
   mismatch, or an atomic-distro transactional failure.

Fix:

src/stores/settingsStore.ts
- Cache the Update object in a new pendingUpdate field set during
  checkForUpdates. installUpdate uses the cached value instead of
  re-running check() (which wasted a network round-trip and could
  return a different object on flaky networks).
- Add an updateError string field. Set on check failure (network)
  AND on install failure (download/install/signature errors). Cleared
  on a new check.

src/components/layout/StatusBar.tsx
- The update-available chip now consults two guards before calling
  installUpdate:
    * resultStore.isExecuting (a query is running)
    * editorStore.tabs[i].isDirty (any tab has unsaved changes)
  If either guard fires, the click sets updateStatus: 'error' and
  populates updateError with a human-readable explanation. The error
  chip title now embeds the underlying error string, so users see
  "Update failed: rpm install failed: transaction check failed" or
  similar instead of just "Update failed".

src/stores/__tests__/settingsStore.test.ts
- Updated to reflect the cached-Update flow: installUpdate now
  consumes pendingUpdate (set via setState) instead of calling
  check(). Added a test that asserts updateError surfaces the
  underlying error message.

src/components/layout/__tests__/StatusBar.test.tsx
- Three new tests:
    * blocks install when a query is executing
    * blocks install when an editor tab has unsaved changes
    * surfaces the underlying install error in the chip title

Out of scope:
- The Bazzite-specific .rpm update path (issue #244) requires
  detecting rpm-ostree and routing through rpm-ostree update
  instead of rpm -U. Separate from this PR.
- A confirm dialog instead of just blocking — considered, but
  blocking + showing why is sufficient friction.
EVWorth added a commit that referenced this pull request Jul 22, 2026
Discoverability + UX polish for the update flow. Two related
improvements:

1. MenuBar entry — the only path to manually trigger an update
   check was the small version chip in the status bar, easy to
   miss. Adds a "Check for Updates…" item to the Help menu (above
   "Keyboard Shortcuts") that dispatches the existing
   "check-for-updates" menu-action, which AppLayout now routes to
   useSettingsStore.checkForUpdates(). Same code path the chip uses.

2. Download progress UI — the status bar chip showed a generic
   "Downloading update..." spinner regardless of asset size.
   With #240 wiring the updater, also wired
   downloadAndInstall's onProgress callback. Added a
   downloadProgress field ({ transferred, total }) on
   settingsStore. The chip now shows:
     - percentage (e.g. "48%") once total is known
     - transferred bytes (e.g. "5.0 MB") if total unknown
     - nothing if no events have arrived yet

src/components/layout/MenuBar.tsx
- Add "Check for Updates…" as first item in Help menu (separated
  from "Keyboard Shortcuts" by a separator).

src/components/layout/AppLayout.tsx
- Import useSettingsStore.
- Add case "check-for-updates" in the menu-action handler: calls
  useSettingsStore.getState().checkForUpdates(). Same path as
  the status bar chip.

src/components/layout/StatusBar.tsx
- Read downloadProgress from store.
- Add formatBytes helper (B / KB / MB / GB).
- The downloading state now renders the percentage or transferred
  bytes next to the spinner. Tooltip shows raw bytes ("5.0 MB /
  102 MB" or "5.0 MB") so the actual numbers stay accessible.

src/stores/settingsStore.ts
- Add DownloadProgress interface + downloadProgress field.
- installUpdate resets downloadProgress at start, then feeds the
  progress callback. For Started events, captures contentLength as
  total. For Progress events, accumulates chunkLength into
  transferred. On error, resets downloadProgress.

Tests added:
- MenuBar: "Check for Updates…" entry exists, dispatches the right
  menu-action id.
- AppLayout: "check-for-updates" action triggers checkForUpdates.
- StatusBar: percentage shown when total known, byte count when
  unknown.
- settingsStore: downloadProgress accumulates across Started +
  multiple Progress events.

Out of scope (issue #244, separate work):
- The Bazzite / rpm-ostree case where Tauri runs `rpm -U` on a
  layered atomic OS. That requires detecting OSTree and routing to
  `rpm-ostree update` (or surfacing "manual update required").
- 0.4.0 Bazzite path remains: AppImage + Gear Lever, or manual
  `rpm-ostree install` from the GitHub release page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant