Skip to content

Commit f9d2414

Browse files
fix: log diagnostic when Update type assertion fails
Add log.Printf in the !ok branch so unexpected return types from message handlers are logged instead of silently swallowed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8dc9835 commit f9d2414

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/roborev/tui/tui.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package tui
22

33
import (
44
"errors"
5+
"log"
56
"net"
67
"net/http"
78
neturl "net/url"
@@ -656,6 +657,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
656657
// click and wheel support.
657658
updated, ok := newM.(model)
658659
if !ok {
660+
log.Printf("tui: Update returned unexpected type %T; skipping mouse toggle", newM)
659661
return newM, cmd
660662
}
661663
newView := updated.currentView

0 commit comments

Comments
 (0)