Feature: persistent tab identifiers and per-tab style policies added to the styling IPC #189
Draft
Shuro wants to merge 2 commits into
Draft
Feature: persistent tab identifiers and per-tab style policies added to the styling IPC #189Shuro wants to merge 2 commits into
Shuro wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the styling IPC (#186) - lets users scope styling per tab (e.g. never hide anything in a "log everything" tab).
Note: this branch contains the styling IPC commit as its base; I'll rebase once #188 is merged. Reviewing the second commit alone shows just this change.
Tab.Identifieris now persisted instead of[NonSerialized]. It was regenerated on every plugin load before, so there was nothing stable to key per-tab settings on. Existing configs migrate on their own: the initializer generates a Guid on load and the next save keeps it.ChatTwo.GetTabs->Dictionary<Guid, string>(identifier -> name, temp tabs excluded)ChatTwo.TabsChanged- event with the same payload, pushed fromSaveConfig(wrapped in try/catch sinceSendMessagedoesn't isolate subscriber exceptions - a broken consumer shouldn't break config saves)ChatTwo.SetTabStylePolicies(Dictionary<Guid, int>)- suppress-flags per tab: 1 = no backgrounds, 2 = no fading, 4 = no hiding. Tabs without an entry have everything enabled. The dictionary is copied defensively (null-safe, and the render thread must not share state with the caller).In
DrawMessagesthe current tab's flags gate the three styling steps; a message whose hiding is suppressed renders fully visible. Pop-outs inherit their tab's policy automatically.Tested in game: per-tab suppression across two tabs and a pop-out, tab rename/reorder pushing
TabsChanged, and policies surviving a restart via the persisted identifiers.Disclosure:
This was co-developed with AI assistance (Claude Code).
I've reviewed the code and tested it in game myself.
No nice Preview Screenshots for this one :(