on main help sign in
fix(tui): panic (#1220)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>

commit4969c34d18747159dcdb2f6c8543afe3ef2c2e0d authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateSat 11 Oct 2025, 18:07 (1 year ago) parent7ac96ef
1 file changed+3−3
internal/tui/tui.go+3−3
internal/tui/tui.go+3−3
@@ -603,9 +603,9 @@ func (a *appModel) View() tea.View {
603603 view.Layer = canvas
604604 view.Cursor = cursor
605605 view.ProgressBar = tea.NewProgressBar(tea.ProgressBarNone, 0)
606− if a.app.CoderAgent.IsBusy() {
607− // use a random percentage to prevent the ghostty from hiding it after
608− // a timeout.
606+ if a.app != nil && a.app.CoderAgent != nil && a.app.CoderAgent.IsBusy() {
607+ // HACK: use a random percentage to prevent ghostty from hiding it
608+ // after a timeout.
609609 view.ProgressBar = tea.NewProgressBar(tea.ProgressBarIndeterminate, rand.Intn(100))
610610 }
611611 return view