Repository navigation
Conversation
Co-Authored-By: Daiki Sato <d@sur33.com>
Contributor
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 57 minutes. View limit details
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. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
blog | 5745b25 | Commit Preview URL Branch Preview URL |
Nov 20 2026, 03:52 AM |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
テーマ切り替えのクライアント側スクリプトで、light と dark を別々に書いていた分岐を
THEMESを使う形にまとめました。動作は変えていません。Summary
src/components/ThemeToggle.astroのapplyTheme()とgetCurrentTheme()は、'dark'と'light'のそれぞれに同じ処理を書いていました。src/types/Theme.tsのTHEMESを使い、1つの流れにまとめています。isTheme()もTHEMES.some(...)で判定するようにし、テーマの一覧をTHEMESだけに置きました。classList.remove()に渡していた'theme-system'を外しました。このクラスを付けるコードは feat: テーマ切り替え追加 #447 からリポジトリのどこにもありません(git grep theme-systemが0件)。BaseLayout.astroのインラインスクリプトは変えていません。tests/unit/theme.test.tsを足し、isTheme()がlightとdarkだけを受け付けることを確かめます。変更前のTheme.tsでも変更後でも 7 件すべて通ります。動作の確認
テーマ切り替えの E2E(6 プロジェクトすべて)
pnpm exec playwright test tests/e2e/specs/theme.spec.tschromium、firefox、webkit、Mobile Chrome、Mobile Safari、Mobile Safari (Small screen) で、ライト OS とダーク OS の循環、リロード後の復元、localStorage が使えない場合、無効な保存値のフォールバックを確かめています。
chromium の E2E 全体
pnpm exec playwright test --project=chromium→70 passed, 2 skipped(コンポーネントの見た目のスナップショットを含む)ビルド結果の比較
mainとこのブランチをそれぞれpnpm run build:e2eでビルドし、dist/の HTML 48 ファイルを比べました。差分が出たのはヘッダーを持つ 46 ファイルで、どれもテーマ切り替えの<script type="module">1 行だけでした。それ以外の行はすべて同じです。pnpm run lintとpnpm run test:unitも通ります。試し方
確かめていないこと
Implemented in session Consolidate theme toggle light/dark branches
Review with Devin · Open in Devin Desktop