mirror of
https://github.com/wu736139669/hapi.git
synced 2026-12-04 06:57:55 +00:00
ChatView rebuilt SessionConfigView (and a fresh SessionConfigModel) on every streaming update because the popover content closure lived in the toolbar body. That allocation churn made a long session feel laggy with the sheet open, and replacing the sheet content reset its @State detent, so scrolling up snapped the sheet back down and rescaled the chat behind it. - Own the SessionConfigModel and selected detent in ChatView so they survive body updates. - Host the popover content once instead of rebuilding it per update. - Make the sheet's scroll view own the gesture (presentationContentInteraction(.scrolls)) so reaching the top does not resize/collapse the sheet. Verified: iOS simulator build; SessionConfigPresentationTests pass. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Code <noreply@anthropic.com>