Skip to content

Feature: persistent tab identifiers and per-tab style policies added to the styling IPC #189

Draft
Shuro wants to merge 2 commits into
Infiziert90:mainfrom
Shuro:feature/tab-style-policies
Draft

Feature: persistent tab identifiers and per-tab style policies added to the styling IPC #189
Shuro wants to merge 2 commits into
Infiziert90:mainfrom
Shuro:feature/tab-style-policies

Conversation

@Shuro

@Shuro Shuro commented Jul 4, 2026

Copy link
Copy Markdown

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.Identifier is 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 from SaveConfig (wrapped in try/catch since SendMessage doesn'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 DrawMessages the 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 :(

@Shuro Shuro marked this pull request as draft July 4, 2026 01:06
@Shuro Shuro changed the title Draft: Feature: persistent tab identifiers and per-tab style policies added to the styling IPC Feature: persistent tab identifiers and per-tab style policies added to the styling IPC Jul 4, 2026
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