@@ -89,8 +89,6 @@ func (a appModel) Init() tea.Cmd {
89 cmd = a.status.Init()
89 cmd = a.status.Init()
90 cmds = append(cmds, cmd)
90 cmds = append(cmds, cmd)
92− cmds = append(cmds, tea.EnableMouseAllMotion)
94 return tea.Batch(cmds...)
92 return tea.Batch(cmds...)
@@ -104,9 +102,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
104 case tea.KeyboardEnhancementsMsg:
102 case tea.KeyboardEnhancementsMsg:
105 for id, page := range a.pages {
103 for id, page := range a.pages {
106 m, pageCmd := page.Update(msg)
104 m, pageCmd := page.Update(msg)
107− if model, ok := m.(util.Model); ok {
108− a.pages[id] = model
105+ a.pages[id] = m
111 if pageCmd != nil {
107 if pageCmd != nil {
112 cmds = append(cmds, pageCmd)
108 cmds = append(cmds, pageCmd)
@@ -234,9 +230,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
235 // Forward to view.
231 // Forward to view.
236 updated, itemCmd := item.Update(msg)
232 updated, itemCmd := item.Update(msg)
237− if model, ok := updated.(util.Model); ok {
238− a.pages[a.currentPage] = model
233+ a.pages[a.currentPage] = updated
241 return a, itemCmd
235 return a, itemCmd
242 case pubsub.Event[permission.PermissionRequest]:
236 case pubsub.Event[permission.PermissionRequest]:
@@ -263,9 +257,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
264 a.isConfigured = config.HasInitialDataConfig()
258 a.isConfigured = config.HasInitialDataConfig()
265 updated, pageCmd := item.Update(msg)
259 updated, pageCmd := item.Update(msg)
266− if model, ok := updated.(util.Model); ok {
267− a.pages[a.currentPage] = model
260+ a.pages[a.currentPage] = updated
270 cmds = append(cmds, pageCmd)
262 cmds = append(cmds, pageCmd)
271 return a, tea.Batch(cmds...)
263 return a, tea.Batch(cmds...)
@@ -285,9 +277,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
287 updated, pageCmd := item.Update(msg)
279 updated, pageCmd := item.Update(msg)
288− if model, ok := updated.(util.Model); ok {
289− a.pages[a.currentPage] = model
280+ a.pages[a.currentPage] = updated
292 cmds = append(cmds, pageCmd)
282 cmds = append(cmds, pageCmd)
@@ -307,9 +297,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
309 updated, pageCmd := item.Update(msg)
299 updated, pageCmd := item.Update(msg)
310− if model, ok := updated.(util.Model); ok {
311− a.pages[a.currentPage] = model
300+ a.pages[a.currentPage] = updated
314 cmds = append(cmds, pageCmd)
302 cmds = append(cmds, pageCmd)
@@ -324,9 +312,7 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
326 updated, cmd := item.Update(msg)
314 updated, cmd := item.Update(msg)
327− if model, ok := updated.(util.Model); ok {
328− a.pages[a.currentPage] = model
315+ a.pages[a.currentPage] = updated
331 if a.dialog.HasDialogs() {
317 if a.dialog.HasDialogs() {
332 u, dialogCmd := a.dialog.Update(msg)
318 u, dialogCmd := a.dialog.Update(msg)
@@ -362,9 +348,7 @@ func (a *appModel) handleWindowResize(width, height int) tea.Cmd {
362 // Update the current view.
348 // Update the current view.
363 for p, page := range a.pages {
349 for p, page := range a.pages {
364 updated, pageCmd := page.Update(tea.WindowSizeMsg{Width: width, Height: height})
350 updated, pageCmd := page.Update(tea.WindowSizeMsg{Width: width, Height: height})
365− if model, ok := updated.(util.Model); ok {
366− a.pages[p] = model
351+ a.pages[p] = updated
369 cmds = append(cmds, pageCmd)
353 cmds = append(cmds, pageCmd)
@@ -467,9 +451,7 @@ func (a *appModel) handleKeyPressMsg(msg tea.KeyPressMsg) tea.Cmd {
469 updated, cmd := item.Update(msg)
453 updated, cmd := item.Update(msg)
470− if model, ok := updated.(util.Model); ok {
471− a.pages[a.currentPage] = model
454+ a.pages[a.currentPage] = updated
473 return cmd
455 return cmd
@@ -573,6 +555,9 @@ func (a *appModel) View() tea.View {
574 view.Layer = canvas
556 view.Layer = canvas
575 view.Cursor = cursor
557 view.Cursor = cursor
558+ view.MouseMode = tea.MouseModeCellMotion
559+ view.AltScreen = true
576 if a.app != nil && a.app.AgentCoordinator != nil && a.app.AgentCoordinator.IsBusy() {
561 if a.app != nil && a.app.AgentCoordinator != nil && a.app.AgentCoordinator.IsBusy() {
577 // HACK: use a random percentage to prevent ghostty from hiding it
562 // HACK: use a random percentage to prevent ghostty from hiding it
578 // after a timeout.
563 // after a timeout.