renderStatusBar in internal/cli/ui.go writes the connection state in square brackets, as [disconnected] or [connected]. The status bar has colour tags turned on, and tview v0.42.0 reads a word in square brackets as a colour name. It drops [disconnected] and [connected] as unknown colours, so the status bar never shows the connection state.
A throwaway test called SetStatus with disconnected on a running UI. The status bar text it read back was erin [0:(status)].
Found while working on #226, whose definition of done expects disconnected in the status bar at start-up. #225 changes which state the same text shows.
Model: opus-5-5
`renderStatusBar` in `internal/cli/ui.go` writes the connection state in square brackets, as `[disconnected]` or `[connected]`. The status bar has colour tags turned on, and `tview` v0.42.0 reads a word in square brackets as a colour name. It drops `[disconnected]` and `[connected]` as unknown colours, so the status bar never shows the connection state.
A throwaway test called `SetStatus` with `disconnected` on a running `UI`. The status bar text it read back was ` erin [0:(status)] `.
Found while working on https://git.eeqj.de/sneak/neoirc/issues/226, whose definition of done expects `disconnected` in the status bar at start-up. https://git.eeqj.de/sneak/neoirc/issues/225 changes which state the same text shows.
Model: opus-5-5
Plan: confirmed from the code on fe734af. renderStatusBar in internal/cli/ui.go writes the connection state as [connected] or [disconnected] into a text view with colour tags turned on, so tview takes it for a colour name and drops it. This goes right after #226 and before #225, whose test needs a status bar that shows the state.
Fix: the status bar shows the connection state, in the same place and brackets as the code means it to. Use tview's own way of writing a literal bracket, and apply it to every part of the status bar that holds brackets or text the user or the server chose (nick, target, buffer names). Change nothing else.
Definition of done
At start-up the status bar shows disconnected; while connected it shows connected.
A nick, target or buffer name with square brackets shows in the status bar as it is.
A test in internal/cli that reads the status bar text back from a running UI on a tcell simulation screen, for items 1 and 2.
One reviewed PR against next, cut after #226 has landed.
Model: opus-5-5
Plan: confirmed from the code on `fe734af`. `renderStatusBar` in `internal/cli/ui.go` writes the connection state as `[connected]` or `[disconnected]` into a text view with colour tags turned on, so `tview` takes it for a colour name and drops it. This goes right after https://git.eeqj.de/sneak/neoirc/issues/226 and before https://git.eeqj.de/sneak/neoirc/issues/225, whose test needs a status bar that shows the state.
Fix: the status bar shows the connection state, in the same place and brackets as the code means it to. Use `tview`'s own way of writing a literal bracket, and apply it to every part of the status bar that holds brackets or text the user or the server chose (nick, target, buffer names). Change nothing else.
## Definition of done
1. At start-up the status bar shows `disconnected`; while connected it shows `connected`.
2. A nick, target or buffer name with square brackets shows in the status bar as it is.
3. A test in `internal/cli` that reads the status bar text back from a running UI on a `tcell` simulation screen, for items 1 and 2.
4. One reviewed PR against `next`, cut after https://git.eeqj.de/sneak/neoirc/issues/226 has landed.
Model: opus-5-5
Built in #231. The status bar line now goes through tview.Escape, so it shows [disconnected] at start-up, [connected] while connected, and nicks such as erin[away] in full.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/neoirc/pulls/231. The status bar line now goes through `tview.Escape`, so it shows `[disconnected]` at start-up, `[connected]` while connected, and nicks such as `erin[away]` in full.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
renderStatusBarininternal/cli/ui.gowrites the connection state in square brackets, as[disconnected]or[connected]. The status bar has colour tags turned on, andtviewv0.42.0 reads a word in square brackets as a colour name. It drops[disconnected]and[connected]as unknown colours, so the status bar never shows the connection state.A throwaway test called
SetStatuswithdisconnectedon a runningUI. The status bar text it read back waserin [0:(status)].Found while working on #226, whose definition of done expects
disconnectedin the status bar at start-up. #225 changes which state the same text shows.Model: opus-5-5
Plan: confirmed from the code on
fe734af.renderStatusBarininternal/cli/ui.gowrites the connection state as[connected]or[disconnected]into a text view with colour tags turned on, sotviewtakes it for a colour name and drops it. This goes right after #226 and before #225, whose test needs a status bar that shows the state.Fix: the status bar shows the connection state, in the same place and brackets as the code means it to. Use
tview's own way of writing a literal bracket, and apply it to every part of the status bar that holds brackets or text the user or the server chose (nick, target, buffer names). Change nothing else.Definition of done
disconnected; while connected it showsconnected.internal/clithat reads the status bar text back from a running UI on atcellsimulation screen, for items 1 and 2.next, cut after #226 has landed.Model: opus-5-5
clawbot referenced this issue2026-11-02 02:10:12 +01:00
Built in #231. The status bar line now goes through
tview.Escape, so it shows[disconnected]at start-up,[connected]while connected, and nicks such aserin[away]in full.Model: opus-5-5