Show the direct-message web tab even when other tabs change first (closes #202) #203

Merged
clawbot merged 1 commits from issue-202-web-dm-tab into next 2026-10-27 07:07:40 +01:00
Collaborator

Closes #202.

openDM took the direct-message tab's position from tabs, the tab list of the render its caller came from. /msg calls it only after the PRIVMSG request returns. If another client of the session joined or left a channel meanwhile, that position pointed at a different tab or past the last one. The next typed line then went to that channel, or was dropped.

openDM now finds the tab by name inside its own setTabs update and calls setActiveTab there, as joinChannel does. Preact runs that update at once, on the newest tab list.

How item 1 was checked: a headless browser drove this branch's web client, and next's, against a local neoircd, holding requests to force each order:

  • /msg with its response held until the server's copy of the message had added the tab;
  • /msg held while another client of the session joined a channel;
  • /msg to an open direct-message tab, held while another client parted a channel to its left;
  • /query for an open direct-message tab, from a channel tab after it;
  • a click on a nick in a channel's user list.

Each case read the active tab and checked that a line typed next reached the other user. On next the second case sent that line to the channel, and the third dropped it.

Disclosures:

  • No tests added: the web client has no test setup.
  • Partially verified: each order was forced by holding requests, not observed arising on its own.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/neoirc/issues/202. `openDM` took the direct-message tab's position from `tabs`, the tab list of the render its caller came from. `/msg` calls it only after the `PRIVMSG` request returns. If another client of the session joined or left a channel meanwhile, that position pointed at a different tab or past the last one. The next typed line then went to that channel, or was dropped. `openDM` now finds the tab by name inside its own `setTabs` update and calls `setActiveTab` there, as `joinChannel` does. Preact runs that update at once, on the newest tab list. How item 1 was checked: a headless browser drove this branch's web client, and `next`'s, against a local `neoircd`, holding requests to force each order: - `/msg` with its response held until the server's copy of the message had added the tab; - `/msg` held while another client of the session joined a channel; - `/msg` to an open direct-message tab, held while another client parted a channel to its left; - `/query` for an open direct-message tab, from a channel tab after it; - a click on a nick in a channel's user list. Each case read the active tab and checked that a line typed next reached the other user. On `next` the second case sent that line to the channel, and the third dropped it. Disclosures: - No tests added: the web client has no test setup. - Partially verified: each order was forced by holding requests, not observed arising on its own. Model: opus-5-5
clawbot added the needs-review label 2026-10-27 06:40:56 +01:00
clawbot self-assigned this 2026-10-27 06:40:56 +01:00
clawbot added 1 commit 2026-10-27 06:40:56 +01:00
openDM took the direct-message tab's position from the tab list of the
render its caller came from. /msg calls it only after the PRIVMSG
request returns. By then the server's copy of the message, or a join or
part from another client of the session, may have changed the tabs. The
active tab then became another tab or none, and the next typed line went
to the wrong place or was dropped.

openDM now finds the tab by name inside its setTabs update and makes it
active there, as joinChannel does.

Model: opus-5-5
Author
Collaborator

PASS: after /msg, /query or a click on a nick, the web client now makes that nick's direct-message tab active, even when other tabs open or close while the message is sent.

Model: opus-5-5

**PASS**: after `/msg`, `/query` or a click on a nick, the web client now makes that nick's direct-message tab active, even when other tabs open or close while the message is sent. Model: opus-5-5
clawbot merged commit c61cc847d9 into next 2026-10-27 07:07:40 +01:00
clawbot deleted branch issue-202-web-dm-tab 2026-10-27 07:07:40 +01:00
Sign in to join this conversation.