@@ -91,8 +91,6 @@ func (a appModel) Init() tea.Cmd {
91 cmd = a.status.Init()
91 cmd = a.status.Init()
92 cmds = append(cmds, cmd)
92 cmds = append(cmds, cmd)
94− cmds = append(cmds, tea.EnableMouseAllMotion)
96 return tea.Batch(cmds...)
94 return tea.Batch(cmds...)
@@ -106,9 +104,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
106 case tea.KeyboardEnhancementsMsg:
104 case tea.KeyboardEnhancementsMsg:
107 for id, page := range a.pages {
105 for id, page := range a.pages {
108 m, pageCmd := page.Update(msg)
106 m, pageCmd := page.Update(msg)
109− if model, ok := m.(util.Model); ok {
110− a.pages[id] = model
107+ a.pages[id] = m
113 if pageCmd != nil {
109 if pageCmd != nil {
114 cmds = append(cmds, pageCmd)
110 cmds = append(cmds, pageCmd)
@@ -232,9 +228,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
233 // Forward to view.
229 // Forward to view.
234 updated, itemCmd := item.Update(msg)
230 updated, itemCmd := item.Update(msg)
235− if model, ok := updated.(util.Model); ok {
236− a.pages[a.currentPage] = model
231+ a.pages[a.currentPage] = updated
239 return a, itemCmd
233 return a, itemCmd
240 case pubsub.Event[permission.PermissionRequest]:
234 case pubsub.Event[permission.PermissionRequest]:
@@ -292,9 +286,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
293 a.isConfigured = config.HasInitialDataConfig()
287 a.isConfigured = config.HasInitialDataConfig()
294 updated, pageCmd := item.Update(msg)
288 updated, pageCmd := item.Update(msg)
295− if model, ok := updated.(util.Model); ok {
296− a.pages[a.currentPage] = model
289+ a.pages[a.currentPage] = updated
299 cmds = append(cmds, pageCmd)
291 cmds = append(cmds, pageCmd)
300 return a, tea.Batch(cmds...)
292 return a, tea.Batch(cmds...)
@@ -314,9 +306,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
316 updated, pageCmd := item.Update(msg)
308 updated, pageCmd := item.Update(msg)
317− if model, ok := updated.(util.Model); ok {
318− a.pages[a.currentPage] = model
309+ a.pages[a.currentPage] = updated
321 cmds = append(cmds, pageCmd)
311 cmds = append(cmds, pageCmd)
@@ -336,9 +326,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
338 updated, pageCmd := item.Update(msg)
328 updated, pageCmd := item.Update(msg)
339− if model, ok := updated.(util.Model); ok {
340− a.pages[a.currentPage] = model
329+ a.pages[a.currentPage] = updated
343 cmds = append(cmds, pageCmd)
331 cmds = append(cmds, pageCmd)
@@ -353,9 +341,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
355 updated, cmd := item.Update(msg)
343 updated, cmd := item.Update(msg)
356− if model, ok := updated.(util.Model); ok {
357− a.pages[a.currentPage] = model
344+ a.pages[a.currentPage] = updated
360 if a.dialog.HasDialogs() {
346 if a.dialog.HasDialogs() {
361 u, dialogCmd := a.dialog.Update(msg)
347 u, dialogCmd := a.dialog.Update(msg)
@@ -391,9 +377,7 @@ func (a *appModel) handleWindowResize(width, height int) tea.Cmd {
391 // Update the current view.
377 // Update the current view.
392 for p, page := range a.pages {
378 for p, page := range a.pages {
393 updated, pageCmd := page.Update(tea.WindowSizeMsg{Width: width, Height: height})
379 updated, pageCmd := page.Update(tea.WindowSizeMsg{Width: width, Height: height})
394− if model, ok := updated.(util.Model); ok {
395− a.pages[p] = model
380+ a.pages[p] = updated
398 cmds = append(cmds, pageCmd)
382 cmds = append(cmds, pageCmd)
@@ -496,9 +480,7 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
498 updated, cmd := item.Update(msg)
482 updated, cmd := item.Update(msg)
499− if model, ok := updated.(util.Model); ok {
500− a.pages[a.currentPage] = model
483+ a.pages[a.currentPage] = updated
502 return cmd
484 return cmd
@@ -602,6 +584,8 @@ func (a *appModel) View() tea.View {
603 view.Layer = canvas
585 view.Layer = canvas
604 view.Cursor = cursor
586 view.Cursor = cursor
587+ view.MouseMode = tea.MouseModeCellMotion
588+ view.AltScreen = true
605 if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() {
589 if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() {
606 // HACK: use a random percentage to prevent ghostty from hiding it
590 // HACK: use a random percentage to prevent ghostty from hiding it
607 // after a timeout.
591 // after a timeout.