neoirc-cli hangs at startup before it shows its screen #226

Closed
opened 2026-11-02 00:23:35 +01:00 by clawbot · 2 comments
Collaborator

Run in internal/cli/app.go calls SetStatus and AddStatus before it starts the UI with ui.Run. Each of them calls QueueUpdateDraw from tview. In tview v0.42.0, that call waits until the event loop has run the update. The event loop has not started yet, so the first call never returns, and neoirc-cli stops before it shows its screen.

A throwaway test that called SetStatus on a new UI before Run did not return within 2 seconds.

Found while working on #223, which has the same cause.

Model: opus-5-5

`Run` in `internal/cli/app.go` calls `SetStatus` and `AddStatus` before it starts the UI with `ui.Run`. Each of them calls `QueueUpdateDraw` from `tview`. In `tview` v0.42.0, that call waits until the event loop has run the update. The event loop has not started yet, so the first call never returns, and `neoirc-cli` stops before it shows its screen. A throwaway test that called `SetStatus` on a new `UI` before `Run` did not return within 2 seconds. Found while working on https://git.eeqj.de/sneak/neoirc/issues/223, which has the same cause. Model: opus-5-5
Author
Collaborator

Plan: confirmed on next and on main. Run in internal/cli/app.go calls SetStatus and AddStatus before ui.Run starts the event loop, and both wait for that loop, so neoirc-cli never shows its screen. This comes right after #223, which changes the same files, and before the other open bugs, since the client cannot start at all.

Fix: the smallest plain change in internal/cli so that the start-up status bar and the two welcome lines are shown without waiting on an event loop that has not started. Change nothing else.

Definition of done

  1. neoirc-cli starts and shows its screen, with the status bar showing disconnected and the two welcome lines in the status window.
  2. A test in internal/cli runs the client's start-up path on a tcell simulation screen, fails within a few seconds if the event loop never starts, and checks that the welcome lines are in the status window.
  3. One reviewed PR against next, cut after #223 has landed.

Model: opus-5-5

Plan: confirmed on `next` and on `main`. `Run` in `internal/cli/app.go` calls `SetStatus` and `AddStatus` before `ui.Run` starts the event loop, and both wait for that loop, so `neoirc-cli` never shows its screen. This comes right after https://git.eeqj.de/sneak/neoirc/issues/223, which changes the same files, and before the other open bugs, since the client cannot start at all. Fix: the smallest plain change in `internal/cli` so that the start-up status bar and the two welcome lines are shown without waiting on an event loop that has not started. Change nothing else. ## Definition of done 1. `neoirc-cli` starts and shows its screen, with the status bar showing `disconnected` and the two welcome lines in the status window. 2. A test in `internal/cli` runs the client's start-up path on a `tcell` simulation screen, fails within a few seconds if the event loop never starts, and checks that the welcome lines are in the status window. 3. One reviewed PR against `next`, cut after https://git.eeqj.de/sneak/neoirc/issues/223 has landed. Model: opus-5-5
Author
Collaborator

Fixed in #230: the start-up status bar and welcome lines now wait for the event loop on a goroutine, so Run reaches ui.Run. The status bar still does not show disconnected, for a separate reason filed as #229.

Model: opus-5-5

Fixed in https://git.eeqj.de/sneak/neoirc/pulls/230: the start-up status bar and welcome lines now wait for the event loop on a goroutine, so `Run` reaches `ui.Run`. The status bar still does not show `disconnected`, for a separate reason filed as https://git.eeqj.de/sneak/neoirc/issues/229. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#226