fix(onboarding): fix onboarding screen freezing when on click on it
To reproduce:
* `rm -rf ~/.config/crush; rm -rf ~/.local/share/crush`
* Open `crush` on onboarding
* Notice how you can navigate using arrows, filter, etc
* Click on the screen
* Not the onboarding screen will stop processing events properly
(can't navigate, filter, choose model, etc)
Closes #812
Follow-up of #817
commit4c8d4a5ce0a1161d49cd6c8fcd68434fa7f311a3
authorAndrey Nering <andreynering@users.noreply.github.com>
dateTue 19 Aug 2025, 11:49 (1 year ago)
parentfc829ac
internal/tui/page/chat/chat.go+6
@@ -177,6 +177,9 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
177177 }
178178 return p, nil
179179 case tea.MouseClickMsg:
180+ if p.isOnboarding {
181+ return p, nil
182+ }
180183 if p.compact {
181184 msg.Y -= 1
182185 }
@@ -203,6 +206,9 @@ func (p *chatPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
203206 }
204207 return p, nil
205208 case tea.MouseReleaseMsg:
209+ if p.isOnboarding {
210+ return p, nil
211+ }
206212 if p.compact {
207213 msg.Y -= 1
208214 }