diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 4d51cc1de..6a79ae236 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -1,16 +1,7 @@ name: Claude Code Review on: - pull_request: - types: [opened, synchronize, ready_for_review, reopened] - pull_request_target: - types: [opened, synchronize, ready_for_review, reopened] - # Optional: Only run on specific file changes - # paths: - # - "src/**/*.ts" - # - "src/**/*.tsx" - # - "src/**/*.js" - # - "src/**/*.jsx" + workflow_dispatch: jobs: claude-review: diff --git a/electron/resources/icon.ico b/electron/resources/icon.ico new file mode 100644 index 000000000..89db3b455 Binary files /dev/null and b/electron/resources/icon.ico differ diff --git a/electron/resources/icon.png b/electron/resources/icon.png new file mode 100644 index 000000000..9ae16952b Binary files /dev/null and b/electron/resources/icon.png differ diff --git a/frontend/src/app/(dashboard)/layout.tsx b/frontend/src/app/(dashboard)/layout.tsx index 9b02c5c38..a5a49cd44 100644 --- a/frontend/src/app/(dashboard)/layout.tsx +++ b/frontend/src/app/(dashboard)/layout.tsx @@ -1,7 +1,6 @@ 'use client' import { useAuth } from '@/lib/hooks/use-auth' -import { useVersionCheck } from '@/lib/hooks/use-version-check' import { useRouter } from 'next/navigation' import { useEffect, useState } from 'react' import { LoadingSpinner } from '@/components/common/LoadingSpinner' @@ -19,9 +18,6 @@ export default function DashboardLayout({ const router = useRouter() const [hasCheckedAuth, setHasCheckedAuth] = useState(false) - // Check for version updates once per session - useVersionCheck() - useEffect(() => { // Mark that we've completed the initial auth check if (!isLoading) { diff --git a/frontend/src/lib/hooks/use-version-check.ts b/frontend/src/lib/hooks/use-version-check.ts deleted file mode 100644 index fff801481..000000000 --- a/frontend/src/lib/hooks/use-version-check.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { useEffect, useRef } from 'react' -import { toast } from 'sonner' -import { getConfig } from '@/lib/config' -import { useTranslation } from '@/lib/hooks/use-translation' - -/** - * Hook to check for version updates and display notification. - * Should be called once per session in the dashboard layout. - * - * Simplified implementation using a single useEffect with a ref guard. - * The toast is displayed once when an update is available and the user - * hasn't dismissed it in this session. - */ -export function useVersionCheck() { - const { t } = useTranslation() - const hasChecked = useRef(false) - - useEffect(() => { - if (hasChecked.current) return - hasChecked.current = true - - getConfig() - .then(config => { - if (!config.hasUpdate || !config.latestVersion) return - - const dismissKey = `version_notification_dismissed_${config.latestVersion}` - if (sessionStorage.getItem(dismissKey)) return - - toast.info(t('advanced.updateAvailable').replace('{version}', config.latestVersion), { - description: t('advanced.updateAvailableDesc'), - duration: Infinity, - closeButton: true, - action: { - label: t('advanced.viewOnGithub'), - onClick: () => window.open('https://github.com/lfnovo/open-notebook', '_blank'), - }, - onDismiss: () => sessionStorage.setItem(dismissKey, 'true'), - }) - }) - .catch(() => { - // Silently fail - version check is non-critical - }) - }, [t]) // t is still a dependency but only executes once due to ref guard -} diff --git a/frontend/src/lib/locales/bn-IN/index.ts b/frontend/src/lib/locales/bn-IN/index.ts index 506cf7517..c18205bc6 100644 --- a/frontend/src/lib/locales/bn-IN/index.ts +++ b/frontend/src/lib/locales/bn-IN/index.ts @@ -756,7 +756,6 @@ export const bnIN = { latestVersion: "সর্বশেষ সংস্করণ", status: "অবস্থা", updateAvailable: "সংস্করণ {version} উপলব্ধ", - updateAvailableDesc: "Open Notebook এর একটি নতুন সংস্করণ উপলব্ধ।", upToDate: "আপ টু ডেট", unknown: "অজানা", viewOnGithub: "GitHub এ দেখুন", diff --git a/frontend/src/lib/locales/en-US/index.ts b/frontend/src/lib/locales/en-US/index.ts index dc698aa7c..853ba0bc0 100644 --- a/frontend/src/lib/locales/en-US/index.ts +++ b/frontend/src/lib/locales/en-US/index.ts @@ -756,7 +756,6 @@ export const enUS = { latestVersion: "Latest Version", status: "Status", updateAvailable: "Version {version} Available", - updateAvailableDesc: "A new version of Open Notebook is available.", upToDate: "Up to Date", unknown: "Unknown", viewOnGithub: "View on GitHub", diff --git a/frontend/src/lib/locales/es-ES/index.ts b/frontend/src/lib/locales/es-ES/index.ts index 5796a29bd..619056799 100644 --- a/frontend/src/lib/locales/es-ES/index.ts +++ b/frontend/src/lib/locales/es-ES/index.ts @@ -756,7 +756,6 @@ export const esES = { latestVersion: "Última versión", status: "Estado", updateAvailable: "Versión {version} disponible", - updateAvailableDesc: "Una nueva versión de Open Notebook está disponible.", upToDate: "Actualizado", unknown: "Desconocido", viewOnGithub: "Ver en GitHub", diff --git a/frontend/src/lib/locales/fr-FR/index.ts b/frontend/src/lib/locales/fr-FR/index.ts index 2dd641d18..97d4d6893 100644 --- a/frontend/src/lib/locales/fr-FR/index.ts +++ b/frontend/src/lib/locales/fr-FR/index.ts @@ -755,7 +755,6 @@ export const frFR = { latestVersion: "Dernière version", status: "État", updateAvailable: "Version {version} disponible", - updateAvailableDesc: "Une nouvelle version de Open Notebook est disponible.", upToDate: "À jour", unknown: "Inconnu", viewOnGithub: "Voir sur GitHub", diff --git a/frontend/src/lib/locales/it-IT/index.ts b/frontend/src/lib/locales/it-IT/index.ts index 916846d9e..a27441c62 100644 --- a/frontend/src/lib/locales/it-IT/index.ts +++ b/frontend/src/lib/locales/it-IT/index.ts @@ -755,7 +755,6 @@ export const itIT = { latestVersion: "Ultima versione", status: "Stato", updateAvailable: "Versione {version} disponibile", - updateAvailableDesc: "È disponibile una nuova versione di Open Notebook.", upToDate: "Aggiornato", unknown: "Sconosciuto", viewOnGithub: "Visualizza su GitHub", diff --git a/frontend/src/lib/locales/ja-JP/index.ts b/frontend/src/lib/locales/ja-JP/index.ts index 9a5dfa200..8c3cd031f 100644 --- a/frontend/src/lib/locales/ja-JP/index.ts +++ b/frontend/src/lib/locales/ja-JP/index.ts @@ -755,7 +755,6 @@ export const jaJP = { latestVersion: "最新バージョン", status: "ステータス", updateAvailable: "バージョン{version}が利用可能", - updateAvailableDesc: "Open Notebookの新しいバージョンが利用可能です。", upToDate: "最新版です", unknown: "不明", viewOnGithub: "GitHubで表示", diff --git a/frontend/src/lib/locales/pt-BR/index.ts b/frontend/src/lib/locales/pt-BR/index.ts index d3f66c063..0d73e7028 100644 --- a/frontend/src/lib/locales/pt-BR/index.ts +++ b/frontend/src/lib/locales/pt-BR/index.ts @@ -755,7 +755,6 @@ export const ptBR = { latestVersion: "Última Versão", status: "Status", updateAvailable: "Versão {version} Disponível", - updateAvailableDesc: "Uma nova versão do Open Notebook está disponível.", upToDate: "Atualizado", unknown: "Desconhecido", viewOnGithub: "Ver no GitHub", diff --git a/frontend/src/lib/locales/ru-RU/index.ts b/frontend/src/lib/locales/ru-RU/index.ts index fece9fd66..b91cf8296 100644 --- a/frontend/src/lib/locales/ru-RU/index.ts +++ b/frontend/src/lib/locales/ru-RU/index.ts @@ -755,7 +755,6 @@ export const ruRU = { latestVersion: "Последняя версия", status: "Статус", updateAvailable: "Доступна версия {version}", - updateAvailableDesc: "Доступна новая версия Open Notebook.", upToDate: "Актуальная версия", unknown: "Неизвестно", viewOnGithub: "Посмотреть на GitHub", diff --git a/frontend/src/lib/locales/zh-CN/index.ts b/frontend/src/lib/locales/zh-CN/index.ts index fa0c4e4dd..853811855 100644 --- a/frontend/src/lib/locales/zh-CN/index.ts +++ b/frontend/src/lib/locales/zh-CN/index.ts @@ -755,7 +755,6 @@ export const zhCN = { latestVersion: "最新版本", status: "状态", updateAvailable: "版本 {version} 可用", - updateAvailableDesc: "Open Notebook 的新版本可用。", upToDate: "已是最新", unknown: "未知", viewOnGithub: "在 GitHub 上查看", diff --git a/frontend/src/lib/locales/zh-TW/index.ts b/frontend/src/lib/locales/zh-TW/index.ts index 25f26fb1b..621dc4739 100644 --- a/frontend/src/lib/locales/zh-TW/index.ts +++ b/frontend/src/lib/locales/zh-TW/index.ts @@ -755,7 +755,6 @@ export const zhTW = { latestVersion: "最新版本", status: "狀態", updateAvailable: "版本 {version} 可用", - updateAvailableDesc: "Open Notebook 的新版本可用。", upToDate: "已是最新", unknown: "未知", viewOnGithub: "在 GitHub 上查看",