fix(header): ウォレットメニューが接続・切断の直後に開いたままになるのを直す - #543
Merged
Merged
Conversation
未接続と接続済みの両 branch が同じ位置に <details> を描くため、React が DOM 要素を 使い回し、open 属性が引き継がれていた。「接続」メニューから接続すると、接続後のメニュー (ログイン / 切断) が開いたまま本文に被さる。切断時も同様。 それぞれの <details> に別の key を付けて作り直す (閉じた状態で始まる)。 JS state は増やさない (native <details> の方針のまま)。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
何を直すか
ヘッダの「接続」メニューからウォレットを接続すると、接続後のメニュー (ログイン / 切断) が開いたまま本文に被さっていた (/agent 磨き上げの撮影中に発見・撮影スクリプトは
removeAttribute('open')で回避していた)。切断時も同様に「接続」メニューが開いたまま残る。原因:
WalletBadgeの未接続 / 接続済みの両 branch が同じ位置に<details>を描くので、React が DOM 要素を使い回し、open属性 (DOM 側の状態) が引き継がれる。対応: それぞれの
<details>に別のkeyを付けて作り直す。JS state は増やさない (native<details>の方針のまま)。可視文言の変更なし・money-path 不変・page ファイル変更なし。
検証
next dev -p 3142): 接続直後のheader details[open]= 0・スクショで本文に被りなしを確認scan.specの接続フローはメニューの開閉に依存しない (summary のアドレス表示だけを見ている) ことをコードで確認🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc