Skip to content

Install React and Redux DevTools in development#157

Merged
ryota-murakami merged 1 commit into
mainfrom
feature/devtools-extensions
May 12, 2026
Merged

Install React and Redux DevTools in development#157
ryota-murakami merged 1 commit into
mainfrom
feature/devtools-extensions

Conversation

@ryota-murakami

@ryota-murakami ryota-murakami commented May 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add electron-devtools-installer as a dev dependency
  • load React DevTools and Redux DevTools before dev windows are created
  • skip packaged builds, hidden E2E launches, and local opt-out launches
  • cover the dev-only guards and non-fatal installer failure path

Verification

  • pnpm exec vitest run src/main/utils/installDevelopmentDevToolsExtensions.test.ts
  • pnpm typecheck
  • pnpm lint
  • pnpm exec fallow dead-code
  • pnpm validate
  • pnpm test:e2e
  • pnpm validate (after commit hook formatting)

Summary by CodeRabbit

  • Chores
    • 開発環境でのデバッグツール統合を実装しました。
    • 開発ビルドに対する条件付きツール初期化ロジックを追加しました。

Review Change Stack

@vercel

vercel Bot commented May 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
skills-desktop Ready Ready Preview, Comment May 12, 2026 1:01pm

Request Review

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 034d0452-77bd-455f-8763-4cb993800b75

📥 Commits

Reviewing files that changed from the base of the PR and between c3cb6c8 and 700bbd7.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (4)
  • package.json
  • src/main/index.ts
  • src/main/utils/installDevelopmentDevToolsExtensions.test.ts
  • src/main/utils/installDevelopmentDevToolsExtensions.ts

Walkthrough

開発時のみ React/Redux DevTools 拡張機能を Electron に動的にインストールする機能を追加します。パッケージ化ビルド、E2E テスト実行、環境変数による無効化に対応する条件付きロジックを含みます。

Changes

Development DevTools Extensions Installation

Layer / File(s) Summary
DevTools インストールロジックとテスト
src/main/utils/installDevelopmentDevToolsExtensions.ts, src/main/utils/installDevelopmentDevToolsExtensions.test.ts
shouldInstallDevelopmentDevToolsExtensions() がパッケージ化ビルド、E2E バックグラウンド起動、環境変数 SKILLS_DESKTOP_DISABLE_DEVTOOLS_EXTENSIONS をチェック。installDevelopmentDevToolsExtensions() は React/Redux DevTools を allowFileAccess: true で動的インストール、インストール名をログ出力、エラーは捕捉して警告ログのみ出力。テストがすべてのガード条件とエラーハンドリングを検証。
開発依存関係の追加
package.json
electron-devtools-installer を devDependencies に追加。
メインプロセス起動統合
src/main/index.ts
app.whenReady() 内で installDevelopmentDevToolsExtensions() を await で呼び出し、レンダラーウィンドウ作成前に実行。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • laststance/lain#13: Electron メインプロセス起動時の React/Redux DevTools 拡張機能動的インストール、E2E/パッケージ化ビルドスキップロジックが共通。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトル「Install React and Redux DevTools in development」は、PR の主要な変更内容を正確に反映しており、開発環境における React/Redux DevTools 拡張機能のインストール機能追加を明確に示しています。
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 feature/devtools-extensions

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

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 53.73%. Comparing base (c3cb6c8) to head (700bbd7).

Files with missing lines Patch % Lines
src/main/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   53.62%   53.73%   +0.11%     
==========================================
  Files         178      179       +1     
  Lines        4496     4509      +13     
  Branches      931      935       +4     
==========================================
+ Hits         2411     2423      +12     
- Misses       1881     1882       +1     
  Partials      204      204              
Flag Coverage Δ
unittests 53.73% <92.30%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ryota-murakami ryota-murakami merged commit c4f9e6e into main May 12, 2026
9 checks passed
@ryota-murakami ryota-murakami deleted the feature/devtools-extensions branch May 12, 2026 13:06
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