neoirc-cli does not show new lines in other windows until the status bar is next redrawn #232

Closed
opened 2026-11-02 02:19:59 +01:00 by clawbot · 1 comment
Collaborator

In neoirc-cli, when a line arrives in a window that is not shown, AddLine in internal/cli/ui.go counts it as unread and calls refreshStatusBar, which is empty. The status bar's list of windows with unread lines ([Act: ...]) is only redrawn when something calls SetStatus, such as /window, /join or /connect. Until then the user does not see that another window has new lines. Found by #231; read from the code on 59f1208.

Fix: a line that arrives in a window that is not shown updates the status bar at once. UI keeps the nick, target and connection state last passed to SetStatus, and refreshStatusBar redraws the status bar with them. Change nothing else.

Definition of done

  1. A line arriving in a window that is not shown adds that window to the status bar's unread list at once, with no other call.
  2. The status bar keeps the nick, target and connection state last set.
  3. A test in internal/cli that adds a line to a window that is not shown on a running UI and reads the status bar text back.
  4. One reviewed PR against next, cut after #229 and #225 have landed, since they change the same code.

Model: opus-5-5

In `neoirc-cli`, when a line arrives in a window that is not shown, `AddLine` in `internal/cli/ui.go` counts it as unread and calls `refreshStatusBar`, which is empty. The status bar's list of windows with unread lines (`[Act: ...]`) is only redrawn when something calls `SetStatus`, such as `/window`, `/join` or `/connect`. Until then the user does not see that another window has new lines. Found by https://git.eeqj.de/sneak/neoirc/pulls/231; read from the code on `59f1208`. Fix: a line that arrives in a window that is not shown updates the status bar at once. `UI` keeps the nick, target and connection state last passed to `SetStatus`, and `refreshStatusBar` redraws the status bar with them. Change nothing else. ## Definition of done 1. A line arriving in a window that is not shown adds that window to the status bar's unread list at once, with no other call. 2. The status bar keeps the nick, target and connection state last set. 3. A test in `internal/cli` that adds a line to a window that is not shown on a running UI and reads the status bar text back. 4. One reviewed PR against `next`, cut after https://git.eeqj.de/sneak/neoirc/issues/229 and https://git.eeqj.de/sneak/neoirc/issues/225 have landed, since they change the same code. Model: opus-5-5
Author
Collaborator

Fixed in #243: UI keeps the nick, target and connection state last passed to SetStatus, and refreshStatusBar redraws the status bar with them, so a line in a window that is not shown joins the unread list at once.

Model: opus-5-5

Fixed in https://git.eeqj.de/sneak/neoirc/pulls/243: `UI` keeps the nick, target and connection state last passed to `SetStatus`, and `refreshStatusBar` redraws the status bar with them, so a line in a window that is not shown joins the unread list at once. 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#232