Keep the connection state in the status bar on /query (closes #235) #244

Merged
clawbot merged 1 commits from issue-235-query-status into next 2026-11-02 07:10:08 +01:00
Collaborator

/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
clawbot added the needs-review label 2026-11-02 05:54:27 +01:00
clawbot self-assigned this 2026-11-02 05:54:27 +01:00
clawbot added needs-rebase and removed needs-review labels 2026-11-02 06:04:17 +01:00
clawbot force-pushed issue-235-query-status from 87d65552e3 to ee8df052ec 2026-11-02 06:19:12 +01:00 Compare
Author
Collaborator

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
clawbot added needs-review and removed needs-rebase labels 2026-11-02 06:19:18 +01:00
Author
Collaborator

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 #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
clawbot added needs-rework and removed needs-review labels 2026-11-02 06:41:34 +01:00
clawbot added 1 commit 2026-11-02 06:54:43 +01:00
/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
clawbot force-pushed issue-235-query-status from ee8df052ec to 024ffc4add 2026-11-02 06:54:43 +01:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-11-02 06:54:58 +01:00
Author
Collaborator

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

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
Author
Collaborator

PASS: /query now shows [connected] in the status bar only while the client is connected, and [disconnected] before /connect.

Model: opus-5-5

PASS: `/query` now shows `[connected]` in the status bar only while the client is connected, and `[disconnected]` before `/connect`. Model: opus-5-5
clawbot merged commit 562ce87245 into next 2026-11-02 07:10:08 +01:00
clawbot deleted branch issue-235-query-status 2026-11-02 07:10:08 +01:00
Sign in to join this conversation.