Skip to content

Add version checking and changelog dialog for web app updates#595

Draft
ryohey wants to merge 1 commit intomainfrom
claude/add-version-update-toast-011CV5grnKsxQqK7LNYjUnYs
Draft

Add version checking and changelog dialog for web app updates#595
ryohey wants to merge 1 commit intomainfrom
claude/add-version-update-toast-011CV5grnKsxQqK7LNYjUnYs

Conversation

@ryohey
Copy link
Copy Markdown
Owner

@ryohey ryohey commented Feb 14, 2026

Summary

This PR adds automatic version checking and update notification functionality to the web application, allowing users to be notified when new versions are available and view the changelog from GitHub releases.

Key Changes

  • VersionCheckService (app/src/services/VersionCheckService.ts): New service that manages version checking by comparing the current version.json with the latest version. Features include:

    • Periodic checks every 5 minutes
    • Listener pattern for update notifications
    • App reload functionality with localStorage tracking
    • Prevents duplicate checks and handles development builds
  • VersionUpdateToast (app/src/components/ui/VersionUpdateToast.tsx): Toast notification component that displays:

    • "Update available" state with action buttons
    • "Update completed" state with changelog link
    • Smooth animations for show/hide transitions
    • Dismiss functionality with localStorage persistence
  • ChangelogDialog (app/src/components/ChangelogDialog/ChangelogDialog.tsx): Dialog component that:

    • Fetches the 5 latest releases from GitHub API
    • Displays release notes with formatted dates
    • Provides links to view releases on GitHub
    • Handles loading and error states gracefully
    • Supports markdown-like formatting (headings, lists, code blocks, links)
  • VersionCheckHandler (app/src/components/App/VersionCheckHandler.tsx): Orchestrator component that:

    • Manages version check lifecycle
    • Handles update notifications and dismissals
    • Tracks dismissed versions to avoid repeated notifications
    • Detects post-update state and shows completion toast
    • Disabled in Electron builds
  • Build Configuration (app/webpack.prod.js): Added GenerateVersionJsonPlugin that:

    • Generates version.json during build with commit SHA, build time, and version
    • Uses VERCEL_GIT_COMMIT_SHA environment variable for deployment tracking
  • App Integration (app/src/components/App/App.tsx): Integrated VersionCheckHandler component into the main App

Implementation Details

  • Version checking is skipped in Electron builds (handled by native update mechanisms)
  • Dismissed version updates are stored in localStorage to prevent notification spam
  • The service uses a singleton pattern for centralized version management
  • GitHub API calls include proper cache-busting headers to ensure fresh data
  • All UI components use emotion styled-components with CSS variables for theming
  • Animations use cubic-bezier easing for smooth transitions

https://claude.ai/code/session_011CV5grnKsxQqK7LNYjUnYs

新しいバージョンが利用可能な場合に右下にトーストを表示し、
アップデートボタンとリリースノートを確認できる機能を実装。

主な変更点:
- Vercelデプロイ時にversion.jsonを生成するWebpackプラグインを追加
- バージョンチェックサービス(5分ごとにポーリング)を実装
- 右下に表示されるバージョン更新トーストコンポーネントを追加
- アップデート後に「更新完了」トーストを表示
- GitHubリリースノートを表示するChangelogDialogを追加
- Appコンポーネントに自動バージョンチェック機能を統合

トーストの種類:
1. 新バージョン検出時: アップデートボタンと「後で」ボタン
2. アップデート完了時: 変更履歴を見るボタン

ユーザーは一度却下したバージョンは再度通知されない仕組みを実装。
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
signal Ready Ready Preview, Comment Feb 14, 2026 1:46am

Request Review

@ryohey ryohey marked this pull request as draft February 14, 2026 01:52
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.

2 participants