@@ -91,8 +91,6 @@ func (a appModel) Init() tea.Cmd {
9191 cmd = a.status.Init()
9292 cmds = append(cmds, cmd)
9393
94− cmds = append(cmds, tea.EnableMouseAllMotion)
95−
9694 return tea.Batch(cmds...)
9795}
9896
@@ -106,9 +104,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
106104 case tea.KeyboardEnhancementsMsg:
107105 for id, page := range a.pages {
108106 m, pageCmd := page.Update(msg)
109− if model, ok := m.(util.Model); ok {
110− a.pages[id] = model
111− }
107+ a.pages[id] = m
112108
113109 if pageCmd != nil {
114110 cmds = append(cmds, pageCmd)
@@ -232,9 +228,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
232228
233229 // Forward to view.
234230 updated, itemCmd := item.Update(msg)
235− if model, ok := updated.(util.Model); ok {
236− a.pages[a.currentPage] = model
237− }
231+ a.pages[a.currentPage] = updated
238232
239233 return a, itemCmd
240234 case pubsub.Event[permission.PermissionRequest]:
@@ -292,9 +286,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
292286
293287 a.isConfigured = config.HasInitialDataConfig()
294288 updated, pageCmd := item.Update(msg)
295− if model, ok := updated.(util.Model); ok {
296− a.pages[a.currentPage] = model
297− }
289+ a.pages[a.currentPage] = updated
298290
299291 cmds = append(cmds, pageCmd)
300292 return a, tea.Batch(cmds...)
@@ -314,9 +306,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
314306 }
315307
316308 updated, pageCmd := item.Update(msg)
317− if model, ok := updated.(util.Model); ok {
318− a.pages[a.currentPage] = model
319− }
309+ a.pages[a.currentPage] = updated
320310
321311 cmds = append(cmds, pageCmd)
322312 }
@@ -336,9 +326,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
336326 }
337327
338328 updated, pageCmd := item.Update(msg)
339− if model, ok := updated.(util.Model); ok {
340− a.pages[a.currentPage] = model
341− }
329+ a.pages[a.currentPage] = updated
342330
343331 cmds = append(cmds, pageCmd)
344332 }
@@ -353,9 +341,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
353341 }
354342
355343 updated, cmd := item.Update(msg)
356− if model, ok := updated.(util.Model); ok {
357− a.pages[a.currentPage] = model
358− }
344+ a.pages[a.currentPage] = updated
359345
360346 if a.dialog.HasDialogs() {
361347 u, dialogCmd := a.dialog.Update(msg)
@@ -391,9 +377,7 @@ func (a *appModel) handleWindowResize(width, height int) tea.Cmd {
391377 // Update the current view.
392378 for p, page := range a.pages {
393379 updated, pageCmd := page.Update(tea.WindowSizeMsg{Width: width, Height: height})
394− if model, ok := updated.(util.Model); ok {
395− a.pages[p] = model
396− }
380+ a.pages[p] = updated
397381
398382 cmds = append(cmds, pageCmd)
399383 }
@@ -496,9 +480,7 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
496480 }
497481
498482 updated, cmd := item.Update(msg)
499− if model, ok := updated.(util.Model); ok {
500− a.pages[a.currentPage] = model
501− }
483+ a.pages[a.currentPage] = updated
502484 return cmd
503485 }
504486}
@@ -602,6 +584,8 @@ func (a *appModel) View() tea.View {
602584
603585 view.Layer = canvas
604586 view.Cursor = cursor
587+ view.MouseMode = tea.MouseModeCellMotion
588+ view.AltScreen = true
605589 if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() {
606590 // HACK: use a random percentage to prevent ghostty from hiding it
607591 // after a timeout.