Skip to content

Fix/settings window#42

Merged
amemya merged 2 commits into
mainfrom
fix/settings-window
Jun 3, 2026
Merged

Fix/settings window#42
amemya merged 2 commits into
mainfrom
fix/settings-window

Conversation

@amemya

@amemya amemya commented Jun 2, 2026

Copy link
Copy Markdown
Owner

設定画面が開けない問題を解決

resolved #38

@amemya amemya requested a review from Copilot June 2, 2026 16:21
@amemya amemya self-assigned this Jun 2, 2026
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a6ecd01d-3d4f-4743-b422-35514dcb2783

📥 Commits

Reviewing files that changed from the base of the PR and between 0323ab6 and a4a5176.

📒 Files selected for processing (3)
  • frontend/src/App.css
  • frontend/src/App.tsx
  • main.go

📝 Walkthrough

Summary by CodeRabbit

リリースノート

  • 新機能

    • ヘッダーに設定ボタンを追加し、設定モーダルへのアクセスが容易に
    • Windows環境でアプリケーションメニューのサポートを有効化
  • スタイル

    • アイコンボタンのスタイル定義を追加。ホバー時の色変更機能を実装

Walkthrough

このプルリクエストは、Settings 画面を開くためのアイコンボタンをヘッダーに追加し、macOS と Windows の両環境でメニューからの設定画面アクセスを実装しました。フロントエンド UI スタイル、UI 実装、バックエンド event handling を統合しています。

Changes

Settings ボタン機能実装

Layer / File(s) Summary
アイコンボタンスタイル定義
frontend/src/App.css
アイコンボタン用 CSS クラス .btn-icon.btn-icon:hover を定義し、flex 中央揃えレイアウトと色切り替え(既定は --text-secondary、ホバー時は --text-primary)を設定しました。
Settings ボタンの UI 実装
frontend/src/App.tsx
ヘッダーのアクション領域に Settings ボタンを追加し、btn-secondary btn-icon クラスを適用して styled icon button として表示し、クリックで setShowSettings(true) を呼び出します。
Settings event の同期的実行と Windows メニュー統合
main.go
macOS メニューの Preferences ハンドラで open_settings event を goroutine ではなく同期的に emit するよう変更し、Webview Window Options に Windows メニュー設定(buildMenu(appStruct))を追加して Windows 環境でのメニュー統合を実現しました。

Sequence Diagram

sequenceDiagram
  participant macOSMenu as macOS Menu
  participant EventEmitter as Event Emitter
  participant Frontend as Frontend App
  participant Modal as Settings Modal

  macOSMenu->>EventEmitter: Emit open_settings
  EventEmitter->>Frontend: open_settings イベント受信
  Frontend->>Modal: showSettings = true で開く
  
  rect rgba(100, 150, 200, 0.5)
  participant WindowsMenu as Windows Menu
  participant Webview as Webview Window
  WindowsMenu->>Webview: buildMenu(appStruct) 適用
  Webview->>Frontend: メニューから Settings 選択可能に
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • amemya/ExifFrame#11: 上部バーおよびボタンシステムの UI リファクタリングと settings 関連レイアウトで、このプルリクエストの .btn-icon スタイル追加および Settings ボタン実装と直接的に重複しています。
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR タイトル「Fix/settings window」は、設定画面の問題修正という主要な変更を明確に示しており、changeset の主要な目的と関連している。
Description check ✅ Passed PR 説明「設定画面が開けない問題を解決」は、関連する issue #38 を参照しており、changeset の目的と関連している。
Linked Issues check ✅ Passed Issue #38 の要件「Windows環境で設定画面を正しく開けるようにする」に対して、本 PR では frontend での設定ボタン追加、backend での goroutine 削除、Windows メニュー設定追加により対応している。
Out of Scope Changes check ✅ Passed 全ての変更(CSS スタイル追加、フロントエンドの設定ボタン、backend の settings window 修正)は Issue #38 の「Windows で設定画面を開く」という目的に関連している。

✏️ 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 fix/settings-window

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 and usage tips.

Copilot AI 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.

Pull request overview

Windows 環境で「Preferences / 設定」画面が開けない問題(Issue #38)を解消するため、Wails 側のメニュー設定を Windows のウィンドウに紐付け、フロント側にも設定を開く導線を追加するPRです。

Changes:

  • Preferences メニュークリック時の open_settings イベント送出を同期実行に変更(goroutine 제거)
  • Windows のウィンドウにメニューを明示的に設定して Preferences を利用可能に
  • フロントのトップバーに Settings アイコンボタンを追加し、CSS を追加

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
main.go Preferences メニューから open_settings を確実に送出し、Windows ウィンドウにもメニューを設定
frontend/src/App.tsx Settings を開くトップバーのアイコンボタンを追加
frontend/src/App.css アイコンボタン用の .btn-icon スタイルを追加

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.go
Comment on lines +77 to +79
Windows: application.WindowsWindow{
Menu: buildMenu(appStruct),
},
@amemya

amemya commented Jun 3, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@amemya amemya merged commit 400b2c3 into main Jun 3, 2026
2 checks passed
@amemya amemya deleted the fix/settings-window branch June 3, 2026 01:38
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