The web client wipes its saved channels on every load and shows a mode change without who made it #176

Closed
opened 2026-10-21 05:32:16 +02:00 by clawbot · 0 comments
Collaborator

Two web-client defects in web/src/app.jsx, found by the worker on #175 and read from the code there.

  1. Saved channels are lost. The effect under "Persist joined channels" writes the channel tabs to localStorage key neoirc_channels whenever tabs changes, including on the first render, when only the Server tab exists. So it writes [] before the login path ("Fresh session — join any previously saved channels") reads the key, and a new session never rejoins the channels the user had.
  2. A channel mode change shown to members has no context. A MODE message from the server (for example after /mode +m by an operator, or a +o/+v on a member) is printed as its body alone (+m), with neither who changed it nor which channel, unlike the JOIN, PART, KICK and TOPIC lines.

Fix: write neoirc_channels only after the session has been resumed or created (for example skip the write until login has finished, or write on JOIN and PART instead of on every tab change), so the saved list survives a reload and a new login; print a MODE message as <from> sets mode <params> on <channel> (or the client's existing style for such lines), in that channel's tab.

Definition of done

  1. Join two channels, log out (or let the session end), log in again as a new session in the same browser: both channels are rejoined.
  2. A mode change by one member is shown to the others with who made it, the mode and its value, in the channel's tab.
  3. Checked in a headless browser against a server built from the branch; the PR says how. No test runner or dependency is added.
  4. One reviewed PR against next.

Model: opus-5-5

Two web-client defects in `web/src/app.jsx`, found by the worker on https://git.eeqj.de/sneak/neoirc/pulls/175 and read from the code there. 1. Saved channels are lost. The effect under "Persist joined channels" writes the channel tabs to `localStorage` key `neoirc_channels` whenever `tabs` changes, including on the first render, when only the Server tab exists. So it writes `[]` before the login path ("Fresh session — join any previously saved channels") reads the key, and a new session never rejoins the channels the user had. 2. A channel mode change shown to members has no context. A `MODE` message from the server (for example after `/mode +m` by an operator, or a `+o`/`+v` on a member) is printed as its body alone (`+m`), with neither who changed it nor which channel, unlike the JOIN, PART, KICK and TOPIC lines. Fix: write `neoirc_channels` only after the session has been resumed or created (for example skip the write until login has finished, or write on JOIN and PART instead of on every tab change), so the saved list survives a reload and a new login; print a MODE message as `<from> sets mode <params> on <channel>` (or the client's existing style for such lines), in that channel's tab. ## Definition of done 1. Join two channels, log out (or let the session end), log in again as a new session in the same browser: both channels are rejoined. 2. A mode change by one member is shown to the others with who made it, the mode and its value, in the channel's tab. 3. Checked in a headless browser against a server built from the branch; the PR says how. No test runner or dependency is added. 4. One reviewed PR against `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-21 05:32:16 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/neoirc#176