Keep the web tab the user reads, and show a kick in the Server tab (closes #195) #199

Merged
clawbot merged 1 commits from issue-195-web-tab-close into next 2026-10-27 05:52:49 +01:00
Collaborator

Closes #195.

removeChannelTab made the Server tab active whenever it closed a channel's tab. A part or kick from another client moved the user off the tab they were reading.

It now finds the tab the user was reading by its name among the remaining tabs and keeps it active. Only when that was the closed tab does the Server tab show. As in joinChannel, the active tab is set inside the setTabs update, so both see the newest values.

When the kicked nick is the user's own, the kick line also goes into the Server tab, which counts it as unread. That copy's id is the event's id plus -server, because addMessage drops an id it has already seen.

How each item was checked: a headless browser drove the web client of this branch, and of next, against a local neoircd. A second client of the same session sent parts; a second user kicked.

  • Item 1: parts and kicks of other channels, while a channel or a DM was being read, left the view in place; on next it moved to the Server tab.
  • Item 2: /part, the close button and the other client's part, each on the channel being read, showed the Server tab.
  • Item 3: each kick showed once in the Server tab, with kicker, channel and reason; on next it did not.

Disclosures:

  • No tests added: the web client has no test setup.
  • Judgement call: the close button on a tab the user is not reading now leaves the view where it is; on next it showed the Server tab.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/neoirc/issues/195. `removeChannelTab` made the Server tab active whenever it closed a channel's tab. A part or kick from another client moved the user off the tab they were reading. It now finds the tab the user was reading by its name among the remaining tabs and keeps it active. Only when that was the closed tab does the Server tab show. As in `joinChannel`, the active tab is set inside the `setTabs` update, so both see the newest values. When the kicked nick is the user's own, the kick line also goes into the Server tab, which counts it as unread. That copy's id is the event's id plus `-server`, because `addMessage` drops an id it has already seen. How each item was checked: a headless browser drove the web client of this branch, and of `next`, against a local `neoircd`. A second client of the same session sent parts; a second user kicked. - Item 1: parts and kicks of other channels, while a channel or a DM was being read, left the view in place; on `next` it moved to the Server tab. - Item 2: `/part`, the close button and the other client's part, each on the channel being read, showed the Server tab. - Item 3: each kick showed once in the Server tab, with kicker, channel and reason; on `next` it did not. Disclosures: - No tests added: the web client has no test setup. - Judgement call: the close button on a tab the user is not reading now leaves the view where it is; on `next` it showed the Server tab. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 05:22:41 +01:00
clawbot self-assigned this 2026-10-27 05:22:41 +01:00
clawbot added 1 commit 2026-10-27 05:22:41 +01:00
removeChannelTab made the Server tab active whenever it closed a
channel's tab. When a part or kick came from another client, the user
lost the channel they were reading.

It now finds the tab the user was reading by its name among the
remaining tabs and keeps it active. Only when that was the closed tab
does the Server tab show.

When the kicked nick is the user's own, the kick line also goes into
the Server tab, which counts it as unread. That copy carries the
event's id with "-server" added, since addMessage drops an id it has
already seen.

Model: opus-5-5
Author
Collaborator

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

  • Judgement call: the close button on a tab the user is not reading now leaves the view where it is; I took this as following the issue's rule that only closing the tab being read shows the Server tab, not a defect.
  • Judgement call: the PR body runs slightly over 250 words; I took the hand-check write-up the issue asks for as the reason, not a finding.

Model: opus-5-5

PASS: the change does what https://git.eeqj.de/sneak/neoirc/issues/195 asks, in a small and plain diff. - Judgement call: the close button on a tab the user is not reading now leaves the view where it is; I took this as following the issue's rule that only closing the tab being read shows the Server tab, not a defect. - Judgement call: the PR body runs slightly over 250 words; I took the hand-check write-up the issue asks for as the reason, not a finding. Model: opus-5-5
clawbot merged commit 2331c15aad into next 2026-10-27 05:52:49 +01:00
clawbot deleted branch issue-195-web-tab-close 2026-10-27 05:52:49 +01:00
Sign in to join this conversation.