L0: IME × controlled input パターンを規約格上げ(CLAUDE.md / sensors / IOS-SAFARI-NOTES) - #39
Merged
Merged
Conversation
PR #37 (SearchBar) が docs/IOS-SAFARI-NOTES.md §1 で明文化されていた controlled input × iOS Safari IME の禁忌パターンを再発した件を受け、 事例集レベルから規約レベルへ格上げする。 - CLAUDE.md「コーディング規約」: ユーザー入力 input/textarea は uncontrolled (`defaultValue`) パターンを既定とする旨を明記。 外部値流し込みの推奨パターン(key 再マウント / ref imperative)と 例外条件(type="number" 等の非 IME 入力)も併記 - CLAUDE.md「禁止事項」: IME を伴う controlled 入力パターンを明示禁止に追加 - sensors/inferential.md §5「技術パターン整合チェック」を新設し、 L1 自己検証で新規 input が uncontrolled になっているかを目視確認する経路を確立 - docs/IOS-SAFARI-NOTES.md §1 冒頭に規約格上げ済みの cross-reference を追加し、 「該当箇所(修正済み)」に SearchBar (PR #37) を追記、履歴に PR #37 を追加 SPEC.md / DONT.md / REGIME.md 変更なし。新たな技術依存追加なし。 typecheck / lint / 228 tests 全て通過。 https://claude.ai/code/session_01NwewRBjFDBUN6Xgn8TJMDK
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Documentation-only PR promoting the "IME × controlled input" anti-pattern from a case-study note to a project-wide convention, after a recurrence in PR #37 (SearchBar). Adds rule entries in CLAUDE.md (coding rules + prohibitions), a new L1 self-check section in sensors/inferential.md, and cross-reference/history updates in docs/IOS-SAFARI-NOTES.md. No code changes.
Changes:
- Add uncontrolled-input default rule and explicit prohibition of controlled IME inputs in
CLAUDE.md, with cross-reference to iOS Safari notes. - New §5 in
sensors/inferential.mdlisting 3 visual-check items for input-pattern compliance. - Add upgrade banner, SearchBar entry, and 2026-05-18 history line in
docs/IOS-SAFARI-NOTES.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| CLAUDE.md | Adds uncontrolled-input rule under coding rules and matching prohibition entry. |
| sensors/inferential.md | Adds §5 technical-pattern compliance checklist for input UIs. |
| docs/IOS-SAFARI-NOTES.md | Adds rule-promotion callout, SearchBar entry to fixed list, and history entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
背景
直前の PR #37 (SearchBar) で、
docs/IOS-SAFARI-NOTES.md§1 に既に明文化されていた「IME × controlled input は壊れる」パターンの再発が発覚した。事例集レベルの記述だけでは新規 input を追加するたびに踏み抜くリスクが残るため、L0 として規約レベルへ格上げする。並走して提示した「中: スクロール容器 × 座標系規約」「低: PATTERNS.md 整備」「却下: 自動テスト強化」のうち、コスト最小・効果最大の「高」のみを本 PR スコープとする。
変更内容
CLAUDE.md
defaultValue) パターンを既定とする旨を追加。理由(iOS Safari IME 競合)/ 外部値流し込みの推奨パターン(key再マウント or ref imperative)/ 例外条件(type="number"等の非 IME 入力)を併記docs/IOS-SAFARI-NOTES.md§1 へ cross-reference)sensors/inferential.md
docs/IOS-SAFARI-NOTES.md
SearchBar(PR fix(search): SearchBar を uncontrolled 化して iOS Safari × IME 競合を解消 #37) を追記検証 (§7.4 自己検証)
CLAUDE.md↔docs/IOS-SAFARI-NOTES.md↔sensors/inferential.md§5)はいずれも実在の見出しを指すnpm run lint/npm test(228 件) は通過確認済SPEC 整合
https://claude.ai/code/session_01NwewRBjFDBUN6Xgn8TJMDK
Generated by Claude Code