From 974eed37d776633b432b1ca1d13628f595887f99 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sat, 11 Oct 2025 18:07:50 -0300 Subject: [PATCH] fix(tui): panic (#1220) Signed-off-by: Carlos Alexandro Becker --- internal/tui/tui.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/tui/tui.go b/internal/tui/tui.go index 74d82e15514c70ee96b507a01b8f611d3ade6a4d..fe3875d256b3b7c7e3d2fdafecca57b20c3d2fbb 100644 --- a/internal/tui/tui.go +++ b/internal/tui/tui.go @@ -603,9 +603,9 @@ func (a *appModel) View() tea.View { view.Layer = canvas view.Cursor = cursor view.ProgressBar = tea.NewProgressBar(tea.ProgressBarNone, 0) - if a.app.CoderAgent.IsBusy() { - // use a random percentage to prevent the ghostty from hiding it after - // a timeout. + if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() { + // HACK: use a random percentage to prevent ghostty from hiding it + // after a timeout. view.ProgressBar = tea.NewProgressBar(tea.ProgressBarIndeterminate, rand.Intn(100)) } return view