Replace polling-based model detection with event-driven Config.onModelChange() listener. Eliminates the duplicate banner / static-region remount glitch when switching models with /model.
Upstream PR
Why
Today we poll getCurrentModel() on a 1s interval to detect model changes. Upstream switched to an onModelChange event listener — better pattern, no polling, fixes the visible header flicker on /model.
Scope / effort
Medium. ~15-line diff on the core side; the conflict surface is AppContainer.tsx which has diverged significantly in our fork (we added recap, verbose, background-agent hooks, etc). Need careful merge around effect-hook order and dependencies.
Prerequisites
None — independent of recap polish, but would benefit from being done after the recap wrapper (issue above) since both touch AppContainer.
Links
Replace polling-based model detection with event-driven
Config.onModelChange()listener. Eliminates the duplicate banner / static-region remount glitch when switching models with/model.Upstream PR
fix(cli): refresh static header on model switchWhy
Today we poll
getCurrentModel()on a 1s interval to detect model changes. Upstream switched to anonModelChangeevent listener — better pattern, no polling, fixes the visible header flicker on/model.Scope / effort
Medium. ~15-line diff on the core side; the conflict surface is
AppContainer.tsxwhich has diverged significantly in our fork (we added recap, verbose, background-agent hooks, etc). Need careful merge around effect-hook order and dependencies.Prerequisites
None — independent of recap polish, but would benefit from being done after the recap wrapper (issue above) since both touch AppContainer.
Links