Skip to content

Per-channel reading: the server's channel list, a Channels tab, and a reading rule per channel - #174

Merged
ctoth merged 5 commits into
masterfrom
feat/channel-reading
Oct 11, 2026
Merged

ctoth merged 5 commits into
masterfrom
feat/channel-reading

Conversation

@ctoth

@ctoth ctoth commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

What this does

The MOO now sends Comm.Channel.List (at login, on request, and whenever you join or leave a channel) and brackets each channel, say, page and link line with Comm.Channel.Start / Comm.Channel.End. This uses both.

  • Channels tab in Preferences. One row per channel, the ones you listen to first. Per channel: Read aloud (Same as Auto Read / Never / When the window is not focused / Always), Voice (Same as Speech or a named voice), Notify.
  • Alt+Shift+R steps the current buffer's channel through the four reading modes and announces the result.
  • A channel left on "Same as Auto Read" behaves exactly as before. A channel with its own rule is spoken from Comm.Channel.Text as "talker. text" in its voice, and Auto Read skips that channel's output line (the line between Start and End), so it is neither read twice nor read when set to Never.
  • Settings are stored locally with the other preferences (storage version 2; the old unused sayto entry is dropped, say_to_you keeps its notification by default).

Wire

Comm.Channel.List is [{name, caption, command, kind, listening}]. decodeChannelList throws on any other shape.

Tested

  • tsc --noEmit clean; vitest run: 137 files, 2086 tests pass. src/gmcp/Comm/Channel.test.ts feeds real telnet bytes.
  • Run in Chrome against the live server as a guest, with speechSynthesis.speak replaced by a recorder:
    • the Channels tab listed the real channels, listened-to first;
    • Say on Always, Auto Read off: one utterance in the chosen voice;
    • Say on Always, Auto Read on: one utterance for the say, other lines read by Auto Read;
    • Say on Never, Auto Read on: the say line printed and not spoken, other lines spoken;
    • Alt+Shift+R stepped the mode and announced it.
  • That run found a bug, fixed in the last commit: a mode change followed at once by a voice change lost the mode.

Not tested

  • Nobody has listened to this with a screen reader.
  • "When the window is not focused" was not tried with the window actually unfocused.

Known limits

  • Neural-interface channels are not bracketed by the server, so with a rule of their own and Auto Read on they are spoken twice, and Never does not silence their line.
  • The wizinfo and INTERMOO channels send no Comm.Channel.Text, so a rule set on them does nothing.
  • Game and fediverse channels are not in the server's list; they get a row once they have sent something.
  • The Alt+Shift+R announcement uses the channel's name (say), not its caption (Say).

ctoth added 5 commits October 10, 2026 22:28
…read aloud

Comm.Channel.List now carries {name, caption, command, kind, listening} and
fills a channels store. Comm.Channel.Start/End mark the output lines that
belong to a channel, so a channel with its own reading rule is spoken once,
from Comm.Channel.Text, in its own voice, and Auto Read leaves its line alone.

Preferences gains a Channels tab (read aloud, voice, notify per channel) and
Alt+Shift+R steps the current buffer's channel through the reading modes.
Stored preferences move to version 2: the unused sayto entry is dropped.
The Channels tab merged each change into the settings it had last
rendered, so a mode change followed at once by a voice change lost the
mode. It now merges into the stored settings. Found by trying the branch
against the live server; the note records that run.
…ship flag

Master now tells the output when browser speech has a line, so the
screen reader does not announce it too. A channel with its own reading
rule sets that flag when its rule speaks the line, and when the rule is
Never, so Never is silent for screen-reader users as well. A channel on
Same as Auto Read takes master's path unchanged.
@ctoth
ctoth merged commit 69b1fd8 into master Oct 11, 2026
2 checks passed
@ctoth
ctoth deleted the feat/channel-reading branch October 11, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant