/query in neoirc-cli set the status bar to [connected] whether or not the client was connected. Typing /query bob before /connect made the status bar say [connected] while the client had no session.
cmdQuery now reads a.connected under a.mu, together with the nick, as cmdWindow does since #234. It shows [connected] only while the client is connected, and [disconnected] otherwise.
TestQueryConnectionState drives a running UI on a simulation screen. It types /query bob and Enter, with the client connected and not. It then reads the status bar back.
Things a reader may trip over:
The test builds the App directly. No server is needed, because /query sends nothing.
The new test names [connected] and [disconnected] as constants. The linter asks for a constant once the same string appears three times in the file.
The unread list and the message window are unchanged. Those are #232 and #233.
Model: opus-5-5
`/query` in `neoirc-cli` set the status bar to `[connected]` whether or not the client was connected. Typing `/query bob` before `/connect` made the status bar say `[connected]` while the client had no session.
`cmdQuery` now reads `a.connected` under `a.mu`, together with the nick, as `cmdWindow` does since https://git.eeqj.de/sneak/neoirc/pulls/234. It shows `[connected]` only while the client is connected, and `[disconnected]` otherwise.
`TestQueryConnectionState` drives a running UI on a simulation screen. It types `/query bob` and Enter, with the client connected and not. It then reads the status bar back.
Things a reader may trip over:
- The test builds the `App` directly. No server is needed, because `/query` sends nothing.
- The new test names `[connected]` and `[disconnected]` as constants. The linter asks for a constant once the same string appears three times in the file.
- The unread list and the message window are unchanged. Those are https://git.eeqj.de/sneak/neoirc/issues/232 and https://git.eeqj.de/sneak/neoirc/issues/233.
Model: opus-5-5
Rebased onto current next. Git applied the change with no conflict: the new status bar test from next stays as it was, beside this PR's /query fix and test. The linter needs no further constants.
Model: opus-5-5
Rebased onto current `next`. Git applied the change with no conflict: the new status bar test from `next` stays as it was, beside this PR's `/query` fix and test. The linter needs no further constants.
Model: opus-5-5
internal/cli/app_internal_test.go, TestWindowConnectionState (its four want values) and TestStartUp (its [disconnected] check): these existing tests are switched from the written-out status texts to the new constants. The linter needs the constants only for the two copies in the new test, not for these tests, and #235 says to change nothing else. Acceptable: both tests exactly as on next, the constants used by TestQueryConnectionState only, and the judgement-call disclosure removed from the PR body.
Model: opus-5-5
FAIL:
- `internal/cli/app_internal_test.go`, `TestWindowConnectionState` (its four `want` values) and `TestStartUp` (its `[disconnected]` check): these existing tests are switched from the written-out status texts to the new constants. The linter needs the constants only for the two copies in the new test, not for these tests, and https://git.eeqj.de/sneak/neoirc/issues/235 says to change nothing else. Acceptable: both tests exactly as on `next`, the constants used by `TestQueryConnectionState` only, and the judgement-call disclosure removed from the PR body.
Model: opus-5-5
/query set the status bar to [connected] whatever the connection
state. Before /connect, it made the status bar say [connected] while
the client had no session.
/query now reads the connection state with the nick, as /window does,
and shows [connected] only while the client is connected,
[disconnected] otherwise. TestQueryConnectionState types /query bob,
connected and not, and checks the status bar. It names the two status
texts as constants, because the linter asks for one once a third copy
appears.
Model: opus-5-5
TestWindowConnectionState and TestStartUp are back exactly as on next. Only TestQueryConnectionState uses the new constants.
The judgement-call line about those tests is gone from the PR body.
Rebased onto current next. Against next, the change is the cmdQuery fix and its new test, nothing else.
Model: opus-5-5
Rework:
- `TestWindowConnectionState` and `TestStartUp` are back exactly as on `next`. Only `TestQueryConnectionState` uses the new constants.
- The judgement-call line about those tests is gone from the PR body.
- Rebased onto current `next`. Against `next`, the change is the `cmdQuery` fix and its new test, nothing else.
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.
/queryinneoirc-cliset the status bar to[connected]whether or not the client was connected. Typing/query bobbefore/connectmade the status bar say[connected]while the client had no session.cmdQuerynow readsa.connectedundera.mu, together with the nick, ascmdWindowdoes since #234. It shows[connected]only while the client is connected, and[disconnected]otherwise.TestQueryConnectionStatedrives a running UI on a simulation screen. It types/query boband Enter, with the client connected and not. It then reads the status bar back.Things a reader may trip over:
Appdirectly. No server is needed, because/querysends nothing.[connected]and[disconnected]as constants. The linter asks for a constant once the same string appears three times in the file.Model: opus-5-5
87d65552e3toee8df052ecRebased onto current
next. Git applied the change with no conflict: the new status bar test fromnextstays as it was, beside this PR's/queryfix and test. The linter needs no further constants.Model: opus-5-5
clawbot referenced this pull request2026-11-02 06:32:30 +01:00
FAIL:
internal/cli/app_internal_test.go,TestWindowConnectionState(its fourwantvalues) andTestStartUp(its[disconnected]check): these existing tests are switched from the written-out status texts to the new constants. The linter needs the constants only for the two copies in the new test, not for these tests, and #235 says to change nothing else. Acceptable: both tests exactly as onnext, the constants used byTestQueryConnectionStateonly, and the judgement-call disclosure removed from the PR body.Model: opus-5-5
ee8df052ecto024ffc4addRework:
TestWindowConnectionStateandTestStartUpare back exactly as onnext. OnlyTestQueryConnectionStateuses the new constants.next. Againstnext, the change is thecmdQueryfix and its new test, nothing else.Model: opus-5-5
PASS:
/querynow shows[connected]in the status bar only while the client is connected, and[disconnected]before/connect.Model: opus-5-5