[BUG] Settings sections inherit scroll position from previously viewed section
Bug Details
Clear description of the bug: The settings sections (General, History, Models, etc.) all render inside one persistent scrollable container in App.tsx that never unmounts when switching sections. As a result, the scroll offset carries over from whichever section was scrolled last.
Steps to reproduce:
- Open Settings, go to the History tab
- Scroll down so History content is offset from the top
- Click on the Models tab (or any other section)
Expected behavior: Models (or the newly selected section) opens scrolled to the top.
Actual behavior: Models opens already scrolled down, inheriting the scroll offset from History, even though its content is different and may be shorter, making parts of it inaccessible or hidden above the fold.
Root cause: The scroll container (<div className="flex-1 overflow-y-auto"> around line 373 of src/App.tsx) wraps all settings section content via renderSettingsContent(), but since the container itself is never unmounted/remounted between sections, its scrollTop is preserved across switches.
I have a fix ready (adds a ref + useLayoutEffect to reset scroll to top on section change) and will open a PR referencing this issue.
Source: cjpais/Handy