@@ -89,8 +89,6 @@ func (a appModel) Init() tea.Cmd {
8989 cmd = a.status.Init()
9090 cmds = append(cmds, cmd)
9191
92− cmds = append(cmds, tea.EnableMouseAllMotion)
93−
9492 return tea.Batch(cmds...)
9593}
9694
@@ -104,9 +102,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
104102 case tea.KeyboardEnhancementsMsg:
105103 for id, page := range a.pages {
106104 m, pageCmd := page.Update(msg)
107− if model, ok := m.(util.Model); ok {
108− a.pages[id] = model
109− }
105+ a.pages[id] = m
110106
111107 if pageCmd != nil {
112108 cmds = append(cmds, pageCmd)
@@ -234,9 +230,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
234230
235231 // Forward to view.
236232 updated, itemCmd := item.Update(msg)
237− if model, ok := updated.(util.Model); ok {
238− a.pages[a.currentPage] = model
239− }
233+ a.pages[a.currentPage] = updated
240234
241235 return a, itemCmd
242236 case pubsub.Event[permission.PermissionRequest]:
@@ -263,9 +257,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
263257
264258 a.isConfigured = config.HasInitialDataConfig()
265259 updated, pageCmd := item.Update(msg)
266− if model, ok := updated.(util.Model); ok {
267− a.pages[a.currentPage] = model
268− }
260+ a.pages[a.currentPage] = updated
269261
270262 cmds = append(cmds, pageCmd)
271263 return a, tea.Batch(cmds...)
@@ -285,9 +277,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
285277 }
286278
287279 updated, pageCmd := item.Update(msg)
288− if model, ok := updated.(util.Model); ok {
289− a.pages[a.currentPage] = model
290− }
280+ a.pages[a.currentPage] = updated
291281
292282 cmds = append(cmds, pageCmd)
293283 }
@@ -307,9 +297,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
307297 }
308298
309299 updated, pageCmd := item.Update(msg)
310− if model, ok := updated.(util.Model); ok {
311− a.pages[a.currentPage] = model
312− }
300+ a.pages[a.currentPage] = updated
313301
314302 cmds = append(cmds, pageCmd)
315303 }
@@ -324,9 +312,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
324312 }
325313
326314 updated, cmd := item.Update(msg)
327− if model, ok := updated.(util.Model); ok {
328− a.pages[a.currentPage] = model
329− }
315+ a.pages[a.currentPage] = updated
330316
331317 if a.dialog.HasDialogs() {
332318 u, dialogCmd := a.dialog.Update(msg)
@@ -362,9 +348,7 @@ func (a *appModel) handleWindowResize(width, height int) tea.Cmd {
362348 // Update the current view.
363349 for p, page := range a.pages {
364350 updated, pageCmd := page.Update(tea.WindowSizeMsg{Width: width, Height: height})
365− if model, ok := updated.(util.Model); ok {
366− a.pages[p] = model
367− }
351+ a.pages[p] = updated
368352
369353 cmds = append(cmds, pageCmd)
370354 }
@@ -467,9 +451,7 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
467451 }
468452
469453 updated, cmd := item.Update(msg)
470− if model, ok := updated.(util.Model); ok {
471− a.pages[a.currentPage] = model
472− }
454+ a.pages[a.currentPage] = updated
473455 return cmd
474456 }
475457}
@@ -573,6 +555,9 @@ func (a *appModel) View() tea.View {
573555
574556 view.Layer = canvas
575557 view.Cursor = cursor
558+ view.MouseMode = tea.MouseModeCellMotion
559+ view.AltScreen = true
560+
576561 if a.app != nil && a.app.AgentCoordinator != nil && a.app.AgentCoordinator.IsBusy() {
577562 // HACK: use a random percentage to prevent ghostty from hiding it
578563 // after a timeout.