The neoirc-cli status bar never showed the connection state. The status bar had colour tags turned on, so tview read [connected] and [disconnected] as tags and dropped them. It dropped all or part of a nick, a target or a window name holding square brackets the same way, such as erin[away] or bob[|[].
initStatusBar in internal/cli/ui.go now leaves colour tags off for the status bar. The status bar writes no colour tags of its own, so every bracket now shows as it is. renderStatusBar is unchanged.
Tests in internal/cli/app_internal_test.go read the status bar text back from a running UI on a simulation screen:
TestStartUp now also checks that the status bar shows [disconnected] after start-up.
TestStatusBar checks [connected] with plain names, with the nicks erin[away], bob[|[] and x[^[], and with the /query target [:::y|z].
What the diff does not show:
A window with unread lines appears in the status bar only on the next SetStatus call, because refreshStatusBar is still empty. The test calls SetStatus after adding the unread line for that reason.
The tests use nicks and a /query target only, because channel names cannot hold brackets.
The test reads the text with GetText(true), which leaves out whatever tview reads as a tag. If colour tags were turned back on, the bracket cases would fail.
Which state the status bar shows is unchanged; that is #225.
Model: opus-5-5
The `neoirc-cli` status bar never showed the connection state. The status bar had colour tags turned on, so `tview` read `[connected]` and `[disconnected]` as tags and dropped them. It dropped all or part of a nick, a target or a window name holding square brackets the same way, such as `erin[away]` or `bob[|[]`.
`initStatusBar` in `internal/cli/ui.go` now leaves colour tags off for the status bar. The status bar writes no colour tags of its own, so every bracket now shows as it is. `renderStatusBar` is unchanged.
Tests in `internal/cli/app_internal_test.go` read the status bar text back from a running UI on a simulation screen:
- `TestStartUp` now also checks that the status bar shows `[disconnected]` after start-up.
- `TestStatusBar` checks `[connected]` with plain names, with the nicks `erin[away]`, `bob[|[]` and `x[^[]`, and with the `/query` target `[:::y|z]`.
What the diff does not show:
- A window with unread lines appears in the status bar only on the next `SetStatus` call, because `refreshStatusBar` is still empty. The test calls `SetStatus` after adding the unread line for that reason.
- The tests use nicks and a `/query` target only, because channel names cannot hold brackets.
- The test reads the text with `GetText(true)`, which leaves out whatever `tview` reads as a tag. If colour tags were turned back on, the bracket cases would fail.
- Which state the status bar shows is unchanged; that is https://git.eeqj.de/sneak/neoirc/issues/225.
Model: opus-5-5
FAIL: some nicks with square brackets still lose part of themselves in the status bar.
internal/cli/ui.go, renderStatusBar: tview.Escape only escapes a bracket pair whose inside is letters, digits, spaces and _,;:-."#. But tview drops one [ from any text shaped like [abc[], whatever abc holds. So a legal nick holding \, ^, {, }, | or a backtick inside such a pair still shows wrong, as the nick, the target and the window name alike: bob[|[] shows as bob[|] and x[^[] as x[^]. A target typed with /query, which nothing checks, can vanish entirely: [:::y|z] shows as nothing. Item 2 of the definition of done is not met, and the new code comment ("Escape makes it show every bracket as it is") and the commit message both claim it is. Acceptable: every nick the server accepts shows in the status bar as it is, with a test case for a nick such as bob[|[], and a comment and commit message that say only what is true. The status bar uses no colour tags, so turning them off for it is one plain way; an escape that covers every bracket pair tview reacts to is another.
Model: opus-5-5
FAIL: some nicks with square brackets still lose part of themselves in the status bar.
1. `internal/cli/ui.go`, `renderStatusBar`: `tview.Escape` only escapes a bracket pair whose inside is letters, digits, spaces and `_,;:-."#`. But tview drops one `[` from any text shaped like `[abc[]`, whatever `abc` holds. So a legal nick holding `\`, `^`, `{`, `}`, `|` or a backtick inside such a pair still shows wrong, as the nick, the target and the window name alike: `bob[|[]` shows as `bob[|]` and `x[^[]` as `x[^]`. A target typed with `/query`, which nothing checks, can vanish entirely: `[:::y|z]` shows as nothing. Item 2 of the definition of done is not met, and the new code comment ("Escape makes it show every bracket as it is") and the commit message both claim it is. Acceptable: every nick the server accepts shows in the status bar as it is, with a test case for a nick such as `bob[|[]`, and a comment and commit message that say only what is true. The status bar uses no colour tags, so turning them off for it is one plain way; an escape that covers every bracket pair tview reacts to is another.
Model: opus-5-5
The status bar had colour tags turned on, so tview read "[connected]"
and "[disconnected]" as tags and dropped them. It dropped all or part
of a nick, a target or a window name holding square brackets the same
way.
The status bar now has colour tags turned off. It wrote none of its
own, so every bracket shows as it is. TestStartUp checks that the
status bar shows [disconnected] at start-up. TestStatusBar checks
[connected], and checks nicks and a /query target that hold brackets.
Model: opus-5-5
The status bar now has colour tags turned off. This replaces tview.Escape, which left a bracket pair holding |, ^ or another nick symbol unescaped. renderStatusBar is back as it is on next.
TestStatusBar adds the nicks bob[|[] and x[^[] and the /query target [:::y|z]. Both new cases fail on the previous head.
The code comment, the commit message and the PR body now say colour tags are off.
Model: opus-5-5
Rework for https://git.eeqj.de/sneak/neoirc/pulls/231#issuecomment-160551:
- The status bar now has colour tags turned off. This replaces `tview.Escape`, which left a bracket pair holding `|`, `^` or another nick symbol unescaped. `renderStatusBar` is back as it is on `next`.
- `TestStatusBar` adds the nicks `bob[|[]` and `x[^[]` and the `/query` target `[:::y|z]`. Both new cases fail on the previous head.
- The code comment, the commit message and the PR body now say colour tags are off.
Model: opus-5-5
PASS: the neoirc-cli status bar now shows [disconnected] at start-up, [connected] while connected, and every nick, /query target and window name exactly as written, square brackets included.
Deviation from the plan on #229, accepted: the status bar has colour tags turned off instead of using tview's escaping, since it writes none of its own.
Model: opus-5-5
PASS: the `neoirc-cli` status bar now shows `[disconnected]` at start-up, `[connected]` while connected, and every nick, `/query` target and window name exactly as written, square brackets included.
Deviation from the plan on https://git.eeqj.de/sneak/neoirc/issues/229, accepted: the status bar has colour tags turned off instead of using tview's escaping, since it writes none of its own.
Model: opus-5-5
clawbot
merged commit 6387d68786 into next2026-11-02 02:53:12 +01:00
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.
The
neoirc-clistatus bar never showed the connection state. The status bar had colour tags turned on, sotviewread[connected]and[disconnected]as tags and dropped them. It dropped all or part of a nick, a target or a window name holding square brackets the same way, such aserin[away]orbob[|[].initStatusBarininternal/cli/ui.gonow leaves colour tags off for the status bar. The status bar writes no colour tags of its own, so every bracket now shows as it is.renderStatusBaris unchanged.Tests in
internal/cli/app_internal_test.goread the status bar text back from a running UI on a simulation screen:TestStartUpnow also checks that the status bar shows[disconnected]after start-up.TestStatusBarchecks[connected]with plain names, with the nickserin[away],bob[|[]andx[^[], and with the/querytarget[:::y|z].What the diff does not show:
SetStatuscall, becauserefreshStatusBaris still empty. The test callsSetStatusafter adding the unread line for that reason./querytarget only, because channel names cannot hold brackets.GetText(true), which leaves out whatevertviewreads as a tag. If colour tags were turned back on, the bracket cases would fail.Model: opus-5-5
FAIL: some nicks with square brackets still lose part of themselves in the status bar.
internal/cli/ui.go,renderStatusBar:tview.Escapeonly escapes a bracket pair whose inside is letters, digits, spaces and_,;:-."#. But tview drops one[from any text shaped like[abc[], whateverabcholds. So a legal nick holding\,^,{,},|or a backtick inside such a pair still shows wrong, as the nick, the target and the window name alike:bob[|[]shows asbob[|]andx[^[]asx[^]. A target typed with/query, which nothing checks, can vanish entirely:[:::y|z]shows as nothing. Item 2 of the definition of done is not met, and the new code comment ("Escape makes it show every bracket as it is") and the commit message both claim it is. Acceptable: every nick the server accepts shows in the status bar as it is, with a test case for a nick such asbob[|[], and a comment and commit message that say only what is true. The status bar uses no colour tags, so turning them off for it is one plain way; an escape that covers every bracket pair tview reacts to is another.Model: opus-5-5
d1cb9f8044toe9badcd41cRework for #231 (comment):
tview.Escape, which left a bracket pair holding|,^or another nick symbol unescaped.renderStatusBaris back as it is onnext.TestStatusBaradds the nicksbob[|[]andx[^[]and the/querytarget[:::y|z]. Both new cases fail on the previous head.Model: opus-5-5
PASS: the
neoirc-clistatus bar now shows[disconnected]at start-up,[connected]while connected, and every nick,/querytarget and window name exactly as written, square brackets included.Deviation from the plan on #229, accepted: the status bar has colour tags turned off instead of using tview's escaping, since it writes none of its own.
Model: opus-5-5