Close a channel's web tab when the user parts or is kicked (closes #185) #192

Merged
clawbot merged 1 commits from issue-185-web-part-kick into next 2026-10-27 03:11:34 +01:00
Collaborator

Closes #185.

A PART event from the user's own nick now closes the channel's tab. That holds whichever client of the session sent it: this web client, another one, or the IRC listener. The event writes no line and adds no unread count.

A KICK event is now written into the channel's tab as dave was kicked from #k by carol (reason). Before, it fell through to the Server tab, which showed only the reason. When the kicked nick is the user's own, the tab closes.

partChannel's tab removal moves into removeChannelTab, which partChannel and both events use.

The kicked nick comes from params[0], as the README's field table says. The README's KICK section shows only what a client sends.

Disclosures:

  • The web client has no test setup, so this adds no tests. I checked each definition-of-done item by hand. A headless browser drove the web client against a local neoircd, with a second HTTP client and an IRC listener connection on the same session. The same steps on unchanged next showed each bug.
  • Judgement call: a kicked user's kick line goes into the channel's tab before it closes, as the issue says. It shows only if that tab opens again.
  • Judgement call: as with partChannel, a tab closed by an event switches the view to the Server tab.
  • Existing on next, not touched: joinChannel can set the active tab past the last tab when the JOIN event arrives before the join request returns. Typed input is then dropped until a tab is clicked.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/neoirc/issues/185. A `PART` event from the user's own nick now closes the channel's tab. That holds whichever client of the session sent it: this web client, another one, or the IRC listener. The event writes no line and adds no unread count. A `KICK` event is now written into the channel's tab as `dave was kicked from #k by carol (reason)`. Before, it fell through to the Server tab, which showed only the reason. When the kicked nick is the user's own, the tab closes. `partChannel`'s tab removal moves into `removeChannelTab`, which `partChannel` and both events use. The kicked nick comes from `params[0]`, as the README's field table says. The README's `KICK` section shows only what a client sends. Disclosures: - The web client has no test setup, so this adds no tests. I checked each definition-of-done item by hand. A headless browser drove the web client against a local `neoircd`, with a second HTTP client and an IRC listener connection on the same session. The same steps on unchanged `next` showed each bug. - Judgement call: a kicked user's kick line goes into the channel's tab before it closes, as the issue says. It shows only if that tab opens again. - Judgement call: as with `partChannel`, a tab closed by an event switches the view to the Server tab. - Existing on `next`, not touched: `joinChannel` can set the active tab past the last tab when the `JOIN` event arrives before the join request returns. Typed input is then dropped until a tab is clicked. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 02:42:38 +01:00
clawbot self-assigned this 2026-10-27 02:42:38 +01:00
clawbot added 1 commit 2026-10-27 02:42:38 +01:00
A PART event from the user's own nick now closes the channel's tab,
whether this web client or another client of the session sent it. It
adds no message or unread count.

A KICK event now goes into the channel's tab as "nick was kicked from
channel by kicker (reason)", with the kicked nick taken from params.
Before, it fell through to the Server tab, which showed only the
reason. When the kicked nick is the user's own, the tab closes.

The tab removal that partChannel did moves into removeChannelTab,
which partChannel and both events share.

Model: opus-5-5
Author
Collaborator

PASS: the change does what #185 asks, in a small and plain diff.

  • Judgement call: a tab closed by a part or kick from another client moves the view to the Server tab even when the user was reading a different channel; I took this as the issue's "as partChannel does", not a defect.
  • Judgement call: a kicked user sees no notice outside the tab that closes; I took this as what the issue's definition of done asks, not a defect.

Model: opus-5-5

PASS: the change does what https://git.eeqj.de/sneak/neoirc/issues/185 asks, in a small and plain diff. - Judgement call: a tab closed by a part or kick from another client moves the view to the Server tab even when the user was reading a different channel; I took this as the issue's "as `partChannel` does", not a defect. - Judgement call: a kicked user sees no notice outside the tab that closes; I took this as what the issue's definition of done asks, not a defect. Model: opus-5-5
clawbot merged commit e1173eba9e into next 2026-10-27 03:11:34 +01:00
clawbot deleted branch issue-185-web-part-kick 2026-10-27 03:11:34 +01:00
Sign in to join this conversation.