Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
React は action で送ったフォームを送信後に reset し、react-aria の Checkbox は reset でマウント時の値に戻そうとして onChange を呼ぶため、保存後に表示だけが ページを開いたときの状態に戻っていた。送信を onSubmit で受けて action を startTransition の中で呼び、フォームが reset されないようにする。 Closes #527 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXATvk9xNT9gCRz7KbvTGG
Owner
Author
|
/e2e |
cateiru
force-pushed
the
fix/527-ai-connection-permissions-reset
branch
from
November 9, 2026 14:54
915b9e6 to
09f405c
Compare
管理画面の VRT (reg-suit) 結果
|
VRT (reg-suit) 結果
差分があったページ
|
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-527-ai-connection-permissions-reset-canshi.cateiru-fe4.workers.dev (commit 09f405c)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
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.
概要
Closes #527
設定の「AIとの接続」で許可する範囲を保存すると、表示だけがページを開いたときのチェックに戻り、再読み込みすると正しい状態になる不具合を直しました。
原因
<form action={...}>で送ったフォームを、Action が終わったあとに自動で reset します。useToggle)はuseFormResetでフォームのresetイベントを受け、マウント時の値でsetSelectedを呼びます。setSelectedはonChangeを呼ぶため、isSelectedで制御しているチェックボックスでもMcpPermissionTreeFieldの state がマウント時の値に書き戻されます。変更点
McpPermissionsFormで送信をonSubmitで受け、preventDefaultしたうえでstartTransitionの中でformActionを呼ぶようにしました。React の自動 reset が走らないため、保存後も選んだチェックのまま表示されます。McpPermissionsForm.test.tsx)を追加しました。家の「書く」を付けて保存した後も、チェックが付いたままであることを確かめます。e2e/ai-connections.spec.ts)で、保存後に「保存する」ボタンが押せるようになるまで待ってから、再読み込み前のチェックの状態を確かめるようにしました。チェックが戻るのはトーストより後の、再検証が終わるタイミングのため、ボタンを待っています。確認したこと
--timeout=180000で実行しました。pnpm test・tsc --noEmit・pnpm lint(既存の警告のみ)が通ることを確認しました。範囲外
ExpenseForm・MemoRecordFormも<form action>の中でisSelectedの Checkbox を使っています。保存に成功すると別の画面へ遷移するため、AIとの接続ページでチェックを入れて「保存する」を押すとキャッシュが残ってチェックが外れた表示になる #527 の症状は出ません。入力エラーで戻ったときの reset は既存の別の話のため、今回は対象外にしました。デプロイ
マイグレーションはありません。マージ後の自動デプロイだけで反映されます。
🤖 Generated with Claude Code
https://claude.ai/code/session_01GXATvk9xNT9gCRz7KbvTGG