Skip to content

feat: support beta channel updates#114

Merged
amemya merged 2 commits into
mainfrom
feat/issue-60-beta-updates
Jun 24, 2026
Merged

feat: support beta channel updates#114
amemya merged 2 commits into
mainfrom
feat/issue-60-beta-updates

Conversation

@amemya

@amemya amemya commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Beta版を含むかどうか選択可能に
(fixes #60)

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • 新機能
    • 設定にベータアップデートの受信オプションを追加しました。ユーザーは「ベータアップデートを受信」チェックボックスで、安定版とベータ版のアップデートを切り替えられるようになります。初期設定は無効です。

Walkthrough

Settings構造体にEnableBetaUpdatesフィールドを追加し、updater.godynamicGithubProviderを導入してstable/betaプロバイダを実行時に動的切り替えできるようにした。フロントエンドのSettingsWindowには「Receive Beta Updates」チェックボックスを追加し、設定の読み込み・保存に対応させた。

Changes

ベータ更新受信トグル機能

Layer / File(s) Summary
Settings構造体へのEnableBetaUpdatesフィールド追加
settings.go
Settings構造体にEnableBetaUpdates bool(JSONキー: enableBetaUpdates)を追加し、init()のデフォルト値をfalseに設定。
dynamicGithubProviderとInitUpdaterの変更
updater.go
dynamicGithubProviderを追加し、Check/DownloadEnableBetaUpdatesの値に基づいてstableまたはbetaプロバイダに動的ルーティング。InitUpdaterは両プロバイダを構築してdynProviderで初期化するよう変更。ioパッケージのインポートを追加。
SettingsWindowへのReceive Beta Updatesチェックボックス追加
frontend/src/SettingsWindow.tsx
enableBetaUpdates stateを追加し、loadSettingsでの読み込み・handleSaveでの書き戻し・UIチェックボックスへのバインドを実装。

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SettingsWindow
  participant Settings as settings.go
  participant dynamicGithubProvider
  participant stableProvider
  participant betaProvider

  User->>SettingsWindow: "Receive Beta Updates" チェックボックスを切り替え
  SettingsWindow->>Settings: handleSave → enableBetaUpdates を書き込み
  Note over Settings: EnableBetaUpdates が永続化される

  User->>dynamicGithubProvider: 更新チェック
  dynamicGithubProvider->>Settings: settingsMu.RLock → EnableBetaUpdates を読み取り
  alt EnableBetaUpdates == true
    dynamicGithubProvider->>betaProvider: Check() (Prerelease: true)
  else EnableBetaUpdates == false
    dynamicGithubProvider->>stableProvider: Check() (Prerelease: false)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • amemya/ExifFrame#72: updater.goInitUpdaterやプロバイダ選択ロジックを変更しており、今回のbetaトグルによるstable/betaプロバイダ切り替えと同じコード経路に直接結びついている。
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Linked Issues check ❓ Inconclusive PR は issue #60 の主要要件(ベータ版設定オプション追加と動的プロバイダー実装)を満たしているが、APIエンドポイント変更と golang.org/x/mod/semver の導入については検証できない。 変更セットがAPIエンドポイント変更と semver パッケージの導入を完全に実装しているか確認してください。
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed タイトル「feat: support beta channel updates」は、プルリクエストの主要な変更(ベータ版アップデートのサポート追加)を明確かつ簡潔に要約しており、変更セット全体と関連性がある。
Description check ✅ Passed 説明「Beta版を含むかどうか選択可能に (fixes #60)」はベータ更新機能の追加に直接関連しており、変更セットと十分に関連している。
Out of Scope Changes check ✅ Passed すべての変更(SettingsWindow、settings.go、updater.go)は issue #60 の要件範囲内で、ベータ版アップデート機能の実装に直接関連している。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/issue-60-beta-updates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@updater.go`:
- Around line 31-50: The dynamicGithubProvider methods Check and Download both
independently read currentSettings.EnableBetaUpdates to determine which provider
to use, creating a race condition where settings changes between these calls
cause provider inconsistency. Modify the Check method to record which provider
(betaProvider or Provider) was selected and store this information as metadata
in the returned Release object. Then update the Download method to retrieve this
stored provider information from the Release object and use the same provider
that was selected during Check, eliminating the need for a second
currentSettings read in Download.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d9f8663f-f39c-48c0-9634-951d2012a37e

📥 Commits

Reviewing files that changed from the base of the PR and between 8741b83 and 85887c8.

📒 Files selected for processing (3)
  • frontend/src/SettingsWindow.tsx
  • settings.go
  • updater.go

Comment thread updater.go
@amemya amemya merged commit 9b08f7e into main Jun 24, 2026
4 checks passed
@amemya amemya deleted the feat/issue-60-beta-updates branch June 24, 2026 03:18
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.

Update通知にbeta版を含むかどうか設定で変更できるようにする

1 participant