Keep the web client's saved channels and show who changed a mode (closes #176) #178

Merged
clawbot merged 1 commits from issue-176-web-saved-channels-mode-line into next 2026-10-21 06:31:30 +02:00
Collaborator

Implements #176 in web/src/app.jsx.

  • The effect that saves the channel tabs to localStorage (neoirc_channels) now does nothing until the user is logged in. Its run on page load used to write [] over the saved list, so a new session had nothing to rejoin. onLogin now reads the list before setLoggedIn(true), since from then on the effect writes the open tabs over it.
  • A MODE message is shown in the channel's tab as alice sets mode +v bob on #chan, the body's parts joined by a space (+k sesame, -k *). It used to fall to the Server tab as the bare body.

How each item was checked: an image built from the branch with script/docker, run on localhost, driven by Playwright over CDP in a headless Chromium container, from a scratch directory outside the clone.

  1. alice joins #one and #two; the session is ended with a logout request, the page's next poll takes it back to the login screen, and the login screen is reloaded once more; then alice2 logs in in the same browser. The check reads the tabs, localStorage at each step, and the server's member lists of both channels.
  2. alice2 creates #three, bob joins, and alice2 runs /mode +m, /mode +v bob, /mode +k sesame and /mode -k. The check reads bob's #three and Server tabs.

Disclosures:

  • Judgement call: /quit still clears the saved list on purpose, so a session ended with /quit rejoins nothing; item 1 was checked with a logout request.
  • Between login and the end of the rejoin, the saved list holds only the channels rejoined so far.

Model: opus-5-5

Implements https://git.eeqj.de/sneak/neoirc/issues/176 in `web/src/app.jsx`. - The effect that saves the channel tabs to `localStorage` (`neoirc_channels`) now does nothing until the user is logged in. Its run on page load used to write `[]` over the saved list, so a new session had nothing to rejoin. `onLogin` now reads the list before `setLoggedIn(true)`, since from then on the effect writes the open tabs over it. - A `MODE` message is shown in the channel's tab as `alice sets mode +v bob on #chan`, the body's parts joined by a space (`+k sesame`, `-k *`). It used to fall to the Server tab as the bare body. How each item was checked: an image built from the branch with `script/docker`, run on localhost, driven by Playwright over CDP in a headless Chromium container, from a scratch directory outside the clone. 1. `alice` joins `#one` and `#two`; the session is ended with a logout request, the page's next poll takes it back to the login screen, and the login screen is reloaded once more; then `alice2` logs in in the same browser. The check reads the tabs, `localStorage` at each step, and the server's member lists of both channels. 2. `alice2` creates `#three`, `bob` joins, and `alice2` runs `/mode +m`, `/mode +v bob`, `/mode +k sesame` and `/mode -k`. The check reads bob's `#three` and Server tabs. Disclosures: - Judgement call: `/quit` still clears the saved list on purpose, so a session ended with `/quit` rejoins nothing; item 1 was checked with a logout request. - Between login and the end of the rejoin, the saved list holds only the channels rejoined so far. Model: opus-5-5
clawbot added the needs-review label 2026-10-21 06:03:21 +02:00
clawbot self-assigned this 2026-10-21 06:03:21 +02:00
clawbot added 1 commit 2026-10-21 06:03:22 +02:00
The web client saved its channel tabs to localStorage whenever the
tabs changed, including on page load, when only the Server tab
exists. That wrote an empty list over the saved one before login
read it, so a new session never rejoined anything. The save now
waits until the user is logged in, and login reads the saved list
before it marks the user logged in.

A MODE message from the server fell through to the Server tab as its
bare body. It now shows in the channel's tab as "alice sets mode
+v bob on #chan".

Model: opus-5-5
Author
Collaborator

PASS

Model: opus-5-5

**PASS** Model: opus-5-5
clawbot removed the needs-review label 2026-10-21 06:27:39 +02:00
clawbot merged commit ddfbdc1277 into next 2026-10-21 06:31:30 +02:00
clawbot deleted branch issue-176-web-saved-channels-mode-line 2026-10-21 06:31:31 +02:00
Sign in to join this conversation.