WIP: RynthChat: server default chat tabs (plugin-declared, server-scoped) #15

Draft
AwfulWaffle wants to merge 7 commits from AwfulWaffle/RynthCore:chat/server-tabs into main

2026-11-15

Daniel Wallace
RynthChat: a new tab never lands in a hidden server tab
"New tab: Network" on a server where the DreamWeave Network tab is
hidden returned that hidden tab, so the player's new rule filled the
server's tab. ChatServerTabs.ResolveNewTab now keeps "returns the
existing one" for a visible tab only; a hidden match gets a free
numbered name ("Network 2"). An unreadable settings file is logged
once per run instead of on every 2 s retry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:05:29 -08:00
Daniel Wallace
RynthChat server tabs: review fixes (pure apply core, pairing, clashes)
The decision core of ChatModel.ApplyServerTab moves into
ChatServerTabs.Apply, a pure function returning edits (rule updates,
inserts, removals, tab create, pin, seed mark, tab server); ChatModel
only carries them out. ChatFilterTests drives it through a small
settings model.

- A seeded entry whose tab was deleted never gets a rule turned on: a
  rule the manifest gains, or one re-added after the player deleted
  the rules, is added off. Tab listing skips a tab only an inactive
  server's rule fills.
- Owned rules pair with declared ones by content (Global-room flag,
  then when/action/mode/pattern, then leftovers), never by position,
  so a reorder or delete no longer moves on/off or colour to another
  rule. Reclaim uses the same pairing.
- Settings count as ready only after a successful read (or no file);
  a failed read is retried every 2 s, the unreadable copy kept once.
- Export leaves out server rules and server tabs; Import makes every
  imported rule the player's (no owner, server or globalRoom).
- Both rule editors lock pattern, mode, when, action, tab, move and
  delete on a server rule; on/off and colour stay live, with a note.
- No adopt-by-name: a taken name seeds "<Name> (<server name>)"
  instead, and tabServers is written only for a tab the plugin made.
  Reclaim requires the entry's name, its clash name, or a tab holding
  only the matched rules. AddCustomTab checks hidden tabs.
- Global-room discovery re-reads the entries and active servers under
  the lock. The manifest parser rejects a bad when or mode, and keeps
  a pattern's spaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:59:53 -08:00
Daniel Wallace
Sections manifest: an absent globalRoomFallback means Roleplay
The Dereth Network README names Roleplay as the room a world usually
borrows for the Global room, so an entry that leaves the fallback out
matches Roleplay until chat shows another room.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:39:27 -08:00
Daniel Wallace
RynthChat: server-scoped default tabs from plugin manifests
SectionRegistry.Rebuild hands every manifest's chatTabs and the active
server ids to ChatModel.ApplyServerTabs, which seeds each entry's tab once
(seededTabs), rewrites its owned rules from the manifest, and gates the tab
(tabServers) and its rules (ChatFilterRule.Server, ChatRouter) on the
server being active. The pump records the Global room from network room
lines (globalRooms) and rewrites the Global-room rule.

- Apply is a no-op when nothing changed (EditFiltersIfChanged; rules
  compared as canonical forms with ChatServerTabs.SameRule), since Rebuild
  runs every second, and waits for the settings file to load first.
- Rules an older engine stripped of "owner" are reclaimed by content
  (ChatServerTabs.Reclaim) instead of a second set being added.
- A deleted server tab stays deleted across a reload: its disabled owned
  rules no longer re-create it in LoadSettings.
- AllTabs caches per filter version and active-server set.
- The rule editor marks server rules; a manifest with a dropped chatTabs
  entry is logged as partly read, not as unread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:38:04 -08:00
Daniel Wallace
RynthChat: server default tab planning and Global room discovery
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:25:02 -08:00
Daniel Wallace
RynthChat settings: server tab, owner, pinned fields
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:23:24 -08:00
Daniel Wallace
Sections manifest: parse chatTabs (server default chat tabs)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:22:56 -08:00