Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
tagName: v__VERSION__ # tauri-action will replace this with package.json version if needed, or use the tag
releaseName: "vstable v__VERSION__"
Expand Down
30 changes: 30 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@
"@monaco-editor/react": "^4.7.0",
"@tailwindcss/postcss": "^4.1.18",
"@tanstack/react-virtual": "^3.13.24",
"@tauri-apps/plugin-dialog": "^2.7.0",
"@tauri-apps/plugin-log": "^2.8.0",
"@tauri-apps/plugin-process": "^2.3.1",
"@tauri-apps/plugin-shell": "^2.2.0",
"@tauri-apps/plugin-store": "^2.2.0",
"@tauri-apps/plugin-updater": "^2.10.1",
"lucide-react": "^0.563.0",
"mysql2": "^3.18.2",
"nice-grpc-common": "^2.0.3",
Expand Down
33 changes: 33 additions & 0 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { ask } from '@tauri-apps/plugin-dialog';
import { relaunch } from '@tauri-apps/plugin-process';
import { check } from '@tauri-apps/plugin-updater';
import { Plus, X } from 'lucide-react';
import React, { useCallback, useEffect, useRef, useState } from 'react';
import { apiClient } from './api/client';
Expand Down Expand Up @@ -56,6 +59,36 @@ function App() {
});
});

// Check for updates on mount
useEffect(() => {
const checkForUpdates = async () => {
try {
const update = await check();
if (update) {
const yes = await ask(
`Update to ${update.version} is available!\n\nRelease notes:\n${update.body || 'No release notes provided.'}\n\nDo you want to install it now?`,
{
title: 'Update Available',
kind: 'info',
okLabel: 'Update',
cancelLabel: 'Cancel',
}
);
if (yes) {
await update.downloadAndInstall();
await relaunch();
}
}
} catch (error) {
console.error('Failed to check for updates:', error);
}
};
// Only check in desktop environments (Tauri)
if ((window as any).__TAURI_INTERNALS__) {
checkForUpdates();
}
}, []);

// Store the latest state of each session reported by SessionView
const sessionStatesRef = useRef<Record<string, any>>({});
const saveTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
Expand Down
Loading
Loading