WIP: RynthChat: server default chat tabs (plugin-declared, server-scoped) #15
Loading…
Reference in a new issue
No description provided.
Delete branch "AwfulWaffle/RynthCore:chat/server-tabs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lets a server plugin ship a default RynthChat tab for its own server. First user: DreamWeave's "Network" tab for the Dereth Network (cross-world tells, invite-only channels and the shared Global room), declared in RynthServers (companion PR).
What it does
chatTabskey:server,id,name,pinned,globalRoomFallbackandrules(the usual rule fields, plusglobalRoom). Old engines ignore the key. A bad entry is dropped and logged as a partial read, and the rest of the manifest still loads.seededTabs,tabServers,globalRooms, and on rulesserver,ownerandglobalRoom. All are optional and written only when set.[Room] Name@world says, "line from a remote speaker records it per server; until then the declared fallback (Roleplay) is used. No command is sent to the server.<Name> (<server name>). A new player tab never lands in a hidden server tab; it gets a numbered name instead.Threading
SectionRegistry.Rebuild(render thread) and discovery on the pump both apply underChatModel.EditLock. Nothing done while holding the lock takes another lock or calls out, and the active-server set is published by whole-array replacement. A steady-state apply is a no-op: no save and no version bump. The decision core is the pureChatServerTabs.Apply, tested intools/ChatFilterTests.Known limits (documented, not coded)
rynthchat_settings.jsonis shared by every client. An older engine saving it drops the new fields. The tab and rules are then reclaimed by content on the next session on that server, but until then the tab can show on other servers.Tests
tools/SectionsTests: 245/245 checks pass.tools/ChatFilterTests: 1740/1740 checks pass. New cases cover seeding, the no-op second apply, rename and delete, deleted-tab resurrection, content pairing, reclaim, clashes, discovery (including forged lines), visibility and export/import.🤖 Generated with Claude Code
"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>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.