From 2c07e60c83909e8dd4199940567b51125fe5b60a Mon Sep 17 00:00:00 2001 From: Michael Chihlas Date: Sat, 7 Mar 2026 18:39:35 -0500 Subject: [PATCH] docs: add mobile scrollIntoView lesson (#52) to CLAUDE.md Co-Authored-By: Claude Opus 4.6 --- CLAUDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 1e08a8e8..341b070f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -335,6 +335,8 @@ navigate(`/trees/${newTree.id}/edit`) **51. AI model tier routing:** `config.py` has `AI_MODEL_TIERS` (fast/standard) and `ACTION_MODEL_MAP` mapping action types to tiers. Use `settings.get_model_for_action(action_type)` to resolve concrete model names. Model IDs must be valid — use alias form (`claude-sonnet-4-6`) not invented dated forms. +**52. Mobile scroll-to-top — use `scrollIntoView`, not `window.scrollTo`:** Mobile browsers (iOS Safari, Firefox Android) often ignore `window.scrollTo()`. Use a ref at the top of the page and call `ref.current.scrollIntoView({ behavior: 'smooth', block: 'start' })` instead. Trigger via `useEffect` on the state change (not inline with `setState`) so the DOM has committed before scrolling. + --- ## RBAC & Permissions