Compare commits

...
741 Commits
Author SHA1 Message Date
JonKazama-Hellion 522545c7a2 chore(release): 2.0.4 -- shorter description, webinterface strings out
Security Scan (reusable) / Security Scan (push) Successful in 20s
Security / scan (push) Successful in 20s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 12s
Build / Build (Release) (push) Successful in 29s
Release / Build and attach release ZIP (push) Successful in 29s
Housekeeping only, no behaviour change.

The v2.0.0 changelog block moves out of the plugin manifest to stay
inside the four-subblock limit; it remains in docs/CHANGELOG.md.
2026-08-20 18:21:59 +02:00
JonKazama-Hellion 63c68327dd Merge branch 'chore/plugin-description' into main
Shorter installer description, corrected locale count, punchline
unified across both manifests.
2026-08-20 18:20:39 +02:00
JonKazama-Hellion 0f9ced8f86 Merge branch 'chore/orphan-strings' into main
30 resource keys for the webinterface, which left the code in May.
Every key verified against the whole repo before deletion.
2026-08-20 18:20:39 +02:00
JonKazama-Hellion 60e3dd87a2 docs(manifest): shorter plugin description, and one that leads with the point
The installer text ran 908 characters and opened by naming a category
rather than saying what the plugin does. It now says it in the first
sentence and stops at 367.

Two things were also wrong rather than long: it claimed 24 locales when
there are 25, and the punchline in repo.json did not match the one in
the yaml, so the store listing and the plugin details showed different
sentences.

Attribution is unaffected -- it lives in NOTICE.md, README.md and the
licence, which is where the notices belong. This field is a product
description.
2026-08-20 18:16:35 +02:00
JonKazama-Hellion 5ab4312cad chore(i18n): drop the webinterface strings, the feature left in May
The HTTP server, its routes and the Svelte frontend went out with
c2801c4 on 2026-05-02. The 30 resource keys behind them stayed, in all
25 languages, and the generated designer kept a property for each.

Verified before deleting, not assumed: every key was matched on word
boundaries against all 382 repo files excluding the resource bundles
themselves, and none appears anywhere. No dynamic resource access exists
in this codebase either -- no ResourceManager.GetString with a literal,
no using alias, no interpolated key name -- so the caller scan is
trustworthy here.

The designer is regenerated by a Visual Studio tool that does not run on
a CLI build, so its properties are removed by hand alongside the resx.
2026-08-20 08:37:09 +02:00
JonKazama-Hellion c1d6ca3bbd docs(readme): carry the version badge and header to 2.0.3
Security Scan (reusable) / Security Scan (push) Successful in 24s
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 32s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 6s
Release / Build and attach release ZIP (push) Successful in 29s
2026-08-20 07:58:45 +02:00
JonKazama-Hellion 4ab9202533 Merge branch 'feature/v2.0.3' into main
Pop-out context menu, screenshot mode toggle, and colours with no alpha
byte. Smoke-tested in game on all three before the merge.
2026-08-20 07:58:18 +02:00
JonKazama-Hellion 5e15d34eeb chore(release): 2.0.3 -- pop-out context menu, screenshot mode
Three fixes, all of them things that simply did not work: the context menu
in pop-out windows, the screenshot mode toggle, and text the game colours
without an alpha byte.

The 1.5.6 changelog block moves out of the plugin manifest to stay inside
the four-subblock limit; it remains in docs/CHANGELOG.md.
2026-08-20 07:58:13 +02:00
JonKazama-Hellion b9feb8650f chore(comments): drop the spec task codes the last pass missed
Codes like POP-1c or B4b-2 name a task in a planning document, not
anything in the code. A reader has no way to resolve them and they age
into noise the moment the document is closed. Where a code was used as a
reference, the sentence now names the function it meant.
2026-08-20 07:54:45 +02:00
JonKazama-Hellion 0f9858a3d3 fix(screenshot-mode): the toggle never wrote its change to disk
Screenshot mode is a persisted setting, but neither of the two toggles
saved the config. Turning it on only stuck when some unrelated save
happened to run afterwards -- and once it was stored, turning it off never
reached the file at all, so it came back on with every plugin load.

Both toggles save now. An install currently stuck on it needs one click.
2026-08-20 07:54:38 +02:00
JonKazama-Hellion a3379818eb fix(popouts): the context menu never opened outside the main window
Right-clicking a name or an item inside a pop-out did nothing at all.

One payload handler is shared by the main window, every pop-out and the
input preview, and it holds a single popup state. The main window is
registered first, so it draws first, finds no open popup in its own scope,
reads that as "closed" and clears the state -- before the window that
actually opened the popup gets its turn.

The popup now belongs to the surface that opened it. The others leave its
state alone instead of dropping it. The rule itself sits in its own helper
because the handler pulls in Dalamud and cannot be loaded from a test.
2026-08-20 07:54:32 +02:00
JonKazama-Hellion d5c7db9f43 fix(colours): text the game colours without an alpha byte rendered invisible
The game hands out some of its configured colours as ARGB with the alpha
byte left at zero. The byte swap then moved that zero into the alpha slot
and the text drew fully transparent.

Two guards, and they belong together: forcing alpha on a colour that is
zero everywhere would turn "no colour" into opaque black, which slips
past the invisible-text fallback in ChunkUtil and paints over the colour
the renderer would otherwise inherit.
2026-08-20 07:54:19 +02:00
JonKazama-Hellion 6e24885241 docs: the privacy claim gets stronger, so the documents have to say so
Security Scan (reusable) / Security Scan (push) Successful in 24s
Security / scan (push) Successful in 24s
Build / Build (Release) (push) Successful in 26s
Removing BetterTTV took out the plugin's only outbound network call, and five
documents were still describing it as present. PRIVACY.md led with "one outbound
network call exists by design" -- the opposite of what shipped an hour ago, and
the one claim in that file people actually check.

PRIVACY.md now opens with none at all. The section that described the call is
kept and marked as removed rather than deleted, so the claim can be read against
what it replaced: the startup fetch meant BetterTTV saw an IP as soon as the
plugin loaded, whether an emote ever appeared or not. Worth leaving visible.
BetterTTV also comes out of the third-party table, which now lists only the two
parties nobody using this plugin through Dalamud can avoid.

SECURITY.md listed the EmoteCache HTTP client as in scope for reports. There is
nothing there to report on.

THIRD_PARTY_NOTICES.md named the call as current; both entries it has ever
carried are now historical.

README dropped the pointer to the outbound call and the switch for it, a
stability bullet about a crash fix in code that no longer exists, and the line in
the Chat 2 migration that moved an emote cache directory nothing reads.

ROADMAP gained 2.0.1 and 2.0.2, and a section for what the 2.0.0 push left
behind: 47 overlong comment blocks, channel names translated in only ten of the
25 languages, an orphaned EmoteCacheV1 directory on anyone who ran an older
build, and the deprecated GlobalScaleSafe call that is the last compiler warning
in the build.
2026-08-19 23:41:23 +02:00
JonKazama-Hellion 16730d5ed9 chore(release): 2.0.2 -- BetterTTV out, placeholders fixed
Forge Announce / Post changelog to Hellion Forge (push) Successful in 9s
Security Scan (reusable) / Security Scan (push) Successful in 27s
Security / scan (push) Successful in 27s
Build / Build (Release) (push) Successful in 34s
Release / Build and attach release ZIP (push) Successful in 31s
BetterTTV emote support is removed rather than switched off. Its shared-emote
endpoint went behind authentication and that is where nearly all of them came
from; what was left is the 65-entry global set, eleven of those on the plugin's
own known-broken list, so 54 largely static images from Twitch's early days.
Exactly one is animated, and that one is 492 frames at 140x140 -- 37 MB of
texture memory for a single emote, uploaded one frame at a time. Not worth a
network call and an on-disk cache on every start.

Gone with it: the download path, the cache directory, the GIF renderer, the
settings section, the block list, and 13 translation keys across 50 resource
files. 1567 lines. The plugin now makes no outbound network calls at all, which
is the claim PRIVACY.md has always wanted to make without an asterisk.

EmotePayload and its MessagePack type byte stay, deliberately. Around a thousand
rows in a two-month-old database carry them, and dropping the type would make
those fail to deserialise -- the history is the one thing 2.0.0 promised not to
touch. Nothing writes one any more and a stored emote renders as the code that
was typed, which is what the sender saw when they typed it.

Five descriptions in the Window tab printed {0} where the plugin name belonged,
handed to the widget directly instead of through string.Format the way the rows
around them do. Every language was affected including English; German surfaced
it because the placeholder lands at the start of the sentence there. A test now
walks every placeholder-carrying resource string, finds its uses, and fails on
an unformatted one -- verified by putting the defect back and watching it go red.

New preview images. The old set was from 2026-05-08, older than every cycle in
2.0.0, and showed stacked ImGui defaults to anyone browsing the installer. Taken
with screenshot mode on so no character names reach a public repo. The wizard
takes the theme picker's slot.
2026-08-19 23:34:41 +02:00
JonKazama-Hellion 39e2d91288 docs(images): new preview shots, taken on the rebuilt interface
Security Scan (reusable) / Security Scan (push) Successful in 23s
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 28s
The three in the plugin installer were from 2026-05-08 and showed the plugin as
it looked before any of the window rebuilds -- older than every cycle that
shipped in 2.0.0. Someone browsing the installer saw stacked ImGui defaults.

Taken with screenshot mode on, so the character and world names are replaced
rather than published: the chat shot would otherwise carry a free company
conversation onto a public repo.

The wizard replaces the theme picker in the set. It is the first surface a new
user meets and it now has something to show; the theme picker is reachable from
the settings shot behind it.

Manifest still points at the old file in this commit -- the URLs are checked
against the pushed tree, so the new image has to exist there before anything can
reference it.
2026-08-19 23:33:56 +02:00
JonKazama-Hellion 3309386fbe docs(readme): the front page still described the plugin as it was at v1.1.0
Security Scan (reusable) / Security Scan (push) Successful in 23s
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 28s
It called the theme engine "a step toward a distinct UI look and feel", which
was true when it was written and stopped being true somewhere around the fourth
window rebuild. It also pointed new readers at `/hellionchat`, a command that
does not exist -- the family is `/hellion` -- and put the wizard at three
profiles when it has had four since May.

The intro says what the plugin is now: a fork by origin, with everything above
the message store rebuilt, and the differences from upstream named as features
rather than as a rewrite plan. The paragraph no longer repeats what the upstream
section further down already explains in more detail.

Added the plugin notice the wizard shows every user. The repo front page is the
other place someone lands first, and it was the only one of the two that said
nothing.

Counted the themes rather than trusting the number I was about to write: ten
built-in palettes, not seven.

Both remaining `/hellionchat` and "24 locales" mentions sit under headings that
say "kept for context" and describe the state at that version. Those stay wrong
on purpose.
2026-08-19 22:52:19 +02:00
JonKazama-Hellion 38c6707970 ci(security): hold API responses in a file instead of piping them onward
Security Scan (reusable) / Security Scan (push) Successful in 25s
Security / scan (push) Successful in 25s
Build / Build (Release) (push) Successful in 28s
Semgrep blocks on gha-curl-pipe-shell, and it is pointing at the publish step
added an hour ago. The rule exists for `curl https://…/install.sh | bash`:
remote content reaching an interpreter. What this actually did was pipe a JSON
response into a python3 -c inline script -- the interpreter and its program both
live in the workflow file, and the server only ever supplied data.

A false positive, then, but the rule cannot see the difference between an
interpreter reading a program from stdin and one reading data, and neither can
the next person to read the step. Responses go to a file and are read from
there. Same shape as the finding suggests, and worth having anyway: a response
that is on disk can be looked at when a call misbehaves, instead of vanishing
into a pipe.

Verified by falsification rather than by a green run: the same ruleset against
the previous revision of this file reports 1 blocking finding, against this one
zero. Without that check a passing scan only proves the rule was not loaded.
2026-08-19 22:49:07 +02:00
JonKazama-Hellion a4c4e15c3b chore(release): 2.0.1
Forge Announce / Post changelog to Hellion Forge (push) Successful in 8s
Security Scan (reusable) / Security Scan (push) Failing after 24s
Security / scan (push) Failing after 24s
Build / Build (Release) (push) Successful in 34s
Release / Build and attach release ZIP (push) Successful in 30s
Same-day hotfix on 2.0.0, nothing user-facing. It exists because the 2.0.0
archive was built before the MessagePack lift, and because the fixed release
workflow needs a tag to prove itself on -- 2.0.0 cannot, since Gitea reads the
workflow from the tagged tree and that tree still holds the broken version.

Not force-moving the 2.0.0 tag: its release object exists with the archive
attached, and someone may already have pulled it.
2026-08-19 22:46:10 +02:00
JonKazama-Hellion 226174bf12 ci(release): publish with curl instead of a go action, and lift MessagePack
Security Scan (reusable) / Security Scan (push) Failing after 23s
Security / scan (push) Failing after 23s
Build / Build (Release) (push) Successful in 30s
The v2.0.0 tag built fine and then died on its last step: gitea.com's
release-action declares `using: go`, the runner has to compile it, and act
cannot -- exec: "go": executable file not found, exit 127, after a green build.
The zip existed and never got attached, so the Discord announcement went out
while the download link pointed at nothing.

This is a known failure. It was diagnosed on another repo in June and the note
from then says in as many words that this repo carries the same pattern and
should migrate before its next release. It did not, and here we are.

The publish step is a plain curl call against the Gitea API now, running in the
job image with curl and python3, independent of go, the action cache, and
whatever @main happens to point at. Idempotent by design: a re-run reuses an
existing release and replaces the asset rather than failing on the duplicate,
which is exactly the state a recovery run finds.

MessagePack moves from the 3.1.4 floor to 3.1.7, which is what the trivy scan
was failing on. The range already allowed it -- NuGet resolves the lower bound
of a range, and trivy reads it the same way, so the floor is the version that
counts. The advisories are recursion depth in Skip and an LZ4 decompression
fault, both reachable only through crafted input; this plugin serialises its own
payloads and reads back its own bytes from a local database, so the practical
exposure is someone who already has write access to the file. Lifted because it
costs nothing and a scan that stays red for a known-harmless reason is how a real
finding gets missed later.
2026-08-19 22:44:55 +02:00
JonKazama-Hellion e316a9b400 Merge branch 'feature/v2.0.0' into main
Security Scan (reusable) / Security Scan (push) Failing after 24s
Security / scan (push) Failing after 24s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 11s
Build / Build (Release) (push) Successful in 33s
Release / Build and attach release ZIP (push) Failing after 30s
2026-08-19 22:36:26 +02:00
JonKazama-Hellion 97d31bb8e4 fix(defaults): the values everyone had set by hand become the defaults
The 2.0.0 reset put every install on the shipped defaults for the first time, and
that exposed which of them had never actually been used. The sidebar was the
loudest: 44 pixels, a width carried over from the v1.2.0 icon-only layout and left
in place long after the sidebar started drawing labels beside those icons. Every
tab name came out clipped. Nobody had noticed in cycles because everyone had
widened it by hand -- 160 in the config this was measured against.

Default 160, and the floor moves from 40 to 130: where a tab name stops being
readable in German, which is the longest of the 25 languages, rather than where
the icons stop fitting. Anyone who wants it slimmer wants the collapsed layout,
and that is a separate width.

Glyph ranges had the same shape of problem with a worse outcome. They were only
ever filled when someone picked a language explicitly, so an install left on
"follow Dalamud" -- the default -- got none at all. That went unnoticed while
configs accumulated ranges over months; a fresh config has none, and a tester on
a Korean, Chinese, Cyrillic or Greek client would have come out of this update
reading boxes. The load path derives them from the Dalamud UI language too now.

The rest are preference defaults taken from a config that has been in daily use
across every one of these cycles: compact density off, title bar off, compact
timestamps on, compact tell tabs on, honorific glow on, 100 messages of tell
history preloaded, inactive opacity 0.75, command help on the right. New tell
tabs open as pop-outs, because the wizard's closing step tells the user to try
/tell and watch exactly that happen.

Two values were deliberately not carried over. SeenPopOutInputHint and
SeenPopOutHeaderHint are not preferences, they are "this user has seen it"
markers -- shipping them as true would mean no new user ever sees the hints that
explain a feature people did not find on their own. The greeted toggle stays off
as well: it is opt-in for people who greet.

Also dropped the light-bulb emoji from the wizard's closing hint in all 25
languages. UI icons come from the icon font here, not from emoji.
2026-08-19 22:34:35 +02:00
JonKazama-Hellion 89c73be71c feat(release): 2.0.0 -- nine cycles ship, and the config starts over
v1.6.0 through v1.15.0 were never published. The whole window layer was being
rewritten from ImGui defaults to custom drawing, and repo.json deliberately kept
its links on v1.5.6 so nobody could update into a half-finished state. That work
lands here in one release.

The config is not migrated, it is replaced. A config carried across nine cycles of
window rebuilds holds values chosen against surfaces that no longer exist, and
starting over is the only way to be sure every install is on the same defaults.
The message database is a separate file and is not touched. The old config is
copied to HellionChat.json.pre-2.0.0.bak first, so rolling back to 1.5.6 stays a
file copy rather than an evening of clicking settings back in.

Config schema 27. The reset runs from the constructor, before LoadAsync seeds the
default tabs, and the self-test now fails if the tab list is empty at /xlperf --
that ordering breaking would leave every user with no tabs and nothing else in the
plugin would notice.

Default layout gains an Emote tab: custom emotes, standard emotes and echo. A
tester asked for it, emotes get lost between system notices otherwise.

Manifest, README, roadmap and the four changelog consumers are on 2.0.0. The
release notes lead with what was fixed rather than what was redrawn -- retroactive
cleanup that could never be applied, a compaction that reported deleting nothing
while deleting everything, pinned tell tabs that came up empty for a session. And
with the one behaviour change users should know about: the channel grid is
authoritative over storage now, so anyone who had unticked channels while the
unknown-channel failsafe was on stores less than they did before.
2026-08-19 22:15:40 +02:00
JonKazama-Hellion 16557213cd chore: comments, second pass -- the task codes the first pass missed
The first sweep matched a character class that swallowed the digit, so a bare
B1 slipped through while B1-2 was caught. Searching the whole A-Z space instead
of guessing prefixes turned up 130-odd more: B0 through B6, C2, C3, D1, H2, M6,
P7, P8, T2, W2, plus GP-04, KB-01, OD-1, PM-1, PM-3, SEC-01, TR-4, TR-7, UI-11,
UI-12, XC-8 and API-3.

Kept deliberately: 41 B4 01 is a byte signature, "N0" a format string,
#L119-L128 a source anchor, LS4/LS6 are linkshells, and A=FF B=0C G=41 R=C2
explains a colour-channel order. Those look like codes and are not.

Also translated the eight German comments left in the theme files and
ImGuiUtil. Seven of them described what a palette does to which channel, which
is worth reading -- just not in a second language in an otherwise English
codebase.
2026-08-19 22:03:12 +02:00
JonKazama-Hellion 5b738e6885 chore: comments say what the code does, not which task produced it
A comment that reads "MUST stay in lockstep with TryGetActiveCrossfade (K8)"
helps nobody outside the plan that used to have a K8 in it, and the plans are
not in this repo. Same for "Spec FR-4", "plan §B.2", "Sub-Task 4.4" and the
F/R/M/A/S round codes scattered through the style engine and the self-tests.

Personal names go too. "tester feedback from Jin (v1.4.7)" and "Flo decision
2026-06-15" carry the reason fine without naming anyone -- the version and the
reason are the parts a reader can act on, and a public repo should not need a
cast list to be read.

The rule applied throughout: keep the why, drop the reference. Version numbers
stay, since those resolve through the changelog. 77 files.

ChunkUtil also carried 281 lines of commented-out code -- an older ToChunks
variant and two helpers with no callers, inherited and never removed. Deleted;
git remembers them.
2026-08-19 21:50:31 +02:00
JonKazama-Hellion 52237fda7e feat(wizard): the profile cards and the welcome page speak the window's language
The cards were the last surface still drawn from ImGui defaults: four emoji on
stock child frames, sized to a fixed 2x2 grid that clipped the longer privacy
descriptions in half the supported languages.

They are tiles in the row language now -- a resting surface, an accent bar down
the left edge when chosen, a held hover over both, tracked caps for the heading.
The emoji are FontAwesome glyphs from the icon font the rest of the plugin
already uses. Each card measures its own height from its text and the pair in a
row takes the taller of the two, inside a scrolling frame, because cutting a
privacy choice off mid-sentence is not a thing this plugin gets to do.

Step three moves onto ToggleSwitch rows and a drawn theme field with a popup
built from PopupRow, using the transient widget overloads throughout: the
Func/Action pair saves on every click, and this step is staged until Finish.

The welcome page is opaque, unlike every other window here. Those are read at a
glance over the game; this one is read once and carries a privacy decision. The
fox sat on a hardcoded off-white rectangle that read as paper taped to the
window -- it is a disc now, tinted from the theme accent and only lightened as
far as the black linework needs, measured rather than set.

Three defects surfaced while doing it, all older than this work:

- The GDPR notice for full history had been translated into 25 languages and
  drawn nowhere since the four-step rewrite dropped it on 2026-05-18. It is on
  the card where the choice is made.
- Two cards claimed to be recommended: the badge sat on casual while the data
  minimisation heading still said "(recommended)" in every language. The suffix
  is gone, and the word it carried became the badge label.
- The wizard had no way back into it at all. /hellion wizard reopens it, and
  OnOpen resets the staged state so a second run cannot commit picks from a
  first one the user never saw.

The welcome text drops the fork framing: Chat 2 and this plugin have diverged
far enough that the codebases no longer line up, so it reads as history in a
muted line rather than as a justification up front. In its place is the notice
that plugins are a grey area in this game and do not belong in public channels.
Channel names in it come from Language.<lang>.resx per language, so the German
build says Sagen/Rufen/Schreien and the Polish one says Say/Yell/Shout, which is
what a Polish player actually sees on an English client.
2026-08-19 21:50:21 +02:00
JonKazama-Hellion 5958bceb1c feat(wizard): the chrome speaks the window's language (block A of v1.15.0)
The wizard is the first thing a tester ever sees and it was the last surface
still drawn in ImGui defaults -- stock buttons under a hardcoded forge bronze
that ignored the active theme entirely, since v1.5.2.

Block A is the frame: the settings backdrop at full strength, pagination dots on
the contrast-checked theme accent (current step filled, the rest rings, so the
position reads by shape), step-3 section headers in the tracked-caps-and-fading-
rule language every finished window uses, the primary action as the chamfered
accent pill, and back/skip as ghost links. The selected profile card's border
and the step-4 accents follow the theme now too.

Still open, deliberately: block B gives the profile cards their real shape --
including replacing the emoji icons, which have stood against the global
no-emoji-as-UI-icon rule since the cards were built -- and block C moves the
step-3 checkboxes onto ToggleSwitch rows and the theme list onto PopupRow.
2026-08-19 19:44:39 +02:00
JonKazama-Hellion 6fadbb1659 Merge branch 'feature/v1.14.0' into main
The input row cycle: two ghost buttons and a menu where five filled defaults
sat, a field with its own surface and focus rail, popups built from the
sidebar's row shape, a softened seam to the conversation, and hover fades at a
human pace. Plus the style lab and the preflight guard for the RGBA/ABGR trap.

Local state only. repo.json stays on 1.5.6.0.

Note on shape: these commits were made directly on main by mistake and were
re-homed onto feature/v1.14.0 before this merge, so the branch-per-cycle rule
holds in the history even where it slipped in the moment.
2026-08-19 19:35:51 +02:00
JonKazama-Hellion dcc8ff1867 chore(release): close the v1.14.0 cycle
Version to 1.14.0 in the csproj, changelog and roadmap for the local state. Not
published: repo.json stays on 1.5.6.0, links untouched.

The changelog leads with what the row became and is honest about how it got
there: every style decision in this cycle was made by looking at variants in the
lab, in-game, against the live theme -- and the two recurring traps of the day
(the RGBA/ABGR contrast swap, popups that do not size to their content) each
left a guard behind rather than just a fix.

Smoke-tested continuously by Flo through the evening rather than at a single
gate: the contrast bug, the clipped menu, the hover speed and the seam hardness
were all his catches, live, and each is named in the log where it was fixed.
2026-08-19 19:35:35 +02:00
JonKazama-Hellion 9e62ed762d fix(style): slower still -- the fade takes a third of a second now
The halved rates were still judged much too fast, so: 3/s in, 2/s out. Rise in
roughly 330ms, settle in 500ms. The textbook says hover fades live around 150ms;
the textbook does not play this game, and the person who does gets the vote.

Timing guard moved with it.
2026-08-19 19:29:01 +02:00
JonKazama-Hellion eeffb5bc6b fix(style): the hover fade ran at light speed, and stopped dead
Tester feedback via Flo, aimed at the sidebar tabs but true everywhere: 14/s in
means a full fade in seventy milliseconds, which is five frames -- fast enough
to read as a flicker rather than a fade. Halved to 6.5/s in and 4/s out, which
puts the rise around 150ms and the settle around 250ms, where UI fades usually
live.

And the curve was linear: one speed the whole way, then a dead stop. Consumers
now get a smoothstep over the linear state -- soft start, soft landing -- while
the state itself stays linear, because the evict rule and the advance step are
written against it. Every hover in the plugin inherits both changes through the
one Query call, so the sidebar, the popups, the ghost buttons and the message
rows all breathe at the same pace.

The timing test now guards the other direction: it fails if anyone drifts the
rate back toward light speed.
2026-08-19 19:26:47 +02:00
JonKazama-Hellion 12a445e08f feat(sidebar): soften the seam and let the active tab reach its content
Tester feedback, relayed by Flo: the transition from the tab list to the chat
field is too hard, and the tabs could present themselves better. Three causes,
three changes, no structural touch -- tabs stay tabs, per the standing decision.

The full-width border line under every row was a ladder of hard cuts. It is a
fading rule now, starting past the icon column and dissolving before the right
edge -- the same shape the section headers have used since v1.11.0, at about
half the opacity.

The gap between the sidebar group and the message area was a bare strip of
window background with a hard edge on both sides. A faint surface wash fades
across it toward the messages, turning the cut into a seam.

And the selected tab bridges that gap: its active fill extends across the
spacing so it touches the conversation it selects -- the classic tab metaphor,
attached instead of adjacent. The bridge is a RowStyle knob (default zero), so
sidebar rows opt in and nothing else inherits it. Hover fills picked up the
standard three-pixel rounding on the way.
2026-08-19 19:20:22 +02:00
JonKazama-Hellion 8a9692a71d fix(chat): size the popups from their rows, not the rows from a guess
An ImGui popup does not grow for draw-list content, so both new popups carried a
fixed minimum width -- and German outran it within a day. The menu clipped
Schnellauswahl and Chat ausblenden mid-word; the channel picker would have done
the same to Freie Gesellschaft on a narrow theme font.

PopupRow gets a CalcWidth that measures label plus icon plus padding under the
faces that will draw them, and both popups take the widest visible entry as
their width. Locale-proof by construction: whatever language writes the longest
string sets the size.
2026-08-19 19:13:30 +02:00
JonKazama-Hellion 3e46600fc3 fix(style): the popup text fed RGBA into the contrast helper -- and a guard so this stops recurring
Fifth and sixth occurrences of the same defect in one day, this time in PopupRow
and three spots in the lab. The menu entries and the channel picker were
unreadable at rest on the green theme and only became legible on hover, because
the hover lerp pulls toward a correctly converted accent -- which is exactly the
symptom the tester reported.

The shape of the mistake is always identical: a raw ThemeColors member (RGBA)
handed to EnsureContrast (ABGR). The compiler cannot see it, both layouts are
uint, and a stray extra RgbaToAbgr around the call makes the result look
plausible while measuring a contrast between two colours that are never on
screen.

So this commit is mostly the guard. preflight Block G runs
scripts/verify-colour-channels.sh, which flags any raw theme member in either
argument of EnsureContrast across the UI tree. Falsified before trusting: broken
deliberately, it goes red; and on its very first real run it caught three
offenders in the lab that a hand-rolled grep had missed minutes earlier.
2026-08-19 19:09:22 +02:00
JonKazama-Hellion d7a308b522 feat(style): option three across the board, every colour contrast-bound
Flo picked the third variant in all four lab sections, with one warning attached:
bind the glyph and text colours to the contrast helper or the theme, or they
drown. The warning was well aimed -- the ghost buttons from the previous commit
were feeding RGBA into EnsureContrast, the same channel-order mistake the header
made this morning, and the pill text was raw TextPrimary on an accent fill with
no check at all. Every colour in the row now goes through EnsureContrast against
the surface it actually lands on.

What changed shape:

The icon buttons glow. Flat at rest, and on hover a soft fill with an accent
glow border rising on the held hover value -- DrawGlowBorder's first caller ever.
The lab version of that glow had its alpha in the wrong byte (DrawGlowBorder
reads RGBA, ApplyAlpha writes ABGR), so what Flo approved was a full-alpha glow
with a dimmed red channel. Fixed in both places, with the alpha byte set by hand.

The channel pill is chamfered, the segmented control's corner language, with the
white depth gradient kept. The rounded Pill widget stays untouched for the
status bar.

The channel header trades its fading rule for a tenth-opacity accent wash from
the top edge. Colour as atmosphere rather than as a box -- at this strength it
survives the violet themes that killed the filled bar in v1.11.0.

The lab stays in permanently, by Flo's call: a dev playground for seeing ideas
in-game against the live theme. Its radios now default to what shipped, so the
window doubles as a record of which variant won.
2026-08-19 19:04:05 +02:00
JonKazama-Hellion 6bdfecb1df feat(chat): the input row learns the window's own language
Five filled plates become two ghost buttons and a menu. The plates were ImGui
defaults sitting between a drawn pill and a drawn status bar -- three shape
languages in the one row a user works in, which is what the tester's screenshot
made obvious. The ghosts follow the sidebar's icon buttons: nothing at rest, a
held hover fill, the glyph lifting toward the accent.

Symbols stay outside the menu because they are used mid-sentence. Theme,
settings, screenshot and hide move in; the screenshot toggle was allowed in only
because its state moved to the status bar first, as an accent pill that shows
while the mode is on. A privacy state behind a closed menu answers nothing.

The input field paints its own rounded surface and hands ImGui a transparent
frame, so the widget draws only text and caret -- the Boutique.Inputs technique
from Character Select+, no rebuild of the widget itself. Focus is a two-pixel
accent rail on the left edge: the same mark the rows, the popups and the message
list already use for "this is where you are".

The channel pill gets the CS+ treatment, a faint white gradient and a one-pixel
light along the top edge. White over the fill rather than a second hue, so it
reads as depth in every palette.

And the popups that open from the row are made of PopupRow now -- the sidebar
row's shape, which is also exactly what CS+ draws for its own popup entries. The
channel picker was the reported case: a drawn pill opening a list of naked
selectables, the style breaking mid-click.

A hundred-odd pixels of button reserve go back to the input field.
2026-08-19 18:30:15 +02:00
JonKazama-Hellion df6296024b feat(style): a lab window for the input-row decision
Four elements, three variants each, drawn side by side in real ImGui against the
live theme. Reachable with /hellion lab.

The alternative was drawing mockups, and mockups are what sent this cycle wrong
once already -- they predate the settings window learning that structure is
typography and only controls get a fill. A picture also cannot show the part that
matters most here: switching themes switches which variant works.

Everything it draws comes from helpers that were already in DrawListExtensions
and had almost no callers. DrawSlipPolygon and DrawVerticalGradient had one
between them, in SegmentedControl. DrawGlowBorder had none at all.

Temporary, and deliberately not behind DEBUG: the decision happens in the build
Flo runs. It comes out once the variants are picked.
2026-08-19 18:22:34 +02:00
JonKazama-Hellion 6449a51daa fix(chat): the channel header had a plate the settings window gave up weeks ago
The mockup draws this band as a filled surface, and I built it that way. The
settings window used to draw its section headings the same way -- and dropped it
in v1.11.0, with the reason written into SectionHeader: a fill reads fine against
blue themes and vanishes against violet ones, because its only distinction from
its surroundings is hue. Tracking is shape, and shape survives every palette.

Side by side with yesterday's build the difference was obvious: the settings
window sets VERHALTEN and TASTENKÜRZEL as tracked caps with a rule that fades
out, while the chat window right next to it carried a lit bar. One window was
three weeks ahead of the other.

So the plate is gone and a fading rule runs between the channel name and the
world, stopping short of it. Same shape the settings headings have had since
ced7ea0.

Worth writing down because the mockups are where this came from, and they are
from before that lesson. They are the starting point of the style track, not its
target -- the target is how far ImGui can be pushed, and the plugin has been past
these drawings since v1.11.0.
2026-08-19 18:08:37 +02:00
JonKazama-Hellion 0abbbc8f8a docs(roadmap): the sidebar comes off the list, the input bar goes on
Both reasons the channel-rows idea existed are gone. It was written when the
sidebar was flat and unstyled; v1.10.0 gave it row surfaces and it already groups
pinned and auto-tell tabs under headings. What was left was a change to how the
plugin is operated rather than how it looks -- and tabs are what users have
learned to use.

Next two are the input bar and the first-run wizard, the last surfaces still
drawn in ImGui defaults.
2026-08-19 17:48:39 +02:00
JonKazama-Hellion de094a8d4f Merge branch 'feature/v1.13.0' into main
Typography cycle. Named type roles instead of one size, a channel header above
the conversation, timestamps in a column of their own, rows with a surface, and
local plus server time in the status bar.

The heaviest finding was not typographic. Screenshot mode reached one of the four
surfaces that draw a tab name, and an auto-tell tab is named Player@World -- so a
picture of the default view named the conversation partner while every message
below it was anonymised. All four share one rule now.

Config version 26. Local state only; repo.json stays on 1.5.6.0.
2026-08-19 17:40:26 +02:00
JonKazama-Hellion b57ca23b9f Merge branch 'feature/v1.12.0' into main
Reconnection cycle. Export, the tab editor, database maintenance and pinning were
unreachable after the v1.6.0 window rebuild; all four are back, the settings
window is translated into 25 languages, and the channel grid decides what gets
stored.

Local state only. repo.json stays on 1.5.6.0 and the download links are
untouched.
2026-08-19 17:40:20 +02:00
JonKazama-Hellion 64f48b1131 chore(release): close the v1.13.0 cycle
Version to 1.13.0 in the csproj, with the changelog and roadmap entries for the
local state. Not published: the public release stays at v1.5.6, repo.json keeps
its 1.5.6.0 manifest and all three download links are untouched.

The changelog leads with the screenshot-mode gap rather than with the typography,
because that is the part that changes what a user's own screenshots contain. An
auto-tell tab is named "Player@World", and three of the four surfaces that draw a
tab name had no rule about it -- so a picture of the default view named the
conversation partner while every message below it was anonymised. Anyone who has
shared a screenshot from an older build should know that.

Config version 26 is in there for the same reason. Its migration marks existing
tell tabs as partner-named, and it says plainly what it cannot do: a tab promoted
to permanent before this version keeps its name and loses every marker, so
nothing in the stored data says where that name came from.

Known issues carry the honest tail: the header recomputes its widths every frame
instead of on the status bar's tick, and all three font handles now rasterise the
full glyph range -- the cost of letting the channel name use the smaller face
without breaking on an umlaut.

The migration self-test asserts what v26 actually does now, rather than only that
the version number moved.
2026-08-19 17:34:49 +02:00
JonKazama-Hellion 3b5001e616 feat(chat): local and server time side by side, and a quieter header
Both clocks in the status bar, in the game's own LT/ST notation. Anyone agreeing
on a time across regions reads them off one line instead of doing the arithmetic
in their head.

Server time is not computed here and must not be. Framework.GetServerTime() hands
it over, so the plugin follows whatever Square Enix does with it -- a local UTC
conversion would be right today and quietly wrong the day that stops holding.
Umbra reads it the same way. The slot drops out on its own like every other one,
and it is empty while logged out, because then there is no server to read a clock
off.

The header gives up its clock in exchange. With both times in the status bar it
would have been the third copy of the same number on one screen, and the header's
job is to answer where you are, not what time it is.

Its title also moves down to the meta size. Tracked caps at body size read like a
headline, and the header is meant to answer a question rather than announce one.
That only works because the meta face now carries the full glyph range: it was
built with an ASCII-sized one on the assumption it would only ever draw clocks
and world names, and a single umlaut in a tab name would have broken it. All
three delegate handles rasterise the full set now -- the honest cost of the
change, and the reason the size distinction is worth having at all.

Two things fell out along the way. The detail no longer needs a flag saying "draw
me in the body face", because there is no glyph the meta face cannot reach. And a
culture-pinning test lost its subject when the clock left, so it asserted nothing
and is gone rather than repaired.
2026-08-19 17:29:20 +02:00
JonKazama-Hellion 439c919d77 feat(chat): a button for screenshot mode, where it can actually be found
It has only ever lived in the right-click menu on a player name. For a privacy
feature that is the same as not existing -- reported as missing by a tester who
has been running the plugin for months and never found it.

Now a camera in the input row, next to hide-window, and lit in the accent colour
while active. A mode whose state you cannot see is worse than no mode: the whole
point is knowing whether the names on your screen are real before you press the
screenshot key.

The button reserve goes from 130 to 156 to fit it. No new string -- the context
menu's label is already translated into all 25 languages and says exactly what
the button does.
2026-08-19 17:13:06 +02:00
JonKazama-Hellion e2b6e7a992 fix(chat): the header measured contrast against the wrong colour space
EnsureContrast works in ABGR. I handed it the theme's RGBA on both arguments, so
it swapped red and blue in the foreground and in the background, measured a
contrast between two colours that were never on screen, and returned a result in
the wrong order -- which then went through RgbaToAbgr a second time.

On a violet surface with a teal accent that came out as dark bordeaux on dark
violet: the exact unreadable pairing the call was there to prevent. Reported from
a real screenshot, not from a test, because nothing here is testable without a
draw frame.

Every existing caller in the codebase passes ABGR -- SettingsPalette hands over
_palette.Abgr(...), SegmentedControl uses fields literally named LabelAbgr and
TrackAbgr. Mine were the only three that did not, and all three were written in
this cycle.
2026-08-19 17:09:05 +02:00
JonKazama-Hellion 80ec7450c8 feat(chat): stop repeating the same minute on every line
The comparison value comes from the message data, not from a variable carried
between rows. In 1.5.6 the loop walked every message and skipped invisible ones
with a dummy, so what it remembered was the last *visible* stamp. The virtualised
list only iterates the visible window, so the row above that window was never
drawn at all -- a carried variable would hold whatever was on screen before the
last scroll, and the first stamp after every jump would be wrong.

No predecessor means draw. Scrolling into the middle of a log would otherwise
swallow the only stamp on screen.

Both draw paths now pass an index; the linear one was a foreach and had none.

The setting is on by default and existed with translations in twenty-three
languages -- Catalan and Italian had kept the English string, so those two are
done now. It needs no fingerprint entry: the column stays reserved when the stamp
is suppressed, so hiding one changes no row's height.
2026-08-19 12:07:39 +02:00
JonKazama-Hellion b63e1eda9b fix(privacy): one rule for tab names, applied to all four surfaces
The header was the only place that knew a tab name can be a person. The sidebar,
the tab strip and a pop-out's window title drew the same "Player@World" string
untouched, so a screenshot of the default view still named the partner while the
messages underneath were anonymised. Guarding one surface out of four guards
nobody.

The rule sits in one place now and all four read it. Names are replaced rather
than blanked: a nameless tab in a strip of tabs is worse to use than a
placeholder, and the sidebar has no room to explain itself. The salt is drawn
fresh on every plugin load, the same reasoning the message path uses -- a stable
label would let two screenshots taken weeks apart be tied together.

The tab strip resolves once and both measures and draws that value. Measuring one
string and drawing another would have sized every tab wrong the moment the mode
came on, which is the kind of thing that looks like a layout bug and gets fixed
in the wrong place.
2026-08-19 12:04:55 +02:00
JonKazama-Hellion 1604186aa1 test(style): pin the type scale table, and mark three mirrors
The arithmetic had tests from the first commit; the table in front of it did not.
Factors is indexed by the enum, so a role inserted in the middle shifts every
factor below it -- and each one still resolves to a plausible size, which is
exactly why nothing would have failed.

Three files were missing their TEST-MIRROR marker despite having mirrors. The
marker is how the drift check finds them.
2026-08-19 12:01:31 +02:00
JonKazama-Hellion 8fea9113b9 fix(privacy): the screenshot guard was reading a field that gets wiped on purpose
This morning's fix hung on TellTarget, and TellTarget is routing state that the
codebase clears deliberately. StripTellBindingOnPromote sets IsTempTab false,
empties TellTarget, and keeps the name -- so a promoted tell tab is called
"Player@World" permanently while carrying neither marker, and falls through both
possible checks. That state survives restarts. A pinned tab whose binding did not
survive a save is the same hole with a different cause; the auto-tell service
logs that case as expected and repairs around it.

The flag is set where the name is built from a partner and is not cleared by
promotion. Renaming clears it, because at that point the user typed it.

Config v26 carries it backwards for tabs that already exist: anything still
holding a tell binding or the temp flag got its name from a partner. Tabs
promoted before this version cannot be recovered -- nothing in the stored data
says where their name came from -- and renaming one has the same effect anyway.

Two more things the header was giving away. Its icon for an auto-tell tab is
derived from the partner and stable across sessions, which is three bits of
linkable information on a picture meant to be shareable; the message path
re-salts its name hashes on every load precisely to avoid that, so screenshot
mode now falls back to a plain envelope. And a world name that is not ASCII --
the CN and KR clients have those, and we ship translations for both -- was being
drawn in the meta face, which carries ASCII and a middle dot. It would have come
out as question marks, the same defect the split was built to prevent.

Plus two that are not privacy: the header had no FontsReady gate, alone among
the drawing components, so its band height and baseline offset were wrong in
exactly the frames this cycle made more common. And a long tab name ran past the
band and got cut mid-glyph at the window edge; it fits now, the way the honorific
header already did it.
2026-08-19 12:00:16 +02:00
JonKazama-Hellion 0399b68d8c fix(settings): let the preview show what the log shows
The preview was four flat lines of text on a plain field. After this cycle the
real log has a channel header above it, a fixed timestamp column, and system
messages in italics -- so the preview had quietly become a picture of a window
that no longer exists. That is the same defect as a widget with no call site,
just pointing the other way: something on screen that stopped tracking what it
describes.

The reserved band grew with it. It is a fixed height that the sidebar mock also
divides by, so adding a row inside without raising it would have pushed the last
message out of the space -- the recurring drawing-into-unreserved-space mistake
this project keeps stepping on.

Preview stamps are fixed rather than live. A clock ticking inside a settings
panel pulls the eye away from the setting being changed.
2026-08-19 11:50:19 +02:00
JonKazama-Hellion 63d1b34b00 feat(chat): two densities that actually look different
Card density puts the sender on its own line with the body indented onto the text
column beneath it, and six pixels of air after each one. That air is what makes a
card read as a card, and it goes through the measured row height so the clipper
plans against it rather than around it.

System messages go italic in both densities. Nobody said them -- it is the game
talking -- and italics carry that in every palette. Colour would have been the
obvious alternative and is the wrong tool twice over: the rule this cycle runs on
says typography solves what typography can, and the channel colours already in
those chunks come from the game and are not ours to dim.

The italic face falls back to the game's own italic rather than to upright text
when the custom one is switched off, so the distinction survives either setting.
2026-08-19 11:48:46 +02:00
JonKazama-Hellion 81e4c9367a feat(chat): give each row a surface to sit on
A wash from the left at a tenth opacity, a two-pixel accent bar on the edge, both
fading in and out on the held hover value rather than snapping.

Two draw paths, because the height arrives at two different times. On a normal
frame the cached height is already correct -- a chat message does not change
height after its first measurement -- so the surface goes down before the text
and costs nothing. On the frame after the cache is dropped no row knows its
height yet, and that is the only time the draw-channel detour is needed. Without
it the entire list would flash bare for one frame after every window resize,
which is not rare: width and display scale are both in the fingerprint.

The gradient and the rounding cannot be one call. AddRectFilledMultiColor writes
four fixed vertices and takes no rounding parameter, so the rounded base goes
down first with the gradient inside it. At two pixels the bar has no visible
corners at all and needs neither.
2026-08-19 11:47:46 +02:00
JonKazama-Hellion ba16ab59e3 feat(style): a scope for drawing behind text that has not been measured yet
Needed on exactly one frame: the one after the height cache is dropped, when no
row knows its own height yet. Every other frame the cached height is already
right -- a chat message does not change height after its first measurement -- and
the caller paints the fill directly without coming near this.

Modelled on LightlessSync's SettingsCardScope, which had already worked out the
two things that make draw channels dangerous. Nesting a splitter into itself
asserts, and Dalamud does not compile asserts out, so the user gets an error
dialog rather than a glitch -- hence the depth count. And a forgotten merge is
not a dropped frame but a permanent one: the commands stay in the channel buffers
and never reach the draw list, then the next frame's split walks into the assert.
Hence the finally, by way of the struct's Dispose.

Fill switches to the background channel and switches straight back, so a caller
cannot leave the channel hanging even by returning early.
2026-08-19 11:46:40 +02:00
JonKazama-Hellion 611dd368cb feat(chat): give the timestamp its own column, and the show-timestamps box its effect back
The stamp used to be text at the head of the line with two spaces after it, so
every sender name started wherever the previous stamp happened to end. It sits in
a fixed column now, measured once per draw from the widest shape the current
format can produce, and the names line up.

The column stays reserved when the stamp is hidden. Collapsing it would make a
per-tab switch change every row height in that tab, and the height cache would
have to carry wrap positions rather than just the format.

tab.DisplayTimestamp has a reader again. It was in 1.5.6 at two call sites and
lost both when cf4705e retired the old chat window; the tab editor has been
writing a setting nobody read since. Same class of defect the last cycle spent
itself on, found in passing here.

The sender draws in the heavier face and the stamp in the smaller one, both
dropped onto the body baseline -- ImGui aligns a row by its top edge, so without
that the stamp would hang. All three faces follow the same FontsEnabled or
UseHellionFont pair every other push site follows; with the game font selected
there is no heavier or smaller variant and the row falls back to one face.

Card density gets the two-line treatment only where there is a sender. A system
message has none, so a header row would be a stamp alone on a line -- an empty
gesture. Those stay single-line in both densities.
2026-08-19 11:46:01 +02:00
JonKazama-Hellion a841942b41 fix(layout): the clock format and the per-tab timestamp switch move row heights
Two more axes the height cache never knew about, and the second one is not even
wired up yet -- it is about to be.

Use24HourClock changes the stamp from 15:45 to 3:45 PM. The stamp sits at the
head of the line with SameLine(0,0), so the wrap width every following word is
measured against shrinks. Rows that wrap near that boundary get a different
height, and nothing dropped the cache.

DisplayTimestamp is per tab, which is why BuildLayoutFingerprint now takes the
tab. It only ever read Plugin.Config before -- the per-tab part of this system is
the gate, one per tab, comparing fingerprints that knew nothing about tabs. The
switch is dead today and gets its reader in the next commit; the axis goes in
first so the cache is right the moment it starts doing something.

Both are toggles, so they sit in the discrete half and skip the settle window.
2026-08-19 11:44:30 +02:00
JonKazama-Hellion ad7421fbed feat(chat): the sample the timestamp column measures against
Eights rather than zeroes. In most faces 8 is the widest digit, and a column
measured from 00:00 gets undercut by a 10:38 -- which would shove the name column
right on exactly that row, the misalignment the column exists to remove.

Two samples because the twelve-hour form is wider. That difference is why
Use24HourClock has to enter the layout fingerprint: switching it moves every wrap
position after the stamp, and the height cache never knew.
2026-08-19 11:43:38 +02:00
JonKazama-Hellion 56a9f3f474 fix(privacy): the header gave away what the log was hiding
Screenshot mode anonymises sender names in the message list. The channel header
I added yesterday sat above that list and showed two things it should not.

The home world, on the right. It narrows a player down almost as far as the
character name does, and the mode exists so a picture can be shared.

Worse, the tab name on the left. AutoTellTabsService builds a tell tab's name as
"Player@World", so a tell conversation had the partner's name and world set in
tracked caps directly above a log where every message had been anonymised. The
one place a reader looks first was the one place still naming them.

The name is suppressed only where it actually names someone -- a tab with a tell
target set. General or Trade stay readable, because they identify nobody, and a
self-named tab is the user's own text.

Found by asking what the new surface shows rather than by a test failing. Nothing
here was failing.
2026-08-19 11:42:13 +02:00
JonKazama-Hellion e810d2479d refactor(style): drop the type role that could never be pushed
TypeRole.Header had no call site and could not get one. The channel header is set
apart by small caps and tracking, not by size, so the role resolved to exactly
Body -- a value that would sit in the enum being equal to another value forever.

That is the precise thing this style track exists to prevent. Five widgets shipped
once with no call site at all, and the rule that came out of it says no piece
lands without one in the same pass. Writing a caller just to satisfy the rule
would have been worse than the rule.

Also cleans two comments the pop-out rewrite left pointing at things that are
gone: a close button that lived on the removed title row, and a method
description with no method under it.
2026-08-19 10:22:25 +02:00
JonKazama-Hellion dfc0cda806 fix(chat): four things the header review found, all of them visible
The self-test was the worst of them, because it is the only tool that makes block
A judgeable at all and it destroyed itself on use. It returned Fail while the
atlas was not ready, and its own weight buttons trigger a rebuild -- which is
asynchronous, not synchronous as the comment claimed. Click a weight, watch the
step go red. It waits now, like the two existing steps that had already worked
this out.

The translated stand-in was drawn in the meta face, whose glyph range is ASCII
plus a middle dot. Fifteen of the twenty-five translations reach outside that, so
"not logged in" would have rendered as a row of question marks in Japanese,
Russian, Korean, Greek and eleven others -- and the measured width would have
been the width of the question marks, so the right edge would have drifted too.
The plan said to keep it on the body face and the comment in FontManager says so
as well; the code simply did not. The detail is two parts now rather than one
string, and each part is measured under the face that draws it.

The header was the only place in the UI pushing RegularFont directly, without the
FontsEnabled-or-UseHellionFont check every other push site makes. With both
toggles off the window draws in AXIS and the header would have drawn in
Inter-Light, at a different size, in a band measured against a third one.

And the icon sat on the text baseline. FontAwesome is a fixed-width handle built
at Dalamud's own size and does not follow the plugin's font setting, so at any
other body size it hangs. The sidebar already knew this and centres against the
row; the header does the same now.

Two smaller ones came along: the minimum-height threshold was compared unscaled,
which would have dissolved it at higher display scales, and the height passed
into that check included the input row -- so "is there still room to read" was
measuring the wrong thing. Both callers now say what sits below them.
2026-08-19 10:21:03 +02:00
JonKazama-Hellion 100290ea4d feat(chat): put the channel header above both windows
Drawn before the scroll child in each, so it stays put while the log moves. The
child's height is deliberately left alone: it is given as a negative value, and
ImGui resolves those against the space still available from the current cursor --
which the header has already reduced. Subtracting it a second time would have
opened a gap of exactly the header's height above the input row, in both windows.

Where the name shows follows one rule: never twice on the same screen. The
sidebar layout is the only place nothing else carries it, so that is the only
place the header says it. The top-tab strip carries it, and a pop-out with its
title bar on carries it in the title.

The pop-out's plain title row is gone, replaced by the header. The comment it
left behind is worth keeping in mind -- an earlier header row was removed exactly
because it repeated the tab name one line below the title bar. That warning is
now the rule rather than a reason to have no header at all.

The trailing detail is the home world and the clock, and the clock follows the
same Use24HourClock setting the message timestamps do. Two clock formats in one
window, with the header sitting directly above a column of timestamps, would be a
defect rather than a preference. Culture is pinned for the same reason it is
pinned in the message list.
2026-08-19 09:58:29 +02:00
JonKazama-Hellion 74f9ff7f16 feat(chat): a header that says which channel you are in
Small caps with wide tracking, not a smaller size. The mockup asks for one pixel
below body text, and one pixel would have cost a whole additional font handle at
full glyph range -- tab names are free user input and can be CJK. Tracking reads
the same in every palette and costs nothing, which is the same argument that
settled the section headings in the settings window.

Only the world and the clock use the meta face. Its glyph range is ASCII plus a
middle dot, so anything that gets translated has to stay on the body face.

Two things it will not do. It drops the tab name where one is already on screen:
a pop-out with its title bar on carries the name in the title, and the top-tab
strip carries it too. Repeating it one line below is the exact defect that got an
earlier header row removed, and the comment left behind at that removal is what
made this rule. And it disappears entirely below a minimum message-area height --
the window minimum is 260px, already shared with the honorific header, the input
row and the status bar, and all of it scales together. A header that leaves two
readable lines is worse than no header.

Both decisions are arithmetic and sit in ChannelHeaderLayout with tests. The
gallery gets an entry despite the header needing a tab and the font handles,
because that window exists precisely because pieces once shipped without a call
site.
2026-08-19 09:55:13 +02:00
JonKazama-Hellion 0551116a0c refactor(sidebar): let the channel header resolve the same icon
Visibility only. The header has to show the icon the sidebar row shows, and the
lookup table alone would not do it: it only answers for a tab with an explicitly
chosen icon, and the default is none. Most tabs reach their icon through the
derivation this method wraps.
2026-08-19 09:52:49 +02:00
JonKazama-Hellion 64f7d9b975 style: let csharpier reflow the widened tuples
Formatting only. The five-element fingerprint tuple and its field declaration ran
past the line limit, and preflight block E is stricter than the check I had been
running per task -- it caught what the narrower filter did not.
2026-08-19 09:51:53 +02:00
JonKazama-Hellion 81456c981b test(selftest): show what each type role actually resolves to
Block A ends with no call site in the message list -- that arrives in block C --
so without this step there would be nothing to look at and two helpers with no
caller at all.

It draws rather than asserts, because asserting proves the wrong thing here.
SimplePushedFont pushes nothing at all when a handle is not ready, silently, and
the text then renders in whatever face was already active. A step that compares
two numbers and reports Pass would sail straight past that. So this one puts a
timestamp, a sender and a body line next to each other and lets them be looked
at, with expected-against-actual printed underneath.

The three weight buttons exist because the alternative was three builds and a
plugin restart between each, and nobody compares a typeface across a restart.
RebuildDelegateFonts is synchronous on this thread, so the sample row picks up
the new rasterisation on the next frame.
2026-08-19 09:50:56 +02:00
JonKazama-Hellion 0916f8d1fb feat(style): put mixed sizes on a shared baseline
ImGui lines items up by their top edge. ItemSize only shifts anything when
CurrLineTextBaseOffset is non-zero, and that stays zero unless
AlignTextToFramePadding ran -- so a meta timestamp beside a body-sized name would
sit flush at the top and float above the baseline.

The correction is the difference of the two ascents, scaled. The scaling looks
like it is applied twice and is not: Dalamud rasterises at SizePx * GlobalScale
and then divides the metrics back down, so ImFont.Ascent comes out logical.
Drawing multiplies it up again. The comment says so, because the first reviewer
to see this file read it the other way.

No call site yet -- the self-test in the next commit takes it, and the message
list takes it in block C.
2026-08-19 09:49:21 +02:00
JonKazama-Hellion 147034bda5 fix(layout): four axes that could always stale the cache, and the new roles
The height cache keys on a fingerprint of everything that can change a row's
height. Four things that can were never in it:

- ItalicFontV2.SizePt. ChunkRenderer pushes the italic face mid-row for emphasis,
  so there have been mixed sizes in a single line all along -- nobody called it
  that. Changing only the italic size moved every wrapped row and left the cache
  untouched.
- ItalicEnabled, which swaps between ItalicFont at its own size and AxisItalic at
  the base size.
- FontsEnabled and UseHellionFont, which swap the face outright. This pair is the
  quiet one: both size fields default to 12.75f, so the fingerprint did not move
  at all while the glyph widths underneath it did.

On top of those, the two new role sizes. They follow the base arithmetically, but
the resolved value is what belongs in the fingerprint -- a theme override moves
the base without moving any factor.

The three toggles go in the discrete half so they bypass the settle window, the
same way density already does. The sizes are sliders and wait it out.

Falsified rather than assumed: dropping FontsEnabled back out of Discrete turns
the new test red, so it is measuring the axis and not just passing.
2026-08-19 09:48:35 +02:00
JonKazama-Hellion 34e343d8f2 feat(fonts): a handle for the sender and one for the meta line
Two roles need a face of their own, and they need it for opposite reasons.

The sender is meant to carry weight. The mockup says 600, and there is no bold
face anywhere in the plugin -- the bundled file is Inter-Light and the game's
Axis is a single weight. So the weight comes from rasterising the same outline
denser, via RasterizerMultiply. That only works on the delegate path: with both
font toggles off the game font handle draws and has no such knob, and the sender
falls back to leaning on channel colour alone. Deliberate limitation, not an
oversight.

The meta face goes the other way: smaller, and on a glyph range of about eighty
entries instead of the full set. Timestamps and world names are Latin in every
client FFXIV ships, so ASCII plus the middle dot covers what this face will ever
be asked to draw. A full range would have rasterised the whole CJK block a second
time for nothing. Anything translated stays on the body face.

Two things in the rebuild path had to change with them. The handles now go up
inside a SuppressAutoRebuild block -- without it, one size change meant four
separate atlas rebuilds instead of one. And FontsReady checks both new handles
unconditionally, unlike ItalicFont which is allowed to be null: a handle that is
not ready makes SimplePushedFont push nothing at all, silently, and the first
frame after a rebuild would measure the wrong face and write those heights into
the row cache.

Both font self-tests were extended to match. A handle nobody asserts is a handle
that can go missing for a release without anyone noticing.
2026-08-19 09:46:34 +02:00
JonKazama-Hellion 6d2bb95528 feat(style): name the four type roles
Body, Sender, Header, Meta. Three of them share the base size, which looks like
an oversight and is not: the sender is set apart by weight and the header by
small caps with wide tracking. Neither of those is a size, and solving them with
size instead would turn the log into a ransom note. Only meta steps down, because
it is meant to be skipped over rather than read.

Factors sit in a static array rather than as consts. The master spec puts
typography under theme control, and ThemeTypography is already the declared
extension point for it -- a const would wall that off before anyone gets there.

No caller yet. FontManager takes the first one in the next commit; that is the
one place in this cycle where a piece lands before its call site, and it closes
inside the same block.
2026-08-19 09:44:31 +02:00
JonKazama-Hellion 58830aecec feat(style): the arithmetic behind a type scale
Quarter-point rounding, not whole points. The base size is 12.75pt, so rounding
a derived role to whole points would move it further than the step between two
adjacent base sizes -- the scale would quantise away the difference it exists to
express.

The floor is what keeps the meta role legible when someone runs a small base
size; below about seven points a timestamp stops being readable at any display
scale.
2026-08-19 09:44:05 +02:00
JonKazama-Hellion fc67c0852a fix(text): give the wrap calculation the scale imgui actually asks for
CalcWordWrapPositionA takes a scale, and imgui means size / FontSize by that --
the ratio between the size being rendered and the size the face was baked at
(imgui_draw.cpp, CalcTextSizeA). We were handing it ImGuiHelpers.GlobalScale.

That is the same number today, but by coincidence rather than by design. Dalamud
bakes every font at SizePx * GlobalScale and then divides the metrics back down,
so g.FontSize / font->FontSize lands on GlobalScale for every handle regardless
of its size. The coincidence holds only while one face draws a line.

The typography work starting with this cycle puts a second size into the same
line, and there the two numbers separate: the wrap would be computed for the
wrong size while CalcTextSizeA keeps measuring with the right one. Measured
height and drawn wrap would drift apart, and the virtualised clipper plans
against the measured value.

No behaviour change expected here -- the expression evaluates to what the old
constant already was.
2026-08-19 09:43:19 +02:00
JonKazama-Hellion b388dcb2de chore(release): close the v1.12.0 cycle
Version to 1.12.0 in the csproj, with the changelog and roadmap entries for the
local state. Not published: the public release stays at v1.5.6, repo.json keeps
its 1.5.6.0 manifest and all three download links are untouched.

The changelog leads with the storage change rather than burying it under fixes.
Until this release the unknown-channel failsafe was applied to known channels
too, so an installation that had unticked channels and left the failsafe on was
storing more than the grid said. From here the grid decides, which means those
installations store less than they did yesterday. Nothing already written is
touched, but a user who compares the database against last week should find the
reason in the notes and not have to guess.

Config version 25 is recorded there for the same reason. There is no migration
behind it -- the storage rule changed shape, and the stamp says so.

Known issues carry the honest tail: the database viewer and the emoji picker are
still English, 245 orphaned resource keys remain as the inventory of what the
v1.6.0 rebuild lost, and the licence text still contradicts itself between the
About tab and the translated resources.
2026-08-19 08:35:18 +02:00
JonKazama-Hellion e0c9efca05 i18n: the five spots the smoke test found, and a BOM in the export
Reported from a real pass through the window.

The theme categories were a static readonly array, so the five names
froze at whatever language the plugin started in and a runtime switch
relabelled the entire window except them. Same shape as the layout
labels earlier in this cycle; this one got missed because replacing the
literals with resource lookups looks finished until you actually switch.

The status bar built its counts from English literals -- tab, tabs, msg,
tell, tells -- and the privacy pill said "Privacy-First" in all 25
files. The thousands separator follows the user's culture now too, so
German reads 1,2k rather than 1.2k.

The live preview claims to show what the window will look like. It was
showing English channel names next to a translated placeholder, which is
worse than either. Channel labels come from ChatType.Name() now and the
status slots share the strings with the real status bar. The four mock
chat lines stay English on the earlier decision.

And the export wrote a byte order mark. Encoding.UTF8 emits one, and a
leading U+FEFF makes the JSON invalid for every strict parser --
confirmed against a real export from the game, where python's json.load
refused the file. CSV keeps its BOM, because without one Excel guesses
the codepage and mangles every non-ASCII name.

The self-test that was supposed to catch that read the file with
File.ReadAllText, which strips a BOM while detecting the encoding. It
reads bytes now.

The status bar tests asserted English literals and started failing on a
German machine -- they pin a fixed culture now instead of inheriting the
locale of whoever runs them.
2026-08-19 08:24:31 +02:00
JonKazama-Hellion fdb1a98519 fix(privacy): the cleanup could never be applied, and three more from the audit
The cleanup preview marked itself stale before it could be drawn. The
gate bumps a revision on release so a preview cannot survive a wipe; I
then made the preview take the gate, so its own release invalidated it
every single time and the apply button never appeared. The feature has
been shipping non-functional since it was written, with a self-test that
asserted the exact bump that killed it.

Read-only operations no longer move the revision, and preview and
maintenance have their own marks instead of borrowing Cleanup -- which
also stops the five-second metadata refresh from expiring previews, and
stops the UI announcing "another operation is running: cleanup" during a
VACUUM.

The JSON export produced invalid JSON. The chat relation kinds were
interpolated straight into the output, and interpolating an enum writes
its member name, so every message with a recognised relation came out as
"source_kind":LocalPlayer. That is the file a GDPR access request goes
out on. The self-test wrote a JSON file and never parsed it; it does now.

Retention with the limit at zero still deleted. The slider is labelled
"0 = never" and the sweep seeded 31 spec defaults unconditionally before
reading the user's overrides, so zero still lost free company, linkshell
and party history after ninety days -- and the short-circuit written for
exactly this case could never be reached, because the map was never
empty.

A wipe that worked reported that it had failed. VACUUM needs the
database to itself, the refilter walks a lazy reader on the primary
connection outside the lock, and the two collide -- after the DELETE has
committed. The delete paths no longer let that escape: the rows are
gone, an uncompacted file is a housekeeping problem, and telling
somebody their history is still there when it is not is a different kind
of problem.

Also:

- CSV cells starting with =, +, - or @ get a leading apostrophe. The
  content is text other people typed into a chat channel and the file
  exists to be opened in a spreadsheet.
- An export that matched nothing no longer replaces the previous one. It
  used to write its header, move it into place, and then report that
  nothing matched. Dalamud's save dialog offers no overwrite
  confirmation to fall back on, so this is the part that had to move.
- The retention sweep says so when it loses the race for the gate, and
  routes its notifications through the teardown check like everything
  else.
2026-08-19 07:17:33 +02:00
JonKazama-Hellion 9ea9e96145 fix: close what the style review found, starting with a gate the metadata skipped
The real defect first. RefreshDatabaseMetadata was the one worker of six
that never took the shared lock, and its flag was the one of six missing
from the tab's busy state. It calls MessageCount, which holds the read
lock, so a wipe could start while it was in there -- and the tab would
not have known to grey the button, because it could not see the worker.
Both halves fixed. The pattern is why: seven near-copies of one worker
skeleton, and each copy decided something slightly different.

The clear button failed silently when its thread could not start. The
most destructive control in the plugin, pressed, and nothing happens,
with no way to tell that from a wipe that worked -- while the three
harmless workers beside it do report. Maintenance was the mirror: its
comment promises refusals are said out loud, and then swallowed the
actual failure. Three start-failure paths also bypassed the notify
helper that carries the teardown check, three weeks after it was added
for exactly that.

The database numbers now wait for a real read, like the clear hint
already did. Zero bytes and zero messages read as an empty database, not
as a number nobody has fetched.

SelectionAfterDelete is gone, with its three tests. The accordion has no
selection, so its return value went into a discard -- a function
answering a question the interface does not ask, with green tests
guarding nothing. The project's own self-test README calls that the
anti-pattern of record.

Six new keys replaced by the translated orphans that already said the
same thing. A commit earlier in this cycle is literally called "stop
duplicating a key" and these went past it. The duplicate button also had
the label "Add", which is the one string out of ninety-four that was
never written.

Tests: CleanupDeleteTypes had none, and with the failsafe on -- how a
fresh config ships -- it is the path every cleanup takes. Four now,
including the one that matters: an empty list deletes nothing rather
than everything.

And a self-test for the gate wiring, which is what would have caught the
metadata worker. The unit tests prove the gate works; nothing proved the
workers use it.
2026-08-19 07:09:54 +02:00
JonKazama-Hellion e7b76fb21b chore(i18n): remove the keys whose features were removed on purpose
Fifty-four keys across 25 files, and a script that can find the rest.

The script reports rather than deletes, because a key with no caller is
a question and not a verdict: this cycle has twice found one that only
described a feature whose button was torn out, and deleting it would
have made the restoration cost 25 files of re-translation. The answer
lives in the git history of the deletion, not in a grep.

So only the ones where that history says the feature went on purpose:
the web interface, the settings card overview the sidebar replaced, the
save-and-discard model this window does not have, the LiteDB migration
dialog, and three one-time announcements for versions long past.

Plus nine this cycle superseded itself, including the three notes
telling the reader to press Save first.

251 keys still have no caller. That is not a to-do list -- it is the
inventory the search pass turned up: timestamp layouts, collapse
duplicate messages, the About tab's prose, the honorific glow, the
novice network button. Every one of them describes something that used
to work. They stay until each has been decided one way or the other,
which is the whole premise of this cycle.
2026-08-19 06:51:56 +02:00
JonKazama-Hellion bbfb9fc630 feat(tabs): the tab editor is back
There has been no way to create a tab, delete one, reorder them, or
choose what any of them collects since the settings window was rebuilt
in May. The five tabs a config happened to have were all a user could
ever have. Every label for this was sitting in the resources, translated
into 25 languages, with no caller.

An accordion, not the list-and-detail pane the plan sketched. The
settings column is narrow, every other tab in this window is a stack of
collapsible sections, and a split pane inside one of them would be the
only thing here that reads differently without buying anything.

Channels go through the matrix that already existed, unchanged: it knows
the groups, the sub-matrices and the ExtraChat channels, and it is
localised. What it does not know is copy-on-write -- it mutates the
dictionary it is handed -- so it never gets the tab's own. Edits land in
a working copy and are published as one reference swap when the user
leaves the tab, and only if something actually changed.

Saving is deferred behind a dirty flag with a short idle, not
IsItemDeactivatedAfterEdit. That idiom defers for sliders and text
fields, which stay active across frames; a checkbox activates and
deactivates inside one click, so it would fire exactly as often as the
return value and write the config file once per box.

Deleting closes the pop-out first, or the pool keeps a slot bound to a
tab that no longer exists. The last editable tab cannot be deleted at
all: the message list has no empty state. Temp tabs are not editable
here -- their name is a conversation partner and the auto-tell service
owns their lifetime -- so they are skipped entirely.

Also E2: Tab.AddMessage stamps LastActivity for every message now. The
condition that used to gate it filtered on InactivityHideChannels, a
setting belonging to hide-when-inactive, and that feature lost its
reader in cf4705e. Which tell tab the pool drops first -- the only thing
that reads the stamp -- was hanging on a setting for something that does
not happen. The three channel fields behind it are gone.
2026-08-19 06:50:23 +02:00
JonKazama-Hellion 3a1b863def i18n: adopt the client's word for tell, and translate the appearance tab
Two decisions, both yours.

Where Square Enix ships a client in a language, that client's word wins.
German says Flüstern, French message privé, Japanese テル, Korean
귓속말, Simplified Chinese 密语. Everywhere else there is no official
client and the loanword is what players actually say, so it stays.

That meant rewriting the whole corpus in those languages rather than
just the new keys, which is the reason the split existed in the first
place: forty German values and thirty-seven French ones carried the old
word. /tell is untouched, because that is a command and not a noun.

The mechanical pass left French with three agreement errors -- "des
message privé", "ce onglet", "messages de message privé" -- which is
what happens when you substring-replace a language with gender and
number. Fixed by hand.

Traditional Chinese keeps 悄悄話, which the file already used nineteen
times; it has no official client of its own.

The appearance tab is translated as well. Thirty keys: the colour
editor's groups and buttons, the theme categories, fork and import and
export, the font labels and the preview's input placeholder. Theme token
names stay English -- WindowBg and TextPrimary are JSON keys, not
prose -- and so do the brand strings.

465 keys, 25 files, no gaps, no orphans, no placeholder drift.

Still English and not in this commit: the database viewer behind
/hellionView, which is a documented user command rather than a
developer tool, and the symbol picker. Both are their own block.
2026-08-19 05:11:05 +02:00
JonKazama-Hellion 5991f49c59 i18n: hold the new strings against the glossary the plugin already had
A language review over all 24 files found that the translation batch had
been written as if the file were empty. It is not: eleven years of
FFXIV vocabulary and several hundred existing values already decided how
this plugin says things, and the new strings disagreed with them.

Three said something wrong rather than something unusual:

- Norwegian called opacity "tetthet", which is density -- and the same
  file uses that exact word for compact density, so one word stood for
  two different settings.
- Danish called the brand section "Brand", which in Danish is fire.
- Turkish called a manifest a notification, in a window that already has
  a notifications section.

Then the glossary itself. "tab" is zakładka in Polish, tab in Romanian
and Danish; "plugin" stays plugin in five languages that had translated
it; "pop-out" is a loanword in six. The Shift key keeps its name in
Swedish, Finnish and Italian, because that is what is printed on it.
Fixing pop-out also shortened the three longest row labels in the batch
past the point where SettingRow would have clipped them.

Czech was the clearest outright error: the existing file addresses the
reader informally throughout, and five new strings switched to the
formal form.

And a gap in my own previous fix: I had moved four of the five tell
strings to the established loanword and missed the fifth pair, so the
failed-tell warning still said "Flüstern" while its neighbours said
"Tell".

435 keys, 25 files, no gaps, no orphans, no placeholder drift, and every
one of the five tell keys now carries the same word in every language.

Whether German and French should say Flüstern and message privé rather
than tell is a real question -- both game clients do -- but that is a
glossary decision for the whole file, not something to introduce through
four new keys.
2026-08-19 00:28:24 +02:00
JonKazama-Hellion b3c0ec73ca i18n(settings): keep the game's own vocabulary, and stop duplicating a key
A review pass found the translation commit had introduced a split rather
than closed one.

Every existing string in this plugin leaves "tell" untranslated -- it is
what the game calls the thing, in twenty values across the German file
alone. My new keys translated it, so the channels tab showed "Auto-Tell-
Tabs" and, two rows below, "Flüstern automatisch öffnen". Thirteen of
fourteen sampled languages had the same break. The four affected keys
now use the established word, which also fixes a German line that had
tells "aufgehen" like a door.

Turkish said the opposite of what the control does: saydamlık is
transparency, the slider is opacity, and 1.0 means fully opaque. Every
other language uses the opacity word. Corrected, along with the inactive
one beside it.

Compact density had grown a second key for a field that already had one.
Appearance_UseCompactDensity_Name and _Description were sitting there
with no caller -- which is precisely what this cycle exists to fix -- so
the chat tab uses those and my duplicate is gone again. The German
wizard label for the same field said "Kompakter Density-Modus"; it says
the same thing as the other two now.

Also: Hungarian called a pop-out window "kiemelt" (highlighted), the
project's word is "kiugró"; German called it "ausgeklappt", which is
what a menu does; Italian and Polish had a clumsy inactive-opacity
label.

435 keys, all 25 files, no gaps, no orphans in either direction.

One claim in the previous commit was wrong and is worth stating plainly:
it said only log lines, thread names, developer tools and brand strings
remained English. The appearance tab is still English throughout -- the
theme picker, the colour editor, the font section, the live preview --
and so are parts of the database viewer, which is a documented user
command, not a developer tool. That is a separate block, not a footnote.
2026-08-19 00:24:28 +02:00
JonKazama-Hellion 83306f1f47 i18n(settings): translate the settings window
The settings window was rebuilt in v1.10.0 and v1.11.0 with its labels
written straight into the C#. Every section heading and most row labels
across five tabs read English in all 25 languages, which the memory
notes had accepted as a known backlog.

Forty-nine keys close it: seventeen section headings, the rows under
them, and the two layout choices. All 25 languages, 437 keys each, no
gaps and no placeholder drift in either direction.

The layout labels are a property rather than a static array now. A
static one would hold whichever language the plugin started in, and this
plugin switches language at runtime.

What stays English, deliberately: log lines and thread names, which no
user reads; the two developer tools behind Shift plus Ctrl+Shift, per
the decision that developer surfaces stay English; and the About tab's
brand lines, attributions and licence identifiers, which are names.
2026-08-19 00:08:19 +02:00
JonKazama-Hellion 6bb020547d feat(tabs): groundwork for the tab editor
The two halves that can be settled without a window, before the window
exists.

Concurrency first, because the editor is the first thing that ever
writes SelectedChannels after load. All three channel-filter fields are
read without a lock from the pending-message thread, the filter worker
and the draw thread, and mutating a live Dictionary while Matches walks
it is the standard way to get a wrong answer on somebody else's stack.
ReplaceChannelFilter builds the replacements and swaps the references,
so a reader sees the old set or the new one and never half of either.

It deliberately stops short of making the three writes one atomic step.
A reader can catch the new dictionary with the old ExtraChat flag for a
single message, which the editor's closing clear-and-refilter
reconsiders anyway. Doing better would mean one reference for all three,
and all three are serialized fields whose shape the config file already
has.

Then the index maths, which is where temp tabs make this more than list
arithmetic. They live in the same collection, they are not editable --
their name is a conversation partner and deleting one would be deleting
a conversation -- and a move has to step over them rather than swap with
them, or moving a tab down and back up would not return it to where it
started. Reversible in the editable order, which is the order the user
sees; the sidebar draws temp tabs under their own headers regardless of
where they sit in the list.

Twelve facts, and one of them started out asserting the wrong property:
that the whole list is restored by a move and its reverse. It is not,
and it does not need to be.

The last editable tab cannot be deleted. The message list has no empty
state, so a window with nothing to draw is not a state to offer.
2026-08-18 23:39:43 +02:00
JonKazama-Hellion 8e38e3e805 refactor(config): delete what was never read, restore what was only orphaned
Block D of v1.12.0. The line between the two is the whole job, and I got
it wrong once on the way: six cache fields on Tab looked dead because
nothing writes them, and nothing writes them because AutoTellTabTint and
TabTintCache went out with the chat window in cf4705e. Deleting the
fields would have cemented a loss instead of recording a decision.

So they are back, and the sidebar uses them again: an auto-tell tab is
tinted and glyphed from its partner, twelve colours against seven icons.
Four open tells are no longer four identical envelopes in one colour.

Their own header promised the same partner keeps its colour "across
sessions" while hashing with string.GetHashCode, which .NET salts per
process -- every game start reshuffled every tab. FNV-1a now, with a
lowbias32 finalizer that is not decoration: without it a probe over 144
similar keys reached six of the twelve colours, because the caller takes
the low bits with a modulo and FNV leaves those correlated. Three pinned
values guard it, which is also the only assertion that can catch a
regression to a salted hash.

The same question, asked of the three hide conditions this block had
quietly orphaned: HideDuringCutscenes, HideInBattle, HideWhenNotLoggedIn
all had readers in v1.5.6 and lost them in the same commit. Two of them
are states rather than conditions -- a cutscene the user dismissed stays
dismissed until it ends, and combat must not seize a chat that is
already hidden for another reason -- so they come back as a small state
machine with eight pinned transitions, and three toggles whose labels
were already translated in all 25 languages.

Actually deleted, with a reader search each time:

- Six per-tab hide fields. Their reader was the pop-out window and it
  stopped consulting them in cf4705e. Per-tab was the wrong unit anyway:
  "hide during cutscenes" is a statement about the screen.
- Tab.ChatCodes, whose migration the v16 schema gate had already made
  unreachable.
- InactivityHideTimeout and InactivityHideActiveDuringBattle, MaxLinesToRender
  which had stopped bounding anything, and the 155 lines of
  Configuration.UpdateFrom with no caller at all.

Config version 25, at all three places that carry it. No migration step:
the gate only refuses anything under 16 and Json.NET drops keys it does
not know, so the deleted fields simply stop being written.

One thing a review pass caught that matters more than any of the above:
the clone parity guard had gone hollow. It compares collections by
count, ChatCodes was the only collection the probe seeded, and removing
it left the guard comparing zero against zero. Verified by making
Tab.Clone discard both remaining collections and watching every
assertion stay green. The probe seeds them now, and the same sabotage
fails as it should.
2026-08-18 23:36:54 +02:00
JonKazama-Hellion 6829a80ff2 refactor(wizard): drop LoadPreviousSession, which never did anything
The wizard asked for it, coupled it to a neighbour, listed it in the
summary as applied, and wrote it to the config. No code in the plugin
has ever read it. A wizard that collects a decision and reports an
effect that does not happen is worse than one that never asked.

Its partner, FilterIncludePreviousSessions, has a real reader and stays.
The coupling was two-way -- switching this on forced the partner on,
switching the partner off forced this one off -- so removing it leaves a
single checkbox that means what it says, and the summary line now
reports the setting that actually took effect.

The self-test asserted that skipping step 3 does not overwrite either
field. That assertion is rewritten rather than repaired: it was pinning
the null-semantics of the wizard's pending state, which still matters,
just with one field instead of two.
2026-08-18 22:54:06 +02:00
JonKazama-Hellion e8d06e05fa fix(input): put the right-click menu back on the input field
Reported by a tester: the input field in v1.5.6 had right-click actions,
the current one has no right-click at all.

Correct, and the commit before this one put those actions in the wrong
place. The v1.5.6 menu was ImRaii.ContextPopupItem("ChatInputContext")
bound to the input field itself; I hung the two token entries off the
chat-message menu, where the rest of that window's items had landed.
They are on the input field now, which is also where they are useful:
you insert a token while composing, not while reading.

Two details from the original that the misplaced version had lost:

- The agent pointers are null-checked. Both can be null during a zone
  transition, which is exactly when somebody is most likely to be typing
  a flag into party chat.
- Inserting refocuses the field and puts the caret behind the token.
  Picking from a menu and then having to click back into the field is
  the kind of friction that makes a feature go unused.

Hiding the chat is not repeated in the menu. It was in the v1.5.6 one,
but it has its own button two widgets to the right now, and one way in
is enough.
2026-08-18 22:45:36 +02:00
JonKazama-Hellion 3cb20b6f65 feat(chat): insert map-flag and item-link tokens again, and finish the resx parity
The two menu items went out with the v1.5.6 chat window in cf4705e.
Their strings stayed, in the base file only, so the feature was gone and
its labels were untranslated in all 24 other languages.

They live in the chat context menu now, next to hide-chat, which is
where the rest of that window's items ended up. The game expands <flag>
and <item> at send time, so appending the literal token is the whole
implementation; each entry is disabled while its precondition is missing
so a token cannot be sent only to expand into nothing at the other end.

ChatLog_ScrollToBottom_Tooltip is the one that stings: it has had a
caller since v1.9.0 and existed in the base file alone, so every player
outside English read that tooltip in English.

All three are translated now, and with them the resource files are at
full parity for the first time -- 25 files, every key in every one.
2026-08-18 22:43:09 +02:00
JonKazama-Hellion 75c4acd19a feat(settings): make eleven settings reachable again
Every field here has a reader in the running plugin and had no control
in the window. The config file was the only way to any of them.

HideChat is the one that mattered. It defaults to on, it suppresses the
game's own chat window, and the only other path to it is a right-click
item that sets it to true and can never set it back. Anyone who used
that item once had to edit JSON to get their chat back. The new toggle
reads and writes the same field, so the two agree instead of fighting.

The rest, by tab:

- Window: the three remaining hide conditions, the preview minimum that
  belongs to a toggle already on screen, native item tooltips and their
  offset.
- Chat: an emotes section holding the BetterTTV switch, the cache state,
  and an editor for the blocked-code list that has been in the config
  since v1.0 with nowhere to edit it. Blocking one code is a finer
  instrument than switching emotes off wholesale. Plus auto-translate
  sorting.
- General: the failed-tell warning. The game reports a failed tell in
  the log only, where somebody who is typing does not see it.
- Data & Privacy: battle messages. It decides whether battle lines are
  persisted at all, which makes it a storage decision rather than a chat
  one, and it sits in front of the whitelist rather than inside it.

MaxParallelPopouts stays out. It is read once in the pool's constructor,
the windows are registered once, and registering at runtime is
explicitly forbidden -- a slider would do nothing until a reload, which
is exactly the kind of decoration this cycle exists to remove.

Four new strings in all 25 languages; the other fifteen labels were
already translated and waiting.
2026-08-18 22:40:54 +02:00
JonKazama-Hellion 1bb968211b feat(tabs): give pinning a way in, and a way back out
Pinning has been complete since v1.4.7: pools, a cap of five,
persistence, logout symmetry, the notification when the cap is hit. The
menu that called it went away, and nothing has called it since.

That is not only a missing feature, it is a dead end in saved data. A
tab pinned in v1.5.6 survives every save and load and permanently
occupies one of the five slots, and there has been no way anywhere to
release it. Unpin is the reason this task exists.

So the context menu grows a pin section for temp tabs, and the sidebar
grows the marker that says which rows are pinned -- a small thumbtack in
the icon's lower left, drawn from the row's own rectangle so it claims
no layout of its own. The unread badge owns the upper right, and badges
in this sidebar are where drawing into unreserved space caught this
project last.

At the cap the item is disabled rather than hidden: that is a state the
user can undo by unpinning something, and the tooltip switches to say
which. Five translated strings that had no caller now have one.

Promote-to-permanent stays out. It was removed on purpose after a tester
kept hitting it by accident. Reconnecting every method that lost its
caller, without asking why it lost it, would rebuild the problem this
cycle is supposed to be cleaning up.
2026-08-18 22:35:13 +02:00
JonKazama-Hellion 4f3bdc3c7b fix(privacy): translate the channel list and give it back its presets
Reported after a translation pass: the channel list in Data & Privacy
reads English in every language. It was not, as assumed, the client's
own naming -- the list called ToString() on the enum member, so it
showed "FreeCompanyLoginLogout" while Language.ChatType_* sat next to it
holding "Freie Gesellschaft (An-/Abmeldung)" in all 25 languages.

Fixing the label exposed how little else the list had. Six translated
strings written for exactly this control had no caller: the explanation
of what it does, the note that it governs the database and not the chat
window, and three presets -- data minimisation, select all, deselect
all. Eighty-nine checkboxes without a "recommended" button is not a
choice anyone makes.

So the list now carries the same eight groups the export uses, with the
individual channels one fold away. It is the one control that decides
what reaches the database; the two screens describing channels the same
way is worth more here than anywhere else.

The unknown-channel switch gets its description back, and the telemetry
section stops being the last English literal in the tab. It stays a
statement rather than a switch: a toggle would imply there is something
to turn off.
2026-08-18 22:30:12 +02:00
JonKazama-Hellion 9b634f54e9 fix(tabs): stop a tell from a popped-out partner hijacking the main window
Reported from the field: a new tell from someone whose tab is popped out
throws the main window onto the General tab, every time.

The router revealed the tab by activating it in the main window. That
window does not display a popped-out tab -- PickMainActiveTab re-anchors
on the next frame, and it anchors to the FIRST non-popped tab in list
order, not to the one the user was reading. So the reveal did nothing it
intended and threw away the active tab on the way.

Nothing needed revealing in the first place: the tab was already on
screen in its own window. That decision now lives in PlanTellReveal,
next to the pop-out helpers it belongs with, pure and pinned by nine
facts -- the mode, the switch and the popped-out state have eight
combinations between them and only two of them should touch anything.

ActivateTab refuses a popped-out tab outright as well. The router is the
caller that got it wrong, but the invariant belongs to the window: its
active tab is never one that something else is drawing.
2026-08-18 22:25:23 +02:00
JonKazama-Hellion 4f4f5fc86a docs: finish holding the documentation against the code
The first pass through A6 caught the dead file paths and the two GDPR
sections. A review pass walked every remaining claim and found eight
more that no longer describe the plugin.

The privacy notice carries a "last reviewed" stamp and commits, in its
own text, to keeping it accurate for the version it describes. It still
said v1.1.0 after the block that rewrote two of its sections.

Both documents announced two outbound network calls in their opening
paragraphs. The Lodestone font download went away in v1.0.4 and the
notice explains that further down, so the summary contradicted its own
body. There is one call, and it is BetterTTV.

The emote cache is `EmoteCacheV1/`, which the notice states correctly in
one place and wrongly in two others, two lines above a line this cycle
had already touched.

The list of buttons that open a browser named a Ko-fi page that appears
nowhere in the source, an issue tracker and a website that have no
button, and left out the Discord invite and the two Honorific links that
do. In a section that exists precisely to enumerate where a click sends
you, both halves matter.

The README described the pop-out input bar as an opt-in under a settings
section that does not exist. Neither does the switch: PopOutInputEnabled
has no reader, the input bar is unconditional, and the field belongs on
the deletion list. Said plainly instead.

Also: the export narrows by age, not by a date range, in both documents;
the tab is called About, not Info, and it has no per-translator list;
the sections are Colours and Integrations.

Plus a note the users affected by it deserve: the v24 migration switches
the privacy filter off where it was on with nothing selected, and until
now that was only in the log.
2026-08-18 22:14:45 +02:00
JonKazama-Hellion 06ef0bfb1c fix(input): let the arrow keys walk the sent-message history again
Reported against v1.11.0: type a command, send it, need it again, and
up-arrow does nothing. v1.5.6 recalled it.

Everything needed was already in the tree. InputHistoryService holds the
last thirty entries with move-to-newest dedup, CompactInputHistoryNavigator
owns the cursor maths, and both have their own test mirrors. Neither had
a single caller, and the input field never set CallbackHistory, so ImGui
had no reason to raise the event in the first place.

So: the flag goes on, the callback grows a history branch, and TrySend
pushes the trimmed line before it clears the buffer. Editing ends the
walk, otherwise down-arrow after changing a recalled line would jump to
the next entry and discard the edit.

The cursor is per input bar while the history is global. Which line each
window is looking at is not something the others should inherit.
2026-08-18 22:13:41 +02:00
JonKazama-Hellion 0279a1a9d6 fix(privacy): close the gaps three review passes found in block A
The worst of them made the block's own privacy promise backwards.

PrivacyPersistChannels was given a non-empty field initializer so a
fresh config would record conversations only. Dalamud deserialises with
Json.NET's defaults, which means ObjectCreationHandling.Auto: a
collection field that already holds items gets *populated*, not
replaced. Verified against Newtonsoft 13.0.3 -- saved [] loads as the
initializer, saved [Say] loads as initializer plus Say. So the change
would have unioned the privacy-first list into every existing config on
load and switched channels back on that the user had unticked, while
also making the v24 migration unreachable and its self-test vacuous. The
field is empty again and the seeding moved to CreateFresh, which only
runs when there is no config file at all.

Cleanup could delete a channel it had promised to keep. The allowlist
could only name channels that were already in the database when the
preview ran, so an unrecognised channel whose first message arrived
afterwards fell outside it. Where the failsafe is on, the deletion now
names what goes -- known channels that are not on the list -- instead of
what stays. The window closes completely, and a listed channel that
happens to be empty right now is safe for the same reason.

The cleanup preview was the one long operation that never took the
shared lock, while holding an open reader across a full-table scan.
That is precisely the case the lock was written for.

Clearing the history reported success when it failed. ClearMessages
purges the full-text index between the delete and the VACUUM; if that
step throws, the plaintext stays on disk and the user was told it was
gone. It has its own error string now, in all 25 languages.

Also:

- One busy state for the whole tab. Cleanup, clear, maintenance and
  export reach the same store, and per-section flags left two
  destructive buttons live at once. The lock turned that into a refusal
  rather than damage, but a refusal you have to trigger to discover is
  not an answer.
- The gate carries a revision, bumped by every mutating operation that
  finishes. A preview taken before a retention sweep no longer passes as
  current afterwards: comparing it against the settings alone cannot see
  that the rows it counted are gone.
- Database metadata moved to a worker. Checking "is anything busy" first
  is not enough, because an operation can take the lock in the gap
  before COUNT(*) runs, and then the game stands still for a whole file
  rewrite.
- The clear hint stays hidden until the count has actually been read.
  "0 messages are stored" in front of the clear button is a lie told at
  the worst possible moment.
- Refusal notices read the operation once. Guard and name were two reads
  of the same field, so a run finishing in between printed a sentence
  that stopped at the colon.
- The retention sweep cannot start twice. The gate only goes busy once
  the worker reaches TryBegin, and the due-check runs every tick.
- Teardown waits up to five seconds for the store to come free rather
  than disposing the connection under a running VACUUM.
- Maintenance has its own flag and says so when it is refused; reload
  gets the same guard as its neighbour; the breakdown tree keeps its
  open state across a language switch.
2026-08-18 22:13:33 +02:00
JonKazama-Hellion 1987d745d8 docs: hold the documentation against the code
Every claim in the user-facing docs, checked against what the plugin
actually does after A2 to A5.

The two GDPR sections in PRIVACY.md describe features that only exist
again as of this cycle, so they now name the screens they live on and
say what the cleanup does with a channel this build does not recognise.
The export sentence promised a date range; the form offers an age in
days.

PRIVACY.md also named "Show emotes" in Settings as the way to stop the
one outbound call the plugin makes. That switch has had no control since
May, and a documented opt-out that only exists in the JSON is not an
opt-out, so the toggle is back in the chat tab. Both its strings were
already translated.

Dead paths: the README source tree still listed a file deleted in May,
docs/IPC.md cited a window that no longer exists, the first-run wizard
pointed at the same removed file, and the theme authoring guide sent
readers to a Themes tab that is called Appearance.

The changelog lost two double blank lines that were failing markdownlint
and holding preflight red. Preflight is green again.

Historical documents keep their old paths on purpose: the changelog and
the AI disclosure describe what was true when they were written.
2026-08-18 21:51:15 +02:00
JonKazama-Hellion e24ea79302 feat(privacy): reconnect database maintenance and the manual retention run
Two sections that had backends and no buttons.

Database: path, size, WAL size, message count, and a clear button. The
numbers refresh at most every five seconds and not at all while a long
operation owns the store -- MessageCount takes the read lock, and asking
for it during a VACUUM means waiting for the whole file to be rewritten,
on the draw thread. The old version called ClearMessages straight from
the draw thread, VACUUM included; it runs on a worker now.

One line beyond the old layout sits above the clear button: how many
messages are stored, and that exporting keeps a copy. Whoever is about
to throw the history away should be told there is a way not to.

The legacy Chat 2 files only get a block when they are actually on disk,
and the advanced tools only appear when the section is expanded with
Shift held. The message injector is not back: it was deleted with the
tab and writing 10,000 fake messages into a user's real database is not
something to rebuild on the way past.

Retention: an "apply now" button, the running hint, and the last-run
line, which v1.11.0 shipped as an English literal while both strings sat
translated in all 25 languages. Plus reset-to-spec next to the existing
clear-overrides, since the two answer different questions and both were
already translated.

Retention_Apply_Tooltip stays unused and gets a replacement. It ends
with "Save your changes first", and the window it was written for had a
Save button.

Also here, found while wiring the manual trigger:

DbOperationGate.End now takes the operation it releases. It used to
reset blindly, on the reasoning that a worker must be able to release
from a finally without knowing whether it acquired. That is backwards: a
worker whose TryBegin was refused also runs its finally, and a blind
reset there hands away the lock of whichever operation actually holds
it. Worse than no gate, because the refused worker walks off believing
it did nothing while a VACUUM starts under somebody's open reader.
2026-08-18 21:47:50 +02:00
JonKazama-Hellion 1ab7ba8377 feat(privacy): reconnect the retroactive cleanup
The privacy filter only decides what gets written from now on. Whatever
was stored before the user narrowed their channels stays there until
something removes it, and that something has had no button since May.

Two rules shape the section, both because this deletes history and
cannot be undone:

- Without a preview the apply button does not exist. Not greyed out,
  absent. A disabled button is something a user waits for; a missing one
  is something they have to go and earn.
- A preview that no longer matches the settings counts as no preview.
  The old version only recoloured the number and left the button live,
  so a changed whitelist could be applied against counts computed for
  the previous one.

The mapping from the live rule to CleanupRetainOnly is the part worth
reading twice. CleanupRetainOnly takes one set and deletes everything
else, so it can only stand in for the live rule where that rule narrows
something: filter off means nothing is filtered, and an empty list means
a full wipe, which has its own button and its own confirmation. Both
cases now say so instead of offering a destructive action that does not
mean what it looks like.

Inside that, the allowlist is the whitelist itself plus any stored
channel this build does not recognise while the unknown-channel failsafe
is on. Deriving it from the counts instead would delete messages that
arrive on a whitelisted but currently empty channel between the preview
and the apply, and dropping the unrecognised ones would defeat the
failsafe, which exists to hold on to a new patch's channel until the
user has decided about it.

The preview runs on a worker over its own connection. It is a GROUP BY
across every stored row, the old version ran it inline on the draw
thread, and holding the read lock for it would stall UpsertMessage on
the framework thread for the length of the scan.

Cleanup_Help_SavedNote stays unused: it tells the reader to press Save
first, and the window it was written for had a Save button.
2026-08-18 21:38:34 +02:00
JonKazama-Hellion 94af81a961 fix(privacy): let the channel grid actually decide what is stored
IsAllowedForStorage applied the unknown-channel failsafe to known
channels too. Untick Say in the grid, leave "Save unknown channel types"
on, and Say kept being written -- and that failsafe is on by default.

So a config that never met the wizard ran with the filter enabled, an
empty list and the failsafe on, which stored everything while the
filter's own description promised "only messages from allowed channels
are written to the database". The grid was inert for exactly the users
who had not been walked through the wizard.

The rule now reads: on the list, or unknown and the failsafe allows it.
A known channel the user did not pick stays out.

That correction alone would turn "stores everything" into "stores
nothing" for those same configs, so two things move with it:

- Config v24 switches the filter off where it was on with nothing
  picked. Same behaviour as before, stated where the user can see it,
  and one line in the log saying so. A config that does have picks keeps
  them and starts honouring them, which is the point of the change.
- A fresh config seeds the list from PrivacyFirstWhitelist instead of
  starting empty. Privacy by Default was already the documented intent;
  it just relied on the hole to stay usable.

The rule lives in its own type now. Configuration implements a Dalamud
interface, and the build suite cannot load Dalamud.dll -- the runtime
resolves the declaring type before reaching the method body, so even a
static call on it fails. Fifteen cases pin the truth table and the
migration condition; the self-test checks the running config is not in
the state the migration exists to undo.
2026-08-18 21:32:02 +02:00
JonKazama-Hellion d59ee62223 feat(privacy): reconnect the message export
The exporter has worked since v1.4.8. The form that drives it went out
with the old settings window in May, which left PRIVACY.md promising an
access request the plugin had no way to answer.

New section in the data and privacy tab: time range, sender substring,
channel groups, format, and a save dialog. Form state lives in the tab,
not the config -- a filter describes one action, and a stale "last 7
days, sender Mira" reappearing weeks later is a worse start than an
empty form.

StreamForExport now takes a caller-owned connection. The reader stays
open for as long as the file is written, seconds to minutes on a large
history, and chat keeps arriving throughout -- so the primary connection
would be read here and written by UpsertMessage at once, and
SqliteConnection is not thread-safe. Holding the read lock instead would
trade that for freezing the game.

ChannelGroups lifts the eight groups out of the deleted tab and finishes
them: 37 of 89 channels belonged to no group and were therefore
unreachable in the UI. Game Master channels follow ChatTypeExt.Parent(),
so GmTell sits with the other tells rather than under system traffic --
an access request that quietly drops part of what it promises is the
dangerous kind of gap.

Also here:

- OpenSecondaryConnection disposes on a failing pragma. Open can succeed
  and journal_mode=WAL still time out, and with Pooling=false the
  connection then survives until a finalizer reaches it. Affects the
  full-text rebuild worker too.
- StreamForExport builds its logger before the reader, so a throwing
  CreateLogger cannot leave a reader nobody owns.
- The export thread takes the gate itself instead of the caller taking
  it first. Acquiring before Start would strand the gate for the session
  if thread creation failed, and the gate also holds back the sweep.
- Notifications are skipped once teardown has started. The thread has no
  cancellation path and finishing the file is right, but reporting it to
  a plugin that is gone is not.
- Transient widget rows that return their value instead of saving it.
  Writing the config file on every keystroke of a sender filter would be
  both pointless and slow.
- Five translated keys for "another database operation is running", in
  all 25 languages. Two of the four operation names have no trigger yet;
  they arrive with the cleanup and maintenance sections.
2026-08-18 21:25:10 +02:00
JonKazama-Hellion 90bf986f76 refactor(export): read text from chunks, write the file atomically
Two changes to MessageExporter before it gets a caller.

It read SenderSource and ContentSource, the raw SeStrings. TextValue on one
holding an auto-translate phrase reaches SeStringEvaluator, which asserts it is
on the main thread and throws unconditionally when a macro resolves a global
number. An export belongs on a worker, so that would abort it partway and leave
half a file.

The plan called for resolving text in batches on the framework thread. Not
needed: Message.Sender and Message.Content are already-resolved chunk lists --
ChunkUtil turns auto-translate into text at ingest, and the full-text index reads
them exactly this way. Same strings, no evaluator, no thread affinity, and no
batching machinery.

Second, the file handling. The format was validated after the StreamWriter was
opened, so an unknown format left a zero-byte file where a previous export had
been. It is checked first now, and the write goes to a .part file that is moved
into place at the end. A crash halfway used to leave a file that opens cleanly
and is quietly incomplete -- which on the path a GDPR access request goes out on
is worse than an obvious failure.

Almost none of this is reachable from the build suite: ExportToFile takes
IEnumerable<Message>, Message needs SeString, and xUnit cannot load Dalamud.dll
-- even an empty list fails, because the runtime resolves the parameter type
before the body runs. So the format mapping is pinned there and the rest by a new
self-test, which builds probe messages with deliberately empty SeStrings: if the
exporter ever reads them again, the text comes out blank and it fails.
2026-08-18 20:47:45 +02:00
JonKazama-Hellion 22de2de234 docs(db): correct why VACUUM fails against an open reader
The comment said PerformMaintenance inherits a five-second timeout before
throwing. It does inherit that timeout, but it is not what happens here: a VACUUM
on a connection with a live reader fails instantly with 'cannot VACUUM - SQL
statements in progress'.

That is SQLITE_ERROR, not SQLITE_BUSY. Busy handling only covers contention
between different connections, so no timeout applies and no retry helps. The
practical difference matters for the error message the UI will show: the DELETE
has already committed when it fires, so the rows are gone and only the compaction
is missing -- 'deleted but not compacted', not 'failed'.

And PerformMaintenance batches VACUUM, REINDEX and ANALYZE in one statement, so
a failing VACUUM takes the other two with it.
2026-08-18 20:37:40 +02:00
JonKazama-Hellion 6a3bbe2357 fix(ci): let the version check tell a release from a local build
The check demanded csproj, repo.json and every DownloadLink carry the same
version. That is right for a published release and impossible for anything else,
so it went red the moment v1.11.0 closed -- and pre-push blocks on it.

The two states were conflated. repo.json is the distribution manifest, so its
version has to describe what the links actually serve. Claiming 1.11.0 while
every link serves v1.5.6 makes Dalamud offer an update, install the old build,
and offer the same update again on the next launch. Satisfying the old rule
meant building exactly that.

Now: the manifest must always agree with itself and with its links, and the
build must never be older than what is published. --release additionally demands
the three match, which is the mode for cutting a tag and still catches the v1.2.2
burn it was written for.

The link check moved from the csproj version to the manifest version, which is
the pairing that protects users. In the old form a manifest could name a version
none of its links served and pass, as long as the csproj agreed -- the exact
mismatch it now rejects.
2026-08-18 20:28:28 +02:00
JonKazama-Hellion d0eb2934ed feat(db): one gate for every long-running database operation
Generalises the retention-sweep lock, which already solved this for a single
case: it stopped a manual sweep from racing the automatic one, and nothing else.

Export, cleanup and clear need the same protection against each other, and for a
sharper reason. An export leaves a reader open on the primary connection
deliberately outside _readLock, because the enumerator is consumed lazily by its
caller. A VACUUM starting while that reader lives meets an active reader on a
connection Microsoft documents as not thread-safe, and PerformMaintenance sets no
command timeout, so it inherits five seconds before throwing -- after the DELETE
has already committed.

TryBegin refuses rather than queues. Every one of these is user-initiated, and a
wipe that fires minutes after the click is worse than one that declines. End is
idempotent and does not check which operation ends, so a worker that throws
before acquiring can still release from its finally block.

Current is volatile because the draw thread reads it every frame to decide which
buttons are disabled. Blocking on the lock to find that out would freeze the game
for the length of a VACUUM, which is the exact failure this is meant to prevent.

Pure state machine, so the transitions are pinned without a database or an ImGui
frame -- including that exactly one of 64 competing callers wins.
2026-08-18 20:19:27 +02:00
JonKazama-Hellion 125a57167e fix(privacy): purge the full-text index when messages are deleted
messages_fts stores sender and content as plain text, and no delete path touched
it. ClearMessages, CleanupRetainOnly and the retention sweep all removed rows
from `messages` alone, so the readable text of every "deleted" message stayed on
disk.

It was self-sealing. InitFtsReadyCache treats a non-empty index as ready, so
after a wipe the index stayed full, the flag stayed true, and the rebuild that
would have cleared it never ran again.

This is not hypothetical: the retention sweep runs unattended every 24 hours,
so any user with retention on has been accumulating orphaned plain text since
the index shipped. And the plugin says otherwise in two places -- the clear
button promises "Removes all message history. Cannot be restored", and
PRIVACY.md documents targeted deletion as a feature.

Wiping the index rather than deleting matched rows, because message_guid is a
GUID string while messages.Id is a BLOB and the two cannot be joined in SQL. The
index is derived data; it rebuilds from the surviving rows on the next start,
which is both cheaper and provably complete.

CleanupRetainOnly also skips VACUUM when nothing matched, the way
DeleteByRetentionPolicy already did. Rewriting the whole file for zero deleted
rows costs seconds on a large database and gains nothing.

Six tests drive the real store against a real database, since the defect was in
what the SQL did not touch rather than in any computed value.
2026-08-18 20:03:03 +02:00
JonKazama-Hellion 8bf351ba02 docs: correct the untranslated string count
Measured across the whole UI rather than estimated from the settings window:
around 270 visible literals without a resource key, not the hundred the changelog
claimed. The settings window is the bulk of it, but the first-run wizard, the
input bar and the about tab carry their share.

Smoke test for the cycle came back green -- everything works and does what it
says. The untranslated strings are the only known issue.
2026-08-18 19:37:07 +02:00
JonKazama-Hellion f205dd4e54 chore(release): close the v1.11.0 cycle
Version to 1.11.0 in the csproj, changelog and roadmap entries for the local
state. Not published: the public release stays at v1.5.6 and the download links
are untouched.

repo.json goes back to 1.5.6.0. It had been carrying the development version
while all three download links pointed at the v1.5.6 archive, which is a trap
waiting for a merge: Dalamud would offer an update to a version the download
does not contain, install v1.5.6 again, and offer the same update on the next
launch. main is unaffected -- it only ever saw 1.5.6.0 -- but the feature
branches have been inheriting the mismatch since v1.6.0.

The manifest version belongs to what the links actually serve. A local state is
tracked by the csproj and the changelog, which is what they are for.

Testing channel deliberately not opened yet. Publishing 1.11.0 as a test build
would ship a modern settings window alongside a first-run wizard and a message
list that are still stock ImGui -- and 1.10.0 would ship the pinned-tell-history
bug that 1.11.0 fixes.
2026-08-18 19:34:27 +02:00
JonKazama-Hellion d1e12ce866 fix(popouts): restore a way to close a pop-out
Last commit hid the header row when the title bar was on, to stop the tab name
appearing twice. The close button was in that row, and the title bar carries
none of its own -- ShowCloseButton is off because closing has to go through the
pool to release the slot. So a pop-out with its title bar on could not be closed
at all.

Pop-in moves into the input row, alongside the settings and hide buttons that
are already there. It is red, contrast-checked against the button plate it sits
on, and carries a tooltip, since a bare X next to an emoji picker does not say
where the tab is going.

Wired by setter after construction rather than through the constructor: the
window is what the button has to call, and it does not exist yet while its own
input row is being built. Routing it through the graph would close a
factory-callsite cycle MS.DI cannot detect.

The header row is now just the tab name, drawn only when there is no title bar
to carry it.

InputBar_PopIn_Tooltip ships in all 25 languages, including the Designer entry.
New strings get translated with the change from here on, not batched.
2026-08-18 19:21:24 +02:00
JonKazama-Hellion 051fd64857 fix(settings): use the translations that were already sitting there
The window came out half German and half English on a German client. Thirteen of
those labels had a translated resource all along, reachable from no line of
code -- the same defect this cycle has now hit four times.

Most visible: all seven tab names in the sidebar. Settings_Tab_General and its
siblings exist in 25 languages and the sidebar drew "General", "Appearance",
"Chat" as literals. That is the first thing anyone sees in this window.

Plus reduce motion, custom sound volume, show hide button, window opacity, the
window style heading, and the themes folder button.

Deliberately left alone where the wording matched but the context did not.
"Never" exists as a world-suffix option, not as "the sweep has never run", and
"Opacity" exists for a tab rather than a window; reusing either would read
wrong in any language that inflects them differently. Those want their own keys,
not a borrowed one.

What stays English is what has no key at all: the section headings, the keybind
labels, and the descriptions written during this cycle. Roughly a hundred
strings, and adding them means 25 files each -- that is the localisation pass,
not this commit.
2026-08-18 19:15:00 +02:00
JonKazama-Hellion 9c7be4106d feat(popouts): bring the pop-out windows up to the rest
Three things, all visible in one screenshot.

The tab name was drawn twice. The pop-out has a title bar carrying the tab name
and a header row underneath repeating it -- the same string, one line apart. The
header now only draws when the title bar is off, which is the case it was
written for.

The close button was ImGui.Button, so it took the theme's button colours. On
several themes that is a bright magenta plate sitting next to plain text, making
the way out of the window the loudest thing in it. It uses the plugin's own icon
button now: glyph contrast-checked against the surface, danger colour on hover
only.

And the message area gets the same floor as the main log, with the same
restraint -- no accent wash, motes at a tenth. Pop-outs were the last surface
still sitting on flat background while every other window had depth.
2026-08-18 19:09:40 +02:00
JonKazama-Hellion d30922af8c feat(settings): convert the appearance tab, finishing the window
The last six stock collapsing headers are gone, so all seven tabs now read the
same way. Appearance is the one people open most, being where the themes live,
and it was still the odd one out.

Its four components each needed only the heading, so they get a SectionRenderer
rather than the whole widget set -- SettingsWidgets would have handed a colour
editor a Plugin reference it has no use for.

Three of the six could not take a literal key. The colour editor draws its
section seven times with seven titles, so the key becomes a parameter. The theme
picker keys its categories by position, since CategoryMap is a fixed list and
the index survives those names being translated later. And the custom-theme
section takes a fixed key although its label carries a count, or it would reset
every time a theme is imported or removed.

The theme picker's headers also pick up the disabled state properly now. They
sit inside an ImRaii.Disabled while a theme is being edited, and a draw-list
header cannot see that push -- so they had stayed at full contrast while
everything under them dimmed.
2026-08-18 19:07:04 +02:00
JonKazama-Hellion 04f8f1ace8 feat(settings): opaque settings window, contrast applied throughout
The settings window no longer inherits the chat window's transparency.
GlobalStyleScope pushes one opacity for every window in the plugin, so a value
chosen to keep the chat log out of the way was also deciding how readable a
settings dialog is.

The stronger reason is that contrast cannot be computed against a background
that is not there. Behind a translucent window the real background is the game:
a black cave one minute, a snowfield the next. Every foreground measured last
commit was measured against a colour it does not actually land on. Opaque makes
that measurement true.

BgAlpha only reaches the window fill, never the draw list, so the backdrop
cannot observe it -- it takes an explicit override instead of guessing from the
pushed WindowBg.

Contrast now runs through SettingsPalette, so every row and heading gets it
without each call site asking: 4.5:1 for labels and titles, 3:1 for descriptions
and accents. The lower floor on descriptions is deliberate. It preserves the
rank between the two lines of a row, which is why the description is dimmer at
all, while still guaranteeing it stays legible.

The toggle's border is in there too. It is the only thing marking an off switch,
and a border tone that blends into the surface leaves the control invisible.
2026-08-18 19:01:54 +02:00
JonKazama-Hellion 33bcc38581 feat(style): pick foreground colours by measured contrast
The gradient was turned down because text on the lit edge became hard to read,
which fixed the symptom and lost the effect. The real problem is that a theme
picks one text colour while the same text lands on a base surface, a lit edge
and an accent fill, and a value that reads on one can vanish on another. White
iconography on a pale violet accent was the reported case.

So contrast is computed rather than assumed. ColourUtil gains WCAG relative
luminance, the contrast ratio, and EnsureContrast, which walks a foreground away
from its background until it clears a threshold -- 4.5:1 for text, 3:1 for
icons -- and stops at the first step that does, so a colour keeps as much of its
hue as the ratio allows.

Luminance is gamma-corrected now. sRGB is gamma-encoded, so averaging raw bytes
overstates dark colours badly, and nearly every surface here is dark. Mid grey
is 0.216 relative luminance, not 0.5.

The tests caught a real error in the first version: direction was chosen by
whether the background measured below 0.5 luminance. Pale violet sits at 0.39,
counts as dark by that rule, and the function tried to make white whiter. It now
picks whichever end reaches further from the background.

With foregrounds that follow, the gradient goes back up past where it was.

Applied to the sidebar icons and labels and to the segmented control's labels.
The remaining call sites are a polish pass of their own -- this is the machinery
plus the two places that were reported.
2026-08-18 18:51:08 +02:00
JonKazama-Hellion ae9b503776 fix(tells): load pinned tell history after login, not before it
A pinned tell tab came up empty for the rest of the session, reported by a
tester and reproduced from his config.

RehydratePinnedTabs runs from a hosted service at plugin start. It queries tell
history by character, and CurrentContentId is 0 until a character is logged in
-- LastContentId only gets set from the framework tick. The game loads plugins
at boot, so the normal path queries for character zero, finds nothing, and there
was no second attempt: the service subscribed to Logout but not Login.

It defers now when no character is available and completes on the login that
follows. The pending flag keeps a later character switch from appending a second
copy of the history to tabs that already have it.

Two things hid this. Reloading the plugin in a running session, which is what
development looks like, always has a character available. And it only shows up
if you pin a tell tab at all -- the same path for non-temp tabs already handles
the boot case explicitly, one file over:

    if (pluginInterface.Reason is not PluginLoadReason.Boot)
        manager.FilterAllTabsAsync();

Also surfaces FilterIncludePreviousSessions in the Chat tab, which decides
whether the log shows anything from before the current session and had no
control at all -- written only by the first-run wizard, and only if the user
reached step 3. Skip the wizard and it stays false forever. It applies
immediately rather than at next launch, since the user is looking at the window
when they ask for it.
2026-08-18 18:44:54 +02:00
JonKazama-Hellion 57780351d4 feat(settings): convert the remaining four standard tabs
Chat, Channels, General and Data & Privacy now draw the same way Window does. A
half-converted window is worse than an unconverted one: before, all seven tabs
were consistently dated; after the pilot, one looked current and six looked
abandoned, and switching between them made the seam obvious.

Descriptions move out of the help markers and onto the rows. Those strings were
written to be read, and a (?) the user has to hover is where an explanation goes
to be ignored. Several were translated into 25 languages and had never appeared
on screen at all.

Two settings that could not use the standard helpers -- the language picker,
which rebuilds the font atlas, and the keybind mode, whose description depends
on the selected value -- go through a plain Row that hands the caller the control
column and leaves the save logic alone.

Privacy filter labels now come from the resources that already existed for them,
same defect as the channels tab last round: strings present, translated, and
reachable from no line of code.

Four more constructors take a TokenResolver, so this wants the DI smoke pass.
Only the appearance tab still draws stock collapsing headers; its four
components are their own block.
2026-08-18 18:23:34 +02:00
JonKazama-Hellion 7df18bd552 fix(style): shorten the ramp instead of layering it
The dithering attempt made it worse and the reasoning was backwards. Four layers
at a quarter alpha each carry a quarter of the steps each, so every layer bands
more coarsely than the single ramp did, and blending four coarse ramps adds
interference on top. Reverted.

The real variable is distance, not layer count. A ramp has as many steps as it
has distinct alpha values, so stretching it over the full height of a pane gives
each step a stripe twenty-odd pixels tall, which the eye sharpens into
scanlines. Running the same ramp over 190 pixels puts those steps a few pixels
apart, where they read as a falloff.

So: light fading down from the top edge, shadow gathering at the bottom, and a
flat surface in between. Constant alpha cannot band at all, which leaves most of
the pane immune by construction.
2026-08-18 18:14:02 +02:00
JonKazama-Hellion 05b203c85c fix(style): dither the surface tint so it stops banding
"Horizontal scanlines" names it exactly. An alpha ramp from 0x34 to 0 has 52
distinct values, so across a 600px pane each one owns a stripe about 12 pixels
tall, and the eye reads those stripes as scanlines. Raising the contrast only
buys more of them, thinner.

So it dithers. Four ramps at a quarter alpha each, every one ending slightly
lower than the last, so they share a starting colour but run at different
slopes. Their step boundaries land on different rows, and where one layer has
stepped up its neighbours have not, which puts the blend between two quantised
values. Same total tint, four times the effective resolution, three extra draw
calls.

Layers are staggered by slope rather than offset on purpose: shifting them would
leave a gap at the top where fewer layers overlap, which reads as a bright band.
That trades one artefact for a worse one.

The tint is roughly twice as strong now, which the settings pane wanted anyway,
and strength is a parameter so the chat log can stay at 45% of it.
2026-08-18 18:09:46 +02:00
JonKazama-Hellion c1f1c0563c fix(style): tint the surface instead of repainting it
Both remaining complaints had one cause. The window paints its own background,
and the backdrop was filling the same area a second time. Two stacked layers
turn a translucent window solid, which is the density over the chat log.

And an opaque fill has to carry the entire gradient by itself. That is where the
banding came from: a shallow ramp across an opaque surface crosses so few 8-bit
values that each one covers a visible stripe. Nothing sits underneath to break
them up.

So it tints now. Near-transparent white at the top, near-transparent black at
the bottom, straight over whatever the window already drew. The window colour
stays visible, the ramp only shades it, and the game showing through disperses
what little stepping is left. The sidebar does the same with a flat black wash
rather than a repainted darker surface.

Motes are roughly half as bright everywhere, and the chat log takes 10% of that.

DrawVerticalGradient stays for the segmented control, which paints a surface
that genuinely is its own rather than one already drawn underneath.
2026-08-18 18:05:11 +02:00
JonKazama-Hellion 8b96ffb2ec fix(style): let the backdrop follow the window's own opacity
Three problems from one screenshot, and the same root cause behind two of them.

The pane painted at full opacity regardless of the window it sat in. BgAlpha
only ever reaches WindowBg, so a draw-list fill ignores it entirely, and a
deliberately translucent settings window came out as a solid block beside a
translucent chat window. The backdrop now reads the alpha out of the resolved
WindowBg colour and carries it through the gradient, the accent wash and the
motes.

The banding is 8-bit quantisation, not a rendering fault: a gentle ramp across a
tall surface crosses so few distinct values that each one covers a visible band.
Halving the range leaves fewer and fainter steps, and the translucency now
underneath them breaks up what remains.

Motes over the chat log drop to 18%. A settings page is read in glances and can
carry motion behind it; a chat log is read line by line, where anything drifting
behind the text competes with it. Intensity is a parameter rather than a second
particle system, so the two surfaces share one implementation.
2026-08-18 18:01:07 +02:00
JonKazama-Hellion 8ebed6846d feat(style): put the chat log on the same floor as the settings
The motes were too subtle to register, so: seventy instead of twenty-four, wider
radius range, and each one is a soft halo with a brighter core rather than a
flat disc. At this size a single filled circle reads as a speck of dirt on the
screen; the ring around it is what makes it look lit.

The backdrop moves into its own component and the chat log gets it too. Two
windows in one plugin looking like two separate products was half the reason the
settings window read as untouched -- the chat had been reworked in v1.10.0 and
the settings had not, and no amount of work inside one window closes that gap.

No accent wash over the message list. It works on a settings pane, where the top
of the surface is a heading; over a chat log the oldest visible messages would
sit in a tinted band and read as highlighted.

Registered transient rather than singleton, so two surfaces on screen own
separate mote sets instead of sharing one drift pattern -- which would be
visible the moment a popout sits next to the main window.

MainWindow's constructor changed, so this needs the DI smoke pass.
2026-08-18 17:55:44 +02:00
JonKazama-Hellion 76416afe3a feat(style): depth for the settings window
Brief was a mix of Lightless and Character Select+, modern without being
overloaded, and the gradient allowed to show more.

The content pane gets a stronger gradient plus an accent wash falling from the
top edge to about a third of the height. Without it the pane was a neutral box
that happened to sit inside a themed window; now the theme reaches the surface
being read.

Ambient motes drift up behind it. Procedural rather than the image sequence
Character Select+ uses, so there are no assets to ship and they take the theme's
accent instead of whatever was baked into a PNG. Fixed count, fixed arrays,
seeded once, so the layout is identical every session and nothing allocates per
frame. They advance once per frame regardless of how many surfaces call in, and
ReduceMotion skips them entirely -- same contract HoverState already honours.

The tab sidebar was the last stock-ImGui element and had started to look it. Its
entries are drawn now: darker plane than the content pane so the two read as
separate surfaces, a chamfered plate with a solid leading bar for the active
one, hover fading between muted and full text.

Its icons go through the draw list with a font pointer taken outside the scope,
rather than being drawn inside a FontAwesome push. That atlas has no ASCII
glyphs, so any label caught inside such a scope renders blank -- which has
already happened twice in this plugin, once in the tooltips and once in a badge.
2026-08-18 17:50:32 +02:00
JonKazama-Hellion ced7ea0c55 feat(style): headings by typography, surfaces by gradient
Two rounds of screenshots said the same thing twice: the section headings read
against blue themes and vanished against violet ones. The cause was that their
only distinction from a normal row was a fill colour, and no fill works in every
palette.

Headings are typography now. Small caps with wide tracking, no plate, no bar,
followed by a rule that fades out along its length instead of stopping dead. The
weight comes from letterforms and whitespace, which look the same in every
theme. 18px of air above each one does the grouping that the bar used to fake.

ImGui has no letter-spacing, so DrawTrackedText renders one glyph at a time
through a stack buffer. That technique is documented in Character Select+, whose
Boutique style layer solves exactly this problem the same way.

Row separators are off by default. A rule under every row turns a settings page
into a ledger, and the hover fill already marks where a row starts and ends.

Surfaces get vertical gradients, derived from a single theme tone rather than a
hardcoded pair, so they follow whatever the active theme sets. Lerp rather than
a brightness multiplier: these surfaces sit near black, where scaling a channel
of 12 by 1.14 lands back on 13. That is what LerpTowardBlack is for.

The selected segment finally uses DrawSlipPolygon, which has been sitting in the
plugin unused since it was written, and its highlight is a second, shorter
chamfer rather than a clipped gradient -- PushClipRect is rectangular and would
have squared the cut corner straight back off.

Reference note: Lightless and Umbra were read for approach only. Both are
AGPL-3.0 and none of their code is here; a vertical gradient is common
knowledge, their implementation of it is theirs.
2026-08-18 17:42:02 +02:00
JonKazama-Hellion 2f4518a6b1 fix(style): give the settings pane the contrast it was missing
The converted tab had the right structure and no legibility. Five separate
causes, all of them contrast rather than colour choice.

The content pane never set ChildBg, so it inherited whatever showed through the
window, and the window is translucent by default. Settings text was sitting on
moving scenery. It gets the surface tone now; the window's own opacity still
applies on top, so the glass look survives.

Section headings had no ground of their own and floated between the rows at
roughly their weight, which meant the tab had lost its grouping entirely. They
get the raised surface, and their accent bar now runs the full height instead of
stopping at the title line.

An off toggle was filled with the same surface tone as the row behind it and
read as empty space. It gets an outline that fades out as it turns on, where the
filled track carries the shape by itself.

Two colours could not be picked statically at all, because themes here range
from near-black to pastel: the label on a selected segment, and the knob on the
track. Both now derive from the luminance of what they sit on, so neither can
end up light-on-light. That is what ColourUtil.OnColour is for.

Descriptions drop from TextMuted to TextFaint. Level with the label they made
each row read as two settings rather than one with an explanation.
2026-08-18 17:13:43 +02:00
JonKazama-Hellion 5a4c3b6707 feat(settings): convert the window tab to the styled widgets
The first tab that actually looks different. Everything here was stock ImGui:
framed collapsing bars, checkboxes with the label trailing on the right, and
sliders glued to the left edge with their name behind them.

Now: section headers with an accent bar, rows with the label on the left and the
control right-aligned in its own column, sliding switches instead of checkboxes,
and a segmented control where two radio buttons used to pretend to be two
settings when they are one.

Three of the four widgets built in this cycle had no call site outside the debug
gallery. That is the exact defect that triggered v1.10.0 -- five tools built and
never wired up -- and the spec rule written afterwards says no widget without a
call site in the same cycle. This closes that on the pilot tab; the remaining
five follow one at a time.

The row helpers live in SettingsWidgets so the other tabs get them unchanged,
and the theme lookups go through SettingsPalette, cached per frame: twenty rows
would otherwise resolve the same five tokens twenty times over.

Section keys are u8 literals rather than the visible titles. ImGui's own storage
keys collapsing headers off the label, which would reset every section's open
state on a language change and merge two sections whose titles translate alike.

Note WindowTab's constructor gained a parameter, so this needs the DI smoke pass
before the next tab follows.
2026-08-18 17:07:39 +02:00
JonKazama-Hellion 18d43f9afa fix(emotes): survive BetterTTV's shared-emote endpoint going private
/emotes/shared/top now answers 403 with {"message":"unauthorized"}. Nothing
checked the status code, so that object was handed to a List<Top100>
deserializer, which threw on the very first character on every plugin start.

The throw escaped the whole loader, so the 65 global emotes -- fetched
successfully one call earlier -- were discarded along with it, and State went
back to Unloaded, arming the same failure for the next trigger.

A failed page now stops paging and keeps what the global endpoint returned. The
global call itself still throws when it fails, because without it there is
nothing to keep.

Two smaller hazards on the same path: an empty page would have made Last() throw
rather than end the loop, and a null deserialization result was dereferenced
outright. Both end the loop now.

Logged as a warning, not an error. This is a third-party endpoint changing its
access policy, not a fault in the plugin, and it does not need a stack trace in
the log at every launch.
2026-08-18 17:01:10 +02:00
JonKazama-Hellion 6397916712 fix(settings): show which channels get their history deleted
Three of the four first-run profiles switch the retention sweep on and write a
per-channel deletion policy. The window only ever showed the global default, so
whatever the wizard decided about individual channels was invisible from the
moment the wizard closed.

The tab now lists every channel whose retention differs from the global value,
tagged by where the number comes from, plus a button to drop the custom ones. It
also finally uses the strings written for this screen, sweep description and
default help included.

Read-only, deliberately. Zero means "keep forever" as a global default and
"delete this channel's entire history" as a per-channel value, because the
default takes a separate SQL branch while a mapped channel gets cutoff = now. No
shipped profile contains a zero and no UI could set one, so nothing is broken
today -- but an editor cannot be offered until those two meanings agree. Noted
at the branch in DeleteByRetentionPolicy.

The default slider now goes down to 0, which is the value that means "never
delete anything". Its own label has been promising "0 = never" while the slider
started at 1.
2026-08-18 14:43:34 +02:00
JonKazama-Hellion 588b886537 fix(settings): remove the switches that do nothing
Six settings had a control, a saved value, translated labels, and no reader
anywhere in the plugin. Flipping them changed a byte on disk and nothing else.

Three sat next to each other in the Chat tab under timestamps, so the section
read as four related options where only one -- the 24-hour clock -- works.
FormatTimestamp consults nothing else.

The first-run wizard offered one of them too, on its visual step, and listed it
back in the summary as if it had been applied. That is the first screen a new
user sees, so it goes as well.

Their own strings show how long this has been drifting: the wizard called
PrettierTimestamps "relative time", the settings tab called the same field
"modern layout". Two different features, one boolean, neither implemented. That
is also why these are removed rather than wired up -- there is no single
behaviour to restore, and inventing one belongs in a cycle that plans it.

Config fields stay, with a comment. A stored value should survive until the
rendering it describes exists, and dropping them would silently reset anyone who
set them.

Found by an audit that turned up considerably more of this: 433 of 824
translated resource keys reach no code at all, and the export, cleanup, tab
editor and pin paths are complete but unreachable. That is its own cycle; this
commit only clears what actively lies to the user in the window we are working
on.
2026-08-18 14:41:07 +02:00
JonKazama-Hellion 64db8986e6 fix(style): close the remaining unreserved-space cases
Three more instances of the pattern the previous fix only half caught.

The section header clipped its description and not its title, so a translated
heading wider than the pane ran out over the scrollbar. Only the window clip
rect stopped it, not the content width.

Row's separator used an unscaled 1px offset with a scaled stroke. ImGui strokes
centred on the path, so at UI scale 2 half the line sits below the rectangle the
row reserved -- and rows stack flush, so it landed in the first pixel row of the
next one. Offset now derives from the thickness.

The segmented control claimed in its own comment to share the setting row's
contract. It did not. It took a position as a parameter and then re-pinned the
layout cursor to it, which moves a caller's layout whenever that position was
not the cursor, and it advanced by the full height where the other two subtract
ItemSpacing.Y. It now reads the cursor like they do, and the comment says why
the advance still differs: those two stack flush because they are list entries,
this is a single control and takes the normal gap.

Also: the label centres against the control band when it has no description
below it, since a slider draws its text at FramePadding.Y and a top-aligned
label sits visibly high next to it. Gallery arrays are held rather than rebuilt
per frame, which its own comment already demanded two sections earlier. And
SectionHeader.Reset is gone -- no caller, and section state keys off ids rather
than labels, so nothing needs to clear it on a language change.
2026-08-18 14:38:42 +02:00
JonKazama-Hellion 0c3023c8cb fix(settings): stop enum combos listing blank rows
The shared label buffer was handed to ImGui.Combo whole, with the value count as
the fourth argument. That argument is not the item count -- it is
popupMaxHeightInItems. The count comes from the span's own length, which was
always 8.

So every enum combo listed eight rows. A three-value setting showed five blank
ones below its real entries, and the popup was capped at three rows high, so it
scrolled. Clicking a blank row hit the range guard and silently did nothing.

Five combos were affected: world suffix, name form, command help side, preview
position and tell auto-open mode. The per-tab code this replaced sized its array
to the value count, so the count happened to be right; sharing one buffer is
what exposed the misread parameter.

Slicing the buffer fixes both halves at once: the span carries the real count
and popupMaxHeightInItems falls back to its -1 default.

Also moves Lerp below LerpTowardWhite. It was inserted directly under that
method's comment block, TEST-MIRROR line included, so the documentation sat on
the wrong method.
2026-08-18 14:11:31 +02:00
JonKazama-Hellion c5a0c4d0d7 fix(settings): show the translations the channels tab already had
Twenty resource keys existed, were translated into all 25 languages, and were
reachable from no line of code. The tab drew hardcoded English literals instead,
so a German player read "Enable auto-tell tabs" while the German string sat in
the plugin unused. This is the same defect as the three unreachable settings
earlier in this cycle, one level down: the work was done, the wiring was not.

The literals were also worse than the strings they shadowed. "Enable auto-tell
tabs" against "Automatically open a tab per conversation partner for every
/tell", and every setting had a written description that had never been shown at
all, so nothing in the section explained what it did.

Two of those are worth more than the labels. The conflict hint names the one
setting in another plugin that silently stops auto-tell tabs from ever opening,
which is not something a user works out alone; it is on screen now. The sidebar
width description explains what the 44px default actually means.

The keys carry stale prefixes from the old eight-tab layout -- the preload one
still says Privacy_ though the setting lives here. Renaming them would touch 25
files per key, so they keep their names and the strings go on screen now.
2026-08-18 13:54:01 +02:00
JonKazama-Hellion 1c78a84b9b fix(style): reserve the height a wrapped description actually needs
Both widgets drew their description with a wrap width and then sized the row as
if it were always one line. Same bug, two different symptoms.

A setting row clips to its label column, so the second line was simply cut off,
directly under a comment claiming the text wraps rather than being cut. A
section header has no clip rect at all, so the overflow was drawn over its own
border line and into whatever the caller rendered next.

Both now measure with CalcTextSize against the same wrap width they draw with.
The section header also gained the clip rect it never had, and its lead offset
is computed once instead of twice, so the measured width and the drawn width
cannot drift apart.

Third fix, same family: the segmented control relied on its last InvisibleButton
to leave the cursor in the right place. It happened to work, because the loop
re-pins the cursor before every segment, but a caller cannot see that from the
outside -- and the gallery duly reserved the row a second time with Dummy,
doubling the gap after every segmented control. The widget now owns its advance
explicitly, like the other two, and CalcSize is gone with its only caller.
2026-08-18 13:53:51 +02:00
JonKazama-Hellion f999036e50 refactor(settings): merge the duplicated tab helpers
Six tabs carried a byte-identical DrawToggle, four a byte-identical slider, and
five hand-rolled the same enum combo loop. 281 lines out, 82 in.

The combos were not only duplicated, they were wasteful: each one called
Enum.GetValues inside Draw, so every open settings window allocated five arrays
per frame for sets that cannot change at runtime. EnumValues<T> reads them once
per closed generic, and the label array is one buffer shared by all of them.

Two behaviours are now uniform rather than accidental. The range check on the
selected index existed in exactly one of the five and is now in all of them,
and the tell auto-open combo lost its inline literal array in favour of a Name
extension like its seven peers -- still English, but at least in the place the
localisation pass will look.

SettingsWidgets is constructed by each tab rather than injected. The tabs are DI
singletons and a seventh constructor signature change buys nothing here.

One visible difference: the tell auto-open combo was 220px wide against 200 for
every other combo in the window. It is 200 now.
2026-08-18 13:42:21 +02:00
JonKazama-Hellion fa15130468 feat(style): let a setting row render disabled
Six settings across the window only apply while another one is on. Today they
sit at full contrast and simply do nothing when clicked.

BeginDisabled cannot carry this: it pushes an alpha that ImGui applies inside
its own widgets, and every part of a setting row that a user reads -- label,
description, separator, hover fill -- is draw-list output that never sees it.
So the row fades itself, drops its click, and stops tracking hover.

The flag is passed through to the control callback as well. A draw-list control
handed into the row has exactly the same problem and no other way to learn about
it.

Note the parameter sits before styleOverride, so the one existing positional
call site had to name its argument.
2026-08-18 13:37:43 +02:00
JonKazama-Hellion 688c05cd77 feat(style): add the segmented control
WindowTab picks its layout with two radio buttons that are one setting wearing
two labels. A setting row knows one label and one control, so the choice was
either two rows that misstate the relationship or a control that holds the whole
choice. This is the latter, and it generalises to any small closed set.

Segment bounds come from rounded edges rather than a per-segment width. At 201
pixels over two segments the naive form paints two 100.5px halves that land on
the same physical column, which leaves a seam in the middle and a gap on the
right. Deriving each edge from the run means segment i ends exactly where i+1
starts.

Hover keys are derived per segment for the same reason the toggle derives its
own: the caller has already spent its id on the enclosing row, and sharing it
would tie the row highlight to whichever segment the mouse is over.

Disabled is a parameter rather than a BeginDisabled scope because that alpha
never reaches draw-list output. The invisible buttons are still submitted while
disabled so item count and cursor advance do not change between the two states.

MetricsMath gains Center, which is what CenterY always was underneath. Reusing
CenterY to centre text horizontally would have read as a bug at every call site.
2026-08-18 13:37:43 +02:00
JonKazama-Hellion cade398b4e feat(style): add the collapsible section header widget
Replaces ImGui.CollapsingHeader, whose framed bar is the single most
ImGui-looking element in the settings window -- 25 of them across nine files.

State lives in the widget, not in ImGui's per-window storage. ImGui keys that
off the label, so once the section titles are localised the open/closed state
would reset on every language switch, and two titles that translate to the same
string would share one state. Callers pass a stable key built from an ASCII
literal instead.

The disabled parameter is not optional decoration. BeginDisabled pushes an
alpha that only reaches ImGui's own widgets, so a draw-list header would sit at
full opacity while everything around it fades -- and ThemePicker wraps two of
its headers in exactly that.

Cursor advance goes through ImGuiP.ItemSize like SettingRow, so the scrollbar
sees the full height.

The gallery shows all three states, including the disabled one inside a real
ImRaii.Disabled scope, which is where the alpha problem would otherwise only
surface in the theme picker.
2026-08-18 12:01:12 +02:00
JonKazama-Hellion cbc4b17e1e fix(style): make the setting row usable for the widgets that need it most
Review of the two new widgets found four things that would all have landed on
the first real tab.

SettingRow had no hit area and no return value, so "the whole row is clickable,
label included" -- which is the point of pairing it with a switch -- was not
reachable. The label half is now an InvisibleButton and Draw returns whether it
was clicked.

SetNextItemWidth is a silent no-op for Checkbox, RadioButton and
InvisibleButton: they size themselves from GetFrameHeight and never call
CalcItemWidth. So exactly the controls the settings tabs are full of would have
sat at the left edge of the control column, 200px from where the row promised
to put them. The callback now receives a context with AlignRight for widgets
that know their own size.

The switch and the row shared a HoverState key. An enabled switch would have
kept its row permanently highlighted, and hovering a disabled row would have
slid its knob to "on" -- the widget lying about its own value. ToggleSwitch
derives its animation key now, so a caller cannot collide even by passing the
same id to both.

The cursor advance moves from SetCursorScreenPos to ImGuiP.ItemSize. Both
advance the cursor, but only ItemSize is guaranteed to extend CursorMaxPos,
which is what the scrollbar measures. SetCursorScreenPos happens to do it on
ImGui 1.88, which is what Dalamud ships -- upstream removed that in 1.92 and
asserts on the pattern instead. ItemSize does not touch g.LastItemData, so the
save throttles stay intact.

Two smaller ones: the label column no longer collapses to a single pixel on a
narrow row (it stops at 60 and the control shrinks instead), and the toggle
geometry clamps its radius once rather than deriving travel from an unclamped
value. Descriptions wrap now instead of being cut at the column edge.

The gallery gained the pairing both widgets exist for, plus a style-override
variant -- the combination that would have exposed all of this.
2026-08-18 11:59:52 +02:00
JonKazama-Hellion 86992c70f2 feat(style): add the setting-row and toggle-switch widgets
Two composites for the settings window, both built on the primitives from
v1.10.0 rather than beside them.

SettingRow puts the label left and the control right-aligned. ImGui does it the
other way round, control first and label trailing, which is a large part of why
the settings window reads as a form dump rather than a settings page. The
control arrives as a callback so one row covers toggles, sliders, combos and
buttons.

The cursor advance in SettingRow is the part that needed care. It has to happen
after the callback, because ItemSize overwrites CursorPos outright when the
control is submitted -- advancing first would simply be undone. But it must not
be an ImGui.Dummy: that submits an item and would replace the control as
g.LastItemData, silently disabling every IsItemDeactivatedAfterEdit save
throttle in the window. SetCursorScreenPos moves the cursor without touching
last-item state.

ToggleSwitch is a capsule with a gliding knob, driven by HoverState so it
animates instead of snapping. Unlike a slider there is no throttle to preserve:
a checkbox commits on the click itself. The caller owns the hit area, so a
settings row can make the whole row clickable, label included.

Named ToggleSwitch, not Toggle: Dalamud's Window base class already has a
Toggle() method, and the plain name collides in every window that uses the
widget.

Geometry lives in WidgetGeometry as usual, with nine new cases pinning the
right-alignment split, the narrow-row fallback (the label yields before the
control does), and that the knob stays inside its capsule at both ends.
ColourUtil gains a two-colour Lerp for the track crossfade.
2026-08-18 11:37:11 +02:00
JonKazama-Hellion 5b51f7dcfd fix(settings): use the existing translations and unfreeze the window title
Review of block A found three things a German user sees straight away.

Two of the three new controls hard-coded English labels although translated
resources already existed for exactly them: Options_PlaySounds_Name and
Options_KeybindMode_Name are in all 25 files. So "Sprache" sat directly above
"Play sounds". The help marker now uses Options_PlaySounds_Description too.

The settings window title was baked in at construction, so it kept whatever
language the plugin started in. Every other string re-reads per draw; this was
the one frozen one. A PreDraw override refreshes it.

Three smaller items from the same review:

The comment on the language order was wrong in both halves. None never reaches
the sort -- it is filtered out and pinned to the front -- so the "list would
jump" hazard it described cannot happen, and the count was 25 endonyms, not 24.
Left as-is it invited someone to swap Where and OrderBy, which would make the
order depend on the culture the game started in.

The rebuild comment claimed thread affinity made it safe. It does not: the
rebuild disposes the very font handle that Plugin.Draw has pushed for the
frame. It works because Dalamud holds the ImFont under a per-frame lock, and
that is now what the comment says. The help marker also warns that switching
rebuilds the atlas and where to clear accumulated glyph ranges.

ApplyLanguage gets an equality guard. Combo only reports real changes, but a
font atlas rebuild is expensive enough that no future caller should be able to
trigger a no-op one.

ChatTab lost its last ChatType reference with the deleted grid, so the using
went too.
2026-08-18 11:33:42 +02:00
JonKazama-Hellion 9a31bbba03 feat(settings): bring back three settings that had no way to reach them
All three drive real behaviour and have translated labels in all 25 language
files. None of them had a control anywhere in the UI -- they were lost in the
v1.6.0 window rewrite and nobody noticed, because the config kept working with
whatever value happened to be stored.

Language picker. This is the one that needed care: a combo alone would have
been wrong twice over. LanguageChanged is an instance method, not static, and
its parameter only matters when the override is None -- it reads the config
itself otherwise. Passing picked.Code() there yields "", so "follow Dalamud"
would have silently meant English. Startup gets this right and is copied.

More importantly the glyph ranges. Their activation used to live in
Settings.Apply, a class that has not existed since v1.6.0; the comment at
Plugin.cs:290 still points at it. Without OR-ing the required range in and
rebuilding the font atlas, switching to Korean renders empty boxes until the
plugin reloads. Four steps, in this order, and the order is forced: the culture
switch reads the config, the atlas rebuild reads the glyph ranges.

Sound toggle. Gates both the per-tab notification sounds and the UI click
sound. It even has a self-test, just no switch.

Keybind mode. Strict versus flexible modifier matching. It has Name() and
Tooltip() per value, so it was demonstrably a control in v1.5.6.

The language order is sorted once into a static: 24 of the 25 endonyms are
fixed literals, so the order does not depend on the current culture, and
recomputing it per frame would make the list jump the moment None's own label
changes.

"Show novice network" moves to Behaviour on the way past. It is a display
filter, and it was the only entry under "Notifications" -- which now holds the
sound toggle it was named for.
2026-08-18 11:20:52 +02:00
JonKazama-Hellion 81b68a1681 fix(settings): stop drawing the same privacy options in two tabs
Three settings were rendered in two places at once, and the third is the one
that matters: the entire 89-entry channel grid existed twice. ChatTab's
"Channel filter" section and DataPrivacyTab's "Privacy filter" section wrote
the same HashSet through near-identical code, differing only in the ImGui id
suffix. Whichever one the user found first, the other silently showed the same
state.

ChatTab's section is gone entirely. DataPrivacyTab is a proper superset of it
-- it additionally carries PrivacyPersistUnknownChannels -- so nothing is lost.
PrintChangelog keeps only its General entry, where it belongs: it is start-up
behaviour, not privacy.

The lock-ordering comment moved before the deletion. DataPrivacyTab's version
was "see ChatTab for the ordering", a cross-reference to the file being
removed; the actual reasoning only existed in ChatTab.
2026-08-18 11:19:32 +02:00
JonKazama-Hellion af242db6f6 chore(release): bump assembly version to 1.10.0
Style foundation cycle closed. Smoke tests green across the sidebar, the tab
strip, the status bar, the theme preview and both message densities.

Download links stay on v1.5.6 deliberately: v1.6.0 through v1.10.0 are local
development states and nobody should update into one. The README badge stays
there too, since it points at the published release.

The roadmap now reflects the actual sequence -- the old "next cycle" entry
still named v1.5.7 ad-block, which has been behind the v2.x UI rebuild since
May.

Verified file by file: csproj, repo.json (both assembly versions, links
untouched), CHANGELOG, ROADMAP. Four TODOs remain in the tree, all pre-existing
and none from this cycle.
2026-08-18 10:13:19 +02:00
JonKazama-Hellion 2686a8f74b feat(i18n): localise the quick-button tooltips
The three quick-button tooltips were hard-coded English while the rest of the
UI goes through HellionStrings. All 25 resource files now carry them, machine
translated on Flo's go-ahead.

Verified: every file still parses as XML, and the base file stays English so a
missing language falls back to what was there before.
2026-08-18 10:09:23 +02:00
JonKazama-Hellion 30c495849d fix(ui): stop the context menu crashing and give the quick buttons their tooltips back
Two things Flo hit on the first run.

The context menu threw on EndPopup. The spacing guard added in 929188e was a
`using var`, which disposes at the end of the method -- after EndPopup. ImGui
asserts when a popup closes with a style var still on its stack. The body moved
into a scoped block so the pop happens inside the popup.

The quick-button tooltips were empty boxes. SetTooltip ran inside the
FontAwesome push, and that atlas has no ASCII glyphs, so the text had nothing to
render with. ImRaii.DefaultFont did not save it. The hovered label is collected
now and drawn after the font is popped. Same trap as the unread badge in C5,
different place.

Those three tooltip strings are still hard-coded English while the rest of the
UI is localised. Pre-existing, and adding resources means touching 24 language
files, so it is noted rather than fixed here.
2026-08-18 09:23:12 +02:00
JonKazama-Hellion ca60c851cd fix(settings): read the preview colours from the same tokens as the chrome
The preview still picked its colours by hand: SurfaceHover for the active row
where the sidebar uses SurfaceActive, and a plain surface for the pills where
the status bar uses SurfaceRaised. Since SurfaceActive was just raised from
0.1 to 0.25, the preview showed a noticeably different active row than the one
next to it.

It resolves through TokenResolver now. Copying the lerp formulas is how it
drifted out of sync to begin with.
2026-08-18 00:20:31 +02:00
JonKazama-Hellion d79188c7b0 fix(statusbar): size pills from the text and give every slot a fit check
Review of block E found the pill height locked to its design value.
WidgetGeometry.Pill discarded the measured text height, so a pill was always
22px times display scale -- and Config.FontSizeV2 does not feed into display
scale. At 18pt the 24px line no longer fit its 22px pill, at 20pt the text left
the reserved strip entirely. Both sizes are in the plugin's own font list.

Height is a floor now, and the text plus vertical padding wins when it is
taller. At the default 12.75pt the floor still applies, so nothing moves.

Only the right-hand version slot checked whether it had room. At 150% scaling
with the window at its 480px minimum -- which stays reachable, because the size
constraint is not scaled -- the counts and tells pills simply ran off the edge.
Every slot checks now.

Pill.Draw returns the size it drew, so the status bar no longer measures each
slot twice. That also removes the risk of the drawn and returned widths
drifting apart if a style override ever reaches only one of the two calls, and
it cuts the lock glyph from three font pushes per frame to one. A font push is
not free: it allocates a lock object and queues a deferred dispose.

Smaller items: the version string is built once instead of per frame, the glyph
cache from IconButton is now in Pill as well, and five metrics constants plus
two usings that lost their consumers in E1 and E2 are gone.
2026-08-18 00:19:39 +02:00
JonKazama-Hellion 929188e5eb fix(ui): respect window opacity and keep badges off the icons
Reviews of blocks C and D found five things a user would see immediately.

Row fills ignored the window's own opacity. Theme surfaces are fully opaque,
and GlobalStyleScope zeroes ChildBg below full opacity so WindowBg alone
carries the coverage -- with the default of 0.85 that made the sidebar a solid
block inside a translucent window. Idle rows now draw no fill at all, and the
active and hover fills are scaled by the current window opacity.

The unread badge landed on the tab icon at the default sidebar width of 44px.
Right-aligning it needs roughly 70px for one digit and 90px for three, and the
old placement also subtracted the popout column even when there was no popout
button. It is only drawn where it clears the icon; below that a plain dot takes
over, which is what the sidebar did before this cycle anyway.

The same collision existed in the top-tab strip, worse: the badge sat in the
trailing padding, which is 10px against a badge at least 14px wide, so it
covered the label on every tab that had one. The badge is part of the tab width
now, and vertically centred rather than top-aligned.

The context menu's spacing guard read the pushed zero back out of GetStyle, so
the max never did anything and X stayed at zero -- which is what HelpMarker's
SameLine uses, so the "(?)" clung to its label. It sets both axes outright now.

Section captions had all their padding above them and one pixel below, so with
zero item spacing the next row started immediately under the text.

Three smaller items: the tab icon was centred against the text font's line
height although FontAwesome is a fixed-width handle that ignores
Config.FontSizeV2; IconButton interpolated a label string per button per frame,
now a PushID over a u8 literal; and the alpha scaling that had grown four
copies now goes through ColourUtil.ApplyAlpha everywhere.
2026-08-18 00:11:53 +02:00
JonKazama-Hellion 891f8ac0ec fix(style): make the active surface actually visible
SurfaceActive was Lerp(Surface, Primary, 0.1f), picked when no production code
drew the token. Against the real sidebar it is barely distinguishable from
SurfaceBase, so the active row was identifiable only by its 2px accent bar --
which is not what "the active tab is unmistakable" was supposed to mean.

0.25 keeps it clearly a surface rather than a coloured block, and stays
distinct from SurfaceHover, which is its own theme slot rather than a
derivation.

Worth a look across all themes during the smoke test: the lerp target is
Primary, so themes with a very light primary will move further than the dark
ones.
2026-08-18 00:05:53 +02:00
JonKazama-Hellion bfc61909cf refactor(ui): scale the remaining layout constants
What blocks A to E did not already touch: the honorific header height and its
two offsets, the message list dummy widths, and the quick-button reserve in the
input bar.

The reserve is the one with visible consequences. At 150% the buttons grow with
the font while a fixed 130px column does not, so they stopped fitting.

The honorific offsets are centred rather than scaled. The 8f there was
(30 - 14) / 2 for the old font, structurally the same case as the sidebar: a
scaled constant keeps its mis-centering, a computed one does not.
2026-08-18 00:05:23 +02:00
JonKazama-Hellion 0d6877ddc6 fix(settings): align the theme preview with the real chrome
The preview had been showing surfaces, an accent bar and an unread marker for
months while the real sidebar drew none of them. Now that the sidebar has
caught up, the preview is the one that is wrong -- in two specific ways.

It put the accent bar on row 0 and the raised surface on row 1, so it showed
two half-active rows instead of one active row. Both now sit on row 0, and the
rows get the separator the real ones have.

The unread marker was a 4x4 square. It is a rounded count badge now.

The status bar preview was a separate 20px reimplementation with three coloured
squares and a hard-coded label. It mirrors the pill layout instead, with the
status colours riding along as slot dots so a theme still shows what it does to
them.
2026-08-18 00:04:00 +02:00
JonKazama-Hellion a7ed8e1146 feat(statusbar): render slots as pills
Five slots drawn as flowing text with a TextDisabled interpunct between them.
They are pills now: channel with its status dot, privacy with its lock glyph,
counts, tells, and version right-aligned.

The composite texts stay composite. FormatCounts produces "5 tabs · 1.2k msg"
and the version slot "v1.10.0 · Hellion" as single strings, and splitting them
would have gained nothing while breaking their pinned format.

Height derives from the pill rather than sitting beside it as a second
constant. MainWindow reserves the body against this property, so the two
drifting apart is the entire failure mode here, and a pill is taller than a
bare text line.

The right-hand slot's fit check actually measures now. The old one compared the
region against a flat 200px and never looked at the left-hand slots at all, so
at the 480px minimum width it kept drawing the version while the left run
needed more room than was left -- the overlap predates this change.

Pill grew optional icon support for the privacy lock. Without it that glyph
would have been silently dropped in the move.

StatusBarCacheTests is re-enabled. It sat in the csproj Compile Remove block,
so the format contract this commit reshapes around had no live net at all. Two
of its cases construct StatusBar with null services, which is safe because
SnapshotForTest touches neither.
2026-08-18 00:02:55 +02:00
JonKazama-Hellion f2dd49e454 refactor(input): move the channel pill onto the pill widget
The pill was already hand-drawn here -- filled rect, rounding 6, a frozen 3px
text offset and an InvisibleButton over the top. That is the Pill widget, built
before the widget existed, so it becomes the widget's first consumer. Its text
now centres against the measured line height instead of the frozen offset.

InputBar.Height moves to Metrics as well. MainWindow and ChannelPopoutWindow
both reserve their body height against it, so both follow without changes. It
had to happen in the same commit: the pill inside the bar now scales, and a bar
that did not would have clipped it at 150%.
2026-08-18 00:00:15 +02:00
JonKazama-Hellion 918cdc8111 fix(style): stop the hover registry from churning on idle rows
Review of block B found Query allocating an entry for every element it was
asked about, hovered or not. The cycle: Query creates the entry, the next
BeginFrame steps it to zero, evicts it, and the next Query creates it again.
With fifteen tabs that is fifteen allocations plus fifteen dictionary inserts
and removes per frame, permanently, with the mouse nowhere near the window.

That is exactly the property master spec 7.5 asks for and the one this block
claimed to improve, so it ate the two string allocations 31fa410 had just
saved. An unhovered element with no entry now returns zero without creating
one.

The footprint self-test only ever queried with hovered: true, which is why it
could not see this. It now runs an idle phase as well.

Four smaller items from the same review:

Advance skipped clearing the hover flags when deltaTime was zero, so such a
frame carried the previous frame's state forward.

Metrics reads GlobalScaleSafe now. The unsafe variant throws while the
interface manager is still coming up, and block F pulls Metrics into more call
sites.

Badge.CalcSize returned a full-size box for a count of zero while Draw drew
nothing, so a caller that reserves and then draws left a badge-shaped hole on
every tab without unread messages -- the normal case.

IconButton caches its glyph strings; ToIconString allocates on every call and
keeps no cache of its own. And the widget gallery clamps its own row width,
since asserting on a zero-width button in the window that demonstrates the
clamp would be a poor look.
2026-08-17 23:59:17 +02:00
JonKazama-Hellion 5696eac55a test(selftest): pin the top-tab underline invariant
TopTabBar had no observability at all -- no counter, no self-test reaching it.
It now exposes LastRenderedUnderlineCount and MainWindow hands the component
out the same way it already does for the sidebar.

Three cases: one of two tabs active draws exactly one underline, a null active
tab draws zero, and an active tab that is not in the list also draws zero. The
last one matters because the strip skips popped-out tabs, so the active tab
legitimately need not be among the drawn ones.
2026-08-17 23:57:11 +02:00
JonKazama-Hellion e4659bc597 feat(toptabs): draw tabs with an active underline instead of selectables
The strip was ImGui.Selectable sized to the bare text width, with a red dot
hanging off the item rect. Six things had to be rebuilt by hand, and the first
is the one that mattered most.

Selectable did have an active fill (ImGuiCol.Header, fed from the theme), so
this replaces a fill rather than adding a marker to something bare. The fill
stays and the accent underline comes on top -- swapping one for the other would
have made the active tab harder to spot.

Tabs now have their own height derived from the measured line height plus
padding, so the strip no longer collapses onto the text. Hover runs through
HoverState like the sidebar, and the label has three states: active and hovered
in Text, idle in TextMuted.

The unread marker is a count badge in AccentEmber, and its position had to be
recomputed: Selectable inflated its bounding box by half the item spacing on
every side, so reusing the old GetItemRectMin/Max maths against an
InvisibleButton would have made the marker jump.

Click semantics follow InvisibleButton's return value, which fires on release
like Selectable did. IsItemClicked would have fired on press, a silent
behaviour change.

The trailing Separator becomes a LineDivider, so both layout modes draw the
same rule.
2026-08-17 23:56:29 +02:00
JonKazama-Hellion 5caa266287 test(selftest): pin the sidebar active-surface invariant
Drives the real Sidebar.Draw and reads the render counter, so a regression in
the draw path fails instead of a parallel calculation passing.

Three cases: one of two tabs active draws exactly one surface, a null active
tab draws zero, and icon-only mode still marks the active row.

Zero is a legitimate state, not a failure -- PickMainActiveTab returns null
when every tab is popped out, so the invariant is "at most one", not "exactly
one".
2026-08-17 23:54:13 +02:00
JonKazama-Hellion 9936638bb3 feat(sidebar): show unread counts as accent badges
The unread marker was a 4px dot in StatusDanger. Red reads as an error, and an
unread message is not one. It is now a count badge in AccentEmber, which is
what the theme preview in settings has always shown.

It has to be drawn outside the FontAwesome scope: that atlas carries no ASCII
digits, so the number would have come out blank inside it. The icon width is
still measured inside the scope and handed out.

Placement follows the mode. Expanded puts the badge right-aligned ahead of the
popout slot, where a three-digit count still fits; icon-only keeps it over the
icon like the old dot.

The frozen vertical offsets go at the same time. The 8f was (32 - 16) / 2 for a
16px font and stayed wrong at every other Config.FontSizeV2, which display
scaling does not feed into. Both the icon and the label now centre against the
measured line height, and the label starts after the measured icon width
instead of a hard 32f.
2026-08-17 23:53:30 +02:00
JonKazama-Hellion 293d56bdbe refactor(sidebar): move popout and greeted toggles onto the icon-button widget
Both were hand-rolled: an InvisibleButton, then a glyph pushed through the
FontAwesome handle onto the draw list, with a frozen 8px vertical offset and a
4px inset. IconButton does the hit area, the hover fill and the centred glyph,
and centres against the measured line height instead of the frozen offset.

Their order is unchanged. Both still sit after TabContextMenu.Draw, which is
the ordering the popup trigger depends on, and the caller keeps what actually
differs between them: cursor placement (SameLine vs. absolute), the visibility
rule, the glyph choice and the greeted glyph counter that
SidebarGreetedGlyphStep pins.

The popout glyph now follows the row surface rather than rowHovered ||
popHovered. That pair needed the button's own hover state one line before it
existed, and the button sits inside the row anyway, so the row's hover covers
both cases.
2026-08-17 23:52:07 +02:00
JonKazama-Hellion eacefb355d feat(sidebar): draw row surfaces, accent bar and separators
The sidebar drew a hover sweep, an icon and a label per row and nothing else.
No hover fill, no active fill, no accent bar, no separator -- the active tab
was visually indistinguishable from the rest. The theme preview in settings has
been showing all of it for months without the real sidebar delivering any.

Rows now go through the Row widget: base surface, active surface, hover
interpolated between them, a 2px accent bar on the active row and a bottom
separator.

Hover is detected with IsMouseHoveringRect, not IsItemHovered. The row button
is up to two hit widths narrower than the row itself (popout slot, greeted
slot), so a full-width surface driven by the item would flicker at the edges.
AllowWhenBlockedByActiveItem is required on the window check, otherwise the
fill disappears the moment the button is pressed, because InvisibleButton owns
the active id by then.

ItemSpacing is pushed to zero around the row loop so surfaces sit flush instead
of leaving a stripe of window background between them. Style vars are a global
stack and the context menu inherits them, so TabContextMenu now restores a
normal spacing inside its popup -- without that its entries would touch.

The row surface is drawn strictly with draw-list calls between the row button
and TabContextMenu.Draw, which is the ordering the popup trigger depends on.
2026-08-17 23:50:52 +02:00
JonKazama-Hellion 464bd52887 refactor(sidebar): move section headers onto the divider widget
Separator plus TextDisabled took all of their vertical breathing room from
ItemSpacing. The next task pushes ItemSpacing to zero so rows sit flush, which
would have collapsed the header onto its neighbours.

LineDivider carries its own padding and submits its own layout item, so it no
longer depends on the surrounding spacing at all. The compact branch keeps
suppressing only the caption, and LastDrawnSectionHeaderCount still increments
exactly where the caption is drawn -- SidebarSectionHeaderStep pins it at 2
with compact off and 0 with compact on.
2026-08-17 23:49:15 +02:00
JonKazama-Hellion 1e8a60ac80 fix(sidebar): scale the drawn width without moving the stored value
The sidebar constants were raw pixels. At 150% display scaling the text grows,
the column does not, and the row contents stop fitting.

GetWidth and IsExpanded stay unscaled on purpose. The stored width and the
switch threshold are user settings in design pixels, and
SidebarModeAutoSwitchStep compares GetWidth's return value against the raw
bounds with exact equality -- scaling there would fail the step at anything
other than 100%. Scaling happens once, at the single draw call site.

RowHeight and the two hit widths now come from Metrics. The row internals read
GetContentRegionAvail, so they follow automatically and the hit-area split
thresholds stay proportional.

The not-ready branch is scaled too: a scale change triggers a font rebuild, so
that branch really is hit while GlobalScale is moving, and an unscaled width
there makes the sidebar jump.

The width slider referenced the bounds as literals. It now uses the constants,
so it cannot drift away from the clamp.

Known remainder, deliberate: SidebarAutoSwitchThresholdPx is compared against
real screen pixels while the columns now scale, so the switch point drifts at
high scaling. Scaling it would fail the same SelfTest. Noted for v1.11.0.
2026-08-17 23:48:36 +02:00
JonKazama-Hellion 10b345821f fix(messages): apply density switches immediately, freeze the cache while waiting
Review of block A found two regressions the settle gate introduced.

Density and the two name modes are switches, not sliders. They land on a new
value in one frame and stay there, but the gate made them wait 200ms like a
drag. Meanwhile the row painter switched instantly, so for about twelve frames
the planner ran compact rows against card heights: wrong slice, wrong offset,
and the visible rows got overwritten with the new density while everything
else kept the old one. Before the gate this was correct, so it was a
regression, not a pre-existing bug. The fingerprint now separates a discrete
axis that applies at once from the continuous one that waits.

Second, the cache did not actually stand still during the wait. Measurements
were written back unconditionally, so a resize drag mixed heights from many
different widths and the lead dummy drifted for the whole drag. The gate now
exposes IsPending and the planned path skips the write while it is set. The
linear path still measures, because without a filled cache there is nothing to
plan against.

Three smaller items from the same review:

An oscillation slower than the settle window used to bypass the wait entirely,
because the pending clock was never reset on the way back to the applied value.

A value that changes on every frame could hold the gate shut forever while the
applied fingerprint stayed wrong. MaxWaitMs is the deadline, checked before the
still-moving branch so a permanently moving value actually reaches it.

The row painter was passed as `compact ? DrawCompactRow : DrawCardRow`. Both
are instance methods, so the method group captures `this` and Roslyn does not
cache it: 64 bytes per frame per window. Bound once in the constructor now. The
per-frame height array is also reused rather than reallocated, which at the
default MaxLinesToRender was 10 KB per frame on what A2 had just made the
default path.
2026-08-17 23:46:43 +02:00
JonKazama-Hellion 460217459c chore(style): add a widget gallery for visual verification
Every widget in its states, reachable via /hellion widgets. The point is to
check them one at a time before they land in real components: the v2.x style
engine grew three primitives that were never wired to a call site
(DrawGlowBorder, DrawSlipPolygon, DrawHonorificHeader), and this is the cheap
way to notice that before a cycle closes.

DEBUG-only, like SeStringDebugger. It is a verification aid, not a feature, so
it never reaches a release build -- verified against a Release compile.

The header line also shows the live GlobalScale and the hover registry size,
which makes both the scaling work and the eviction contract observable while
dragging the Dalamud scale slider.
2026-08-17 23:42:05 +02:00
JonKazama-Hellion d6ad81e8ca feat(style): add the drawn-widget set
Five widgets, each with a real consumer inside this cycle: Row for sidebar
rows, Badge for unread counts, IconButton for the popout and greeted toggles,
LineDivider for section headers, Pill for the channel pill and the status bar.

Row carries no Tab on purpose. v1.11.0 moves the sidebar from tab rows to
channel rows, and if the chrome sits in a Tab-free widget that cycle only has
to change the caller.

IconButton is deliberately small. Its two sidebar call sites differ in
placement, visibility rule, glyph choice, and one of them bumps a SelfTest
counter. Taking all of that as parameters would produce a widget that is five
switches and no behaviour, so the caller keeps them.

LineDivider brings its own vertical padding and submits its own layout item.
The sidebar is about to push ItemSpacing to zero so rows sit flush, and a
divider relying on spacing would collapse onto its neighbours there.

Colours go through WidgetPalette. TokenResolver returns RGBA and ImDrawList
expects ABGR; with five widgets that is the same swap-red-and-blue trap five
times over.

Sizes go through WidgetGeometry, which is pure so the build suite can pin it,
and clamps every result to a positive extent -- ImGui asserts on a zero-sized
InvisibleButton and takes the window with it.
2026-08-17 23:40:15 +02:00
JonKazama-Hellion 31fa410875 fix(style): drive the hover sheen from held state, drop the leaking start map
The sheen kept its own Dictionary<string, DateTime> of start timestamps and
only cleared an entry in the un-hover branch. A row that disappeared while the
pointer was on it left its entry behind until the plugin reloaded, which is
exactly what happens to temp tabs under the LRU limit.

It now takes the held intensity from HoverState and draws on the rising edge
only. The alpha falls off as the value climbs, so the sweep has faded out by
the time the surface underneath is fully in. On the way out it simply does not
run, which is what stops it from travelling backwards -- the old
SheenStarts.Remove prevented that by resetting, and dropping the map without
this guard would have reintroduced it.

The sidebar call site built "sidebar.tab.{guid}" per row per frame, two
allocations each. Master spec 5.3 asks for constant keys, and 7.5 for a stable
allocation count. It now uses ImGui.GetID("row"u8), which is allocation-free
and seeded from the window's ID stack, so the same literal stays distinct per
window and per PushID'd tab.

HoverSheenAllocStep pinned the old dictionary contract and is replaced by
HoverStateFootprintStep, which pins the same property against the registry:
repeated queries add no entries, and an element that stops being queried leaves
the map instead of leaking.
2026-08-17 23:37:24 +02:00
JonKazama-Hellion bf0c3e2bd7 feat(style): hold hover state across frames instead of one-shot sweeps
DrawHoverSheen measured its own elapsed time against DateTime.UtcNow and gave
up after 0.65s, so a row stopped reacting while the pointer was still on it.
There was no held value to interpolate colours against.

HoverState keeps one 0..1 intensity per element, rising at 14/s and falling at
8/s. Slower out than in is what makes the fade read as deliberate.

Query and advance are separate on purpose. Several SelfTest steps call
Sidebar.Draw against the live tab list, so the same element gets submitted up
to three times in one frame, twice from a window the mouse is not over. If the
query advanced the value, the last caller would win and the fade would run
backwards. Query only ORs the hover flag; BeginFrame does all the moving and
the eviction.

BeginFrame sits above the HideInLoadingScreens and New Game+ early returns, so
a hidden main window still lets pop-out hovers fade out instead of freezing
mid-blend.

FrameLerp gains Ramp: Smooth approaches asymptotically and never arrives, so a
value driven by it would never reach zero and never become evictable.

ReduceMotion short-circuits before the map is touched, returning a hard 0 or 1.
An infinite rate would produce NaN and poison the entry for the session.
2026-08-17 23:35:54 +02:00
JonKazama-Hellion 28b97b3f70 feat(style): add a scale-aware metrics layer
Layout constants lived as bare floats in the components: row heights, hit
widths, insets, reserve widths. None of them multiplied by GlobalScale, so at
125% or 150% display scaling the text grows and the boxes do not. The quick
buttons stop fitting into their 130px column.

Metrics holds the design values and exposes scaled properties. The Raw
constants stay reachable for the few places that must store or compare an
unscaled value: Sidebar.GetWidth (a SelfTest pins it against raw numbers) and
the width slider bounds.

Scale is pinned once per frame against ImGui.GetFrameCount(). GlobalScale is a
live value the Dalamud slider moves on every dragged frame, so reading it per
access can shift a CalcSize away from its matching Draw inside one frame, and
costs three native calls each time.

Not in ThemeLayout: that record is serialised into theme JSON, and layout
customisation is out of scope per the master spec.

MetricsMath is the pure half so the build suite can pin the arithmetic. Text
heights are measured rather than scaled -- the font is built from
Config.FontSizeV2, which GlobalScale does not feed into.
2026-08-17 23:34:08 +02:00
JonKazama-Hellion 0ef33934a2 refactor(messages): plan compact rows like cards instead of assuming a fixed height
Compact mode ran an ImGuiListClipper with CompactRowHeight = 18f. Two things
were wrong with that.

The number: at the default 12.75pt the font is 17px, and ChunkRenderer pushes
ItemSpacing to zero for the whole chunk loop, so a single-line compact row
advances the cursor by 17, not 18. The clipper seeded the cursor one pixel too
low per row, which accumulates into a visible drift against the scrollbar.

The assumption: compact rows are not constant height at all. DrawCompactRow
renders content with wrap: true, and WrapEncodedLine submits one text item per
wrapped line. At 620px and 17px type that kicks in around 70 characters, so
most chat lines are multi-line.

Both densities now share DrawRows/DrawLinearAndMeasure over the existing
CardClipPlanner, with the row painter passed in. The fixed height and the
clipper are gone.

Also corrects the CompensatedDummy comment: the cached heights carry no
trailing ItemSpacing (every row ends inside DrawChunks, where spacing is
zero, and ImGui writes the advance at submission). The compensation is
correct because it cancels the spacing the dummy itself appends.

CardClipPlanStep drives the invalidation hook directly, which now sits behind
the settle gate, so it walks a synthetic clock past the window.
2026-08-17 23:32:04 +02:00
JonKazama-Hellion 39a8e95581 fix(messages): invalidate the height cache when UI scale changes
The layout fingerprint tracked font size, density, both name modes and
content width, but not ImGuiHelpers.GlobalScale. Scale feeds
CalcWordWrapPositionA, so changing it rewraps every row while the cached
heights stay put and the clipper dummies drift against the scrollbar.

Two further problems came out of the same code:

The fingerprint lived in a single field on MessageList while the cache it
guards is per tab. Resizing in tab A marked the new value applied, so tab B
kept measuring against the old width. It is now a gate per tab identifier.

Acting on every fingerprint change is too eager. A window resize or a drag on
the Dalamud UI-scale slider moves the value on every frame, and each change
drops the cache and forces the linear measure path over the whole tab (up to
Config.MaxLinesToRender rows). The gate now waits for the value to settle for
200ms, which turns a drag into one rebuild instead of one per frame.

The settle logic sits in Util/LayoutFingerprint.cs as a plain value type so
the build suite can pin it without standing up an ImGui frame.
2026-08-17 21:17:38 +02:00
JonKazama-Hellion 3583dfc032 perf(tells): build the tab outside the lock, guard pin transitions
HandleTell was one atomic block, and PreloadHistory sat inside it -- so every
new tell partner held TabsListLock across a store query that sorted the whole
receiver history before returning a row. That is the lock the draw thread and
the message worker both wait on.

Now three steps: look for an existing tab under the lock, build the new one
(including history) without it, then commit under the lock again. Splitting it
opens a window where the world can change, so the second block re-checks:

- FindTempTab again, in case something else created the tab meanwhile. The
  message goes to that one instead. Not in the first block's early return --
  HandleTell runs after the delivery loop, so an existing tab already has it and
  adding again would duplicate the line.
- A generation counter, bumped by OnLogout under the same lock. A logout in
  between wipes the unpinned pool, and without this the freshly built tab would
  outlive it and show up for a character we already left. Not via
  CurrentContentId: its getter falls back to a cached value, so the comparison
  can silently pass.
- The pool cap moves into CommitTempTab and stays there exactly once. Evaluating
  it twice would evict a tab on every spawn.

Pin, unpin and promote take the lock around the flag change now -- they decide
pool membership and whether a save strips the tab. SaveConfig stays outside, so
no fsync lands on the click path.

DropOldestTempTab removes by reference: the index came from an earlier Select in
the same block and would point at the wrong tab if anything shifted the list.
2026-08-17 18:38:08 +02:00
JonKazama-Hellion c34024a18b chore(release): bump assembly version to 1.9.0
The whole v1.9.0 cycle ran without a version bump, so the plugin still reported
1.8.8 in-game. For a tester beta that is untenable: bug reports would name a
version that does not identify the code they ran.

Download links stay pinned to v1.5.6 on purpose. There is no v1.9.0 release, and
pointing at an artifact that does not exist is worse than the visible mismatch
between assembly version and download target. Public stays on v1.5.6 until
v2.0.0.
2026-08-17 07:27:59 +02:00
JonKazama-Hellion eaed0b13e0 fix(config): guard the shared config maps, restore lost fields in Tab.Clone
TabsListLock never covered ChatColours, PrivacyPersistChannels or
RetentionPerChannelDays, yet the settings UI mutates them from the draw thread
while the retention thread can be serializing the same config. Adding a new key
to a dictionary or a new element to a set invalidates a running enumeration, so
this could throw from inside JsonConvert.SerializeObject.

Not a corner case: the colour picker lists 66 channels but only 25 ship with a
default, so the first edit of any of the remaining ones inserts a new key -- and
the reset button removes a key, which makes the next edit a fresh insert again.

The readers matter as much as the writers. IsAllowedForStorage runs per message
on the worker thread and asks PrivacyPersistChannels whether a channel may be
stored; a Contains racing an Add that resizes buckets can answer wrong, and that
answer decides whether a message is written to disk. The retention sweep
enumerates RetentionPerChannelDays on the framework thread while the wizard can
clear it -- Clear does not throw there, it just cuts the enumeration short, so
the sweep would run on half a policy.

New ConfigMapsLock covers all of it. It sits inside TabsListLock (that edge is
real, AutoTellTabsService calls SaveConfig while holding the tabs lock), never
the other way round -- so every call site closes the lock before saving.

Tab.Clone silently dropped Icon and ChatCodes, both serialized. A reflection
test now walks the serialized fields so a future one cannot slip past.

Also: CurrentTab read Count and [0] as two separate accesses.
2026-08-17 07:27:48 +02:00
JonKazama-Hellion 2b4243599e fix(ui): render each frame from one tab-list snapshot, key widgets by identity
Sidebar, top tabs and status bar each read Config.Tabs on their own, unlocked,
while the worker added or evicted tabs. That gave three independent views of a
moving list: an index built in one place could resolve to a different tab a few
lines later, which showed up either as an out-of-range crash on the draw thread
or -- worse, because it is silent -- as a click landing in someone else's tell.

MainWindow now takes one snapshot under the lock and passes it through the whole
frame. Deliberately a shallow copy: tab identity is compared by reference all
over the draw path, so cloning would break every ReferenceEquals and Contains.
ChangeTabDelta and ResetActiveTabIfRemoved run on the framework thread and keep
their own locked reads instead; ThemeQuickPicker locks its own copy, since
reaching it would mean threading a parameter through InputBar, which popouts
share and which has no tab list.

Widget IDs move from list position to tab.Identifier. ImGui carries popup and
widget state across frames under that ID, so a position-based one re-binds an
open context menu to a different tab as soon as the list shifts -- a snapshot
cannot fix that, it spans frames. This also resolves top tabs visually merging
into each other when the list changed.

The sidebar section headers counted over the live list while the rows came from
BuildRenderOrder, which skips popped-out tabs. Both sides take the same
predicate now, so the count matches what is drawn.
2026-08-17 07:27:34 +02:00
JonKazama-Hellion 24dff3cc2e fix(messages): snapshot the tab list before delivering a message
ProcessMessage walked Config.Tabs live on the worker thread while SaveConfig's
strip and the auto-tell spawn mutated the same list under TabsListLock. The
resulting "collection was modified" was caught by the pending-message handler
and only logged -- so the message was dropped entirely: no tab entry, no sound,
and MessageProcessed never fired, which also meant no tell tab and no routing.
Silent message loss, exactly under the load where it hurts.

The loop now runs over a snapshot taken under the lock. AddMessage stays
outside it, so the lock order (list outer, MessageList inner) is unchanged.

SelectNotificationSound reports which tab it picked, so playback can skip a tab
that disappeared between snapshot and sound -- otherwise the snapshot would let
an evicted tab still make noise.

While here: the current tab was read twice despite the comment claiming it was
snapshotted once.
2026-08-17 07:27:21 +02:00
JonKazama-Hellion 89c66e0d3d perf(store): index (Receiver, Date) so tell history streams sorted
GetTellHistoryWithSender filters on Receiver and orders by Date DESC. Without a
matching index SQLite sorted the whole receiver history into a temp b-tree
before yielding row one -- measured 10 ms to first row against 9621 tells, all
of it under TabsListLock, which defeats the early break in the caller.

(Receiver, ChatType, Date) does not help: the ChatType IN filter sits between
the equality prefix and the sort column, so the temp b-tree stays. Verified on
a real database: plan now reads SEARCH ... USING INDEX idx_messages_receiver_date
with no sort step.

No SQL LIMIT -- an earlier 500-row cap was removed in v1.4.10 because it cut
less-frequent partners off the back of the window, and 83% of partners have
fewer than 21 tells in total.

The migration dispatcher is cumulative, so Migrate5 is appended to every
existing case, not just the new one.
2026-08-17 06:50:04 +02:00
JonKazama-Hellion d2da51a4f7 perf(settings): write config on release instead of every slider frame
ImGui sliders report a change in every frame the value moves, so dragging one
rewrote the full 31 KB config to disk per frame -- serialize, fsync and rename,
synchronously on the draw thread. Measured on Linux/Wine that showed up as a
114 ms frame while the plugin itself only drew for 2.9 ms; the rest was waiting
on the write.

The five shared slider helpers now defer SaveConfig to IsItemDeactivatedAfterEdit,
matching what ChatColourPicker already did for the colour wheel.

Renaming a tab needed its own path: the input lives inside a popup, and ImGui
never re-submits it when the popup is dismissed by clicking outside, so
IsItemDeactivatedAfterEdit would not fire and the new name would be lost. A
pending-rename marker scoped to the owning tab flushes it when the popup is
gone -- scoped, because every other tab's Draw reaches that branch too.

DeferredSaveFrames is removed: the debounce was fully wired but never armed,
and this approach makes it redundant.
2026-08-17 06:49:53 +02:00
JonKazama-Hellion 99dca8cb31 fix(selftests): take TabsListLock around Config.Tabs mutations
The three sidebar/coupling steps add, insert and remove tabs straight from
the framework thread while the message worker mutates the same list under
TabsListLock. CurrentTabCouplingStep's Insert(0, ...) is the worst of them:
it shifts every index, so DropOldestTempTab can remove the wrong tab between
its index lookup and RemoveAt.

Locks sit around the individual mutations, never around a Draw call, so no
step holds the lock across rendering.
2026-08-17 06:49:42 +02:00
JonKazama-Hellion ce5973aea9 Merge remote-tracking branch 'origin/main' into feature/v1.9.0 2026-08-16 21:08:20 +02:00
JonKazama-Hellion fd8e5a1a17 revert(ci): security-scan wieder ueber den reusable workflow
Security Scan (reusable) / Security Scan (push) Failing after 27s
Security / scan (push) Failing after 27s
Build / Build (Release) (push) Successful in 36s
Rueckbau des Inline-Workarounds. Der Runner konnte den reusable workflow
nicht mehr laden, weil git fetch gegen die Forge crashte. Ursache war kein
Bug, sondern eine Kompromittierung ueber CVE-2026-59774: ein injizierter
packObjectsHook ersetzte git pack-objects durch einen Malware-Dropper.

Gitea laeuft jetzt auf 1.27.2, der Hook ist entfernt, fetch funktioniert
wieder. Die Scan-Definition liegt damit wieder an einer Stelle statt in
sieben Dateien. Details: Obsidian "Projekte/Hellion Forge/Forge
Security-Incident 2026-08-15.md".
2026-08-15 21:17:43 +00:00
JonKazama-Hellion d50f2cea90 fix(ci): security-scan inline statt reusable workflow
Security / Security Scan (push) Failing after 21s
Build / Build (Release) (push) Failing after 34s
act_runner laedt reusable workflows per git-clone ueber HTTPS. Dieser Pfad
ist auf der Forge seit 2026-08-12 defekt (git upload-pack --stateless-rpc
bricht mit BUG "packfile_uris requires sideband-all" ab). Die Scans liefen
bisher nur ueber eine im Juni gecachte Kopie im Runner.

Der Scan steht jetzt vollstaendig in dieser Datei, der Quellstand kommt als
tar-Archiv statt ueber actions/checkout. Zurueckbauen, sobald git fetch
ueber HTTPS wieder funktioniert.
2026-08-15 17:26:51 +00:00
JonKazama-Hellion de9d11ba4a docs: v1.9.0 comment-pass (Z-3) — fix false TEST-MIRROR paths, comment accuracy + density 2026-06-16 20:59:09 +02:00
JonKazama-Hellion 618e029ff4 perf(tabs): share Plugin.TabsListLock across AutoTellTabsService + MessageManager refilter + SaveConfig (B3) 2026-06-16 20:39:56 +02:00
JonKazama-Hellion 93f4fbba72 perf(card): variable-height clipper + layout-fingerprint cache invalidation + clip-plan self-test 2026-06-16 20:09:45 +02:00
JonKazama-Hellion 1d69d0cc30 B2: add Dalamud-free CardClipPlanner variable-height clip-plan helper 2026-06-16 19:58:02 +02:00
JonKazama-Hellion b048a51534 B1: dedupe CJK/symbols merge via AddCjkAndSymbols, trim fallback range; FontsReady + report self-test 2026-06-16 19:53:39 +02:00
JonKazama-Hellion 7d2fd1ab65 selftest: add on-disk SelfTestReport log; report PASS/FAIL details from steps 2026-06-16 19:53:39 +02:00
JonKazama-Hellion 2c5c40524d B1: add Dalamud-free CjkFallbackRange helper + coverage tests 2026-06-16 19:25:34 +02:00
JonKazama-Hellion 0508a05bab test(selftest): add GlobalStyleScope GC-reserve alloc probe 2026-06-16 19:23:15 +02:00
JonKazama-Hellion 32013babaf perf(style): make GlobalStyleScope.StackHandle GC-free via counter scope 2026-06-16 19:23:15 +02:00
JonKazama-Hellion 430c8f235a perf(baseline): 1000-frame steady-state capture with quad-proxy draw calls + JSON sink 2026-06-16 19:13:45 +02:00
JonKazama-Hellion 68c4e28495 perf(baseline): time full Draw() handler into LastDrawMs field 2026-06-16 19:13:45 +02:00
JonKazama-Hellion 458df3b4bd Restore permanent-REPLY game-side tell pre-targeting (1.5.6 parity) 2026-06-16 19:03:34 +02:00
JonKazama-Hellion 6733c7f92e Restore pop-out exclusivity: hide popped tabs from main window + keybind/unread parity 2026-06-16 18:30:23 +02:00
JonKazama-Hellion fa20b53455 C2/C3: restore rotation keybinds (REPLY/LS-cycle) + focus contract routing on the focused chat surface 2026-06-16 14:09:28 +02:00
JonKazama-Hellion ea3f00f107 GP-04: reset Tab.PopOut on load via shared helper (clears stale pinned flags) 2026-06-16 13:26:17 +02:00
JonKazama-Hellion 5bdf4217d6 D1-3 (XC-8): route PayloadHandler Send-Tell through shared BuildTellCommand (IsPublic at call-site) 2026-06-16 13:10:22 +02:00
JonKazama-Hellion 97e58934d6 D1 (XC-8): extract shared PrefillTellInput/BuildTellCommand for the two tell-prefill detours 2026-06-16 13:03:26 +02:00
JonKazama-Hellion f05d7104af A3: gate pop-out affordance on expanded sidebar (icon-only overlap fix) 2026-06-16 12:33:26 +02:00
JonKazama-Hellion e98cefa0b2 A2: name Sheen tuning knobs + SmoothStep crossfade easing 2026-06-16 12:29:57 +02:00
JonKazama-Hellion c1765ce8ca A1: harden HoverSheenAllocStep with real dictionary-footprint assertion 2026-06-16 12:22:29 +02:00
JonKazama-Hellion 7ead120213 A1: scharfschalten DrawHoverSheen accent-tint (Variante A) 2026-06-16 12:17:39 +02:00
JonKazama-Hellion f5ba1c0246 A1: add ColourUtil.LerpTowardWhite accent-tint helper 2026-06-16 12:02:53 +02:00
JonKazama-Hellion b372ab84c3 Merge branch 'feature/v1.8.0' into main 2026-06-16 09:18:12 +02:00
JonKazama-Hellion c27785f9f6 Merge branch 'feature/v1.8.0-closeout' into feature/v1.8.0 2026-06-16 09:07:57 +02:00
JonKazama-Hellion 6f71b09331 fix(closeout): address closure-review findings
- gate keybind pill-sync on IsChannelOrExistingLinkshell so an empty
  linkshell slot no longer desyncs the pill from the real send channel
- close manually-popped pop-out windows on logout via an IsOpen filter
  instead of the PopOut flag (which manual pops never set)
- read the router's tell-tab lookup through a lock-wrapped accessor so the
  framework thread cannot enumerate Config.Tabs mid worker-thread mutation
- add a "switch on every tell" toggle (default on) and make the auto-open
  mode pick the matching layout, so Sidebar vs Top-tab are distinct
- comment corrections (stale/contradictory text, TEST-MIRROR path depth)
2026-06-16 09:04:18 +02:00
JonKazama-Hellion 49f5119b17 feat(popout): arm the auto-tell pop-out settings and add the pool self-test 2026-06-16 01:29:59 +02:00
JonKazama-Hellion 6578c10b13 feat(settings): restore the tab-cycle keybind binder UI 2026-06-16 01:21:05 +02:00
JonKazama-Hellion 3878869904 feat(keybind): cycle tabs and switch channel with pill sync 2026-06-16 01:21:05 +02:00
JonKazama-Hellion 88491902eb feat(chat): prefill the input bar for context-menu and direct-chat tells 2026-06-16 01:04:34 +02:00
JonKazama-Hellion 47a49de8c0 feat(tell-router): auto-open incoming tells per TellAutoOpenMode 2026-06-16 00:50:45 +02:00
JonKazama-Hellion 7b6871fea4 feat(autotell): wire temp-tab pop-outs to the channel-popout pool 2026-06-16 00:39:01 +02:00
JonKazama-Hellion 8e2d333130 fix(toptab): size each tab selectable to its label width 2026-06-16 00:24:18 +02:00
JonKazama-Hellion 4db2ad99b9 Merge branch 'feature/v1.8.8' into feature/v1.8.0
v1.8.8 Block 4b -> full theme/window restoration (last of the 1.8.x restore
series). B4b export-button + schema-v2 default-fill, then P1-P8: custom-theme
selection, typography font-size apply, font-selection UI, theme-card mockup,
chat-colour editor, header theme/tab quick-picker, window/display toggles
(title bar, hide button, 24h clock), and hide-window + Enter-to-restore.
Local-only; manifest 1.8.8; all self-tests green.
2026-06-15 21:08:30 +02:00
JonKazama-Hellion a73f4d0d0c feat(window): restore hide-chat-window + Enter-to-restore (1.5.6)
The eye/hide button now hides the HellionChat window (runtime-only, via a new
DrawConditions gate) instead of toggling native-chat suppression, matching 1.5.6.
The chat-activation keybind (Enter / "/"), whose dispatch was a dead stub in the
KeybindManager since the v1.6.0 rewrite, is re-wired to MainWindow.ActivateChat:
it un-hides, opens if closed, brings the window to front and focuses the input --
so the chat reacts to Enter again from any state. /hellion is a reliable one-press
recovery (Toggle now clears the hide), and the window always shows on login
(start state no longer read from the persisted flag). Adds HideRestoreSelfTestStep.
2026-06-15 20:49:14 +02:00
JonKazama-Hellion b397591ba4 feat(window): restore the title-bar, hide-button, and 24-hour-clock toggles
Re-wires four 1.5.6 settings that survived the v1.6.0 rewrite as dormant config
fields but lost their UI + consumers:
- ShowTitleBar / ShowPopOutTitleBar: gate ImGuiWindowFlags.NoTitleBar on the main
  window (ResolveFlags) and pop-out windows (new PreDraw). Inverted logic matches
  1.5.6 (flag set only when the toggle is off).
- ShowHideButton: gate the input-bar hide button on the toggle.
- Use24HourClock: add the toggle (MessageList already consumes the field).
New 'Window style' section in WindowTab; Use24HourClock in ChatTab display modes.
MainWindowFlagsStep extended with the NoTitleBar fresh-base contract.
2026-06-15 20:19:59 +02:00
JonKazama-Hellion 6813b80d58 feat(themes): restore the header theme/tab quick-picker
Brings back the 1.5.4 quick-picker lost in the v1.6.0 rewrite: a palette button
in the input-bar button row (left of the cog) opens a popup that switches the
theme (built-in + custom, active row checked) and jumps between chat tabs without
opening settings. Theme switch mirrors the settings ThemePicker; the tab jump
routes through a new MainWindow.ActivateTab that replays the click path
(previous -> set -> OnTabActivated) so tell/unread handling is unchanged. Main
window only -- pop-out InputBars get a null picker. Adds QuickPickerSelfTestStep.
2026-06-15 19:53:31 +02:00
JonKazama-Hellion 0352e6c199 feat(themes): restore the chat-channel colour editor in the appearance tab
Brings back the 1.5.6 per-channel colour editor lost in the v1.6.0 rewrite:
presets (incl. brand styling), per-ChatType reset/import-from-game/colour-edit
over Config.ChatColours, the colour-selected-input-channel toggle, and the
theme adopt-banner. The colour-edit drag recolours live but defers SaveConfig
to release (IsItemDeactivatedAfterEdit) to avoid a per-frame full-config write.
2026-06-15 19:12:09 +02:00
JonKazama-Hellion 8cbf9c554f feat(themes): restore the per-card theme preview mockup in the picker 2026-06-15 18:49:45 +02:00
JonKazama-Hellion 18834cddae feat(fonts): restore the font-selection UI in the appearance tab 2026-06-15 18:41:03 +02:00
JonKazama-Hellion fe0414dd2b feat(themes): apply theme typography font-size overrides on every activation path 2026-06-15 18:19:08 +02:00
JonKazama-Hellion ec92cf2c04 feat(themes): list custom themes in the theme picker 2026-06-15 18:03:39 +02:00
JonKazama-Hellion 512533ed3a feat(themes): default-fill missing colour/layout slots on theme load 2026-06-15 16:55:50 +02:00
JonKazama-Hellion a2d8a9c223 feat(themes): add an export button for the active theme 2026-06-15 16:55:50 +02:00
JonKazama-Hellion dcf089b886 chore(release): bump manifest to 1.8.8 for theme export, default-fill, font-apply 2026-06-15 16:18:05 +02:00
JonKazama-Hellion c4562dd6a0 style(selftests): wrap HonorificTitleData ctor to satisfy csharpier
Inherited csharpier drift from the 1.8.7 merge (72099c8); format-only, no behaviour change.
2026-06-15 16:18:05 +02:00
JonKazama-Hellion 74f7bb3fc1 Merge branch 'feature/v1.8.7' into feature/v1.8.0 2026-06-15 14:50:02 +02:00
JonKazama-Hellion 8afcb87624 test(about): assert integrations status through the real render 2026-06-15 14:44:26 +02:00
JonKazama-Hellion f9ed487ae2 feat(about): restore the integrations section with honorific status 2026-06-15 14:40:21 +02:00
JonKazama-Hellion 72099c8871 test(honorific): assert the title gate through the real draw path 2026-06-15 14:35:20 +02:00
JonKazama-Hellion fe766285ad feat(honorific): wire title gate + colour + truncation, restore preview glyphs 2026-06-15 14:26:22 +02:00
JonKazama-Hellion 8db2dee38c chore(release): bump manifest to 1.8.7 for honorific + integrations restoration 2026-06-15 13:53:06 +02:00
JonKazama-Hellion a38afbcf67 Merge LastTab-decoupling fix + unread-badge restore (1.8.6) into v1.8.x track 2026-06-13 18:53:28 +02:00
JonKazama-Hellion 5dfe8e3b49 fix(unread): restore the tab unread badge and fix the post-F2 unread decision
The v1.8.x sidebar/top-bar rebuild never re-rendered the unread dot, so inactive tabs showed no badge even though the counter was tracked. Draw it again top-right of the tab icon in both Sidebar and TopTabBar, gated on !active && UnreadMode != None && Unread > 0, and zero the active tab's counter every frame (1.5.6 convention) so the dot only ever shows on tabs you are not looking at.

The unread decision moves to MessageManager.ShouldCountUnread and snapshots the active tab + whether it shows the message once before the loop: Unseen suppresses unread on an inactive tab only when the active (real, post-F2) tab also shows that message. Adds SidebarUnreadDotStep (render) and UnreadDecisionStep (decision) self-tests (step count 32 -> 34).
2026-06-13 18:49:27 +02:00
JonKazama-Hellion 0ca8513065 fix(tell): couple CurrentTab to the active tab, retire LastTab
Plugin.CurrentTab now delegates to MainWindow.ActiveTab (fallback Tabs[0]) instead of the never-assigned LastTab index, so the game hooks, unread tracking, notification sounds, InputDisabled and Foray/Eureka paths all operate on the tab the user actually has selected. The dead LastTab/WantedTab fields and both WantedTab writes are removed.

A reference-based MainWindow.ResetActiveTabIfRemoved repairs the active-tab reference on eviction/logout (immune to the SaveConfig temp-tab strip window). The worker-thread eviction path marshals it onto the framework thread so the strip mutation serializes with Draw; logout is already framework-thread. The Draw-seed gains a lazy re-seed for a wholesale config swap. Adds CurrentTabCouplingStep (headless) and the interactive CurrentTabGuidedStep self-test (step count 30 -> 32).
2026-06-13 16:09:59 +02:00
JonKazama-Hellion ad635c77c1 fix(tell): strip stale tell state on tab activation
OnTabActivated clears the runtime tell state the game-side detour leaves on a tab (CurrentChannel tell target + partner label) when a DIFFERENT tab becomes the input surface, so a normal typed line can no longer route as a silent /tell to the old partner. Re-clicking the active tab and tabs carrying their own Tab.TellTarget binding (leg1) are preserved.

All four activation paths route through it: Sidebar, TopTabBar, ChannelPopoutPool.TryOpen, and the MainWindow draw-seed. EnsureCurrentChannel becomes a pure derive-helper reached only via OnTabActivated. Adds the TellResetOnActivateStep self-test (step count 29 -> 30).
2026-06-13 15:09:38 +02:00
JonKazama-Hellion 593eb30c9f chore(release): bump manifest to 1.8.6
Branch start for the LastTab-Decoupling fix cycle. csproj <Version> and repo.json AssemblyVersion + TestingAssemblyVersion go 1.8.5 -> 1.8.6. DownloadLinks and Changelog stay release-deferred on v1.5.6.
2026-06-13 14:23:10 +02:00
JonKazama-Hellion 11ef5951a4 Merge restoration block 3 (sidebar UI) into v1.8.x track 2026-06-10 17:00:51 +02:00
JonKazama-Hellion c28e3f72a1 feat(messages): restore scroll-to-bottom bar with snap decision 2026-06-10 16:55:26 +02:00
JonKazama-Hellion dc51e295ea feat(sidebar): restore section headers and compact separators 2026-06-10 16:22:49 +02:00
JonKazama-Hellion 540cb7ac52 feat(sidebar): restore per-tab greeted toggle glyph 2026-06-10 14:59:51 +02:00
JonKazama-Hellion 1f2c354471 feat(sidebar): restore per-tab notification sound picker with preview 2026-06-10 13:26:55 +02:00
JonKazama-Hellion ac7f74b227 feat(sidebar): restore tab rename via shared context menu 2026-06-10 11:42:44 +02:00
JonKazama-Hellion c7047407f5 feat(core): add static Plugin.Instance handle for UI helper access 2026-06-10 10:09:32 +02:00
JonKazama-Hellion e5a17ee798 chore(release): bump manifest to 1.8.5 for sidebar-ui restoration 2026-06-10 10:01:55 +02:00
JonKazama-Hellion 83de7cd989 Merge tell-routing restoration (1.8.4) into v1.8.x track 2026-06-04 17:20:59 +02:00
JonKazama-Hellion 51c8f79846 chore(release): bump manifest to 1.8.4 for tell-routing restoration
Download links stay on v1.5.6 (local-only block, no public release yet).
2026-06-04 17:11:32 +02:00
JonKazama-Hellion d40b120b91 fix(tell): restore outgoing tell routing from the input bar
Input-bar tells went out as a bare "/t" without the target, so the game
rejected them with "you must add the World name". Rebuild the full
"/tell name@world" from the 1.5.6 target chain in a pure BuildOutgoing:

- leg2/leg3 gated on current == Tell so a stale tell target on a Say tab
  can't send a say line silently as /tell (CORR-1)
- world-resolve gate: an unresolvable world falls back to the channel
  prefix, never "/tell name@ text" (COMP-1)
- ResetTempChannel after the send, tell-only

Also clear the runtime tell state on PromoteToPermanent so a promoted tab
can't route a typed line to the old partner, and surface the tell partner
("-> name@world") in the channel pill so a misfire stays visible. Adds
tell-routing and pill-transparency self tests.
2026-06-04 17:11:32 +02:00
JonKazama-Hellion 99901b64ed Merge pull request 'chore(deps): update minor and patch updates (nuget)' (#17) from renovate/minor-and-patch-updates-(nuget) into main
Security / scan (push) Successful in 21s
Build / Build (Release) (push) Successful in 30s
Reviewed-on: #17
2026-06-03 06:07:06 +00:00
renovate-bot 7ef1337ea0 chore(deps): update minor and patch updates (nuget)
Security / scan (pull_request) Successful in 20s
Build / Build (Release) (pull_request) Successful in 26s
2026-06-03 06:06:55 +00:00
JonKazama-Hellion a13713752e Merge pull request 'chore(deps): update actions/setup-dotnet digest to 9a946fd' (#19) from renovate/actions-setup-dotnet-digest into main
Security / scan (push) Successful in 21s
Build / Build (Release) (push) Successful in 27s
Reviewed-on: #19
2026-06-03 06:06:11 +00:00
renovate-bot a9f42e32c5 chore(deps): update actions/setup-dotnet digest to 9a946fd
Security / scan (pull_request) Successful in 29s
Build / Build (Release) (pull_request) Successful in 45s
2026-06-01 00:32:04 +00:00
JonKazama-Hellion e372afc8ac Merge restoration block 2 (settings without UI) into v1.8.x track 2026-05-31 00:48:58 +02:00
JonKazama-Hellion b0bee25770 feat(input): warn and hold before sending plugin-only symbols 2026-05-31 00:45:31 +02:00
JonKazama-Hellion 92f1736ea9 feat(settings): add world suffix and name format combos to the chat tab 2026-05-31 00:36:09 +02:00
JonKazama-Hellion 83b1708d5d feat(messages): render sender names through the name-aware path 2026-05-31 00:31:48 +02:00
JonKazama-Hellion 8fcb10cf51 chore(release): bump manifest to 1.8.3 for restoration block 2 2026-05-31 00:11:29 +02:00
JonKazama-Hellion 71cf6234b5 Merge restoration block 1 (dead settings) into v1.8.x track 2026-05-30 19:08:15 +02:00
JonKazama-Hellion 78d56f0e3e fix(channels): restore auto-tell limit range to 50 and relocate enable toggle 2026-05-30 19:04:32 +02:00
JonKazama-Hellion ca00f528d6 feat(config): drop dead SidebarTabView and migrate false to top tabs (schema v23) 2026-05-30 18:55:26 +02:00
JonKazama-Hellion a7a5aee982 feat(sidebar): wire configurable expanded width through a single source 2026-05-30 18:22:38 +02:00
JonKazama-Hellion caacb87a6a feat(window): wire move/resize flags and consolidate the duplicate toggle 2026-05-30 17:54:15 +02:00
JonKazama-Hellion 336f722eef feat(window): wire inactive opacity to main window focus state 2026-05-30 16:57:59 +02:00
JonKazama-Hellion 7792b327dc chore(release): bump manifest to 1.8.2 for restoration block 1 2026-05-30 16:17:06 +02:00
JonKazama-Hellion 6581943bf1 Merge restoration block 0 (verification truth) into v1.8.x track 2026-05-30 08:56:00 +02:00
JonKazama-Hellion c84891e75d docs(selftest): add binding render-path selftest standard 2026-05-30 08:43:06 +02:00
JonKazama-Hellion 6af9e05664 test(selftest): add PayloadHandler and ChunkRenderer ctor smoke steps 2026-05-30 08:40:51 +02:00
JonKazama-Hellion ea549ebcd0 test(selftest): remove dead ConfigMigrationV21 step superseded by V22 2026-05-30 08:23:29 +02:00
JonKazama-Hellion d33c25e77a chore(release): bump manifest to 1.8.1 for restoration block 0 2026-05-30 08:18:16 +02:00
JonKazama-Hellion ad892cbcb6 feat(layout): add top-tabs layout mode and shared channel resolver 2026-05-29 14:06:41 +02:00
JonKazama-Hellion a9e70ce2af fix(popout): guard against mid-frame unbind when closing from the header 2026-05-29 13:29:29 +02:00
JonKazama-Hellion db47708264 feat(popout): wire pool + window render + sidebar pop-out routing 2026-05-29 12:49:21 +02:00
JonKazama-Hellion e786257cb3 feat(config): add MainWindowLayoutMode + v22 migration; scaffold popout pool 2026-05-29 11:56:18 +02:00
JonKazama-Hellion b221a6e418 feat(input-bar): wire auto-translate tab picker + payload-replace on send
v1.7.0 component-layer refactor removed ChatLogWindow.cs (which housed
the auto-translate popup) and dropped Ui/AutoCompleteInfo.cs without
migrating the logic into the new InputBar component — v2.x spec §3
said "LÖSCHEN + Logik migrieren", but only the deletion happened.
Result: Tab key did nothing in v1.7.1, and even manually typed
<at:group,key> tokens were never resolved into real auto-translate
payloads on send.

Root cause confirmed empirically via VN-1 diagnostic build
(_logger.LogDebug in SlashCommandCallback proved CallbackCompletion
fires on Tab once the flag is set). Following the diagnose-zuerst
pattern established by Issue #3 to avoid the source-code-only
hypothesis trap from Issue #2.

Migration follows v1.5.6 ChatLogWindow.DrawAutoComplete + ChatTwo
upstream AutoCompleteHandler patterns, but ported to v1.7.0 stil:

- ImGuiInputTextFlags extended with CallbackCompletion (Tab trigger)
  and CallbackAlways (cursor restore via _activatePos analog v1.5.6
  ActivatePos)
- SlashCommandCallback now dispatches three branches: CallbackAlways
  (cursor restore), CallbackCompletion (Tab → word-boundary search
  via Encoding.UTF8.GetString on the byte span, char-offset DTO
  construction to avoid the byte-vs-char drift in v1.5.6's raw
  pointer arithmetic), CallbackEdit (existing slash-command help
  detection, now properly scoped)
- 7 new private state fields (_autoCompleteInfo, _autoCompleteOpen,
  _autoCompleteList, _fixCursor, _autoCompleteSelection,
  _autoCompleteShouldScroll, _activatePos)
- DrawAutoCompletePopup renders the picker at the end of Draw():
  IsWindowAppearing seeds _fixCursor + focus, ListClipper-wrapper
  from Util/SearchSelector.cs (IDisposable, automatic Destroy) for
  the result list, Ctrl+0-9 quick-pick, Enter/Escape handling,
  char-splice commit (_pendingMessage = before + replacement + after)
- AutoCompleteCallback handles popup-input-field fix-cursor seeding,
  Up/Down navigation with wrap-around, Tab cycle in the default case
- TrySend now runs AutoTranslate.ReplaceWithPayload(ref bytes) and
  sends via ChatBox.SendMessageUnsafe(byte[]) with a manual 500-byte
  guard, because SendMessage(string) would route through SanitiseText
  which destroys the binary SeString macro bytes that
  ReplaceWithPayload emits
- AutoCompleteInfo DTO added as sealed internal companion type at the
  end of InputBar.cs (15 LOC, exclusively consumed by InputBar);
  ToComplete is a mutable field rather than auto-property so it can
  be passed as ref to ImGui.InputTextWithHint without CS0206

Verified in-game (Flo): Tab on empty input opens picker with full
list, "fire" + Tab filters correctly, Up/Down/Tab navigate, Enter
commits <at:group,key>, send resolves to real auto-translate payload
in chat, Ctrl+0-9 quick-pick works, Escape closes without commit.
dotnet build clean, dotnet csharpier check clean.

Single minor plan-drift: scroll-to-selected uses
ImGui.SetScrollY(selection * lineHeight) instead of
SetScrollFromPosY(clipper.StartPosY) because the local
ListClipper-wrapper does not expose StartPosY — same UX effect.
2026-05-28 17:23:11 +02:00
JonKazama-Hellion 0319636fc5 fix(chat): route inventory item-link addIfNotPresent into InputBar
The AddonChatLog.OnRefresh hook is registered and fires correctly
when the user picks "Link item" from the inventory right-click menu
in-game. The detour extracts addIfNotPresent="<item>" from the
AtkValue array — verified empirically via a temporary _logger.LogDebug
diagnostic build (eventId=31 valueUInt=C addIfNotPresent=<item>).

Pre-fix the extracted value was discarded with `_ = addIfNotPresent;`
and a comment "Chat-window Activated integration is offline until the
new chat layer surfaces an Activated entry point." The Activated entry
point on the new v1.7.0 component layer has existed since that cycle
(InputBar.AppendPending + InputBar.Activate, same pattern as
PayloadHandler.DrawStatusPopup:546-549), but the rewiring was forgotten
when ChatLogWindow.Activated() was removed.

Route addIfNotPresent through InputBar.AppendPending with a
v1.5.6-equivalent !PendingMessage.Contains() guard to prevent
double-insertion on repeated OnRefresh events. Activate = true marks
the input bar for ImGui.SetKeyboardFocusHere on the next draw, so the
user can immediately keep typing after the link is inserted.

Verified in-game: right-click "Link item" on multiple inventory items
inserts <item> into the HellionChat input bar, repeated link insertion
does not produce <item><item>, MainWindow gains keyboard focus.
2026-05-28 16:03:57 +02:00
JonKazama-Hellion b954a19b67 fix(payload-handler): popup-pfad in MessageList-Child-Scope verschieben
Seit dem v1.7.0-Components-Layer-Refactor lebte der PayloadHandler-
Popup-Render in MainWindow.Draw als _messages.DrawHandlerPopups()-
Aufruf nach dem ##hellion-body-Child-Close. ImGui.OpenPopup (in
RightClickPayload, innerhalb ##hellion-main-area-Child) und
ImGui.BeginPopup (in PayloadHandler.DrawPopups, im MainWindow-Root
nach Child-Close) hashed die Popup-ID per g.CurrentWindow->GetID(...)
window-relativ — also unterschiedlich. OpenPopupStack-Eintrag wurde
nie gefunden, popup.Success blieb false, _popup wurde auf null
zurückgesetzt. Alle vier Popup-Switch-Cases waren tot: URL-Rechtsklick,
Player, Item (inkl. EventItem-Subpfad), Status.

Fix nach v1.5.6/ChatTwo-Pattern: _handler?.Draw() ans Ende von
MessageList.Draw() verschieben. MessageList läuft im
##hellion-main-area-Scope und öffnet selbst kein Child, also teilen
OpenPopup und BeginPopup denselben Window-Stack. ID-Hash matched,
Popup rendert.

DrawHandlerPopups-Wrapper aus MessageList und der Aufruf in
MainWindow.Draw entfallen — kein toter Code mehr (grep
DrawHandlerPopups: 0 Treffer).

Hypothese verifiziert gegen imgui.h:845 + imgui.cpp:12282+12528
(beide BeginPopup-Hash und OpenPopup-Hash sind window-relativ),
v1.5.6 ChatLogWindow.cs:1667 (handler.Draw im
##chat2-messages-Child), ChatTwo ChatLog.Window.cs:620 (identisches
Pattern). Reader-Lock auf tab.Messages bleibt während DrawPopups
gehalten — identisch zu v1.5.6-Semantik.

Verifiziert in-game (Flo): Linksklick auf URL öffnet Browser direkt
(v1.5.6-konform), Rechtsklick öffnet wieder das Kontext-Popup. dotnet
build clean, dotnet csharpier check clean.

Plan-Runde 1 dieses Cycles (4-LOC-Reroute LeftClick → RightClickPayload)
wurde verworfen weil empirischer Test zeigte dass auch Rechtsklick
broken war — der Reroute hätte das Symptom nur sichtbarer gemacht
ohne die Root-Cause zu adressieren.
2026-05-28 15:25:05 +02:00
JonKazama-Hellion 29fb4b92eb fix(input-preview): wire Inside-mode + Tooltip-mode render paths
InputPreview was only rendered for PreviewPosition.Top/Bottom (the
DrawConditions IsWindowMode gate). Inside-mode (the default) and
Tooltip-mode had no caller at all because v1.5.6's inline-render path
lived on the deleted ChatLogWindow and was not migrated to the v1.7.0
Components-Layer.

Wire Inside-mode by calling CalculatePreviewHeight + DrawPreview
inline from MainWindow.DrawMainArea between the message-list child
and the input bar, with the message-list height reserved for the
preview block. Wire Tooltip-mode by sampling IsItemHovered() on the
input text widget inside InputBar.DrawInputField (analog to the
existing _isFocused = ImGui.IsItemFocused() idiom on the same line)
and exposing it as WasInputTextHovered; MainWindow opens the tooltip
after _input.Draw when both the hover-flag and PreviewPosition.Tooltip
are active.

Plan-drift acknowledged: the plan stated Plugin.InputPreview is
statically reachable, but the property was declared as an instance
member on Plugin.cs:101. Hoisted to internal static to match the
plan's intention (analog to Plugin.Config); updated the single
external instance-access site in PluginLifecycle.RegisterWindows
to the type-qualified form.

Verified in-game: Inside-mode preview block appears between message
list and input bar on first keystroke; tooltip-mode shows preview on
text-field hover only; Top/Bottom-mode unchanged; empty buffer hides
the preview in all modes. dotnet build clean, dotnet csharpier check
clean.
2026-05-28 13:21:59 +02:00
JonKazama-Hellion 24d3f69041 fix(host): break InputBar/CommandHelpWindow/MainWindow DI cycle
J + J2 closed a singleton cycle:
  InputBar.ctor -> CommandHelpWindow (J2)
  CommandHelpWindow.ctor -> MainWindow (J)
  MainWindow.ctor -> InputBar (pre-existing)

MS.DI does not detect cycles through FactoryCallSite registrations,
so resolution recursed silently on the async plugin-init thread until
the worker died with an uncatchable StackOverflowException. Dalamud's
LoadAsync task never resolved; the plugin UI hung on "Enabling..."
with no exception in the log. First triggered at Plugin.cs:289
(TypingIpc.ctor needs InputBar).

Fix: break the cycle on the laziest edge.
  - CommandHelpWindow.ctor no longer takes MainWindow.
  - New AttachMainWindow setter wired in
    CommandHelpWindowInitHostedService.StartAsync, mirroring the
    existing §6.2 MessageList.AttachPayloadHandler pattern.
  - UpdateContent throws InvalidOperationException if the setter
    never ran, so a future regression fails loudly instead of a
    silent NullRef during input draw.

Also enable UseDefaultServiceProvider(ValidateOnBuild + ValidateScopes)
so future ConstructorCallSite cycles throw at Build time instead of
silently hanging. Catches reflection-based registrations; will not
catch FactoryCallSite cycles like this one (those still need code review).

Verified via 6 enable/disable cycles in-game; plugin loads cleanly,
Hosting starts, FilterAllTabs completes, command help popup renders
for /em and /say (exercises AttachMainWindow), hover counter ticks
(exercises PayloadHandlerInitHostedService AddonLifecycle wiring).
2026-05-28 08:16:27 +02:00
JonKazama-Hellion f6749d206b chore(polish): cycle-end sweep — drop dead fields, dep-cycle, comments
Accumulated polish across the v1.7.1 R-Block reviewer findings. Single
sweep before Phase-3 Smoke-Gate.

Dep-cycle cleanup (Block H + #30):
- CommandHelpWindow drops the dead _inputBar ctor-param + discard that
  was J's speculative prep; this eliminates the InputBar <-> CommandHelpWindow
  ctor cycle at its root
- InputBar replaces Lazy<CommandHelpWindow> wrapper with direct
  CommandHelpWindow ctor-param now that the cycle is broken
- PluginHostFactory InputBar + CommandHelpWindow DI-regs simplified

Dead-field removals:
- MessageList drops _themes + _resolver (no reads after H's render-path
  swap to _chunkRenderer.DrawChunks)
- InputBar drops FocusedPreview (no consumer wiring in the new architecture)
- InputPreview drops SelectedCursorPos (v1.5.6 letter-by-letter renderer
  artifact, no callers in R1)
- InputPreview drops WhitespaceRegex + partial keyword on class (dead
  GeneratedRegex with no callers)

Visibility fixes:
- InputPreview + CommandHelpWindow + DebuggerWindow ctors flip
  public -> internal for consistency with internal sealed class declarations

DI helper extraction:
- PluginHostFactory MakePayloadHandler private static helper DRYs the
  7-arg list shared between PayloadHandler-singleton and Lender<T> factory

ImGui-rendering fix:
- MessageList.DrawCompactRow uses SameLine(0f, 0f) — eliminates visible
  ItemSpacing.X gap between sender-prefix and chunk content

Bug fixes:
- PayloadHandler.LeftClickPayload drops spurious unsafe keyword (no
  pointer ops in the method body; v1.5.6 had no unsafe here)
- PayloadHandler.StringifyMessage Aggregate seeded with string.Empty to
  fix empty-sequence crash for pure-icon messages
- PayloadHandler.MoveTooltip args==null LogWarning template simplified
  (?.GetType().Name was always null after the null-check — misleading)
- InputBar.SlashCommandCallback drops redundant BufTextLen==0 guard
  (BufTextSpan handles empty correctly)

Comment improvements (WHY-not-WHAT):
- ImGuiUtil.cs payload-state cluster comment moved below Buttons array
- PayloadHandler: §6.9 trimmed to 1 line, FindCharacterForPayload
  documented, hq symbol marker restored, MoveTooltip guard documented
  as defensive v1.7.1 addition, NativeItemTooltips branch explained,
  §4.2 theme colour swap explained
- DebuggerWindow class comment mentions PayloadHandler counters section
- InitHostedServices StopAsync explains params-overload semantics
- InputBar AppendPending null policy vs SetPendingMessage documented,
  CommandManager leading-slash assumption noted
- PluginHostFactory block comment explains singleton+Lender split

Build: 0 warnings, 0 errors. csharpier: clean. Version unchanged.
2026-05-27 23:42:28 +02:00
JonKazama-Hellion d1bfddd9b8 feat(main-window): wire Lender + handler.Draw() (A2, MessageList popups)
A2 completes the deferred Lender-cycle from A1 and addresses the
handler.Draw() gap identified in I code-quality-review:

- MainWindow ctor takes Lender<PayloadHandler> as new param (DI-reg
  extended in PluginHostFactory); _handlerLender.ResetCounter() called
  at top of Draw() as primary pool-reset path (InputPreview has the
  secondary defensive fallback for MainWindow-closed edge case)

- MessageList.DrawHandlerPopups() new passthrough method
  (=> _handler?.Draw()) provides the per-frame popup-tick that
  PayloadHandler needs to render the right-click context popup;
  MainWindow.Draw() calls it after the message-list body renders

Without this fix, right-clicking a player/item/status in the chat log
would silently fail to open a popup (handler.Draw() never fired for the
MessageList's _handler). Phase 3 smoke steps 3/4/5 unblocked.

Polish-Sweep + Smoke-Gate are the last cycle-tasks.
2026-05-27 23:29:18 +02:00
JonKazama-Hellion cba6a16f8e feat(input-bar): wire slash-command callback + AllCommands (J2)
J2 closes the trigger-gap discovered in J review (2026-05-27): J
migrated CommandHelpWindow as a window but the v1.5.6 trigger-path
was never ported. J2 restores it:

- InputBar.cs adds ImGuiInputTextFlags.CallbackEdit + character-level
  callback that reads data.BufTextSpan, detects /-prefix, extracts
  command word, and calls _commandHelpWindow.Value.UpdateContent(desc)
- AllCommands.cs (new file, 1:1 port from v1.5.6) populates a static
  Dictionary<string, TextCommand> from Sheets.TextCommandSheet at
  startup; Plugin.CommandManager.Commands is the fallback for
  non-hardcoded commands
- CommandHelpWindow injected into InputBar via Lazy<T> ctor param to
  break the InputBar <-> CommandHelpWindow circular dep; PluginHostFactory
  DI-reg extended with the Lazy wrapper accordingly

Closes the smoke-step-9 gap. Phase-3 windows are now all reachable
end-to-end (R1 InputPreview, R2 CommandHelpWindow, R3 DebuggerWindow).
2026-05-27 23:19:21 +02:00
JonKazama-Hellion c652a1c450 feat(debugger): reactivate PayloadHandler counters (R3)
K reactivates the debugger's PayloadHandler counter readout
(HandleTooltips / HoveredItem / HoverCounter / LastHoverCounter —
populated in E1's PayloadHandler skeleton). PayloadHandler injected
via DI-extended ctor; class flipped to internal sealed to match
PayloadHandler's internal visibility and avoid CS0051. Plugin.cs
property updated public → internal accordingly (same pattern as I/J).

Last Phase-3 window sub-task before A2 (Lender + handler.Draw fix),
J2 (InputBar slash-callback), Polish-Sweep, and Smoke-Gate.
2026-05-27 22:54:33 +02:00
JonKazama-Hellion 830d247eda feat(command-help-window): full R2 migration (ctor-injected + DI-reg)
J resurrects CommandHelpWindow from the v1.7.0 stub state:

- Class header public → internal sealed
- Ctor takes 4 DI deps (ChunkRenderer, MainWindow, InputBar, ILogger)
  via Factory-Lambda DI-reg. NO Lender<PayloadHandler> — command-help
  chunks are read-only command-description text with no click-targets
  (per spec §5-J + F W8 consumer audit).
- Draw() calls _chunkRenderer.DrawChunks(desc chunks, wrap: true,
  handler: null, lineWidth: 0f) — null-handler is intentional.
- Plugin.cs property visibility flipped public → internal to satisfy
  CS0053 (analogous to I's InputPreview fix).

K (R3 DebuggerWindow counters) and A2 (Lender + handler.Draw fix) are
the remaining Phase-3 sub-tasks before Polish-Sweep + Smoke-Gate.
2026-05-27 21:04:42 +02:00
JonKazama-Hellion 8431fbcf80 feat(input-preview): full R1 migration (PreOpenCheck/PreDraw split + Lender)
I resurrects InputPreview as a fully ctor-injected window:

- Class header public → internal sealed (Components-Layer style); Plugin.cs
  property visibility corrected to internal to match
- Ctor takes 5 DI deps (ChunkRenderer, Lender<PayloadHandler>, MainWindow,
  InputBar, ILogger) via Factory-Lambda DI-reg
- Window-hook split: PreOpenCheck() owns the state (Drawing/PreviewMessage/
  HasEvaluation/PreviewHeight/LastLength), PreDraw() owns position/size
  computation. Matches v1.5.6's split — avoids wasted position-math when
  Window isn't drawn (DrawConditions gates on IsDrawable getter).
- Framework.Update subscribe/unsubscribe removed (PreOpenCheck runs per
  draw-frame, same cadence as Framework.Update for our needs)
- Draw() borrows fresh PayloadHandler per-frame from Lender for popup
  isolation (preview hover doesn't bleed into log)
- Defensive ResetCounter fallback when MainWindow closed + InputPreview
  open — primary path is A2's MainWindow.Draw() ResetCounter

R2/R3 (J/K) next. A2 closes out the Lender DI-cycle for MainWindow.
2026-05-27 20:35:25 +02:00
JonKazama-Hellion 931a152d00 feat(infra): wire PayloadHandlerInitHostedService (AddonLifecycle + setter)
G connects PayloadHandler to the runtime — this is the activation point
after E1-E6 built the type and F registered it in DI:

- StartAsync calls MessageList.AttachPayloadHandler(_payloadHandler) to
  complete the §6.2 cycle-resolution (ctor-cycle was broken by setter,
  this is where the setter actually fires)
- StartAsync registers AddonLifecycle listener for MoveTooltip on
  PostUpdate of "ItemDetail" and "ActionDetail" addons
- StopAsync unregisters the listener
- Both Register/Unregister wrapped in Plugin.Framework.RunOnFrameworkThread
  as defensive insurance — IAddonLifecycle thread-affinity is not
  explicitly documented in Dalamud API; wrap keeps the v1.5.6 runtime
  contract intact (per spec §5-G note)

Mirrors existing IpcManagerInitHostedService / TypingIpcInitHostedService
pattern in Infrastructure/Hosting/. PluginHostFactory adds the
AddHostedService<PayloadHandlerInitHostedService>() registration.

After G, the chunked-message-render pipeline is end-to-end functional:
MessageList renders via ChunkRenderer, _handler is wired so popups fire
on click/hover, MoveTooltip repositions native item-tooltips away from
the chat window.
2026-05-27 20:03:52 +02:00
JonKazama-Hellion 4fb5ee6128 feat(message-list): wire ChunkRenderer ctor + AttachPayloadHandler setter
H integrates the chunk-render pipeline into MessageList:

- Extends ctor to 4 params (themes, resolver, fonts, chunkRenderer);
  TokenResolver preserved as load-bearing dep
- Adds private PayloadHandler? _handler field + internal
  AttachPayloadHandler(PayloadHandler) setter
- Switches DrawCompactRow/DrawCardRow render-path to
  _chunkRenderer.DrawChunks(message.Content, wrap, handler, 0f)
  instead of plain TextUnformatted

Setter-injection for PayloadHandler is the §6.2 cycle-resolution
(PayloadHandler → MainWindow → MessageList → PayloadHandler ctor-cycle
broken by post-construction wiring). G's HostedService.StartAsync will
call AttachPayloadHandler after both singletons resolve.

Also extends MessageList DI-reg in PluginHostFactory.cs with the
ChunkRenderer arg (4th GetRequiredService).
2026-05-27 19:24:20 +02:00
JonKazama-Hellion 2e143686af feat(host-factory): register ChunkRenderer + PayloadHandler + Lender (F)
F adds the 3 new DI registrations needed for the v1.7.1 R-Block:

- ChunkRenderer (4-param ctor: themes, fonts, logger, gameFunctions)
- PayloadHandler singleton (7-param ctor: themes, ipc, functions,
  inputBar, mainWindow, chunkRenderer, logger)
- Lender<PayloadHandler> factory (closure over sp, constructs a fresh
  PayloadHandler per Borrow() — used by InputPreview in Sub-Task I)

All three use Factory-Lambdas because Lender<T> has an internal ctor and
ChunkRenderer/PayloadHandler are internal sealed (ActivatorUtilities
can't reflect into internal ctors per [[reference_hellion_chat_di_container_v150]]).

MainWindow DI-reg update is deferred to Sub-Task A2 (split per Flo
2026-05-27 to avoid the DI-cycle that would otherwise emerge from the
PayloadHandler → MainWindow → MessageList → PayloadHandler graph —
cycle resolved via setter-injection on MessageList in G/H).

G is next: wires PayloadHandlerInitHostedService.StartAsync to register
the AddonLifecycle listener for MoveTooltip and call MessageList.
AttachPayloadHandler. H adds the MessageList ChunkRenderer ctor-param +
AttachPayloadHandler setter.
2026-05-27 18:44:46 +02:00
JonKazama-Hellion d6012a9459 feat(payload-handler): wire MoveTooltip (E6 completes PayloadHandler)
E6 closes out the PayloadHandler resurrection. MoveTooltip handles the
cross-viewport AddonLifecycle tooltip-repositioning logic — reads
MainWindow.LastViewport/LastWindowPos/LastWindowSize (from A1) to filter
events and reposition the native item tooltip away from the chat window.

Whole method marked `public unsafe void` per spec §4.2 (matches v1.5.6
exactly — avoids per-read unsafe-block scoping).

LogWarning added on the unexpected-AddonArgs early-out branch (wires
_logger into real use, prevents CS0414 unused-field warning).

PayloadHandler is now feature-complete. F registers it in DI; G wires
the AddonLifecycle.RegisterListener for MoveTooltip from a HostedService;
H adds MessageList.AttachPayloadHandler setter-injection.
2026-05-27 14:31:23 +02:00
JonKazama-Hellion 121c96f79e feat(payload-handler): wire Hover/Click + LeftClick/RightClick/LinkClick paths
E5 fills the hover/click handler layer (10 methods):

- Hover/Click: replaces E1's empty stubs with real 1:1 bodies; Click uses
  unsafe for FFXIVClientStructs pointer access (UIGlobals.PlaySoundEffect
  via PopupSfx const from E2)
- DoHover: §4.2 swap LogWindow.DefaultText → _themes.Active.Colors.TextPrimary
- HoverStatus, HoverItem, HoverEventItem: 2x _chunkRenderer.DrawChunks
  swaps each (name + description rendering)
- HoverUri: pure 1:1, no LogWindow deps
- LeftClickPayload: unsafe-preserved, Plugin.GameGui static stays
- ClickLinkPayload: pure 1:1, Plugin.ChatGui / Plugin.Framework statics stay
- RightClickPayload: sets _popup field (per E1/E2 field-syntax convention)

Adds FFXIVClientStructs.FFXIV.Client.UI using for UIGlobals; adds
Action alias and DalamudPartyFinderPayload/ChatTwoPartyFinderPayload
aliases required by LeftClickPayload switch arms.

E6 will wire MoveTooltip. After E5, PayloadHandler is functionally complete
except for the MoveTooltip AddonLifecycle wiring.
2026-05-27 13:51:18 +02:00
JonKazama-Hellion 6da8ac93fe feat(payload-handler): wire DrawItem/EventItem/Status/Uri popups + InlineIcon
E4 fills the remaining popup-body methods:

- DrawItemPopup: shows item-name, icon (via InlineIcon), and description
  via _chunkRenderer.DrawChunks; dispatches to DrawEventItemPopup when
  payload.Kind == ItemKind.EventItem (per v1.5.6 internal split)
- DrawEventItemPopup: same shape, Sheets.EventItemSheet/EventItemHelpSheet
  reads, _chunkRenderer.DrawChunks for description rendering
- DrawStatusPopup: status-name + description via _chunkRenderer.DrawChunks;
  "Link" action appends " <status>" via _inputBar.AppendPending (per §4.2)
- DrawUriPopup: open-in-browser + copy-link selectables (no LogWindow deps)
- InlineIcon: pure static helper for popup-icon rendering

Replaces E2's TODO(E4) markers in DrawPopups' Item/Status/Uri switch-cases
with real calls + drawn=true. E5 will wire Hover/Click bodies; E6
MoveTooltip.
2026-05-27 13:20:59 +02:00
JonKazama-Hellion abc0617d58 feat(payload-handler): wire DrawPlayerPopup + FindCharacterForPayload (E3)
E3 fills the player-payload right-click menu. DrawPlayerPopup migrates
1:1 from v1.5.6 with all §4.2/§6.9 substitutions:

- Tell-prefix builds via _inputBar.SetPendingMessage (single string build)
  + _inputBar.Activate = true (replaces v1.5.6's 3x LogWindow.Chat
  incremental writes + LogWindow.Activate flip)
- Channel-switch routes through _mainWindow.ActiveTab?.CurrentChannel?
  .SetChannel(channel) (per §6.3, ActiveTab is public getter on
  MainWindow per v1.7.0 refactor)
- SendFriendRequest / AddToBlacklist / AddToMuteList / AddToTermsList
  / SetEurekaTellChannel all route through injected _functions
- Player-name renderings route through _chunkRenderer.DrawChunks

FindCharacterForPayload migrates 1:1 (pure helper, Plugin.ObjectTable
static stays as-is).

Replaces E2's TODO(E3) marker in DrawPopups' PlayerPayload case with
real DrawPlayerPopup(chunk, player) call.

E4 will wire Item/EventItem/Status/Uri popup bodies; E5 the Hover/Click
bodies; E6 MoveTooltip.
2026-05-27 12:50:23 +02:00
JonKazama-Hellion 63f5a28834 feat(payload-handler): wire DrawPopups + Integrations/ContextFooter/StringifyMessage
E2 fills the popup-dispatch layer of PayloadHandler:
- DrawPopups: switch-dispatch over payload types, with TODO(E3)/(E4)
  markers at the deferred Draw{Player,Item,Status,Uri}Popup call sites
- Integrations: invokes registered IPC integrations (LogWindow.Plugin.Ipc
  -> _ipc substitution per §4.2)
- ContextFooter: ScreenshotMode + HideChat checkboxes (Plugin.Config
  static-bridge substitutions per §4.2)
- StringifyMessage: pure helper, 1:1 from v1.5.6

Adds PopupSfx const (E1 polish — needed by E5's Click for
UIGlobals.PlaySoundEffect). Removes #pragma CS0169 for _popup since
DrawPopups now writes the field; the warning no longer triggers.

E3 will fill DrawPlayerPopup + FindCharacterForPayload; E4 the
Item/Status/Uri popups; E5 the Hover/Click bodies; E6 MoveTooltip.
2026-05-27 12:19:50 +02:00
JonKazama-Hellion e46b6a7520 feat(imgui-util): resurrect WrapText pipeline (~220 LOC from v1.5.6)
Replaces C2's no-op WrapText stub with the full word-wrap pipeline
(WrapText / WrapEncodedLine / CalcWordWrap / DrawText / FindFirstSpace).
ChunkRenderer.DrawChunk's text-path now renders properly wrapped text
with payload hover-highlights and click-binding via PostPayload (which
was already full-ported in C2).

Also adds LastLink and PayloadBounds static fields that C2's PostPayload
port required but did not declare; DrawText needs both for per-segment
hover-rectangle accumulation across wrapped lines.

Unblocks E5's Hover paths that depend on functional WrapText for
status/item tooltip rendering. No structural changes — pure body
migration of the v1.5.6 unsafe word-wrap implementation.
2026-05-27 10:27:58 +02:00
JonKazama-Hellion 2067a54467 feat(payload-handler): add skeleton with 7-param ctor + Draw() popup tick
Replaces the 15-LOC C2 forward-stub with the full PayloadHandler
skeleton. Class header flips to `internal sealed` per §4.1; ctor takes
7 DI-registered services (ThemeRegistry, IpcManager, GameFunctions,
InputBar, MainWindow, ChunkRenderer, ILogger) per Flo decision
2026-05-27 (ChunkRenderer was added to the ctor list to satisfy the
§4.2 _chunkRenderer.DrawChunks references in HoverStatus/HoverItem/
DrawItemPopup paths — those land in E2-E5).

Draw() per-frame popup tick is a 1:1 port from v1.5.6 PayloadHandler.
DrawPopups() call is stubbed as TODO(E2) since that method lands in E2.
Hover/Click signatures remain empty (E5 fills the bodies, but the
signatures must compile so ChunkRenderer + ImGuiUtil callers stay live).

Skeleton-only — DrawPopups/Integrations (E2), DrawPlayerPopup (E3),
DrawItemPopup/DrawStatusPopup (E4), Hover/Click bodies (E5),
MoveTooltip (E6) all defer to their respective sub-sub-tasks.
2026-05-27 09:58:22 +02:00
JonKazama-Hellion 61a1e6bf87 feat(chunk-renderer): wire DrawIcon + icon-dispatch + EmoteCache path
Completes the ChunkRenderer pipeline. DrawIcon is a 1:1 port of v1.5.6
ChatLogWindow.DrawIcon (GFD-icon font-relative rendering via
Plugin.TextureProvider + ImGuiUtil.PostPayload). C2's TODO(C3) stub in
DrawChunk's IconChunk branch is replaced with the real dispatch.
EmotePayload special-case wired via EmoteCache.GetEmote (static helper
per §6.8).

Also adds a one-line rationale comment for the surviving _logger discard
(C2 code-quality-review polish — discard kept because _logger is not yet
consumed; E-task wiring will likely add call-sites later).
2026-05-27 09:29:35 +02:00
JonKazama-Hellion dec0daf30c feat(chunk-renderer): add DrawChunks + DrawChunk text-path (C3 stubs icon)
Resurrects v1.5.6 ChatLogWindow's DrawChunks/DrawChunk text-rendering
pipeline into the new ChunkRenderer Components-Layer class. Text-chunk
path is the full v1.5.6 migration (Plugin.Config.ScreenshotMode,
_themes.Active.Colors.TextPrimary, _fonts.ItalicFont/_fonts.AxisItalic
substitutions applied per §4.2/§4.5); icon-chunk dispatch in DrawChunk
is stubbed pending C3 (EmoteCache + DrawIcon path).

ImGuiUtil.WrapText is forward-stubbed in Util/ImGuiUtil.cs as a no-op
TextUnformatted wrapper — Sub-Task D will replace the body with the
full ~220-LOC word-wrap pipeline. ImGuiUtil.PostPayload is also
forward-stubbed (payload hover/click routing belongs to Sub-Task E).
Both stubs are the cleanest cut to keep DrawChunk's body faithful to
v1.5.6 and avoid temporary fallback paths inside ChunkRenderer.

PayloadHandler.cs is a minimal forward-stub class (Hover + Click stubs
only) required by the DrawChunks/DrawChunk and PostPayload signatures.
Sub-Task E will replace this stub with the full implementation.

Discard pattern from C1 removed for _themes/_fonts (now genuinely
consumed by DrawChunks/DrawChunk); _logger discard kept — not yet
consumed in C2, deferred to E-task wiring.
2026-05-27 08:59:23 +02:00
JonKazama-Hellion 7e541ac842 feat(chunk-renderer): add skeleton + per-ctor salt + player-hide helpers
Extracts v1.5.6's `ChatLogWindow.HidePlayerInString` / `HashPlayer` into
a standalone `Ui/Components/ChunkRenderer` class. C1 lands the skeleton
(ctor + DI-deps + salt + two pure helpers); C2 will add DrawChunks/DrawChunk
text-path; C3 will add DrawIcon + EmoteCache integration.

Salt is per-ctor random matching v1.5.6 session-random behavior — hashed
player names change every plugin reload to avoid stable cross-session
linkage (Spec §6.5 decision).

GameFunctions injected via ctor (not static Plugin.Functions) because
Plugin.Functions is a non-static internal property — injection is the
correct Components-layer pattern for this dependency.

Not yet DI-registered (Sub-Task F) and not yet consumed by MessageList
(Sub-Task H) — class compiles standalone.
2026-05-27 08:19:08 +02:00
JonKazama-Hellion 94fdef38ad feat(main-window): track per-frame window pos/size/viewport for PayloadHandler
Replaces the v1.5.6 `LogWindow.LastViewport/LastWindowPos/LastWindowSize`
window-instance state with public/internal MainWindow surfaces refreshed
at the top of Draw() each frame. PayloadHandler.MoveTooltip in Phase 2
will read these to filter cross-viewport AddonLifecycle events and to
reposition the native item tooltip away from the chat window.

LastViewport is `internal unsafe` (not public) — the only consumer is
PayloadHandler.MoveTooltip in the same assembly; keeping the raw pointer
out of the public surface is the safer default.

Split from Sub-Task A — Lender injection lives in A2 (after F's DI-reg).
2026-05-27 08:08:29 +02:00
JonKazama-Hellion 01fc69efda feat(input-bar): add SetPendingMessage/AppendPending mutators + Activate/FocusedPreview flags
Replaces v1.5.6's direct LogWindow.Chat mutation pattern with typed mutators
that LogWarning + clip/drop on BufferCapacity overflow (silent-overwrite
semantics preserved, but overflow is now observable via /xllog).

Plumbing for v1.7.1 PayloadHandler resurrection — DrawPlayerPopup (tell-
prefix) and DrawStatusPopup (status-link append) will call these mutators
instead of mutating a public field.
2026-05-27 07:59:39 +02:00
JonKazama-Hellion f5f9a4e4da feat(config): bump schema v20→v21 with ScreenshotMode field
Adds persisted ScreenshotMode flag to Configuration (was previously a
ChatLogWindow-instance field in v1.5.6). Schema bump is additive — no
breaking change. SelfTest renamed V20→V21 with matching version-gate
flip and new touch-test for the new field.

Pre-flight for v1.7.1 PayloadHandler-Pipeline Resurrection.
2026-05-27 07:47:15 +02:00
JonKazama-Hellion ced22d73b2 chore(format): csharpier line-break LINQ chain in ThemePickerCategoryStep 2026-05-26 23:02:47 +02:00
JonKazama-Hellion d2b2ebf17f test(selftests): verify TypingIpc state matches input bar 2026-05-26 23:01:59 +02:00
JonKazama-Hellion 125a41c6a0 test(selftests): verify OpenMainUi targets MainWindow not Settings 2026-05-26 23:01:26 +02:00
JonKazama-Hellion dc8d2ae8b7 test(selftests): cover Settings window toggle 2026-05-26 23:00:59 +02:00
JonKazama-Hellion 22bf1dd110 test(selftests): cover theme picker category map 2026-05-26 22:57:11 +02:00
JonKazama-Hellion 4595de5efc test(selftests): implement ColorEditorBufferStep against editing buffer 2026-05-26 22:50:13 +02:00
JonKazama-Hellion 730e15d108 chore: remove v1.7.0 'lands in' placeholders 2026-05-26 20:44:41 +02:00
JonKazama-Hellion 545ddfbfcc chore(ui): delete settings stub from v1.6.0 2026-05-26 20:37:58 +02:00
JonKazama-Hellion f510d01f46 feat(plugin): switch SettingsWindow type to new Ui.Windows namespace 2026-05-26 20:29:35 +02:00
JonKazama-Hellion 490da3e908 feat(settings): add About tab with brand, links, credits 2026-05-26 20:20:53 +02:00
JonKazama-Hellion 262fb3022a feat(settings): add Data & Privacy tab with retention and filter 2026-05-26 20:05:52 +02:00
JonKazama-Hellion 0512d4c9d2 feat(settings): add Channels tab with auto-tell and sidebar configs 2026-05-26 19:53:57 +02:00
JonKazama-Hellion 1f9afe182a feat(settings): add Window tab with layout/opacity/resize 2026-05-26 19:26:32 +02:00
JonKazama-Hellion 2c23a88e9d chore(format): csharpier line-break GeneralTab toggle calls 2026-05-26 19:12:02 +02:00
JonKazama-Hellion 2507ed5197 feat(settings): add Chat tab including command help side 2026-05-26 19:12:01 +02:00
JonKazama-Hellion 7e933cb8ba feat(settings): add General tab with direct-save toggles 2026-05-26 18:57:34 +02:00
JonKazama-Hellion 26c395419a feat(settings): wire Appearance tab with import/export row 2026-05-26 18:51:24 +02:00
JonKazama-Hellion 12bf83b826 feat(windows): add SettingsWindow skeleton (W1) 2026-05-26 18:35:30 +02:00
JonKazama-Hellion 6bbdc67089 feat(settings): register LivePreviewPanel in DI 2026-05-26 18:24:29 +02:00
JonKazama-Hellion 13ca241ac7 feat(settings): render six mock elements in live preview 2026-05-26 18:20:57 +02:00
JonKazama-Hellion 304e1aab20 feat(settings): add LivePreviewPanel skeleton 2026-05-26 18:00:53 +02:00
JonKazama-Hellion cce56610fc feat(settings): register ColorPicker in DI 2026-05-26 17:37:47 +02:00
JonKazama-Hellion eed919e961 feat(settings): wire ColorPicker sections for all 21 slots 2026-05-26 17:33:11 +02:00
JonKazama-Hellion 21689655da feat(settings): add ColorPicker skeleton with lifecycle 2026-05-26 17:05:40 +02:00
JonKazama-Hellion c6f7266194 feat(settings): add ThemePicker with five categories and switch lock 2026-05-26 16:36:54 +02:00
JonKazama-Hellion a73cad1534 feat(settings): add ContentArea wrapper 2026-05-26 16:08:27 +02:00
JonKazama-Hellion bb37e19176 feat(settings): add TabSidebar with seven entries 2026-05-26 15:59:01 +02:00
JonKazama-Hellion ffef5634ed feat(util): add RgbaToVector4 and Vector4ToRgba helpers for color picker 2026-05-26 15:25:31 +02:00
JonKazama-Hellion 947c4b2061 fix(themes): bump example-theme.json to schemaVersion 2 2026-05-26 14:47:02 +02:00
JonKazama-Hellion d156ff4c56 fix(plugin): route OpenMainUi to MainWindow instead of Settings 2026-05-26 14:11:34 +02:00
JonKazama-Hellion 7979568165 refactor(ipc): drop this.-qualifier and trim BuildState comments
Same shadowing-via-instance-property as Plugin.CurrentTab above. Comments
trimmed to default 1-3 line density; security/threading WHY-blocks earn
their lines when they document non-obvious invariants, not standard C#
name resolution.
2026-05-26 14:04:46 +02:00
JonKazama-Hellion 93bfd408bc feat(ipc): wire TypingIpc state from InputBar API 2026-05-26 13:38:21 +02:00
JonKazama-Hellion e01de0403a feat(input): expose state API, wire settings cog, add test hooks 2026-05-26 13:31:00 +02:00
JonKazama-Hellion 11eb7b9e90 fix(themes): tighten editing-buffer save path (tmp cleanup, log-PII, line-refs)
Three review-pass fixes on SaveEditingBuffer:

- Wrap File.Move in try/catch that deletes the .tmp sibling on failure
  (AV-scanner lock, EXDEV, share-violation) then rethrows so the outer
  IOException catch still owns the error path. Avoids accumulating
  '<slug>.json.tmp' litter in the themes dir on retry storms.

- Reduce PII in the five new LogWarning calls that previously included
  full paths containing the user's home directory. Filename-only via
  Path.GetFileName is sufficient for triage; the two forensics-critical
  path-escape log calls keep full paths because diagnosing the escape
  needs the resolved target. WHY-comment anchors the v1.8.0 PII
  re-audit roadmap.

- Replace seven hardcoded 'ThemeRegistry.cs:<line>' references in
  comments with method-name + symbol descriptions so future Switch/
  RefreshCustomCache refactors do not bit-rot the comments.

Build 0/0, csharpier clean.
2026-05-26 13:16:57 +02:00
JonKazama-Hellion 4f81cd1f24 feat(themes): add editing buffer with begin/update/save/discard 2026-05-26 13:03:30 +02:00
JonKazama-Hellion 8e7149cadc fix(ui): guard sidebar row at min drag and widen system-icon match
DrawRow asserted on a zero-width InvisibleButton when the window was
dragged below the pop-out hit threshold — the row now drops out cleanly
under 2px of remaining sidebar width, and the pop-out button only
splits off when there's room for both hit areas. The trailing pop-out
icon is hidden too when its strip is collapsed, so the row stays as a
single selectable strip on extreme drags.

System icon path: ResolveTabIcon used to look only at the first key in
SelectedChannels, so a System tab whose first filter happened to be a
generic ChatType slipped through to Comment. The resolve now walks
every key and keeps the first non-Comment match, and a final
case-insensitive name match flips the icon to fa-cog when the user's
filter set falls completely outside the channel-type table.
2026-05-23 21:08:22 +02:00
JonKazama-Hellion 2f099fd4e1 fix(ui): clickable channel pill, auto-seed channel, kill outer scrollbar
Three smoke bugs from the second in-game test:

1. The channel pill was draw-list only, so it didn't react to clicks
   and there was no way to switch channels inside a tab. The pill now
   has a hit area on top and opens a popup that lists every ChatType
   in tab.SelectedChannels with a ToInputChannel mapping; selecting
   one writes through CurrentChannel.SetChannel.

2. Switching to Allgemein / Gruppe / Linkshell still showed "—"
   because tab.CurrentChannel.Channel stayed at Invalid until somebody
   set it. The sidebar now seeds CurrentChannel on tab activation by
   walking SelectedChannels for the first key with a valid mapping,
   so every tab opens with its own real channel instead of inheriting
   the FC default.

3. MainWindow still surfaced an outer scrollbar next to the message
   list's own scroll. Adding NoScrollbar + NoScrollWithMouse to the
   window flags strips the second bar — the body child owns scroll on
   its own.

Plus the system-icon path: System / BattleSystem / GatheringSystem /
Error / Notice / LootNotice all map to fa-cog now, so the System tab
renders the gear instead of falling back to the generic comment.
2026-05-23 20:58:50 +02:00
JonKazama-Hellion 52b0fa7c67 fix(ui): wire chat send and fix sidebar icons, channel pill, scrollbar
Five smoke bugs from the first in-game test:

1. Sidebar showed fa-comment for every tab because the resolve path
   only honoured tab.Icon. Channel-type fallback restored — auto-tell
   tabs render the envelope, the rest map their first SelectedChannels
   key onto FontAwesome (Linkshells → link, FC → users, Party →
   user-friends, System/Echo → cog, emotes → comments).

2. InputBar's channel pill read from tab.Channel (the saved default),
   which is null on most non-FC tabs and rendered as "—". The pill now
   reads tab.CurrentChannel.Channel first so the runtime input state
   surfaces on every tab, with the saved default as a second fallback.

3. MessageList was making its own ImRaii.Child inside the main-area
   child MainWindow already owns. That nested scroll created the second
   scrollbar on the outer window. The component now lays out directly
   into the parent's scroll region.

4. The input field reserved 90px for the three FontAwesome buttons,
   which clipped them on standard frame padding. Reserve raised to
   130px so the trailing buttons fully render.

5. Pressing Enter dropped the buffer — there was no send wiring. The
   field now uses ImGuiInputTextFlags.EnterReturnsTrue and routes the
   pending message through GameFunctions.ChatBox.SendMessage. Lines
   that don't start with a slash get the active channel's prefix
   prepended so typing in /fc lands on the FC channel instead of the
   current game-side default.

InputBar gains an ILogger<InputBar> for the send-failure path; the
DI registration in PluginHostFactory is updated to match.
2026-05-23 20:50:54 +02:00
JonKazama-Hellion 0109bfd222 test(selftests): add v1.6.0 SelfTest steps from sub-spec
Six new ISelfTestStep entries register with the Dalamud SelfTestRegistry:
SidebarModeAutoSwitch probes the width threshold both above and below the
exact boundary so the >= contract stays pinned; ColorEditorBuffer is a
placeholder until the picker arrives; ConfigMigrationV20 asserts the
schema stamp and the five v20 field defaults; HoverSheenAlloc drives 100
hovered frames against three constant keys and a final un-hover sweep to
exercise the cleanup branch; HonorificHeaderRender runs one Draw call on
the live component to catch IPC fallback crashes; PerformanceBaseline
prints a JSON line of the IO counters so the cycle notes can pick up a
snapshot. MainWindow gets internal accessors so the probes can reach the
sidebar and honorific header without widening the public surface.
2026-05-23 20:35:01 +02:00
JonKazama-Hellion cf4705e01f refactor(ui): retire ChatLogWindow and the v1.5.6 chat-window layer
The legacy ChatLogWindow.cs and its tightly coupled neighbours are gone:
PayloadHandler, Popout, ChatInputBar, AutoCompleteInfo, AutoTellTabTint,
the three tab-icon helpers, the old Ui/StatusBar and Ui/SymbolPicker
behind the components-layer replacements, HellionStyle + helpers, the
CompactInputSubmitter test mirror and the QuickPickerSelfTestStep. The
new component layer (MainWindow + the five components + GlobalStyleScope)
now drives the whole chat surface.

InputPreview, CommandHelpWindow and Debugger lose their ChatLogWindow
backref. The first two are skeleton windows for now — DrawConditions
always returns false until the new chat layer exposes equivalent state.
Debugger keeps the current-tab and vanilla-chat blocks; the payload
counters are explicitly marked offline. DbViewer renders Sender/Content
columns as plain TextValue strings instead of the removed DrawChunks.

GameFunctions.Chat and GameFunctions.KeybindManager keep the hook
plumbing intact but mark every ChatLogWindow.Activated /
ChangeTabDelta / TellSpecial site as offline so the FFXIV-side
integration still compiles and runs without an Activated entry point.
TypingIpc.BuildState reports the IPC state as not-typing / not-focused
until the new chat layer surfaces real focus and buffer state again.

Plugin.cs Draw uses StyleEngine.GlobalStyleScope.Push for the per-frame
theme push and stops calling BeginFrame / FinalizeFrame / HideStateCheck
/ DefaultText through the dead window. ImGuiUtil drops PostPayload +
WrapText + the surrounding word-wrap pipeline. PluginHostFactory and
PluginLifecycle drop the legacy DI singletons and AddWindow entries.

Build is clean and csharpier is clean across the trimmed 131-file tree.
2026-05-23 20:31:12 +02:00
JonKazama-Hellion c9e746a8e3 refactor(settings): reduce SettingsWindow to a stub and drop the tab system
The seven settings tabs and the overview helper are removed. The new
settings UI lands in a later cycle and will be rebuilt from scratch on
the v2.x component layer; keeping the v1.5.6 tab classes around in the
meantime would only carry dead dependencies through the rest of this
cycle. The window stays registered so /hellion settings, the slash
command path, and the UiBuilder open handlers all still resolve.
2026-05-23 20:12:16 +02:00
JonKazama-Hellion ec02a5f381 feat(commands): consolidate /hellion and /clearhellion in Plugin.SetupCommands
/hellion routes through one handler with three subcommands: empty arg
toggles the main window, "settings" toggles the settings stub (full
settings UI lands later), "reset" calls ThemeRegistry.SwitchSilent on the
default slug so a broken custom theme can be unloaded without a settings
UI. /clearhellion now lives next to /hellion instead of inside the chat
window. ChatLogWindow loses its old register/unregister pair so the two
slash-commands stop double-binding.
2026-05-23 20:08:09 +02:00
JonKazama-Hellion 576cd6dafd feat(ui): assemble MainWindow from the components layer
Top-level chat window composes HonorificHeader, Sidebar, MessageList,
InputBar and StatusBar in the layout from the master spec: header row,
horizontal body (sidebar + main area with messages + input), status
strip pinned to the bottom. Component types are fully qualified through
the Ui.Components prefix so the v1.5.6 Ui.StatusBar type cannot shadow
the new layer through parent-namespace resolution before it is removed.
Toggle is a new-shadow on Window.Toggle so the open path also writes
Config.MainWindowOpen; OnClose covers the close path through the base
behaviour. InputBar.Height is now public so the layout math can reach
it from outside the components folder.
2026-05-23 19:52:37 +02:00
JonKazama-Hellion 0fc2512f3e feat(ui): rebuild StatusBar inside the components layer
Same 1Hz-cached slot layout (channel indicator, privacy badge, counts,
tells, version + brand) but ThemeRegistry and FontManager arrive via
constructor injection rather than the Plugin static bridge, and Draw
takes the active tab directly so the component does not have to reach
back through Plugin.CurrentTab. Pure helpers (FormatCounts, FormatTells,
AggregateForStatusBar) stay static so the build suite can pin them
without an ImGui frame. The v1.5.6 Ui/StatusBar.cs stays in place until
the cleanup block removes it.
2026-05-23 19:35:50 +02:00
JonKazama-Hellion 36afce21e5 feat(ui): add InputBar with channel pill and symbol picker overlay
Channel pill picks Token.AccentEmber when the tab is a tell (matched by
IsTempTab + a set TellTarget) and Token.AccentPrimary otherwise, so the
tinted background reads as the channel type at a glance. SymbolPicker
runs as an overlay popup — the inserted fragment splices straight into
the pending buffer up to a 500-char cap. Send wiring and the settings
button arrive when the main window assembles the components.
2026-05-23 19:17:25 +02:00
JonKazama-Hellion bdfb1298ad feat(ui): migrate SymbolPicker into the components layer
Lifted out of Ui/ into Ui/Components and registered as a DI singleton so
the new InputBar can consume it via constructor injection. PUA tab still
sources from SeIconChar, BMP tab keeps the server-verified whitelist
verbatim. The old Ui/SymbolPicker.cs stays in place until the cleanup
block removes the v1.5.6 file.
2026-05-23 19:12:18 +02:00
JonKazama-Hellion eb95968750 feat(ui): add MessageList with two-mode virtualisation
Compact mode reuses ImGuiListClipper because rows are a constant line
height; card mode falls back to a linear render with a per-message height
cache and an IsItemVisible skip path so off-screen rows place a Dummy of
the cached height instead of running the full render. Bottom-lock detects
whether the user was pinned to the bottom before the layout pass and
re-pins after new rows land. Renders text-only via SeString.TextValue for
this cycle — full chunk and payload rendering re-attaches later, so the
component shape stays correct without dragging the v1.5.6 chunk pipeline
into the new layer.
2026-05-23 18:53:38 +02:00
JonKazama-Hellion 6ab2e9cece feat(ui): add Sidebar component with width auto-switch
Channel-list panel for the chat window's left side. Auto-switches between
icon-only (38px) and expanded (150px) based on
Config.SidebarAutoSwitchThresholdPx. Each row renders a FontAwesome tab
icon, an expanded-mode name label, a hover-sheen sweep keyed on the tab
identifier, and a pop-out affordance — both the trailing hover button and
the right-click context menu route through a log stub until the channel
popout pool comes online. Glyph table is inlined so the Ui layer carries
its own lookup after the standalone mapping file is removed.
2026-05-23 18:30:29 +02:00
JonKazama-Hellion 0e0c563608 feat(ui): add HonorificHeader component
30px header row pinned to the top of the chat window. Crown always renders
as a brand anchor — even with the Honorific IPC down — while the bracketed
title only appears when CurrentTitle has content. First-frame guard reads
FontManager.FontsReady so layout math never runs against placeholder font
metrics.
2026-05-23 18:17:33 +02:00
JonKazama-Hellion 9c490fa066 feat(services): add TellRouterService stub
Skeleton for the upcoming auto-open routing. Subscribes to
ChatGui.ChatMessageUnhandled and Dispose unsubscribes — when the routing
logic lands, it drops into OnChatMessage without touching the DI graph or
Plugin.cs registration.
2026-05-23 18:12:18 +02:00
JonKazama-Hellion 44c14ace2c feat(fonts): add FontsReady gate property
Returns true once every required atlas-owned handle reports Available.
Components will gate their first-frame draw on this so the layout math
runs against the real atlas rather than placeholder metrics. ItalicFont
null counts as ready because that means italics are disabled in config.
2026-05-23 18:10:36 +02:00
JonKazama-Hellion 53ed154103 feat(config): bump schema to v20 with style-refactor visibility fields
Adds MainWindowOpen, SettingsWindowOpen, MaxParallelPopouts (channel popout
pool size), TellAutoOpenMode (Off/Sidebar/TopTab/Popout) and
SidebarAutoSwitchThresholdPx. Migration is additive — field initializers
fill defaults for v19 configs, the Plugin.cs schema gate bumps the version
stamp after load. UpdateFrom gets explicit sync statements for all five so
settings-save edits do not drop them.
2026-05-23 18:08:34 +02:00
JonKazama-Hellion 620dfe9ea0 feat(themes): bump JSON schema to v2 with typography roundtrip
Loader returns Theme? — null is the silent hard-cut skip for v1 files so
the v2.x refactor stays free of legacy-mapping code. v2 adds an optional
typography{} block with overrideGlobalFontSizePt and overrideSymbolsFontSizePt
slots, both nullable. ThemeRegistry.RefreshCustomCache gets a null guard
so the yield path drops skipped files cleanly. Writer emits typography{}
with explicit nulls so hand-edited files show the available knobs.
2026-05-23 17:38:23 +02:00
JonKazama-Hellion cd9e43c183 feat(style-engine): add DrawListExtensions primitives
Custom-drawing primitives consumed by upcoming components: DrawHoverSheen
with sweep tracking via a static dictionary scoped to constant element-id
keys, DrawGlowBorder using squared-fade layer rects, DrawSlipPolygon as
unsafe stackalloc six-point chamfered polygon, and DrawHonorificHeader for
the crown plus bracketed title. BuildSlipPolygon is internal so the build
suite can pin the geometry without spinning up an ImGui frame.
2026-05-23 17:04:33 +02:00
JonKazama-Hellion b8299a90ca feat(style-engine): add PushStack as ImRaii bridge
DI-singleton that pairs Token lookups with ImRaii's tracked push/pop
machinery. Begin() returns a disposable PushScope with fluent Color, Style
(float/Vector2) and Font methods; reverse-order dispose runs through the
collected IDisposables. Counter-symmetry and exception-safety come from
ImRaii, this layer just handles the token → ImGuiCol resolution and the
RGBA → ABGR conversion at the ImGui boundary.
2026-05-23 16:36:01 +02:00
JonKazama-Hellion d89540de52 feat(style-engine): add TokenResolver and TokenMap
Semantic token layer between code and ThemeColors slots. 41 tokens in three
categories: 24 ImGui-slot tokens with TokenMap mapping to ImGuiCol, 11
custom-drawing tokens that throw on ToImGuiCol, 6 derived surface/text
tokens that lerp from base slots so user picks propagate without inflating
the persisted slot count. Resolver values are RGBA; callers convert at the
ImGui boundary.
2026-05-23 15:59:36 +02:00
JonKazama-Hellion 1d3b429f1b style(format): apply csharpier and markdownlint reflow
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 31s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 6s
Release / Build and attach release ZIP (push) Successful in 41s
2026-05-23 09:07:01 +02:00
JonKazama-Hellion c640a05a8a Merge branch 'feature/v1.5.6' 2026-05-23 08:59:54 +02:00
JonKazama-Hellion 73a8532e26 release(v1.5.6): rewrite manifest for the settings overhaul 2026-05-23 08:52:18 +02:00
JonKazama-Hellion 32840623ff i18n(settings): translate v1.5.6 first-wave control labels 2026-05-23 08:35:08 +02:00
JonKazama-Hellion 2acac78b4c refactor(settings): retitle data and about cards to match merged scope 2026-05-23 08:28:51 +02:00
JonKazama-Hellion ce4c5d9cf9 i18n(settings): translate new section titles and prune orphan keys 2026-05-23 05:04:47 +02:00
JonKazama-Hellion 4cf7aa5501 refactor(settings): merge integrations into the About tab, finalize seven tabs 2026-05-23 04:11:18 +02:00
JonKazama-Hellion 0da4751b0f refactor(settings): merge privacy into the Data and Privacy tab 2026-05-23 03:20:04 +02:00
JonKazama-Hellion ee39fd0eec refactor(settings): rebuild the per-tab panel into sub-sections 2026-05-23 02:22:55 +02:00
JonKazama-Hellion 78efd654e6 refactor(settings): rebuild the Window tab into three sections 2026-05-23 01:30:41 +02:00
JonKazama-Hellion d3cea8c6c0 refactor(settings): rebuild the Chat tab and pull in tooltips and novice network 2026-05-23 00:57:28 +02:00
JonKazama-Hellion 3058e6bc6d refactor(settings): merge fonts, colours and window style into the Appearance tab 2026-05-23 00:05:49 +02:00
JonKazama-Hellion 8a8c6ccae2 refactor(settings): rebuild the General tab into collapsible sections 2026-05-22 23:07:01 +02:00
JonKazama-Hellion eafa20748c refactor(settings): wire the section-open signal, rename tab files 2026-05-22 22:26:04 +02:00
JonKazama-Hellion b3fc96f424 revert(ui): remove the per-tab regex filter 2026-05-22 21:42:43 +02:00
JonKazama-Hellion a18ac130b3 release(v1.5.6): manifest bump, changelog and forge post 2026-05-22 17:57:01 +02:00
JonKazama-HellionandClaude Sonnet 4.6 c652b102fc feat(ui): add sender name display options
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 17:20:51 +02:00
JonKazama-Hellion ba4cd918da feat(ui): warn before sending plugin-only symbols 2026-05-22 16:41:06 +02:00
JonKazama-Hellion a6e2a75422 feat(ui): add optional regex filter per tab 2026-05-22 15:41:48 +02:00
JonKazama-Hellion d05770fd6d feat(ui): separate opacity for focused and unfocused chat window 2026-05-22 15:03:56 +02:00
JonKazama-Hellion 921dd701c4 feat(audio): add custom sound volume slider 2026-05-22 14:28:22 +02:00
JonKazama-Hellion ba30b1e742 feat(config): bump schema v18 to v19 2026-05-22 14:03:36 +02:00
JonKazama-Hellion 5771573a94 fix(ci): keep bilingual forge-announce embeds from merging
Both the DE and EN embed carried the same release url, which makes
Discord merge url-identical embeds and render only the first embed's
description. The EN block was posted and stored but never shown, so
every auto-announce from v1.4.6 onward displayed German only.

Drop the url from the EN embed so Discord stacks both as separate
cards with both descriptions visible.
2026-05-22 09:56:17 +02:00
JonKazama-Hellion d4bcbc93e2 Merge branch 'feature/v1.5.5'
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 29s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 6s
Release / Build and attach release ZIP (push) Successful in 36s
2026-05-21 21:27:57 +02:00
JonKazama-Hellion ca801a006a release(v1.5.5): manifest bump, changelog and forge post 2026-05-21 20:43:54 +02:00
JonKazama-Hellion cc1c05add0 feat(ui): add bundled custom notification sounds
Adds three embedded WAV files as additional notification sound choices
(ids 17-19) alongside the existing 16 game sounds. Playback via NAudio
WaveOutEvent/WinMM, which works correctly on Wine/Linux.
2026-05-21 20:07:09 +02:00
JonKazama-Hellion 969d5e6aa6 feat(ui): add a preview button for the per-tab notification sound 2026-05-21 19:01:45 +02:00
JonKazama-Hellion aaeca76bfd fix(branding): enlarge fox banner and add a contrast card 2026-05-21 19:01:42 +02:00
JonKazama-Hellion 4f6c916bd9 feat(branding): replace ASCII fox banner with embedded image 2026-05-21 18:47:25 +02:00
JonKazama-Hellion ce7dda9e48 fix(ui): null-guard agent access and refocus input after token insert
AgentMap.Instance() and AgentChatLog.Instance() can return null during
zone transitions. Capture pointers into locals and short-circuit the
FlagMarkerCount/LinkedItem deref when null so the entries are correctly
greyed out without faulting. Add Activate/ActivatePos after each append
so the input box regains focus and the caret lands after the token,
matching the SymbolPicker and AutoComplete insert paths.
2026-05-21 18:15:12 +02:00
JonKazama-Hellion 80699b27e4 feat(ui): insert map-flag and item-link tokens from chat input 2026-05-21 18:08:49 +02:00
JonKazama-Hellion 3296a12516 style: drop task references from cycle code comments 2026-05-21 14:52:58 +02:00
JonKazama-Hellion 81123ccddf style: apply csharpier formatting to cycle files 2026-05-21 14:46:19 +02:00
JonKazama-Hellion 636a62814f fix(ui): isolate scroll-button state from pop-outs and tidy toolbar
Guard _childScrolledUp writes behind updateScrollState param so pop-out
windows no longer contaminate the main window's scroll state. Widen the
honorific title slot budget when the scroll button is visible, fix stale
comment, and apply csharpier formatting.
2026-05-21 14:43:26 +02:00
JonKazama-Hellion b5aebaad35 fix(ui): keep scroll-to-bottom button on the toolbar row 2026-05-21 14:32:25 +02:00
JonKazama-Hellion bd75f2453c fix(ui): move scroll-to-bottom button into the chat header toolbar
Drop the three-attempt floating overlay entirely. The button now lives in
the chat header toolbar (DrawScrollToBottomToolbarButton), visible only when
the user is scrolled above the live end. Toolbar layout: honorific slot,
scroll button, pop-out button flush-right -- pop-out position unchanged.
2026-05-21 14:22:58 +02:00
JonKazama-Hellion c909d1646b fix(ui): draw scroll-to-bottom button in a standalone overlay window
Button drawn in the parent window over the ##chat2-messages child was never
clickable: ImGui resolves g.HoveredWindow to the child for that screen rect, so
ItemHoverable rejects any item submitted in the parent. A top-level Begin/End
window is a sibling in the window list and wins the hit-test for its own rect.
ownerId parameter keeps the window name distinct between the main window and
each pop-out, preventing Begin/End collisions when both render in the same frame.
2026-05-21 14:10:01 +02:00
JonKazama-Hellion 5781be2e41 feat(ui): pin failed-tell log-message ids and drop discovery logging 2026-05-21 13:46:42 +02:00
JonKazama-Hellion 65fea0e5f5 fix(ui): render scroll-to-bottom button as a parent overlay
The button was drawn inside the ##chat2-messages child via SetCursorPos,
which inflated ContentSize.y / ScrollMaxY each frame (causing positional
drift) and was clipped by the scrollbar's inner clip rect (causing right-
edge cutoff). Move it to the parent window using screen-space coordinates
captured before the child opens; the scroll state is cached inside the
child while GetScrollMaxY/Y still refer to the child's scroll context.
2026-05-21 13:46:42 +02:00
JonKazama-Hellion 3de6e4a3cb feat(ui): add scroll-to-bottom button to the chat log 2026-05-21 13:03:36 +02:00
JonKazama-Hellion e0289962b1 style: remove em-dashes from new code comments 2026-05-21 12:10:17 +02:00
JonKazama-Hellion 95375c8516 feat(ui): auto-focus tab rename and raise buffer to 512 2026-05-21 11:16:53 +02:00
JonKazama-Hellion 36ea8ddcfc feat(ui): add per-tab notification sound for inactive tabs 2026-05-21 10:39:09 +02:00
JonKazama-Hellion 246f0e2511 feat(ui): notify on failed tell via RaptureLogModule hook 2026-05-21 10:00:53 +02:00
JonKazama-Hellion 2e81c42e3b feat(config): bump schema v17 to v18 2026-05-21 09:20:21 +02:00
JonKazama-Hellion a46d89c197 Merge branch 'feature/v1.5.4'
Security / scan (push) Successful in 20s
Build / Build (Release) (push) Successful in 27s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 6s
Release / Build and attach release ZIP (push) Successful in 36s
2026-05-20 16:42:39 +02:00
JonKazama-Hellion 57b6ead003 release(v1.5.4): manifest bump and forge post
Bumps csproj, yaml, repo.json, CHANGELOG, ROADMAP and README in
lock-step to 1.5.4. Forge-post DE-body added with the Polish & Motion
versionsnatur. Slim-rule applied to the yaml and repo.json changelog
blocks (keeps v1.5.4 + v1.5.3 + v1.5.2 + v1.5.1, drops v1.5.0).

A csharpier reflow of two v1.5.4 source files (ChatLogWindow,
HellionStyle) is folded in. preflight.sh blocks A-F all green.
2026-05-20 16:32:42 +02:00
JonKazama-Hellion a42cc2a97e test(selftest): pin v1.5.4 crossfade and quick-picker contracts
ThemeCrossfadeSelfTestStep walks Switch -> crossfade-observed ->
mid-crossfade-switch -> crossfade-end -> restore using
TryGetActiveCrossfade, returns Waiting frame-by-frame and Pass after
the restore concludes. The mid-switch phase fires a second Switch
within ~100ms of the first observed crossfade and asserts the lerped
value is neither identity-from nor identity-to, exercising the
ArmCrossfade mid-flight-origin override.

QuickPickerSelfTestStep verifies the three new resource strings, the
built-in theme floor (>=10), and Config.Tabs non-empty.
2026-05-20 16:21:29 +02:00
JonKazama-Hellion 96ff4ddfd8 feat(ui): lerp sidebar-icon and card-mode-border hover alphas
Sidebar icons ease from 40% to 100% alpha on hover-in via FrameLerp
plus ApplyAlpha. Card-mode borders aggregate row-hover per tab and
lift the border alpha by up to ~+0x70 across every row in that tab.
borderColorAbgr moves into the loop so the per-iteration boost can
apply. ReduceMotion snaps both paths instantly.

Card-hover detection uses IsMouseHoveringRect over the row bounds --
IsItemHovered would only see the 2px spacer dummy below each row.
2026-05-20 14:42:21 +02:00
JonKazama-Hellion 0bfe3a62cb feat: add FrameLerp helper and per-tab hover-alpha fields
FrameLerp.Smooth is the framerate-independent smoothing path -- a
Umbra-style v += (target - v) * factor with the factor clamped to 1
so a stalled frame snaps cleanly instead of overshooting. Tab gets
two NonSerialized fields (_hoverAlpha, _cardHoverAlpha) that the
v1.5.4 render loops drive.
2026-05-20 13:26:16 +02:00
JonKazama-Hellion 01a7f9b4ec feat(ui): add header quick-picker for themes and tabs
Palette button left of the cog opens a two-section popup. The themes
section enumerates AllBuiltIns + AllCustom; the tabs section
enumerates Config.Tabs. The active entry gets a leading check-glyph,
inactive rows a same-width blank so labels stay aligned. Click
selects without closing the popup (DontClosePopups).

Theme click triggers the PM-1 crossfade via ThemeRegistry.Switch;
tab click routes through ChangeTab so LastActivityTime stays
consistent with the sidebar and top-bar click paths.

The header input-width reservation now counts the new button plus
the per-button SameLine spacing -- the old formula dropped the
spacing term and overflowed the row once a third button appeared.
2026-05-20 12:48:31 +02:00
JonKazama-Hellion 0237602ab7 feat(util): add ColourUtil.ApplyAlpha for hover-lerp modulation
Alpha-only modulator for ABGR colors -- RGB stays intact, factor
clamped to [0, 1]. Used by the v1.5.4 PM-3 hover-lerp path.
2026-05-20 11:20:48 +02:00
JonKazama-Hellion a600f014eb i18n: add quick-picker strings and reduce-motion settings toggle
Five new keys across the EN source plus 24 locale variants (DE plus
23 AI-assisted, each carrying the pending-review marker): the header
quick-picker tooltip and two section headers, plus name and
description for a new ReduceMotion checkbox.

ReduceMotion was a config field with no UI -- the checkbox lands in
the Theme & Layout tab's window-style section. Designer.cs hand-edited
as a v1.5.4 block matching the v1.4.8 convention.
2026-05-20 11:07:45 +02:00
JonKazama-Hellion a35067f80a feat(ui): wire ThemeRegistry crossfade into PushGlobal
Switch picks a lerped AbgrCache during the 300ms crossfade window
(ReduceMotion bypass keeps the snap path). Plugin-load init path
switches to SwitchSilent so opening the plugin no longer fades from
the default theme. WindowBg/ChildBg RGBA path stays bound to the
user's per-window opacity override and never fades.

PushGlobal takes the ThemeRegistry as a parameter -- it is an instance
member on Plugin, not static, so the single Plugin.Draw call-site
threads it through alongside the active theme.
2026-05-20 10:36:33 +02:00
JonKazama-Hellion 74b07519f5 feat(themes): arm crossfade state in ThemeRegistry.Switch
Three new private fields plus TryGetActiveCrossfade entry-point, plus
SwitchSilent variant for the plugin-load init path. ArmCrossfade
captures a value-copy of the active AbgrCache and stamps TickCount64;
mid-crossfade Switch composes the current lerped state as the next
fade origin so back-to-back theme switches stay smooth.

Same-slug Switch is a no-op (no identity-crossfade).
2026-05-20 09:26:51 +02:00
JonKazama-Hellion 8dade8c4b2 feat(themes): add ThemeAbgrCacheLerp pure-helper for crossfade
Per-slot ABGR byte-lerp between two cache value-records, stack-allocated
output, t clamped. Pattern anchor: imgui.cpp ImAlphaBlendColors.
2026-05-20 08:57:33 +02:00
JonKazama-Hellion 35e8d3a7fe fix(font): bundled font now actually renders, ship Inter Light, +CJK fallback
Security / scan (push) Successful in 19s
Build / Build (Release) (push) Successful in 29s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 5s
Release / Build and attach release ZIP (push) Successful in 49s
Plugin.cs:937 only pushed RegularFont when Config.FontsEnabled was true.
  FontsAndColours.cs:50 forces FontsEnabled=false whenever UseHellionFont is
  enabled (to hide the chooser UI), so the bundled-font path was silently
  dead and the FFXIV Axis game-font took over. Exo 2 looked "almost right"
  because it overlaps Axis on basic Latin, so the regression went unnoticed
  for the entire v1.5.x series.

  The fix routes RegularFont through draw whenever either FontsEnabled or
  UseHellionFont is on. First-frame HITCH dropped from ~74 ms to ~20 ms
  median (5-reload Linux/Wine sample 17.9-23.6 ms) as a side effect — the
  v1.5.1 "too optimistic" defer-pattern hypothesis was actually a symptom
  of this bug, not bad math.

  Font-stack overhaul on top:
  - Inter Light (Static 18pt-Light, 343 KB, SIL OFL 1.1) replaces Exo 2 as
    the bundled font. Inter ships full Latin Extended-A/B, Greek polytonic
    and Cyrillic Supplement coverage.
  - NotoSansCjkRegular added as a third merge layer for Hangul,
    Simplified-Chinese-specific Han glyphs, and CJK fallbacks the FFXIV
    Japanese font does not ship.
  - Two new ExtraGlyphRanges flags (LatinExtended, Greek) implemented via
    AddChar pair lists in SetUpRanges.
  - Settings.Apply auto-activates the matching ExtraGlyphRanges flag on
    language change. Plugin.LoadAsync runs a one-shot migration that ORs
    in the required flag for an already-selected language.
  - ExtraGlyphRanges CollapsingHeader reachable regardless of
    UseHellionFont (was hidden in the early-return branch).
  - New WarningText below the language combo: FFXIV's chat engine only
    fully supports EN/DE/FR/JA. Other scripts render in the HellionChat
    UI but may garble in in-game chat input/send.

  Localisation wave (originally a FR-only cycle):
  - 24 selectable UI languages. LanguageOverride enum gains 10 new locales
    plus 3 previously commented-out (Italian, Korean, Norwegian with ISO
    code `nb` instead of `no`). All new values append to keep existing
    user-config integer serialisation stable.
  - Resource bundle split: HellionStrings.resx (24 locales, 328 keys) for
    fork-added strings, Language.resx (24 locales, 456 keys) for the
    ChatTwo-Crowdin-heritage. 4 post-sync Crowdin keys backfilled into
    13 legacy locales with per-key AI-assisted comment marker.
  - Em-dash sweep on EN source plus 18 translations. Russian and Ukrainian
    keep their typographic norm.

  Old HellionFont.ttf + HellionFont-OFL.txt removed; Inter-Light.ttf +
  Inter-OFL.txt take their place. Configuration field UseHellionFont keeps
  its name for backwards-compat. Migration v17 stays.
2026-05-19 17:28:48 +02:00
JonKazama-Hellion 38586db9d8 fix(l10n): em-dash sweep across EN source and translations, backfill Crowdin gap
- HellionStrings.resx: 10 in-prose em-dashes -> period/colon per style guide
- 18 HellionStrings.<lang>.resx: 114 mechanical em-dash edits via heuristic
    (period before capital, colon otherwise). Skipped: fr (already clean),
    zh-Hans/zh-Hant (already clean), ru/uk (em-dash is orthographic norm)
- HellionStrings.de.resx: fix substantive-heuristic miss in Wizard_Cancel_Label
- Language.de.resx: add Hellion Forge maintainer header (native-maintained)
- Backfill the 4 post-Crowdin keys (Options_ColorSelectedInputChannelButton_*,
    Options_HideInNewGamePlusMenu_*) into 13 legacy Crowdin locales with
    per-key AI-assisted comment marker. All 23 Language.*.resx now at 456 keys.
2026-05-19 13:52:18 +02:00
JonKazama-Hellion c357873604 feat(l10n): add HellionStrings bundle (EN + 22 variants) and Language siblings — WIP v1.5.3
Security / scan (push) Successful in 28s
Build / Build (Release) (push) Successful in 30s
Split fork-added keys into a dedicated HellionStrings resource bundle separate
    from the Language.*.resx Chat-2 Crowdin heritage.

  - Add HellionStrings.resx (EN source, 328 keys) and HellionStrings.Designer.cs
  - Add 22 HellionStrings.<code>.resx variants: ca, cs, da, de, es, fi, fr, hu, it,
    ja, ko, nb, nl, pl, pt-BR, pt-PT, ro, ru, sv, tr, uk, zh-Hans, zh-Hant
  - Add matching Language.<code>.resx siblings for the new locales with the
    Hellion Forge maintainer header
  - FR pass: align labels with the rest of the UI
    (Confidentialité, Visualiseur, Violet indigo)
2026-05-19 09:32:45 +02:00
JonKazama-Hellion 67bec11f10 Merge branch 'feature/v1.5.2'
Security / scan (push) Successful in 18s
Build / Build (Release) (push) Successful in 28s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 6s
Release / Build and attach release ZIP (push) Successful in 40s
2026-05-18 23:47:59 +02:00
JonKazama-Hellion 35efdd4628 style(wizard): reflow FirstRunWizard and WizardStateSmokeStep to csharpier
Preflight Block E (`dotnet csharpier check`) flagged two reflows
in the v1.5.2 code: the ForgeBronzeDim Vector4 constant needed
multi-line form, and a handful of switch arms / long Plugin.Config
chains in WizardStateSmokeStep needed line-breaks at csharpier's
print-width. Pure formatting — zero functional change. Block D
build stays clean, Block E now passes.
2026-05-18 23:46:00 +02:00
JonKazama-Hellion 271a6ae650 docs(forge): add v1.5.2 forge announcement post body
Bilingual layout: DE in this file, EN extracted by forge-announce.yml
from HellionChat.yaml changelog block. Body covers the four-step
wizard rewrite, the new Roleplay profile, the surfaced power
settings, the staged-commit + test-hint pattern, the
WizardLastShownVersion re-show-once mechanism for existing users
and the under-the-hood test additions. Subtitle 54 chars,
versionsnatur 8 chars, embed sum (forge body + en-yaml + footer)
4158 chars — all under the workflow caps (60 / 40 / 5500).
2026-05-18 23:42:44 +02:00
JonKazama-Hellion 003bd5c695 docs(changelog): polish v1.5.2 prose hygiene
Fixes two minor copy-paste artefacts in the v1.5.2 CHANGELOG block:
the duplicate trailing "EUPL-1.2." right after the Based-on footer,
and a stray German "Optik" tab name in the power-settings list
(the settings tab is "Appearance" in EN, the German label only
appears in the localised UI). Yaml / repo.json / ROADMAP / README
already used the right wording.
2026-05-18 23:36:13 +02:00
JonKazama-Hellion e1f84a9b10 chore(release): v1.5.2 manifest bump
Bumps csproj Version, repo.json AssemblyVersion/TestingAssemblyVersion
plus the three DownloadLink* URLs, yaml + repo.json changelog blocks
(slim-rule: v1.5.2 + v1.5.1 + v1.5.0 + v1.4.10 retained, v1.4.9
trimmed to the Full history footer link), docs CHANGELOG long-form
block, ROADMAP v1.5.2 marked complete and v1.5.3 set as next cycle
(FR localisation with Hezcal native-speaker review), README status
strings plus moved pre-v1.5.2 history. Changelog includes the
in-cycle UI shrink + Fox-Banner-TreeNode smoke fix and the
WizardLastShownVersion re-show-once mechanism for existing users.
2026-05-18 23:29:56 +02:00
JonKazama-Hellion 9745abea0c feat(wizard): re-surface first-run wizard once for existing v1.5.2 users
Bestehende User haben FirstRunCompleted=true vom alten Single-Page
Wizard und würden den neuen Multi-Step-Flow nie zu sehen bekommen.
Neues Config-Feld WizardLastShownVersion (Default leer) trägt die
Version, deren Wizard zuletzt gezeigt wurde. Plugin.LoadAsync
vergleicht gegen die Konstante WizardReshowVersion ("1.5.2") und
setzt FirstRunCompleted einmalig zurück, wenn die Werte abweichen.
SaveConfig sofort danach, damit ein Pre-Finish-Crash die Re-Show
nicht endlos wiederholt. Künftige Cycles bumpen die Konstante nur
wenn der Wizard wirklich umstrukturiert wird.
2026-05-18 23:18:19 +02:00
JonKazama-Hellion 1e418ab86f fix(ui): shrink wizard window and fold the Fox banner by default
Smoke feedback v1.5.2 R1: the 900x560 default size dominated the
screen and the centred MonoFont fox silhouette filled the welcome
step. Default size drops to 720x480, MinimumSize to 600x400, so
the wizard fits comfortably on a sub-monitor and still leaves the
power-settings step readable when shrunk. Step 1 wraps the banner
in a folded TreeNode (label "Hellion Forge", same anchor pattern
the v1.5.1 wizard used) so the onboarding copy stays the primary
focus and users opt into the silhouette explicitly.
2026-05-18 23:10:53 +02:00
JonKazama-Hellion 1c820b7f53 test(selftest): register WizardStateSmokeStep for v1.5.2 wizard flow
Variant 1 walks the FirstRunWizard state machine through Step 1 →
4 and commits with no pending values to verify the no-op
write-back path. Variant 2 picks Roleplay on Step 2, skips Step 3,
commits, and asserts LoadPreviousSession /
FilterIncludePreviousSessions stayed on their pre-test value —
pinning the null-semantics from Spec Z.176. ApplyRoleplay would
overwrite six privacy / retention fields, so the step snapshots
them before Variant 2 and CleanUp() restores them, keeping the
self-test idempotent across /xlperf runs. Catches state-machine
throws and CommitPending NREs that would otherwise surface as a
hard plugin crash during Finish ✓ clicks. Runs alongside the
existing three FontManager / ThemeSwitch self-test steps.
2026-05-18 22:03:50 +02:00
JonKazama-Hellion 2cc260170e feat(ui): rewrite FirstRunWizard as four-step staged-commit flow
Multi-step navigation (Welcome → Privacy → Power Settings → Done)
with a nested WizardState holding nullable Pending* fields. Profile
picker becomes a 2x2 grid covering all four privacy profiles
(PrivacyFirst, Casual ★ recommended, Roleplay new, FullHistory).
Power-settings step surfaces six previously-hidden Configuration
fields (LoadPreviousSession, FilterIncludePreviousSessions,
AutoTellTabsHistoryPreload, UseCompactDensity, PrettierTimestamps,
Theme) without introducing new ones. ApplyRoleplay mirrors the
existing Apply* methods, CommitPending writes only the non-null
fields back so skipping a step preserves existing config. OnClose
docstring updated to reflect the actual code path (both Decide-Later
and Finish set FirstRunCompleted = true, the wizard does not reopen).
2026-05-18 21:15:27 +02:00
JonKazama-Hellion de86084dbc feat(resources): add multi-step wizard strings for v1.5.2 (EN + DE)
Thirty-two new bilingual resource keys covering all four wizard
steps: titles, section headings, control labels, navigation, the
new Roleplay profile, the staged-summary template strings, the
'Decide later' multi-step skip label plus its dedicated tooltip.
Existing Wizard_Cancel_Label and Wizard_Cancel_Tooltip stay
untouched for legacy reopen paths.
2026-05-18 20:26:22 +02:00
JonKazama-Hellion f56b968768 feat(privacy): add Roleplay profile defaults to PrivacyDefaults
Adds RoleplayWhitelist (PrivacyFirst + Say + both emote types) and
RoleplayRetentionOverrides (Say 30d, emotes 90d). Shout/Yell and
Novice Network stay out — public-distance noise from strangers
is not story content. Whitelist + overrides are IReadOnlySet /
IReadOnlyDictionary with pure-helper type footprint, so the Build
Suite can pin them without touching Dalamud.
2026-05-18 19:02:54 +02:00
JonKazama-Hellion edab5c7a6d Merge branch 'feature/v1.5.1'
Security / scan (push) Successful in 20s
Build / Build (Release) (push) Successful in 29s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 5s
Release / Build and attach release ZIP (push) Successful in 34s
2026-05-17 19:17:02 +02:00
JonKazama-Hellion 82cbf4c281 chore(release): v1.5.1 manifest bump
- csproj <Version> 1.5.0 to 1.5.1; <None Include="images\**"> now
  excludes the source-only ASCII study folder so the deploy stays
  clean
- yaml + repo.json changelog block prepended with the v1.5.1 entry,
  v1.4.8 trimmed out per the slim rule (three to four versions in
  the manifest cache, older history lives on the Gitea release page)
- repo.json AssemblyVersion + TestingAssemblyVersion bumped to
  1.5.1.0, three DownloadLink* URLs point at v1.5.1
- docs/CHANGELOG and docs/ROADMAP gain the v1.5.1 entry; ROADMAP
  Next-Cycle slot moves to v1.5.2 First-Run-Wizard rework
- README status sections updated, the previous v1.5.0 paragraph
  kept under a "Project status (pre-v1.5.1, kept for context)"
  heading
- Forge-post .github/forge-posts/v1.5.1.md added, DE body honest
  about the HITCH-win miss
- yamllint config ignores the plugin manifest yaml because it
  follows DalamudPackager's 4-space indent convention rather than
  yamllint's default 2

Changelogs are honest about the cross-plugin HITCH target from
v1.5.0 not landing this cycle.
2026-05-17 19:12:22 +02:00
JonKazama-Hellion 00ae81751b docs(branding): collect ASCII study assets with README
Move the four leftover ASCII variants from the repo root into
HellionChat/images/ascii/ and add a README that explains which two
files are embedded in the plugin DLL versus which ones stay as study
material. The original paw file was split into a stipple version and
an outline version because the two paws were stacked in one source.

Attribution:

- fox-*.txt files are by Julia Moon, drawn for Hellion Chat, free to
  use without attribution
- wolf-head-blazejkozlowski.txt is by Blazej Kozlowski, originally
  published on asciiart.eu, kept as a style reference
2026-05-17 18:50:20 +02:00
JonKazama-Hellion 89384702b4 feat(logging): prepend fox-mini silhouette to DI-logger bootstrap banner
Pulls the four-line fox-mini ASCII out of the embedded branding
resources and writes each line through IPluginLog before the existing
bootstrap line, so an /xllog reader sees the Hellion Forge mark on
every plugin load. The text provenance ("by Julia Moon - Hellion
Forge") follows the silhouette, then the version + fingerprint line
stays where it was.

Empty lines from the resource are skipped so the log stays compact.
2026-05-17 18:41:47 +02:00
JonKazama-Hellion 54316313dc feat(branding): embed Hellion Forge fox ASCII signature
Ship two ASCII variants as embedded resources under HellionChat.Branding:

- fox-banner.txt — full silhouette with "Hellion Forge" set inside the
  body, rendered in the first-run wizard and the Settings Information
  tab as a folded "about the makers" anchor
- fox-mini.txt — compact fox-head + curly-tail used by the DI-logger
  bootstrap banner

A small HellionForgeAscii helper lazy-loads both strings; the wizard
and information-tab render them in a collapsed TreeNode using the
UiBuilder MonoFontHandle so the stipple-art lands pixel-aligned.

Both art files are self-made (Julia Moon, free to use) and travel with
the plugin DLL so a partial deploy can't lose them.
2026-05-17 18:40:08 +02:00
JonKazama-Hellion 4059b363a3 test(selftests): add FontManager ctor and push smoke steps
Two new self-test steps for the hybrid FontManager:

- FontManagerCtorSmokeStep proves all five handles land on the manager
  after Phase-1 resolve (ItalicFont nullable per Config.ItalicEnabled)
  and that no atlas-load exception is sitting on any of them
- FontPushSmokeStep proves IFontHandle.Push() returns without throwing
  for the two main delegate handles right after plugin load

Both steps run on the framework thread via the xlperf self-test path
and are registered alongside the existing theme-switch step in
SelfTestRegistry.
2026-05-17 18:34:33 +02:00
JonKazama-Hellion 0220e5d756 chore(linting): refresh configs and sweep auto-fix
Pull in the refreshed linter and tooling configs (editorconfig,
gitignore, gitattributes, prettierignore, prettierrc, markdownlint,
yamllint, env.example, dotnet-tools) and run prettier and markdownlint
in --fix / --write mode across the repo so the existing tree matches
the new rules.

- prettier 2-space indent on yaml/yml and json overrides, asterisk
  strong, underscore emphasis, proseWrap always
- markdownlint MD007 indent aligned to 2 and MD049 to underscore so
  prettier output stays passing
- preflight Block F also ignores CLAUDE.md (gitignored personal file)
- prettierignore extended to keep HellionChat.yaml manifest and the
  NuGet packages.lock.json out of the formatter

No semantic content changed; csharpier, build, full build-suite
(729/729) and the new prettier/markdownlint/yamllint checks all green.
2026-05-17 17:20:55 +02:00
JonKazama-Hellion 2315f10d91 refactor(fonts): reuse Dalamud IconFontFixedWidthHandle for FontAwesome
Drop the custom NewDelegateFontHandle that built our own FontAwesome
atlas slot and reuse Dalamud's UiBuilder.IconFontFixedWidthHandle
instead. One less delegate-build step in the ctor, and the handle is
host-managed so Dispose() leaves it alone.

The pre-cycle icon inventory verified that every site we push the
FontAwesome font for renders an icon that is present in the host's
fixed-width handle glyph range, so no rendering site changes.
2026-05-17 17:01:17 +02:00
JonKazama-Hellion 3283e51381 refactor(fonts): hybrid FontManager init via SuppressAutoRebuild
Move font handle creation from BuildFonts() into the FontManager ctor
inside a single atlas.SuppressAutoRebuild() block. Axis, AxisItalic and
FontAwesome become init-only IFontHandle properties; RegularFont and
ItalicFont stay mutable so the live font-settings rebuild path keeps
working without a plugin reload.

- BuildFonts() renamed to RebuildDelegateFonts(), scope reduced to the
  delegate fonts only
- BuildFontsAsync() removed; Task.Run had no purpose with ctor-init
- FontManagerInitHostedService deleted; PluginHostFactory drops the
  matching AddHostedService registration
- PluginHostFactory FontManager registration takes IDalamudPluginInterface
  via factory lambda
- Settings save path now calls RebuildDelegateFonts() instead of
  BuildFonts()
- Plugin.Draw push site gets a null-forgiving for the nullable
  RegularFont with a one-line WHY
2026-05-17 16:15:28 +02:00
JonKazama-Hellion 7e960371a3 docs(honorific): close gradient-port anchor in v1.5.1 2026-05-17 15:50:41 +02:00
JonKazama-Hellion f2a2daf39d Merge branch 'feature/v1.5.0'
Security / scan (push) Successful in 21s
Build / Build (Release) (push) Successful in 26s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 5s
Release / Build and attach release ZIP (push) Successful in 33s
2026-05-17 11:45:16 +02:00
JonKazama-Hellion 7d87f1c4fe chore(release): v1.5.0 manifest bump
Version strings bumped across all eight tracked surfaces:

- HellionChat/HellionChat.csproj   <Version>1.5.0</Version>
- repo.json                        AssemblyVersion + TestingAssemblyVersion = 1.5.0.0
- repo.json                        three DownloadLink* URLs -> /v1.5.0/latest.zip
- repo.json                        Changelog field synced with yaml
- HellionChat/HellionChat.yaml     new v1.5.0 changelog block on top; v1.4.7
                                   drops out per the four-block slim rule
- docs/CHANGELOG.md                v1.5.0 entry prepended
- docs/ROADMAP.md                  Next Cycle pointer moves to v1.5.1, v1.5.0
                                   joins the released-cycle archive block
- README.md                        three status surfaces (badge, header,
                                   Project Status long-form) on v1.5.0
- .github/forge-posts/v1.5.0.md    Discord announcement body (German)

Preflight blocks A-F all green. Changelog embed total 2050 / 5500 chars
(four subblocks), forge-post frontmatter inside the 60/40 char caps.

Tag, push, merge are reserved for Flo.
2026-05-17 11:43:07 +02:00
JonKazama-Hellion fe84fd558e docs(di): trim cycle-internal codes and verbose block comments
Code comments were drifting into plan-internal shorthand (DI-2a,
Slice B, "see plan §9") that nobody outside the cycle authors can
decode. They also tended toward AI-generated paragraph blocks where a
two-line WHY would have done.

This commit tightens the comment surface from the v1.5.0 work:
- IPluginLogProxy header lists the consumer buckets without naming
  the cycle items that decided them.
- DalamudLogger / DalamudLoggingProvider provenance markers explain
  themselves in two lines each; the long EUPL-rationale paragraph
  moves to the commit message.
- PluginHostFactory block headers shrink to one line each, ASCII
  dividers come out, plan-internal codes go.
- Plugin.cs field doc and Phase-1 / DisposeAsync comments lose the
  cycle-name references; the file gains nothing from "C3 surfaced X"
  in code.
- FontManager / GameFunctions static-method notes shrink to one
  sentence each.
- InitHostedServices class header keeps the eager-resolve WHY in
  three lines, drops the constraint label.

Csharpier reformatted the .csproj layout (long PackageReference
multi-lined). No functional change, no behavior change.
2026-05-17 11:35:44 +02:00
JonKazama-Hellion 624ad20404 feat(logging): add dev signature to DalamudLogger output
EUPL-1.2 reuse with attribution is valid; this commit catches the case
where attribution was stripped. Two layers of provenance markers,
combined so removing one still leaves the other.

Layer 1 (subtle, kopier-resistent):
- DalamudLogger.Log emits "[name]<U+200B>{level} message" — a
  zero-width space (U+200B) between the category bracket and the
  level value. Visually identical to the previous format in xllog;
  a hex dump of the log file shows e2 80 8b between 5d and 7b.
  Survives 1:1 code copies. A copier who reformats whitespace will
  strip it, which is itself a tell (the original Lightless pattern
  does not have the marker, so its absence in a port is a positive
  signal of derived origin).

Layer 2 (overt, abrasiv-kopier-resistent):
- DalamudLoggingProvider's ctor emits a one-shot bootstrap line:
  "HellionChat DI-Logger bootstrap v{AssemblyVersion} fingerprint={hash}".
  Visible in xllog as the first plugin INFO line. Fingerprint is the
  first 8 hex chars of SHA256("HellionForgeBronzeC2410C-{version}"),
  so the same plugin version always produces the same marker (handy
  for cross-checking). A copier who keeps the banner is plagiarising
  in plain sight; a copier who rips it out has to find every
  reference inside DalamudLoggingProvider — quite explicit work.

Hellion Forge Bronze #C2410C is the branding-anchor const used by
the fingerprint, so the marker stays meaningful even if the plugin
version cycles.
2026-05-17 11:15:40 +02:00
JonKazama-Hellion 54ff88d6d4 refactor(di): migrate Root + Misc to ILogger<T> (DI-4 Slice D)
Slice D shrinks vs the original plan: three of the six files cannot
take an ILogger ctor arg without breaking external contracts.

Migrated (8 LogProxy sites across 4 files):
- Commands: 2 sites (Warning, Error). New ctor takes ILogger<Commands>.
- Themes/ThemeRegistry: 1 site (Debug). ILogger<ThemeRegistry>? is
  optional (default null) so the existing Build-Suite tests that
  construct `new ThemeRegistry()` parameterless keep working without
  changes. _logger?.LogDebug guards the call site.
- PayloadHandler: 3 sites (Error, Warning, Error). New ctor takes
  ILogger<PayloadHandler>. ChatLogWindow's two `new PayloadHandler(this)`
  sites (the direct field and the Lender lambda) now hand a fresh
  CreateLogger<PayloadHandler>() from the existing _loggerFactory.

Not migrated (5 sites stay on Plugin.LogProxy, plan drifts D12-D14):
- D12 - Configuration (1 site): IPluginConfiguration, instantiated by
  Dalamud's Interface.GetPluginConfig() via reflection on the
  parameterless ctor. Adding an ILogger arg would break GetPluginConfig.
- D13 - Message (4 sites): partial data class with two ctor overloads,
  mass-instantiated across 3 plugin sites plus Newtonsoft JSON
  deserialisation. Ctor extension would be invasive across ~20 call
  sites with low payoff (data-class logger is unusual).
- D14 - FontManager (2 sites): both Plugin.LogProxy calls live in
  static methods (TryGetHellionFontBytes, AddFontWithFallback) that
  cannot reach an instance _logger. Same root cause as D8 in
  GameFunctions. FontManager joins the static-bucket alongside
  EmoteCache et al.; the ctor + _logger field added mid-Slice-D were
  rolled back to keep the class clean.

Plugin.LogProxy surface after C9 (8 file buckets, ~12 sites total):
- 4 originally-static consumers: EmoteCache, AutoTranslate,
  MemoryUtil, WrapperUtil
- 3 cannot-take-ctor-arg consumers: Configuration, Message, FontManager
- 1 single-static-method consumer: GameFunctions.TryOpenAdventurerPlate
  (D8 from Slice B)

Smoke 2 is now due.
2026-05-17 11:02:08 +02:00
JonKazama-Hellion c955f30422 refactor(di): migrate UI Window-Layer to ILogger<T> (DI-4 Slice C)
Six UI files shift from Plugin.LogProxy to ILogger<T> via
constructor injection.

Container singletons (each takes a typed ILogger plus, where it owns
nested allocations, an ILoggerFactory to spawn child loggers):
- Ui/ChatLogWindow (15 sites, plus an ILoggerFactory for the
  Popout new-call at Ui/ChatLogWindow.cs:2417)
- Ui/Settings (SettingsWindow): no own sites, but takes an
  ILoggerFactory so it can hand typed loggers to its three migrated
  settings tabs (General, the other six tabs stay unchanged)
- Ui/DbViewer (3 sites)

Nested instances allocated by parent containers:
- Ui/Popout (7 sites, ILogger<Popout> as the new 4th ctor arg passed
  from ChatLogWindow)
- Ui/SettingsTabs/ThemeAndLayout (1 site)
- Ui/SettingsTabs/FontsAndColours (1 site)
- Ui/SettingsTabs/DataManagement (15 sites)

PluginHostFactory factory lambdas updated for ChatLogWindow,
SettingsWindow and DbViewer to resolve the new logger args.
2026-05-17 10:26:47 +02:00
JonKazama-Hellion 7a1bd1babc refactor(di): migrate Integrations + IPC layer to ILogger<T> (DI-4 Slice B)
Seven services across Integrations/, Ipc/ and GameFunctions/ shift
from Plugin.LogProxy to Microsoft.Extensions.Logging.ILogger<T>.

Files with live LogProxy sites (10 in total):
- Ipc/ExtraChat (1)
- GameFunctions/Chat (6)
- GameFunctions/GameFunctions (2)
- GameFunctions/KeybindManager (1)

Foundation-touch files (no current sites, ctor takes ILogger<T> as
seed for the v1.5.7-11 Plugin-Integrations wave):
- Integrations/HonorificService (also drops the local IPluginLog
  _log field in favour of ILogger<HonorificService> _logger; the
  three _log.* calls there are migrated as a bonus since the field
  had to change anyway)
- IpcManager
- Ipc/TypingIpc

GameFunctions takes ILoggerFactory as an extra ctor arg so it can
hand a typed logger to its nested Chat and KeybindManager (same
pattern MessageStore + MessageEnumerator use in Slice A).

PluginHostFactory factory lambdas updated for all five Slice B
services that need extra resolves.

Plan drift D8: GameFunctions.TryOpenAdventurerPlate is an internal
static method whose only Warning call cannot reach the instance
_logger. The one site stays on Plugin.LogProxy with an inline note;
promoting it to instance + PayloadHandler.cs:814 call-site update is
a v1.5.1+ cleanup, out of DI-4 Slice B scope.
2026-05-17 09:56:46 +02:00
JonKazama-Hellion d0be75e79d refactor(di): migrate services layer to ILogger<T> (DI-4 Slice A)
MessageStore, MessageEnumerator, MessageManager, AutoTellTabsService
move from Plugin.LogProxy / IPluginLogProxy onto
Microsoft.Extensions.Logging.ILogger<T> via constructor injection.

MessageStore additionally takes ILoggerFactory so it can build a
per-instance ILogger<MessageEnumerator> at each of the five reader-
spawning sites; the enumerator is not a container singleton.

PluginHostFactory's MessageManager and AutoTellTabsService factory
lambdas grow to resolve the new logger args; everything else stays in
place.

Site-level migration in the four files:
- MessageStore: 12 calls, _logger field IPluginLogProxy -> ILogger<MessageStore>
- MessageManager: 7 Plugin.LogProxy.* sites, new _logger field
- AutoTellTabsService: 9 Plugin.LogProxy.* sites, new _logger field

Plus a pre-existing template bug surfaced by CA2017: a LogDebug call
in AutoTellTabsService used "{tab.Name}" with no `$` prefix, which
landed in xllog as literal text under Plugin.LogProxy; ILogger now
reads that as a structured placeholder, so the call was promoted to
proper structured logging with tab.Name passed as a parameter.
2026-05-17 09:09:55 +02:00
JonKazama-Hellion e0ead86616 refactor(di): drop manual PlatformUtil and LogProxy wiring (DI-3)
C3's Phase-1 bridge in Plugin.ctor already pulls IPlatformUtil and
IPluginLogProxy out of the container right after the host builds, so
the manual `new DalamudPlatformUtil()` / `new DalamudPluginLogProxy`
assignments in Phase-0 were just allocating throwaway instances that
got overwritten a few lines later.

Phase-0 helpers that run before the container build
(MigrateFromChatTwoLayout, LanguageChanged, ImGuiUtil.Initialize) do
not touch Plugin.PlatformUtil or Plugin.LogProxy, so the brief
null-window between the schema gate and the container build is safe.

The DalamudPlatformUtil and DalamudPluginLogProxy wrapper classes
themselves stay in the code; DI-4 (logger migration to ILogger<T>)
will eventually retire the proxy for new sites but EmoteCache,
AutoTranslate, MemoryUtil and WrapperUtil keep using it.
2026-05-17 08:58:03 +02:00
JonKazama-Hellion b66005daea fix(di): stop double-disposing container singletons in Plugin.DisposeAsync
Smoke 1 of C3 surfaced MessageManager.DisposeAsync throwing on unload:
Plugin.DisposeAsync ran the manual MessageManager teardown (CTS
cancel + dispose at MessageManager.cs:84-99), then awaited
_lifecycle.DisposeAsync which routed Host.Dispose through the
container, which hit MessageManager.DisposeAsync a second time and
threw ObjectDisposedException on the already-disposed CTS.

Plugin.DisposeAsync now drops every manual service dispose - the
container owns those singletons end-to-end. The framework-thread block
keeps the three calls the container has no handle on
(TearDownCommands, GameFunctions.SetChatInteractable,
WindowSystem.RemoveAllWindows), plus the static-class cleanups
(EmoteCache.Dispose, InputHistoryService.Reset) stay outside the
container entirely.

This changes the teardown order versus v1.4.10: the container disposes
in reverse-registration order, which puts Windows ahead of IPC
services. The v1.4.10 ordering ("IPC before Windows so a final IPC
event cannot hit a half-torn ChatLogWindow") is no longer enforced.
Host.Dispose runs synchronously on the framework thread, so no
Framework.Update or Draw event fires during teardown; the remaining
risk is an external IPC plugin invoking a subscriber mid-dispose,
which is not something v1.4.10 actually prevented either.
2026-05-17 08:24:45 +02:00
JonKazama-Hellion 0fe66d2c3c fix(di): use factory lambdas for internal-ctor services
C3 bootstrap throws "A suitable constructor for type
HellionChat.Ipc.ExtraChat could not be located" because
Microsoft.Extensions.DependencyInjection's ActivatorUtilities only
binds to PUBLIC constructors via reflection. ExtraChat is a public
class with an internal ctor; Commands and StatusBar are internal
classes whose implicit default ctor inherits class accessibility
(internal); every IHostedService adapter is `internal sealed class
X(deps)` with a primary ctor that is also internal.

The fix routes all eight singletons and all seven hosted-service
adapters through factory lambdas. `new T(...)` inside the
PluginHostFactory namespace sees the internal surface, so the
container never has to reflect over internal ctors.
2026-05-17 08:20:02 +02:00
JonKazama-Hellion 169168cea9 feat(di): wire Plugin.cs to the DI container (DI-2a + DI-5)
Flips the container live. Plugin.ctor now builds the host after the
schema gate clears, pulls PluginLifecycle out of the container, and
backfills the Plugin.X static surface plus the instance properties
(11 services + 8 windows) so existing consumers reach the same
instances the container holds.

Plugin.LoadAsync gets thinner: service and window allocations are gone
(the container owns them), BuildFonts / Switch / FilterAllTabsAsync /
Initialize moved to their hosted-service adapters inside
Host.StartAsync, WindowSystem.AddWindow moved into
PluginLifecycle.LoadAsync on the framework thread. Plugin-internal
init (SelfTestRegistry, FirstRunWizard, SetupCommands +
Commands.Initialise, RetentionSweep, EmoteCache.LoadData, FTS5 rebuild
worker, UiBuilder.Disable*UiHide, AutoTranslate.PreloadCache,
Framework / Draw / LanguageChanged subscribes) stays in Plugin.LoadAsync
because each step reaches Plugin-private members or fields.

Plugin.DisposeAsync keeps the manual teardown for ordering (IPC before
windows, hooks first) and awaits _lifecycle.DisposeAsync at the end to
stop the host and dispose the container on the framework thread.
Double-disposes against container singletons are no-ops for the
services that hold real resources (Dispose idempotency is the standard
pattern).

PluginLifecycle takes Plugin as a constructor arg so it can iterate
the Window properties and call WindowSystem.AddWindow on the framework
thread; v1.4.9 Stage-2 verified that AddWindow's backing List<> is
not thread-safe.

Plan drift D4 noted: Plugin.cs ends at 1050 lines instead of the
150-220 vision because helper methods (MigrateFromChatTwoLayout,
SeedExampleThemeIfEmpty, RunRetentionSweepIfDue, FrameworkUpdate,
Draw, LanguageChanged, SetupCommands, slash handlers, FTS worker)
stay in Plugin.cs. Extracting them is DI-2b or a dedicated service
refactor in v1.5.1+. C3 still hits the DI-2a goal: bootstrap is
container-driven and LoadAsync is allocation-free.

PlatformUtil and LogProxy keep the manual `new` for now; C5 (DI-3)
removes those once C3 stabilises in the smoke test.
2026-05-17 03:34:34 +02:00
JonKazama-Hellion f6d3794d87 feat(di): scaffold Microsoft.Extensions.Hosting container (DI-1 + DI-1b)
Lays down the DI foundation that v1.5.x will run on top of, without
flipping the switch on Plugin.cs yet (that move follows in C3). The new
files compile alongside the existing bootstrap but no caller resolves
the host, so the live behaviour is byte-identical to v1.4.10.

What's new:

- PluginHostFactory.cs: HostBuilder.Build(plugin, dependencies)
  registers ~46 services across Block A (21 Dalamud singletons), Block
  B (14 HellionChat services plus FileDialogManager), Block C (8
  windows), plus Plugin and PluginLifecycle. Service-class bodies are
  untouched - Plugin-backref ctors go through factory lambdas.
- PluginLifecycle.cs: thin IAsyncDisposable wrapping the host's
  StartAsync/StopAsync, with idempotent dispose and framework-thread
  Host.Dispose. The Host is assigned via a property setter from
  Plugin.ctor; HellionChat deviates from Lightless' Func-delegate
  pattern because the schema gate must run before Build.
- Infrastructure/Logging/{DalamudLogger, DalamudLoggingProvider,
  DalamudLoggingProviderExtensions}.cs: ILogger<T> -> IPluginLog
  bridge, ported from Lightless without the mod-sync hasModifiedGameFiles
  flag and without the LightlessConfigService log-level coupling.
- Infrastructure/Hosting/InitHostedServices.cs: seven IHostedService
  adapters around the existing init methods (FontManager.BuildFonts,
  ThemeRegistry warmup+switch, IpcManager/TypingIpc/ExtraChat eager
  resolve, MessageManager.FilterAllTabsAsync, AutoTellTabsService
  .Initialize). Adapter style rather than inlining ": IHostedService"
  on the service classes per the DI-2a "service bodies untouched"
  constraint.

Plan drift noted for cycle closure: MessageStore stays inside
MessageManager.ctor (not a standalone container singleton) because
MessageManager.ctor allocates it directly today; promoting it would
double-construct the SQLite handle. AutoTellTabsService reads it via
MessageManager.Store inside its factory lambda.
2026-05-17 02:44:54 +02:00
JonKazama-Hellion 763f5a3f5d chore(deps): add Microsoft.Extensions.Hosting et al. for DI foundation
Prepares the v1.5.0 DI-container adoption (Lightless pattern) by adding
four MS.Extensions packages as direct closed-range references:

- Microsoft.Extensions.Hosting (IHost, HostBuilder)
- Microsoft.Extensions.DependencyInjection (IServiceCollection)
- Microsoft.Extensions.Logging (ILogger<T> for DI-4 logger migration)
- Microsoft.Extensions.Options (transitive used by Hosting + future config)

Closed-range [10.0.7, 11.0.0) matches the existing pinning style for
MessagePack/Pidgin/ImageSharp and locks the major version while letting
Renovate roll minor and patch updates. Lock file regenerated.
2026-05-17 02:29:41 +02:00
JonKazama-Hellion 8a18f7caaa fix(chat-input): replace input on slash-command insert
Cherry-pick from ChatTwo upstream ee7768ac (Infiziert90, 2026-05-16):
when args.AddIfNotPresent or args.Input starts with '/', replace the
chat input instead of appending. Fixes the Friend-List "/tell" path
where existing text like "test" would otherwise concatenate to
"test/tell user@world" before the receiver and channel resolve.

Variable drift versus upstream: HellionChat uses local 'Chat' where
ChatTwo uses InputHandler.ChatInput; logic is 1:1.
2026-05-17 02:26:03 +02:00
JonKazama-Hellion 5f7bfb5890 fix(preflight): avoid jq SIGPIPE race in verify-changelog-sync
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 31s
The Block C check used `jq -r '.[0].Changelog' | grep -qE ...` to spot
the **vX.Y.Z** marker. With `set -o pipefail`, grep -q closing stdin on
the first match makes jq trip SIGPIPE on the rest of the multi-KB
Changelog string, which the script then surfaces as a false-positive
"Changelog missing **vX.Y.Z** subblock" failure. Interactive shells
sometimes raced through fast enough to hide the issue, but the pre-push
runner hit it reliably (saw it on the v1.4.10 release-cut push attempt).

Switched the pipe to a process substitution so jq writes into a FIFO
and SIGPIPE never enters the picture. Both directions of the marker
check now stay deterministic.
2026-05-16 14:08:19 +02:00
JonKazama-Hellion 3be4e73c27 Merge feature/v1.4.10 — Symbol-Picker and Tell-History Fix
Forge Announce / Post changelog to Hellion Forge (push) Successful in 7s
Release / Build and attach release ZIP (push) Successful in 37s
2026-05-16 14:04:20 +02:00
JonKazama-Hellion 667950c98e docs: add v1.4.10 forge announcement post and apply csharpier reflow
Forge-Post is required in the tagged tree so forge-announce.yml can read
it during the release-pipeline run. Plus a csharpier reflow on two files
(SymbolPicker.cs, ChatLogWindow.cs) that preflight Block E flagged after
the cycle's comment-tightening sweep — purely whitespace, no behaviour
change.
2026-05-16 14:01:17 +02:00
JonKazama-Hellion 3e91177833 release: bump to v1.4.10 2026-05-16 13:25:53 +02:00
JonKazama-Hellion 51f18e46a0 chore(comments): tighten v1.4.10 inline commentary after self-review
Five trim spots from the cycle's earlier commits — none change behaviour,
just drop redundant phrasing and stale references per the HellionChat
comment-style convention (1-3 lines default, link "same as X" instead of
repeating, file:line refs only where they aid navigation).

SymbolPicker:
- BmpWhitelist header consolidated to source + filter ranges
- ImRaii.Popup pattern links the established ChatLogWindow popup idiom
  instead of citing three call-sites
- ToIconString comment drops the "discoverability" footnote that the
  code already telegraphs
- Manually-wrapping comment drops the "same modern idiom" tail that
  duplicated the preceding sentence

MessageStore:
- Merge the stale pre-v1.4.10 sqlScanLimit comment with the new
  v1.4.10 commentary; the cap mention now describes the historical
  reason rather than a parameter that no longer exists
2026-05-16 12:49:01 +02:00
JonKazama-Hellion f66316161b fix(autotells): preload tell history fully up to the user-configured limit
PreloadHistory had a hardcoded 500-row SQL scan window that capped the
per-partner history pull regardless of the AutoTellTabsHistoryPreload
setting. For active users with many tell partners, the scan window
filled up with chatter from other partners and pushed less-frequent
partners' history off the back end — pinned tabs reloaded empty even
though the messages were still in the database.

Drops the hardcoded scan cap. The (Receiver, Date) index keeps SQL fast
on the now-unbounded read, and the client-side loop still breaks as
soon as the configured per-tab limit is hit, so decode cost stays
proportional to the depth at which `limit` matches accumulate (typically
shallow even for chatty users).
2026-05-16 12:16:08 +02:00
JonKazama-Hellion 679b8f0f5e feat(settings): toggle for the symbol-picker chat-input button
Adds a Configuration property, defaulted to enabled, and a checkbox in
the Chat settings tab's Behaviour section. Strings live in HellionStrings
so DE/EN stays in sync. Defaults aligned with our 'discoverable by
default, hidden by user choice' convention. Schema stays at v17 — the
new boolean is additive, the default constructor covers existing configs.
2026-05-16 10:05:37 +02:00
JonKazama-Hellion 0e470fcdce feat(ui): SymbolPicker BMP tab and session-only recents
Second tab exposes the server-verified BMP whitelist (round-tripped via
/echo and /say in the v1.4.10 preflight). Recent-used row at the top
floats the user's last sixteen picks across both tabs, move-to-front
on reuse. Recents stay session-only by design — no Configuration touch,
schema unchanged.
2026-05-16 09:27:58 +02:00
JonKazama-Hellion abbbf95002 feat(ui): add SymbolPicker popup with FFXIV icon tab
New popup attached to the chat input lets the user browse and insert
Dalamud SeIconChar glyphs (161 PUA codepoints, server-safe by design).
Search field filters by enum name. Multi-insert keeps the popup open
until the user clicks elsewhere. BMP tab follows in the next commit.
2026-05-16 01:11:12 +02:00
JonKazama-Hellion fbbbeebade refactor(commands): cache slash-command wrappers in private fields
TearDownCommands attached the same instance via re-Register with identical
args, which was functionally a no-op but masked a latent bug if Description
or ShowInHelp ever diverged between Setup and Teardown. Hold the wrapper
instances as nullable fields so Teardown can detach the live registration
directly. Mirrors the cached-wrapper pattern in ChatLogWindow.
2026-05-15 20:18:41 +02:00
JonKazama-Hellion 7c9b90c767 Merge feature/v1.4.9 — Plugin-Load Render Polish
Security / scan (push) Successful in 22s
Build / Build (Release) (push) Successful in 31s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 7s
Release / Build and attach release ZIP (push) Successful in 36s
2026-05-15 13:35:37 +02:00
JonKazama-HellionandClaude Opus 4.7 b81894b859 docs: surface the ChatTwo IPC compatibility layer in v1.4.9 patch notes
Adds a "ChatTwo IPC compatibility layer" bullet across all six
release-note surfaces so the new behaviour from commits 8c4afaa and
655c903 is visible to users via the manifest installer, the Gitea
release page, the README project-status section, the changelog/roadmap
docs and the Forge-Discord announcement.

Files touched:
- HellionChat/HellionChat.yaml: bullet added inside the v1.4.9
  changelog block, preserved order so the regression-tripwire line
  still comes before the migration-stays line.
- repo.json: Changelog field kept synchronous (JSON-escaped newlines).
- README.md: project-status paragraph extended with a one-sentence
  recap of the IPC mirror and the conflict-detection caveat.
- docs/CHANGELOG.md: bullet inserted between the profiling-logs and
  migration-stays bullets, code-fenced gate names.
- docs/ROADMAP.md: v1.4.9-released section gets the same recap so the
  cycle history stays self-describing.
- .github/forge-posts/v1.4.9.md: German-only bullet for the Discord
  embed, slotted before the migration-v17 bullet. Char-cap holds —
  preflight Block C reports the embed total well under 5500 chars.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 13:04:18 +02:00
JonKazama-HellionandClaude Opus 4.7 655c903cb5 feat(ipc): mirror context-menu IPC gates under ChatTwo namespace (v1.4.9 R4 ext)
Extends commit 8c4afaa: the TypingIpc mirror covered only two of the six
ChatTwo IPC slots. Third-party plugins like Artisan and AllaganTools
subscribe to a different ChatTwo IPC surface — the context-menu
integration (ChatTwo.Register / Unregister / Available / Invoke) that
lets them push item-links into the chat. Smoke test against the
deployed v1.4.9 build showed Artisan logging "Chat2 is not available"
because those four gates were not yet mirrored.

This commit adds the missing four ChatTwo-prefixed provider gates in
IpcManager.cs:

- ChatTwo.Register  (Func<string>) — bound to the existing Register()
  backing method, so plugins that subscribe via either namespace land
  in the same Registered list.
- ChatTwo.Unregister (Action<string>) — bound to the existing
  Unregister() backing method, same shared-state rationale.
- ChatTwo.Available (Action<>) — SendMessage() fires from the ctor right
  after AvailableGate.SendMessage(), so any subscriber waiting on the
  "Chat 2 became available" signal sees both events.
- ChatTwo.Invoke (Action<string, PlayerPayload?, ulong, Payload?,
  SeString?, SeString?>) — Invoke() fans the context-menu event out to
  both InvokeGate and ChatTwoInvokeGate in lockstep. Subscribers compare
  on the registration ID they got back from Register, so the
  shared-backing approach keeps that contract intact regardless of which
  namespace they subscribed under.

Dispose() unregisters all four ChatTwo gates plus the four existing
HellionChat gates. The conflict-detection that prevents ChatTwo from
loading alongside HellionChat guarantees no slot collision at runtime.

With this commit the full ChatTwo IPC surface (6 of 6 slots) is mirrored:
- ChatTwo.GetChatInputState     (TypingIpc, commit 8c4afaa)
- ChatTwo.ChatInputStateChanged (TypingIpc, commit 8c4afaa)
- ChatTwo.Register              (IpcManager, this commit)
- ChatTwo.Unregister            (IpcManager, this commit)
- ChatTwo.Available             (IpcManager, this commit)
- ChatTwo.Invoke                (IpcManager, this commit)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 13:01:12 +02:00
JonKazama-HellionandClaude Opus 4.7 8c4afaac17 feat(ipc): mirror TypingIpc provider slots under ChatTwo namespace (v1.4.9 R4)
HellionChat replaces ChatTwo (conflict detection prevents parallel loading)
but third-party plugins with a no-fork policy keep subscribing only to the
ChatTwo.*-prefixed IPC gates. Mirroring the two TypingIpc provider slots
under the ChatTwo namespace lets those plugins keep working without code
changes on their side.

Mirrored slots:
- ChatTwo.GetChatInputState  ←→ HellionChat.GetChatInputState
- ChatTwo.ChatInputStateChanged ←→ HellionChat.ChatInputStateChanged

Implementation:
- Two additional ICallGateProvider fields (ChatTwoStateQueryGate +
  ChatTwoStateChangedGate) with the identical ChatInputState tuple
  signature. The tuple's underlying types match ChatTwo's surface byte-
  for-byte (bool/bool/bool/bool/int/ushort — ChatType is `ushort` in both
  repos), so Dalamud's IPC marshalling matches across plugin boundaries
  even when the subscribing plugin defines its own copy of the ChatType
  enum.
- ctor registers the new provider gates and binds RegisterFunc(GetState)
  to ChatTwoStateQueryGate so query calls route to the same backing path.
- Update() pushes the state to both ChatTwoStateChangedGate and the
  existing StateChangedGate in lockstep.
- Dispose() unregisters both query gates.

Ipc/ExtraChat.cs is intentionally unchanged — it is a subscriber on
ExtraChat's own IPC, not a provider, so no compatibility mirror applies.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:47:06 +02:00
JonKazama-HellionandClaude Opus 4.7 c6a3780753 docs: add v1.4.9 changelog and forge announcement post
Synchronises the v1.4.9 changelog across the manifest sources that the
Dalamud plugin installer, the gitea repo.json feed and the Forge auto-
announce workflow read at release-tag time.

Files touched:
- HellionChat/HellionChat.yaml: v1.4.9 block inserted at the top of the
  changelog: literal. v1.4.5 dropped to keep the slim-rule at 4 subblocks
  (preflight Block C enforces YAML_VERSIONS <= 4). Current set is
  v1.4.9/v1.4.8/v1.4.7/v1.4.6.
- repo.json: Changelog field kept synchronous with the yaml — v1.4.9
  block prepended, v1.4.5 substring removed, JSON-escaped newlines.
- .github/forge-posts/v1.4.9.md: new file with frontmatter (subtitle
  "Plugin-Load Render Polish", versionsnatur "Performance-Patch") and
  a German-only body. The English half of the eventual Discord embed
  is pulled automatically from the yaml changelog at tag-push time by
  .gitea/workflows/forge-announce.yml — same workflow as v1.4.4
  onwards, the post file does not carry an English block.

Char-cap pre-check passes (title 46 + description ~2700 + footer 33 =
~2800 chars, well under the 5500-char Discord embed total cap).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 11:51:25 +02:00
JonKazama-HellionandClaude Opus 4.7 d9f6704316 chore: bump version to 1.4.9, sync manifest
Manifest version bump for the v1.4.9 release cut. Schema-required v16
stays unchanged (R1/R2/R3 are all config-neutral refactors).

Files touched:
- HellionChat/HellionChat.csproj: <Version> 1.4.8 -> 1.4.9
- HellionChat/Plugin.cs: schema-migration error string self-reference
  (v1.4.8 -> v1.4.9, required schema v16 stays)
- repo.json: AssemblyVersion, TestingAssemblyVersion, 3x DownloadLink*
  URLs all bumped to 1.4.9 / v1.4.9. Changelog field is still on v1.4.8;
  the v1.4.9 block plus v1.4.5 slim-drop land in the next commit.
- README.md: shield badge, version header in lead paragraph, project-
  status block rewritten for v1.4.9 (Plugin-Load Render Polish).
- docs/CHANGELOG.md: v1.4.9 block inserted above v1.4.8.
- docs/ROADMAP.md: v1.4.9 moved into the released-versions list,
  "Next Cycle" header now targets v1.4.10 (Render Clipper + Symbol
  Picker reserves carried over from the v1.4.9 plan).

yaml changelog block and repo.json Changelog field follow in the
docs commit so the slim-drop of v1.4.5 stays atomic with the v1.4.9
block insert.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 11:31:35 +02:00
JonKazama-HellionandClaude Opus 4.7 011490368b perf(draw): defer non-essential first-frame rendering (v1.4.9 R2)
Cut first-frame HITCH from ~127ms median down to ~76ms median (4-reload
sample, threshold lowered to 1ms for measurement) — comfortably under
Dalamud's 100ms warning threshold. ChatTwo upstream sits at ~63ms median
for comparison; the remaining ~13ms gap is the cost of HellionChat-only
features (Sidebar tab view, custom StatusBar, Honorific integration).

Mechanism: a single `_firstFrameDone` flag (flipped in Draw's finally
block) gates six sections that don't need to render on frame 0:

  - StatusBar.Draw (~12ms): the bottom status bar
  - DrawChannelName chunks (~17ms): SeString-Renderer layout, replaced
    with a plain-text fallback (activeTab.Name) for frame 0
  - PositionReset/BoundsCheck (~10ms): EnsureWindowOnScreen viewport
    iteration, only matters once the user notices a mispositioned window
  - DrawV061HintBannerIfNeeded (~3-5ms): v0.6.1 migration notice
  - DrawAutoComplete (~6ms): renders nothing until the user types a command
  - InputPreview.CalculatePreview (~3-5ms): triggers InputPreview first-
    frame lazy init, user-typing-driven anyway

Frame 1 then renders all of them in ~40ms (still well under the warning
threshold), and frames 2+ stay at 0ms as before. User sees the deferred
sections ~17ms (60fps) later than before — invisible inside the ~2.5s
Atlas-Build window after every plugin reload.

Hypothesis triage from the R2-profiling pass:
  - (a) Atlas-Sync-Fallback: falsified. xllog shows the Atlas-Complete
    line always lands ~2.5s before the HITCH frame.
  - (b) Theme-Apply ABGR-Cache-Init: not dominant. PushGlobal is 5ms.
  - (c) Multiple-Window-Render: falsified in v1.4.9 Stage-2-Lazy-Init
    diagnose (deferred 4 windows, no measurable delta).
  - (d) DrawList-Setup-Cost per Window: actual root cause. Layout cost
    distributes evenly across ~10 ImGui sections inside ChatLogWindow
    (5-20ms each). No single hot-spot to optimise — the six selective
    skips above are the pragmatic fix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 10:14:13 +02:00
JonKazama-Hellion 8ed10a536b refactor(plugin): centralise slash-command registration for lazy-window readiness (v1.4.9 R1 stage 1)
Pull the four user-triggered slash-commands (/hellion, /hellionView,
/hellionDebugger, /hellionSeString) plus the two Plugin-Manager
UiBuilder hooks (OpenConfigUi, OpenMainUi) out of their window
constructors and into a central Plugin.SetupCommands method so they
work before their target window has been opened the first time. A
matching TearDownCommands runs as the first CaptureFailure inside the
framework-thread teardown lambda. /hellion and /hellionSeString stay
under the same #if DEBUG guard SeStringDebugger had before. The four
window classes keep their public Dispose method signatures so the
existing Plugin.DisposeAsync method-group binding still resolves —
the bodies are now empty pointers to TearDownCommands. The pre-v1.4.9
`OpenMainUi` body that flipped SettingsWindow.IsOpen and the three
private Toggle(string, string) method-group wrappers are gone since
the central handlers call SettingsWindow.Toggle() / DbViewer.Toggle()
etc. directly.

The properties stay eager in stage 1 — the lazy-init switch lands in
stage 2 with the matching `_lazyWindowLock` guard around AddWindow
and RemoveAllWindows. Doing it in two commits keeps the slash-command
correctness verifiable on its own.

Smoke (release build): /hellion, /hellionView, /hellionDebugger,
/clearhellion plus Plugin-Manager Settings and Open buttons all
toggle their target window. /hellionSeString remains DEBUG-only as
before.
2026-05-15 00:28:18 +02:00
JonKazama-Hellion 6051e49307 chore(profiling): instrument plugin-load hot paths (v1.4.9 R3)
Bump AutoTranslate-warmup and FilterAllTabs log-level from Debug to
Information so the xllog tail surfaces them without a Debug filter.
Wrap MessageStore.Connect and MessageStore.Migrate in Stopwatches so
the SQLite open and migration-chain costs are visible too.

Sub-Task 3.4 Befund on v1.4.8-baseline (4 reloads, medians):
- MessageStore.Connect: 50.5 ms
- MessageStore.Migrate:    2 ms
- MessageManager.FilterAllTabs: 68.5 ms
- AutoTranslate warmup:  108 ms
- UiBuilder HITCH:       108.9 ms

Outcome D — none of the three dominates the 200 ms threshold. The
ChatTwo "300 ms" comment for AutoTranslate is falsified at ~108 ms;
SQLite is not the bottleneck (52.5 ms total); FilterAllTabs runs on
the worker thread and only competes for CPU slots. The HITCH is left
unexplained by these probes, which keeps Hypothesis c (multi-window
WindowSystem.Draw initial pass) as the main R2 suspect to be
validated by the R1 lazy-window refactor.

Logs stay in as belt-and-suspenders for future plugin-load
regressions.
2026-05-14 23:33:56 +02:00
JonKazama-Hellion 55120e6572 Merge branch 'feature/v1.4.8'
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 29s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 7s
Release / Build and attach release ZIP (push) Successful in 37s
2026-05-14 12:12:06 +02:00
JonKazama-Hellion 7542d48983 perf(dbviewer): dispatch FTS filter to worker thread
FullTextSearch + LoadByGuids could stall the draw thread for 100-300 ms
on large databases with a popular search term. The two hot trigger sites
(FTS toggle, search input) now route via TriggerFilterRefresh, which
dispatches the FTS path to Task.Run; the in-memory page-filter path
stays inline because it is sub-ms on the loaded page array.

_ftsFilterSeq is bumped per trigger so a late worker recognises itself
as stale and drops its result instead of overwriting a newer one. The
date/channel and history workers already lived on Task.Run and are
untouched.

Surfaced during the v1.4.8 pre-tag review.
2026-05-14 11:48:40 +02:00
JonKazama-Hellion 7b36763359 docs: add v1.4.8 changelog and forge announcement post
- HellionChat.yaml: v1.4.8 changelog block above v1.4.7, v1.4.4
  dropped per slim-rule (verify-changelog-sync enforces max 4).
- repo.json: Changelog field synchronised with yaml, same slim-drop.
- .github/forge-posts/v1.4.8.md: bilingual announcement post (DE
  body, EN block resolved from yaml at workflow time). Frontmatter
  subtitle 32/60 chars, versionsnatur 12/40 chars, embed total
  ~2787/5500 chars.
2026-05-14 10:51:50 +02:00
JonKazama-Hellion eecedd9f97 chore: bump version to 1.4.8, sync manifest
- csproj <Version>, Plugin.cs schema-gate self-reference, repo.json
  (AssemblyVersion, TestingAssemblyVersion, 3x DownloadLink URLs).
- README.md shield badge, version header, Project Status body.
- docs/CHANGELOG.md gains a v1.4.8 section above v1.4.7.
- docs/ROADMAP.md flips Next Cycle to v1.4.9 (Plugin-Load Render
  Polish), v1.4.8 moves into the released history above v1.4.7.
- Config schema stays at v17, Migration v17 stays additive.

repo.json Changelog field and HellionChat.yaml changelog block plus
the new forge-posts/v1.4.8.md follow in a separate commit (slim-drop
of v1.4.4 happens there).
2026-05-14 10:28:51 +02:00
JonKazama-Hellion 1003a88cad fix(messagestore): match TEXT-stored UUID form in FTS bulk insert and LoadByGuids
messages.Id is declared BLOB but stored as TEXT because Microsoft.Data.Sqlite
binds Guid parameters as UUID strings (UpsertMessage uses AddWithValue with
a Guid). RebuildFtsIndex cast reader.GetValue(0) to byte[] and threw
InvalidCastException at the first row. LoadByGuids bound byte[] params
against the TEXT-stored Id and would have returned no rows once the index
had built.

- RebuildFtsIndex reads via GetGuid and stores ToString() in
  messages_fts.message_guid.
- LoadByGuids parses incoming UUID strings and binds them as Guid so
  Microsoft.Data.Sqlite re-serialises to TEXT, matching the messages.Id
  storage form.
- DbViewer caller variable renamed hexIds -> guidHits for clarity.
2026-05-14 09:58:58 +02:00
JonKazama-Hellion 299fd59cbb refactor(retention): use Framework.RunOnTick instead of synchronous .Wait()
Retention sweep no longer blocks for ~194ms on Framework.Run().Wait().
The clear+refilter pair is now scheduled on the next framework tick, so
it still runs on the framework thread (keeping the Tabs-list mutation
serialisation invariant -- Plugin.Config.Tabs is plain List<Tab> and
AutoTellTabsService can mutate it from background paths) but does not
block the sweep thread while the framework finishes the current frame.

A new _isDisposing volatile bool is set as the first statement in
DisposeAsync so a deferred tick that fires after teardown bails before
it touches MessageManager / Log / static fields the dispose path has
already cleared. The retention worker is IsBackground=true so plugin
unload can race against a still-pending tick.

The existing RetentionSweepLock / RetentionSweepRunning serialisation
covers the not-two-sweeps-at-once invariant; we don't add a CTS here
because RunOnTick is fire-and-forget and the framework service owns
the tick lifecycle.

v1.4.8 B3. Coverage via in-game smoke (frame-time trace during a
retention sweep run) in Task 9 -- no Build-Suite test because the
suite has no FakeFramework fixture and the change is a schedule-form
swap rather than new behaviour.
2026-05-14 00:00:53 +02:00
JonKazama-Hellion 74bcb91b65 feat(themes): auto-reload active custom theme on disk change
When the user edits their active custom theme JSON in an external editor
and saves, the change now propagates to HellionChat within ~1 second
without re-selecting the theme in the picker.

RefreshActiveIfStale runs from Plugin.Draw on every frame but the actual
File.GetLastWriteTimeUtc stat is 1Hz-throttled -- 60fps would otherwise
mean 3600 stats/min, more on Wine. Built-in themes short-circuit on the
IsBuiltIn check; custom themes without a captured source path (Switch
fell to default) short-circuit on the null check.

Switch() now captures the source path of custom themes via an out-param
on LoadCustomBySlug, which now reverse-looks-up against the existing
_customCache (no re-parse, no extra disk IO). Plugin.LoadAsync warms the
cache via AllCustom() once before the first Switch so a Config.Theme
pointing at a custom slug does not fall through to the built-in default
on a cold registry.

Switch's lookup order is now built-in-first to match Get(slug), so a
user-authored JSON that declares a built-in slug is consistently
ignored in both code paths.

Pure-helper ThemeStampDiff isolates the stamp-diff rules for the
Build-Suite (covers DateTime.MinValue hold-the-line semantics).

v1.4.8 B2.
2026-05-13 23:22:14 +02:00
JonKazama-Hellion 2c64aaa251 fix(statusbar): make height DPI-aware via GetTextLineHeightWithSpacing
Replace the fixed 22px const Height with a computed property that bakes
in the ImGui font line height plus a GlobalScale-rounded 2px spacer.
The constant clipped the bottom bar on Windows display-scaling >100%
because ImGui rendered the actual font taller than 22px; the bar then
got pushed off the window edge.

ChatLogWindow.cs:423 reservation drops the explicit +2 because the
spacer now lives inside Height. Same idiom as the v1.4.6 F7.2 underline
pill in ChatLogWindow.cs:1639-1653.

v1.4.8 B1. Coverage via in-game smoke on Windows (Jin) and Linux/Wayland
in Task 9 -- DrawList-coupled, no Build-Suite test.
2026-05-13 22:42:40 +02:00
JonKazama-Hellion 607d2c7241 feat(dbviewer): full-text-search toggle wired to FTS5 query API
New UseFullTextSearch transient UI bool flips DbViewer.Filter() between
the existing local page filter (default) and the FTS5 MATCH path across
the whole database. ImRaii.Disabled blocks the toggle while the bulk-insert
worker is still building the index; the HelpMarker swaps between two
hints, one for the indexing state and one for the phrase-match advisory
once the index is ready.

Three new HellionStrings entries cover EN + DE + the Designer accessor:
- DbViewer_FullTextToggle (label)
- DbViewer_FullTextToggle_Hint_Indexing (tooltip while indexing)
- DbViewer_FullTextToggle_Hint_PhraseMode (tooltip once ready, warns
  multi-word terms match as phrases and how to opt into raw MATCH syntax)

Filter() short-circuits to the local fallback if the toggle is on but
ftsReady has flipped back to false -- defensive against a mid-session
Dispose-and-reopen during indexing.

v1.4.8 H2 Sub-Task 4.4.
2026-05-13 22:08:32 +02:00
JonKazama-Hellion b2a0f3a77c feat(messagestore): add FullTextSearch + LoadByGuids with MATCH-syntax escape
Two new public query methods plus an internal EscapeFtsTerm helper:
- FullTextSearch(term, limit) runs MATCH against messages_fts and returns
  hex-encoded GUIDs sorted by FTS5 rank. Empty/whitespace short-circuits
  to an empty list so callers can fall back to the local page filter.
- LoadByGuids(hexIds) resolves the hex GUIDs back to Message rows via
  WHERE Id IN (...). Chunked at 500 to stay below SQLite's 999-parameter
  cap, and the BLOB-PK autoindex means the join is O(log n) per id.
- EscapeFtsTerm wraps user input in double-quotes so multi-word queries
  match as a phrase, not as per-word AND. Users opt into raw MATCH
  syntax by writing their own quotes.

Plus _readLock serialises every Connection-touching internal method
(UpsertMessage, MessageCount, all readers, retention writers, etc.).
The DbViewer filter worker now runs FullTextSearch on a Task.Run thread
while the PendingMessageThread keeps calling UpsertMessage; SqliteConnection
is not safe for concurrent use, so this single lock is the minimal
architecture change that closes the race. The Lazy-Enumerator methods
(StreamForExport, GetDateRange, GetPagedDateRange) hold the lock only
through command-setup + ExecuteReader; v1.4.8 doc-notes the caveat for
the v1.5.x DI cycle to address with a snapshot-to-list or connection pool.

RebuildFtsIndex stays outside the lock -- it owns its own SqliteConnection
via OpenSecondaryConnection.
2026-05-13 21:27:17 +02:00
JonKazama-Hellion d26c4701fa feat(messagestore): async background FTS5 bulk-insert with progress notification
Adds the worker that fills the messages_fts virtual table after Migrate4.
The bulk-insert runs off the framework thread on its own SqliteConnection
opened via OpenSecondaryConnection -- WAL lets the live UpsertMessage
path on the primary Connection keep flowing, and the worker's writer
lock yields every 500 rows with a 5ms breather so PendingMessageThread
does not hit "database is locked" after DefaultTimeout=5s.

InitFtsReadyCache runs in the ctor and short-circuits to ready=true when
the index is already populated or when the messages table is empty. The
DbViewer (Task 4.4) reads IsFtsIndexBuilt per frame as a single volatile
field read.

Plugin.cs LoadAsync kicks the worker after FilterAllTabsAsync, gated on
IsFtsIndexBuilt and a CancellationTokenSource that DisposeAsync cancels
before MessageManager tears down. Progress reports back via IActiveNotification,
marshalled onto the framework thread via Framework.RunOnTick. Success path
finishes the notification as Success with a 5s linger; cancellation
dismisses it; an error swaps the type to Error with a fallback hint.
2026-05-13 20:38:05 +02:00
JonKazama-Hellion 7f317a2b18 refactor(messagestore): extract BuildConnectionString and ApplyPragmas helpers
Pre-step for the v1.4.8 FTS5 bulk-insert worker. The worker opens its
own secondary SqliteConnection on the same db path so the WAL journal
lets parallel reads/writes through, and it has to apply the exact same
connection-string options and PRAGMAs as Connect() -- otherwise the
worker connection drifts the moment Connect grows a new pragma.

Splitting BuildConnectionString + ApplyPragmas out lets both Connect()
and the upcoming OpenSecondaryConnection() share the same source of
truth instead of duplicating the body. No behaviour change.
2026-05-13 20:31:43 +02:00
JonKazama-Hellion 38149059c3 feat(messagestore): add Migrate4 with standalone FTS5 virtual table
Lays down a messages_fts virtual table with message_guid (UNINDEXED, hex
TEXT of the BLOB primary key), sender_text and content_text columns
using the unicode61 tokenizer with diacritic folding. Standalone FTS5
without content='messages' linking, because messages.Id is BLOB and
FTS5's content_rowid contract requires an INTEGER rowid alias.

LoadByGuids (Task 4.3) will resolve the hex GUIDs back to messages rows
via WHERE Id IN (...) joins. Schema step only -- the bulk-insert worker
that fills the index lives in Task 4.2.

Internal Connection property exposure plus a HasMessagesFtsTable helper
let the Build-Suite verify Migrate4 without raw PRAGMA glue in each test.

v1.4.8 H2 Sub-Task 4.1.
2026-05-13 19:51:54 +02:00
JonKazama-Hellion 67175419a9 refactor(messagestore): extract ReadMessageRow as shared deserialiser
Pure deserialisation helper that pulls one row from the current reader
position into a Message. The MessageEnumerator load path delegates to
it, and the upcoming FTS-join LoadByGuids (Task 4.3) will share the
same code so both stay in lockstep when the column layout shifts.

Pre-step for v1.4.8 H2 FTS5 full-text search.
2026-05-13 19:20:55 +02:00
JonKazama-Hellion d3fdcdf43d Merge branch 'feature/v1.4.7'
Security / scan (push) Successful in 23s
Build / Build (Release) (push) Successful in 30s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 7s
Release / Build and attach release ZIP (push) Successful in 39s
2026-05-13 11:07:32 +02:00
JonKazama-Hellion f4ea460644 chore: bump version to 1.4.7, sync changelog and forge post
- csproj <Version> -> 1.4.7
- repo.json AssemblyVersion + TestingAssemblyVersion -> 1.4.7.0
- repo.json DownloadLink{Install,Update,Testing} URLs -> /v1.4.7/
- repo.json + HellionChat.yaml changelog: prepend v1.4.7 block, retire
  v1.4.3 (slim rule keeps the last 3-4 versions)
- docs/CHANGELOG.md + docs/ROADMAP.md: v1.4.7 section, next-cycle
  pointer flipped to v1.4.8 Hook-Layer-Cycle
- README.md release badge + version stamps + Project Status block
  rewritten for v1.4.7
- .github/forge-posts/v1.4.7.md (new): DE body with subtitle
  "Backlog Cleanup and Mid-Features" / versionsnatur "Mid-Feature-Patch"
- Pin diagnostic logs (RehydratePinnedTabs / TryPin / Unpin /
  PromoteToPermanent) downgraded from Info to Debug so non-debug
  console stays quiet on release builds
2026-05-13 11:00:25 +02:00
JonKazama-Hellion d5735d8dcc fix(tabs): preserve runtime channel across Settings Save, deep-clone seeded CurrentChannel
Smoke-test round 4 surfaced a clean reproducer: a Party or Linkshell
tab with channel /p, then Settings → Save, popped the input back to
/tell <pinned-partner> on the next interaction. Two bugs combined:

1. Configuration.UpdateFrom captured only Messages+LastSendUnread from
   the live state during the persistent-tab merge. CurrentChannel was
   not preserved, so a Settings save overwrote the runtime channel
   state with the settings-time snapshot. If the user switched channel
   in-game between Settings-open and Settings-save, that switch was
   lost. Live CurrentChannel now joins Messages and LastSendUnread in
   the per-Identifier preservation tuple.

2. TabSwitched seeded a new tab's CurrentChannel from previousTab via
   reference copy (`newTab.CurrentChannel = previousTab.CurrentChannel`).
   That left both tabs sharing the same UsedChannel instance, so a
   later mutation on one bled into the other — exactly the path that
   carried a pinned tell-target onto Party. Switched to a deep clone
   (UsedChannel.Clone(), same Cherry-Pick-Patch-B pattern from v1.4.6)
   plus a Debug log so the next smoke can confirm at a glance which
   previous tab donated its channel state.

Pre-existing ChatTwo upstream pattern; v1.4.7 just made it visible
because pinned tabs are now the kind of long-lived tell-target that
sticks around for the seed path to grab.
2026-05-13 10:31:21 +02:00
JonKazama-Hellion 80b48ac3ad feat(sidebar): pinned section, dimmed pin glyph, configurable width
Smoke-test round 3 feedback from Jin:

- Sidebar now groups tabs into three sections rendered in this order:
  persistent → pinned TempTabs → unpinned TempTabs. Each TempTab
  section carries its own divider header ("Angepinnt (n)" / "Aktive
  Tells (n)"). Plugin.Config.Tabs order is untouched — only the
  display order changes, so tabI still mirrors the real index and
  LastTab/WantedTab stay consistent.

- The thumbtack glyph overlay on a pinned tab dropped from accent
  colour at full alpha to TextMuted at ~47% alpha. The section header
  is now the primary discoverability cue; the glyph is just a per-tab
  confirmation hint.

- Sidebar width is now a Config field (default 44, range 44-160).
  Slider lives in Theme & Layout under the existing Sidebar-Tab-View
  toggle. The icon button inside each row stretches with the width so
  a widened sidebar doesn't leave the icon floating in dead space.
2026-05-13 10:16:53 +02:00
JonKazama-Hellion cddd29a986 fix(tabs): pin indicator, history preload, drop Promote from temp menu
Smoke-test round 2 feedback from Jin:
- Promote-to-permanent label "Dauerhaft behalten" was indistinguishable
  from Pin in German, leading to misclicks that dropped the tell-target.
  Removed the menu entry from TempTabs entirely — Promote stays as a
  service method for future use, but the user-facing path is gone. Anyone
  who wants a regular tab can still create one via the existing
  "neuen Tab anlegen" flow.
- No visual confirmation that pin took effect. Added a FontAwesome
  thumbtack overlay top-left of the sidebar icon, accent-coloured, and
  appended a "Pinned — survives relog" line to the hover tooltip.
- Pinned tabs came back empty after a full disable/enable cycle because
  Tab.Messages is NonSerialized. RehydratePinnedTabs now also runs the
  same MessageStore-backed PreloadHistory the spawn path uses, so the
  recent conversation window reappears alongside the rehydrated
  TellTarget.

Diagnose-logging on TryPin/Unpin/Promote/Rehydrate stays in so the next
smoke can confirm at a glance which path fired from the Dalamud console.
2026-05-13 10:08:33 +02:00
JonKazama-Hellion 799fdb67cc fix(tabs): rehydrate pinned TempTab tell-targets after reload
Smoke-test (Jin's scenario) surfaced two coupled bugs in v1.4.7 pin
persistence:

1. The chat input couldn't send to the pinned partner after a reload.
   Tab.CurrentChannel is NonSerialized, so it came back as a fresh
   UsedChannel with TellTarget=null even though tab.TellTarget (the
   persisted twin) was intact. The game-side channel hook only repaints
   CurrentChannel on a /tell or channel switch, so the pinned tab sat
   there mute until the user manually re-bounced the channel.

2. An incoming tell from the pinned partner spawned a *second* TempTab
   instead of routing into the existing pinned one. The Name+World
   lookup in FindTempTab was vulnerable to any round-trip nuance on
   tab.TellTarget — the fallback path now matches by tab name, which
   FormatTabName pins at spawn time.

Fix:
- AutoTellTabsService.Initialize now calls RehydratePinnedTabs() after
  the Phase-2 wiring lands, seeding tab.CurrentChannel.TellTarget +
  Channel from the persisted tab.TellTarget. Channel is also defaulted
  to InputChannel.Tell on the tab record so the chat-input bar paints
  Tell mode immediately on first selection.
- FindTempTab gained a Name-based fallback for the case where the
  primary TellTarget lookup misses (e.g. a pinned tab whose TellTarget
  didn't round-trip cleanly through an old save).
- HandleTell self-heals: when the fallback matches a pinned tab with a
  missing TellTarget, the tab is repaired from the live partner data
  and persisted, so subsequent messages take the fast path.

Build-suite coverage was attempted (PinnedTabJsonRoundtripTests) but
Tab + TellTarget are both Dalamud-coupled — Newtonsoft's reflection
walk loads Dalamud.dll which isn't available in the xUnit AppDomain
(documented in feedback_dalamud_test_isolation). Verification stays on
the ingame smoke path.
2026-05-13 09:53:27 +02:00
JonKazama-Hellion 69fa0fecbd feat(honorific): render glow outline as opt-in (gradient deferred)
Honorific's TitleData carries Glow / Color3 / GradientColourSet /
GradientAnimationStyle beyond the Title + Color we parsed in Cycle 1.
The DTO now mirrors all four so the JSON roundtrip doesn't silently
drop fields.

Rendering for v1.4.7 covers Glow only: when Config.ShowHonorificGlow
is on and the title has a Glow colour, the chat header title gets an
8-direction ±1px draw-list outline pre-pass in the glow colour at 0.4
alpha, then the primary text on top.

Gradient (Color3 / GradientColourSet / GradientAnimationStyle) is parsed
and stashed for a later cycle — porting the full animation needs
Honorific's hardcoded Pride-palette list and GradientSystem.cs (or an
upstream IPC PR exposing the resolved frame colour). Tracked as
"Honorific Full Gradient Port" in the vault backlog.

ShowHonorificGlow defaults OFF — keeps v1.4.6 visuals untouched and
dodges per-frame DrawList overhead on low-end hardware. Tooltip flags
the gradient deferral so users aren't surprised by static rendering.
2026-05-13 09:34:43 +02:00
JonKazama-Hellion fd5f970a8b feat(tabs): add IsPinned with separate pool and 5-tab cap
Tester-Request from Jin (2026-05-03): TempTabs should be pinnable so a
key conversation partner survives a relog. Right-click a TempTab and
choose Pin Tab / Unpin Tab / Promote to permanent.

Pool semantics:
- AutoTellTabsLimit (15) still gates the auto-managed unpinned pool.
- Pinned TempTabs live in their own pool, hard-capped at 5.
- The 6th pin attempt fails with a notification; users can unpin first
  or promote to permanent.
- Unpinning into a full unpinned pool drops the oldest unpinned (no
  user friction).

Mechanics:
- Tab.IsPinned (default false); Tab.Clone() carries it.
- Migration v16 -> v17 (additive; existing tabs default to unpinned).
- Three strip-sites synchronised through TabLifecycleHelpers:
  Plugin.cs load-time, Plugin.SaveConfig, Configuration.UpdateFrom.
- AutoTellTabsService:
  * MaxPinnedTempTabs constant.
  * F2.1 _activeTempTabCount counter retired — ActiveTempTabCount is
    now Tabs.Count(predicate). Pin/Unpin/Promote transitions are
    cold-path and don't need lock-free reads.
  * DropOldestTempTab filters on IsInUnpinnedPool so pinned tabs are
    never drop candidates.
  * OnLogout strips only the unpinned pool; pinned popouts and the
    active-tab switch behave correspondingly.
  * TryPin / Unpin / PromoteToPermanent service methods.
- ChatLogWindow tab context menu: Pin / Unpin / Promote with disabled-
  state at-cap tooltip + Promote tooltip explaining the channel-filter
  side effect.
- HellionStrings (EN+DE) for menu labels, tooltips, the limit warning.
- AutoTellTabsLimit slider description now flags the separate pinned
  pool so users aren't surprised by 18 tabs when the limit reads 15.
2026-05-13 09:06:14 +02:00
JonKazama-Hellion fee2459e73 refactor(services): route logging through IPluginLogProxy
F12.2 step 5b — service cluster (~42 sites in 16 files):
MessageManager, GameFunctions/{Chat, GameFunctions, KeybindManager},
EmoteCache, PayloadHandler, AutoTellTabsService, FontManager, Commands,
Util/{WrapperUtil, AutoTranslate, MemoryUtil}, Message, Themes/ThemeRegistry,
Ipc/ExtraChat, Configuration.

The proxy interface gained Dalamud's params-overload signature
(messageTemplate + params object[]) to cover Configuration.cs:86 which
relies on Serilog-style placeholders.

Verified: zero remaining Plugin.Log.X(...) call-sites in HellionChat/,
build green, build-suite 690/690.
2026-05-13 08:38:40 +02:00
JonKazama-Hellion 63cad62c89 refactor(ui): route logging through IPluginLogProxy
F12.2 step 5a — UI cluster (~40 sites in 6 files):
ChatLogWindow, DbViewer, Popout, SettingsTabs/{DataManagement,
FontsAndColours, ThemeAndLayout}. Plugin.Log.X(...) → Plugin.LogProxy.X(...).
No behaviour change; the proxy delegates 1:1 to the original IPluginLog.
2026-05-13 08:22:12 +02:00
JonKazama-Hellion dca5de4085 refactor(messagestore): inject IPluginLogProxy for test isolation
MessageStore's Migrate0 (and the Migrate1/2/3 siblings) called
Plugin.Log.Information directly, which prevented an isolated xUnit
construction test from running — Dalamud.dll cannot load in the test
AppDomain. With IPluginLogProxy threaded through the ctor and the inner
MessageEnumerator, the whole MessageStore.cs file is now Dalamud-static
free and the Build-Suite covers it (Floor 688 -> 690).

This is the second half of F12.2; the remaining ~82 Plugin.Log call
sites in the rest of the plugin will be routed through the static
Plugin.LogProxy wrapper in a follow-up commit.
2026-05-13 08:15:20 +02:00
JonKazama-Hellion 8edc3c70d3 feat(util): add IPluginLogProxy interface and production wrapper
F12.2 closes the gap that F12.1 left open: MessageStore's ctor calls
Plugin.Log.Information inside Migrate0, which prevents an isolated xUnit
construction test (Dalamud.dll cannot load in the test AppDomain).

The proxy mirrors IPluginLog's full surface (Verbose/Debug/Information/
Info/Warning/Error/Fatal — both Info and Information as Dalamud exposes
them) with both single-string and Exception+string overloads, so the
~91 existing Plugin.Log.* call-sites become a drop-in rewrite to
Plugin.LogProxy.*.

A later DI-container adoption cycle (v1.5.x) may swap this for
Microsoft.Extensions.Logging's ILogger<T>; this commit is the
intermediate decorator step.
2026-05-13 08:11:34 +02:00
JonKazama-Hellion 3c33acf6d7 fix(util): pin operator precedence in DrawArrows IconButton id
`id + 1.ToString()` resolves as `id.ToString() + "1"`, producing "01"
instead of "1" for the ArrowRight button. The single live caller
(DbViewer page navigation) still produced unique IDs by accident, but
the semantics were wrong. Explicit parentheses fix it.
2026-05-13 08:08:52 +02:00
JonKazama-Hellion c8ba8c1cd0 docs: linting Docs
Security / scan (push) Successful in 22s
Build / Build (Release) (push) Successful in 29s
2026-05-12 22:41:54 +02:00
JonKazama-Hellion 94e4828aeb fix: update forge-announce.yml to use the correct branch
Security / scan (push) Successful in 21s
Build / Build (Release) (push) Successful in 27s
2026-05-12 22:33:53 +02:00
JonKazama-Hellion 1d88cb4c42 Merge feature/v1.4.6 — Code Hygiene and Refactor
Security / scan (push) Successful in 22s
Build / Build (Release) (push) Successful in 29s
Release / Build and attach release ZIP (push) Successful in 37s
Forge Announce / Post changelog to Hellion Forge (push) Failing after 7s
2026-05-12 21:28:29 +02:00
JonKazama-Hellion c5fe69f0d3 feat(themes): swap Moonlit Bloom for Crystal Nocturne, sort built-ins by colour family
Crystal Nocturne (royal sapphire + electric magenta on obsidian, by
CRYSTALLITE) replaces Moonlit Bloom in the built-in roster. The same
chat-channel tinting convention applies: sapphire-blue identity on
party/team channels, accent-magenta on tells, and an alternating
mint/yellow/peach palette across the eight linkshell slots so each
LS stays individually distinguishable on the dark obsidian background.

Users who had Moonlit Bloom selected fall back to the default Hellion
Arctic on the first plugin load. A custom JSON copy of Moonlit Bloom
dropped into pluginConfigs/HellionChat/themes/ keeps working as a
user theme.

Plus a cosmetic re-sort of the registry: insertion order now drives a
deliberate Theme-Picker grid layout (3 columns) — blue family in row 1,
purple to magenta in row 2, green/warm/classic in row 3, Synthwave
Sunset alone in row 4 as a retro bonus.
2026-05-12 21:28:16 +02:00
JonKazama-Hellion b46d3ad0a8 chore: bump schema-gate message to v1.4.6
Plugin.cs:171-172 hardcoded the version into the schema-gate
InvalidOperationException string. The follow-up rename in v1.4.7 will
move this to Plugin.Interface.Manifest.AssemblyVersion so this commit
stops happening every cycle, but for v1.4.6 the bare version bump is
the smallest change.

Also picks up a one-line csharpier reflow on UrlValidation.cs
collapsed by the format pass.
2026-05-12 20:59:56 +02:00
JonKazama-Hellion e33cf0dcb9 ci(forge): add v1.4.6 forge announcement post
DE body for the Hellion Forge Discord embed; subtitle and
versionsnatur frontmatter fields within the 60/40 char caps;
embed-total ~2267/5500 per the changelog-sync verifier.
2026-05-12 20:58:59 +02:00
JonKazama-Hellion 0d016aaa5d docs: log v1.4.6 release notes
CHANGELOG.md gets the full per-bullet block, ROADMAP.md gets the
released-cycle summary plus a v1.4.7 next-cycle placeholder, README
status section and version badge updated.
2026-05-12 20:58:57 +02:00
JonKazama-Hellion 5b972238bb chore: bump version to 1.4.6
csproj <Version>, yaml changelog block (v1.4.6 added on top, v1.4.2
rotated out per the slim-4-versions rule), repo.json AssemblyVersion
+ TestingAssemblyVersion + the three DownloadLink URLs + Changelog
string, all in sync.
2026-05-12 20:58:52 +02:00
JonKazama-Hellion 7ac1eb3fd4 fix(ui): pass measured width straight through IconButton, drop broken subtract
Inspired by ChatTwo upstream f35b7d3 (Infiziert90, 2026-05-12).

Upstream dropped the width parameter entirely because nothing called
it. We keep the parameter — two ChatLogWindow header buttons (Cog,
EyeSlash) size themselves to match the preceding ChannelIcon button.

The actual bug is local: the previous size = width - 2 * CellPadding.X
mixed a raw int (HUD-scale unaware) with CellPadding.X (HUD-scaled),
so the button shrank under elevated HUD scale. ImGui.Button handles
its own frame padding internally, so the measured width passes
through unchanged.
2026-05-12 20:42:17 +02:00
JonKazama-Hellion db48f27842 fix(chat): release Utf8String when linkshell check rejects channel
Cherry-pick from ChatTwo upstream f35b7d3 (Infiziert90, 2026-05-12).

Chat.SetChannel allocates a native Utf8String for the target name and
then runs a validity check. The previous early return on an invalid
linkshell skipped Dtor and leaked the native allocation; every invalid
linkshell switch added one Utf8String to the unmanaged heap.

- Renamed ValidAnyLinkshell to IsChannelOrExistingLinkshell so the
  call-site reads naturally.
- Wrapped ChangeChatChannel in the validity check instead of
  early-returning. Dtor now runs on every path.
- ChatLogWindow follows the rename at its single call-site.
2026-05-12 20:39:23 +02:00
JonKazama-Hellion f8b5c14509 fix(config): deep-clone UsedChannel and TellTarget in Tab.Clone
Cherry-pick from ChatTwo upstream f35b7d3 (Infiziert90, 2026-05-12).

Tab.Clone() used to assign CurrentChannel = CurrentChannel and run
TellTarget.From(TellTarget). The first was a plain reference copy of
the UsedChannel — the clone and the source shared the same channel
state, so a channel switch or TellTarget update on a PopOut/Temp tab
also mutated its origin tab. The second was a static factory call
that read like a constructor where every other place uses Clone().

- TellTarget: static From(t) replaced by instance Clone(); only
  call-site swapped to TellTarget.Clone().
- UsedChannel: new Clone() that copies the scalar fields and runs
  Clone() on the two TellTarget references (null-safe).
- Tab.Clone(): CurrentChannel goes through UsedChannel.Clone().
2026-05-12 20:38:12 +02:00
JonKazama-Hellion 28e4b30cd6 refactor(ui): route OpenLink call-sites through Plugin.PlatformUtil (F12.1)
Ten Util.OpenLink call-sites across five files now go through the
IPlatformUtil indirection: WrapperUtil.TryOpenUri, the Settings Ko-Fi
buttons (x2), the Information tab (issues link plus media/upstream
links, x3), the Integrations tab (Honorific repo/author plus forge
discord, x3), and the ThemeAndLayout 'open themes folder' button.

A future addition to this pattern only needs to plug into IPlatformUtil
instead of touching Dalamud.Utility.Util directly.
2026-05-12 20:32:17 +02:00
JonKazama-Hellion 4510c1e404 refactor(store): route MessageStore IsWine probe through IPlatformUtil (F12.1)
MessageStore.Connect used to call Util.IsWine() directly via a
DalamudUtil alias, which made the ctor unreachable from the xUnit
test AppDomain: any test that allocated a MessageStore tripped a
FileNotFoundException on Dalamud.dll before reaching the assertion.

The ctor now takes an IPlatformUtil and reads the cached IsWine
property. MessageManager passes Plugin.PlatformUtil in. Production
behaviour is identical; the test path can now substitute a fake
and exercise the SQLite migration logic in isolation.
2026-05-12 20:29:22 +02:00
JonKazama-Hellion 6b44f549b4 feat(util): add IPlatformUtil indirection over Dalamud.Utility.Util (F12.1)
Introduces a thin interface around Util.IsWine and Util.OpenLink so
services can be constructed in an isolated xUnit AppDomain without
forcing Dalamud.dll onto the assembly search path. Production wiring
(DalamudPlatformUtil) caches IsWine at ctor time — it's a runtime
probe that never changes for the lifetime of a plugin instance,
mirroring the Lightless DalamudUtilService pattern.

Plugin.PlatformUtil is wired in the Phase-1 ctor so any service that
LoadAsync allocates can resolve the platform indirection without
plumbing the instance through additional constructor params.

Follow-up commits route MessageStore and the OpenLink call-sites
through this interface.
2026-05-12 20:10:40 +02:00
JonKazama-Hellion ae1436b103 perf(config): clone only temp tabs in SaveConfig snapshot/restore (F2.2)
The pre-serialization snapshot used to clone the entire Config.Tabs
list, then Clear/AddRange the snapshot back. With a typical config of
~30 user-defined tabs plus up to 15 session-only temp tabs, that's a
45-item clone on every save. The persistent tabs never leave the list
during this routine, so cloning only the temp subset is functionally
identical and keeps the allocation proportional to AutoTellTabsLimit.
2026-05-12 19:35:17 +02:00
JonKazama-Hellion 2684c31f10 fix(ui): scale active-tab underline with DPI for crisp rendering (F7.2)
The 2px underline pill was hardcoded — at 125/150% DPI the surrounding
tab layout scaled with ImGuiHelpers.GlobalScale but the pill stayed
2px, so the line landed on sub-pixel boundaries and rendered as a
fuzzy band. Now: height scales with GlobalScale (clamped to >=1px),
and the DrawList coordinates round to physical pixels via MathF.Round
so the rect aligns with the framebuffer grid.
2026-05-12 19:09:43 +02:00
JonKazama-Hellion bdd64cad07 perf(ui): cache GetWindowDrawList per frame in SettingsOverview (F7.3)
DrawCard used to call ImGui.GetWindowDrawList once per card, so a frame
with 10 settings cards took 10 draw-list lookups. The list is the same
for every card in the same frame, so Draw() now resolves it once and
passes the pointer down. Pattern parity with ChatLogWindow's frame-local
draw-list handling.
2026-05-12 18:43:05 +02:00
JonKazama-Hellion 28ea2fa553 refactor(theme): extract ChildBgAlpha threshold logic to testable helper (F1.2)
HellionStyle.PushGlobal had two lines that resolved the child-bg alpha
based on window opacity. Moves the 0.999f threshold and the alpha-mask
into HellionStyleHelpers.ResolveChildBgAlpha so the logic is reachable
from the build suite without touching the ImGui surface.
2026-05-12 18:19:15 +02:00
JonKazama-Hellion dd597fca44 feat(branding): validate URL constants on module init (F11.2)
BrandingLinks (5 Hellion-owned URLs) and IntegrationLinks (2 third-party
plugin URLs) now run through UrlValidation.ValidateAll from a
[ModuleInitializer] hook. A malformed URL throws InvalidOperationException
at plugin load with the source class and the broken URL in the message,
instead of silently failing when a user clicks the button.

CA2255 is suppressed at the attribute sites — the warning is for library
code shipped to unknown consumers, but the plugin DLL is loaded directly
by Dalamud, which makes module-init the right one-shot hook.
2026-05-12 17:48:51 +02:00
JonKazama-Hellion b9d3ff8f26 fix(fonts): broaden font fallback catch to handle atlas-toolkit throws (G2)
The atlas-toolkit pipeline can throw InvalidOperationException or
ArgumentException when a configured font is structurally broken (e.g.
unreadable header, unsupported glyph table). Previously only IO-shaped
throws routed to the NotoSansCjkRegular fallback, so a corrupt font
config would take down the entire atlas build instead of degrading
gracefully. The warning log now carries the exception type name so the
diagnostic path can tell which class of throw triggered the fallback.
2026-05-12 17:19:28 +02:00
JonKazama-Hellion df3d5d78d6 build(preflight): add csharpier and markdownlint blocks (G1)
Block E runs 'dotnet csharpier check' against the HellionChat/ tree,
catching reflow drift before push. Block F runs markdownlint-cli2 over
the repo's *.md files; MD036 is disabled because forge-post bodies use
bold emphasis as section headings (the auto-announce workflow renders
those as Discord embeds, so the bold pattern is required). The .claude
directory is excluded from the lint scope to match its gitignore status.

.markdownlint.json also gains MD024 with siblings_only:true so per-release
'### Internal' sub-headers in CHANGELOG.md don't trip the rule across
sibling H2 sections.
2026-05-12 16:53:22 +02:00
JonKazama-Hellion 2e057ce6c4 Merge feature/v1.4.5 — UX and Robustness
Security / scan (push) Successful in 22s
Build / Build (Release) (push) Successful in 31s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 8s
Release / Build and attach release ZIP (push) Successful in 40s
2026-05-12 15:32:02 +02:00
JonKazama-Hellion e5dbc333fa docs: linter pass on v1.4.5 release notes
Whitespace and line-reflow drift from the markdown linter on the four
files touched by the versions-bump commit (forge-post, README,
CHANGELOG, ROADMAP). No content changes.
2026-05-12 15:30:06 +02:00
JonKazama-Hellion d0ec94c3e6 style: align v1.4.5 additions with HellionChat conventions
Pattern-adherence pass after the cycle's code commits:

- ChatLogWindow.cs: NotifiedDrawFailure renamed from
  _notifiedDrawFailure. The file's per-window state flags (DrewThisFrame,
  WasDocked, Activate, PlayedClosingSound, …) all use PascalCase
  without underscore prefix; the new flag now matches that
- Plugin.cs: trim the session-only RemoveAll comment from 5 lines to 2
  and add the standard TEST-MIRROR pointer line. Same shape as
  AutoTellTabsService.cs:28 and the other six TEST-MIRROR sites
- InputHistoryService.cs: add the TEST-MIRROR pointer for the new
  Build-Suite tests
2026-05-12 15:30:01 +02:00
JonKazama-Hellion cafb6faa39 chore: bump version to 1.4.5
Manifest sync across csproj, yaml, repo.json, README, CHANGELOG,
ROADMAP and the Plugin.cs schema-gate error message. ROADMAP also gets
the v1.4.4 release block that was missed in that cycle's closure.

Forge-post v1.4.5.md follows the established frontmatter + DE-body
convention; the EN block is sourced from the yaml changelog by the
forge-announce workflow.
2026-05-12 14:33:13 +02:00
JonKazama-Hellion b8d289a847 fix(ui): hide status bar version when window is too narrow
Below roughly 340 px content width the version slot starts overlapping
the four slots to its left because the right-aligned SameLine still
plants the text where its baseline would have been. New 200 px width
threshold drops the version line entirely below that, so the other
slots stay readable. The version is back as soon as the window grows.
2026-05-12 14:19:46 +02:00
JonKazama-Hellion f16d8f5c78 docs(plugin): clarify session-only Auto-Tell-Tab invariant (F2.3)
Expands the one-liner above Plugin.cs:167-168 to spell out *why* the
RemoveAll runs before AutoTellTabsService.Initialize: tells are
typically privacy-filtered, so resurrecting a tab from a crashed
session would trigger DB reconstruction on the next load. Also links
to the TEST-MIRROR pin in the Build-Suite for future readers.
2026-05-12 14:11:02 +02:00
JonKazama-Hellion eabb39ba86 fix(font): fall back to system font if embedded resource missing (F10.2)
GetHellionFontBytes used to throw a FileNotFoundException when the
embedded Hellion font resource was missing — only possible on a broken
csproj or a hand-rolled dev build, never on a signed release, but the
throw bubbled up and broke the entire UiBuilder font atlas.

Replaced with a nullable TryGetHellionFontBytes that logs a warning
and returns null on miss. The RegularFont delegate now falls back to
the same system-font path that UseHellionFont=false already uses, so
the plugin still loads and the issue surfaces in /xllog instead of as
a crash.
2026-05-12 13:55:04 +02:00
JonKazama-Hellion b489ac946c fix(ux): reset input history on plugin dispose (F10.1)
Static InputHistoryService entries used to survive a plugin reload
because static field state doesn't get cleaned up on its own. The new
Reset() method clears the list and is wired into Plugin.DisposeAsync
alongside the existing pure-memory cleanups, so the next plugin load
starts with an empty history instead of inheriting the previous
session's typed commands.
2026-05-12 13:41:38 +02:00
JonKazama-Hellion 8d9151c74a feat(ux): explicit cancel affordance on first-run wizard (F8.1+F8.2)
Splits accept from close: OnClose no longer silently sets
FirstRunCompleted, so the X-button leaves the wizard pending and it
reopens on the next plugin load. A new footer 'Later — keep defaults'
button is the explicit path to dismiss the wizard without picking a
profile; defaults stay active and the choice persists.

Strings are bilingual (EN + DE) with a tooltip explaining the
behaviour. Card height now reserves room for the footer separator.
2026-05-12 13:31:53 +02:00
JonKazama-Hellion 4ecbaf2a4b feat(ux): show notification on chat log draw failure (F7.1)
Surfaces a per-session warning notification when DrawChatLog throws so
the user knows something went wrong instead of staring at an empty
window. Stack trace stays in /xllog as before. The one-shot guard
prevents the notification stack from flooding frame-by-frame; it
resets only on the next plugin reload.
2026-05-12 13:22:24 +02:00
JonKazama-Hellion 3e4601a0c8 chore: reflow drift from v1.4.4 closure
Whitespace and line-reflow artefacts from auto-formatter passes plus a
packages.lock.json indent normalisation. No content changes.
2026-05-12 13:08:59 +02:00
JonKazama-Hellion 61d5a33683 Merge fix/release-workflow-ref-guard into main
Security / scan (push) Successful in 21s
Build / Build (Release) (push) Successful in 28s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 7s
Release / Build and attach release ZIP (push) Successful in 39s
Guards release.yml against non-tag refs and fixes the silent
ignore of body_path / tag_name that left every Gitea release
since v1.4.1 with an empty body.
2026-05-12 11:50:32 +02:00
JonKazama-Hellion 7ed689587b fix(ci): guard release.yml against non-tag refs and pass body inline
The release-action@main reads GITHUB_REF directly and rejects anything
that doesn't start with refs/tags/. The previous workflow tried to work
around this by passing tag_name as an action input, but the action's
action.yml never declared tag_name (or body_path) - both inputs were
silently ignored, which is why every Gitea release since v1.4.1 was
published with an empty body.

Changes:
- New "Validate tag ref" step fails fast with a clear message when the
  workflow is dispatched from a branch ref instead of a tag ref.
- workflow_dispatch.inputs.tag dropped; recovery now means picking the
  tag from Gitea's Ref dropdown so GITHUB_REF lines up with refs/tags/.
- release-body.md is re-emitted as a step output and passed via body:
  (the input the action actually reads) instead of body_path.
- tag_name input removed from the action call - the action derives the
  tag from GITHUB_REF_NAME on its own.
2026-05-12 11:33:58 +02:00
JonKazama-Hellion 612bf8814f fix(ci): match release + forge-announce parsing to current yaml format
Security / scan (push) Successful in 21s
Build / Build (Release) (push) Successful in 30s
Both workflows looked for "**Hellion Chat <version>" as the changelog
subblock header, but the yaml convention is "**v<version> — <subtitle>"
(matches verify-changelog-sync.sh and the slim-rule grep). Plus the
indent-strip was 2 spaces, but prettier writes the changelog block with
4-space indent. Both regressions silently failed every release-workflow
run since the format change — likely why v1.4.3 was released manually.

Sync header marker to "**v$version " and indent-strip to 4 spaces in
both files.
2026-05-12 11:17:41 +02:00
JonKazama-Hellion be17472cd5 chore(ci): migrate workflows to .gitea/workflows/
Security / scan (push) Successful in 19s
Build / Build (Release) (push) Successful in 42s
Gitea Actions reads exclusively from .gitea/workflows/, not from
.github/workflows/. Since the cutover in v1.4.3 only the security
workflow has been running — release and forge-announce silently sat in
the wrong directory and never fired on any tag push. v1.4.3 must have
been released manually.

Move build, release and forge-announce yamls to .gitea/workflows/. The
.github/forge-posts/ and .github/release-footer.md data files stay where
they are; the workflows reference them by repo-relative path and that
keeps working.

For the v1.4.4 backfill: workflow_dispatch via the Gitea web UI with
tag=v1.4.4 will run release.yml + forge-announce.yml against the tagged
tree (which doesn't contain this migration). The dispatch yaml itself
is read from the default branch, not the tag, so the missing yamls in
the v1.4.4 tag tree don't matter.
2026-05-12 11:05:52 +02:00
JonKazama-Hellion 8bf50151d5 Merge feature/v1.4.4 into main (Threading and IPC Safety release)
Security / scan (push) Successful in 18s
2026-05-12 10:56:51 +02:00
JonKazama-Hellion 57da455700 fix: post-review polish on v1.4.4
- IsAllowedForStorage warning now only fires for ChatTypes the build
  doesn't recognise (Enum.IsDefined), not for opted-out known ones
- Drop stale tests-location comment in HonorificService
2026-05-12 10:47:43 +02:00
JonKazama-Hellion 0982b68a4a chore: bump version references in Plugin.cs and README
Pre-push grep-verification found four stale v1.4.3 mentions outside the
Slim-Rule history files:

- Plugin.cs schema-gate error message referenced v1.4.3 by name in both
  the comment and the user-facing exception text. Schema stays at v16,
  but the message now points at the current release
- README.md latest-release badge bumped to v1.4.4
- README.md version header bumped to v1.4.4
- README.md Project Status block rewritten for v1.4.4 with the threading
  and IPC safety items as the lead

ROADMAP.md historical references to v1.4.3 are intentional (released-tag,
foundation-reference) and stay.
2026-05-12 10:22:21 +02:00
JonKazama-Hellion 0fc88e480a chore: bump version to 1.4.4 + changelog sync + forge-post
Threading and IPC safety release. Items: F2.1 (Interlocked counter),
F4.1/F4.2/F4.3 (HonorificService threading banners + warning log),
F9.2 (AutoTranslate IsBackground), F3.1 (PrivacyPersistUnknownChannels
default), F3.2 (unknown-ChatType warning).

verify-changelog-sync: yaml/repo.json/forge-post in sync, embed-total
~2699/5500, 3/4 yaml subblocks. verify-version-consistency and
verify-manifest-shape both green.
2026-05-12 10:11:31 +02:00
JonKazama-Hellion 7eb50e2c8d feat(privacy): log warning on unknown ChatType in IsAllowedForStorage
F3.2: a future FFXIV patch can introduce ChatTypes that aren't on any
existing whitelist, and the filter currently routes them silently
through the unknown-channel failsafe. Add a dedup HashSet (per runtime,
NonSerialized) so the first hit per ChatType logs a Warning. The
failsafe behaviour itself is unchanged — only visibility is new.
2026-05-12 09:54:05 +02:00
JonKazama-Hellion 58e754c169 feat(privacy): default PrivacyPersistUnknownChannels to true for new configs
F3.1: future FFXIV patches can add new ChatTypes that aren't on any
existing whitelist. With the field defaulted to false a new install
would silently drop those channels until the user opts in. New configs
now start with PrivacyPersistUnknownChannels=true via a constant in
PrivacyDefaults. Existing configs keep their explicit choice — the
deserializer overrides the initializer, so no migration and no schema
bump.
2026-05-12 09:41:52 +02:00
JonKazama-Hellion 83064cd40b fix(autotranslate): mark warmup thread as IsBackground
F9.2: PreloadCache spawned a new Thread without IsBackground, which kept
the plugin unload blocked until the warmup finished (typically
100-300 ms). Setting IsBackground=true plus a named thread matches the
pattern already used in MessageManager (F6.1) and Plugin.RetentionSweep
(F9.3) since v1.4.0.
2026-05-12 09:33:57 +02:00
JonKazama-Hellion 5ca3b73b7f refactor(honorific): per-method threading banners + warn on unsubscribe-fail
F4.1: replace the block threading comment with per-method banners that
read like documentation at the call site. F4.2: TryUnsubscribe now logs
Warning instead of Debug — a silent unsubscribe failure leaks a live
subscription across plugin reloads. F4.3: CurrentTitle gets a one-line
banner matching the same convention.
2026-05-12 09:19:52 +02:00
JonKazama-Hellion 570a6f071c style(autotell): csharpier format F2.1 changes 2026-05-12 09:19:49 +02:00
JonKazama-Hellion 11ad5db127 perf(autotell): replace lock-protected count with Interlocked counter
F2.1: ActiveTempTabCount was doing a LINQ Count under _tempTabsLock on
every read, including the hot-path HandleTell guard. Replace with an
Interlocked counter kept in sync with Config.Tabs from inside the
existing mutation paths (SpawnTempTab, DropOldestTempTab, OnLogout).
Initialize from the persisted Tabs list on Initialize() to handle
configs that already contain TempTabs from a prior session.

Plugin.cs SaveConfig snapshot-restore mutates Config.Tabs outside of
AutoTellTabsService; expose ResyncTempTabCounter() and call it after
AddRange so the counter stays consistent. Plugin.cs:168 crash-recovery
RemoveAll runs before Initialize() and is covered by the init snapshot.
2026-05-12 09:06:20 +02:00
JonKazama-Hellion 5c550e8587 fix(scripts): adapt verify-changelog-sync to **vX.Y.Z** subblock format
yaml.changelog and repo.json.Changelog now use **vX.Y.Z** subblock
headers instead of the older **Hellion Chat X.Y.Z** form. Updated the
three regex patterns (yaml check, repo.json check, version counter)
and re-enabled Block C in preflight.sh — the SKIP workaround is no
longer needed.
2026-05-12 02:22:59 +02:00
JonKazama-Hellion eb2a04c56b docs: Update gitignore for Pair AI settings 2026-05-12 00:33:52 +02:00
JonKazama-Hellion 3f714d6f38 Merge pull request 'chore(renovate): fix schema warning (prPriority)' (#16) from chore/renovate-config-schema-fix into main
Security / scan (push) Successful in 11s
Reviewed-on: #16
2026-05-11 22:25:23 +00:00
renovate-bot 747e0e1574 chore(renovate): fix schema (prPriority placement)
Security / scan (pull_request) Successful in 16s
Moves prPriority out of vulnerabilityAlerts (only allowed in packageRules per schema).
Fixes the recurring 'Found renovate config warnings' issue.
2026-05-11 22:16:49 +00:00
JonKazama-Hellion debfdcd278 Merge pull request 'chore(config): migrate Renovate config' (#15) from renovate/migrate-config into main
Security / scan (push) Successful in 11s
Reviewed-on: #15
2026-05-11 18:43:52 +00:00
renovate-bot f85daf3dbe chore(config): migrate config renovate.json
Security / scan (pull_request) Successful in 14s
2026-05-11 18:35:29 +00:00
JonKazama-Hellion 3b24b2adc4 docs: translate CHANGELOG and ROADMAP to English
Security / scan (push) Successful in 13s
Translate all remaining German sections in docs/CHANGELOG.md and
docs/ROADMAP.md to English for consistency across the repository.
Previously English sections left unchanged.
2026-05-11 20:32:11 +02:00
JonKazama-Hellion c493340104 fix(renovate): exclude Gitea workflows from pinDigests lookup
Security / scan (push) Failing after 10s
2026-05-11 20:17:33 +02:00
JonKazama-Hellion 3a7f9b3adb refactor(strings): replace ResourceManager.GetString with direct HellionStrings properties
Security / scan (push) Successful in 13s
- SettingsOverview: replace dynamic key lookup via ResourceManager with
  direct HellionStrings property access; switch static readonly array to
  BuildCardDefs() method to ensure correct initialization order
- ThemeAndLayout: replace all ResourceManager.GetString calls with direct
  HellionStrings/Language property access throughout DrawThemeSection()
  and DrawChatColorsApplyBanner()

Also rework DE/EN string copy for a more natural, less formal tone in the German localization, and to better match the English source text. This includes
2026-05-11 20:11:53 +02:00
JonKazama-Hellion b1b6402827 docs: Fix the last comments i think now
Security / scan (push) Successful in 12s
2026-05-11 08:11:30 +02:00
JonKazama-Hellion 7d73def53d fix: disable changelog sync preflight check for non-code change
Security / scan (push) Successful in 11s
Changed HellionChat.yalm but need to Ajust the preflight script to not fail on this non-code change. TODO: Fix the script to only check for code changes in the future.
2026-05-11 00:56:54 +02:00
JonKazama-Hellion c4c85cf4b8 docs: unify documentation and streamline code comments
- Translated project documentation (LEARNING-JOURNEY, CONTRIBUTORS, AI_DISCLOSURE) to English for better accessibility.
- Standardized internal code documentation by converting XML-doc blocks to standard comment format.
- Cleaned up inline comments and removed redundant versioning metadata across the codebase.
- Refactored non-functional text elements to improve readability and maintain a consistent style.
2026-05-11 00:52:15 +02:00
JonKazama-Hellion a37882893e Merge pull request 'chore(deps): pin dependencies' (#12) from renovate/pin-dependencies into main
Security / scan (push) Successful in 11s
Reviewed-on: #12
2026-05-10 20:26:33 +00:00
renovate-bot 702e4ca160 chore(deps): pin dependencies 2026-05-10 20:26:33 +00:00
JonKazama-Hellion 1ebc7b820f Merge pull request 'chore(deps): refresh' (#13) from renovate/lock-file-maintenance into main
Security / scan (push) Successful in 11s
Reviewed-on: #13
2026-05-10 20:24:58 +00:00
renovate-bot 3152312890 chore(deps): refresh
Security / scan (pull_request) Successful in 13s
2026-05-10 18:31:56 +00:00
JonKazama-Hellion 4000bbd199 chore: reformat after editorconfig update
Security / scan (push) Successful in 12s
Updated .editorconfig to set indent_style=space and indent_size=4 for C# files. Reformat all .cs files to apply the new indentation settings. No code logic changes, just whitespace reformatting.
also updated some comments in files in shorter and Precise way. No logic changes, just comment rewording for clarity and conciseness.
2026-05-10 19:54:39 +02:00
JonKazama-Hellion 3cabdf3e15 chore: add linter & formatter config
Security / scan (push) Successful in 11s
Add .editorconfig (LF, Allman), .prettierrc.json, .markdownlint.json,
.yamllint.yaml, .gitattributes and .prettierignore. Extend CI with
format and lint checks.
2026-05-10 13:46:43 +02:00
JonKazama-Hellion 05c28f7e92 Merge branch 'main'
Security / scan (push) Successful in 12s
2026-05-10 13:02:36 +02:00
JonKazama-Hellion 699d4ede1d chore: housekeeping — linter & formatter setup
Add .prettierrc.json, .markdownlint.json, .yamllint.yaml, .gitattributes
Run CSharpier, Prettier and markdownlint across the entire codebase.
No logic changes — formatting, using order and line endings only.
2026-05-10 13:01:00 +02:00
JonKazama-Hellion 31673fdff6 chore(config): migrate Renovate config (#10)
Security / scan (push) Successful in 22s
Auto-merge: Renovate config migration (matchPackagePrefixes -> matchPackageNames).
2026-05-09 15:46:43 +00:00
renovate-bot 07337108bc chore(config): migrate config renovate.json
Security / scan (pull_request) Successful in 25s
2026-05-09 15:42:04 +00:00
JonKazama-Hellion fd82033666 Add ignoreDeps for actions/release-action
Security / scan (push) Successful in 21s
The release.yml workflow uses https://gitea.com/actions/release-action@main.
Renovate's gitea-tags manager tries to resolve @main as a tag and 404s,
which crashes the entire renovate run (affecting all repos via autodiscover).
Repo-level ignoreDeps + a packageRule make this defense-in-depth alongside
the global ignoreDeps in /opt/renovate/config.js.
2026-05-09 17:41:38 +02:00
JonKazama-Hellion cd01fa63a1 style: reformat renovate.json with standard 2-space indent
Security / scan (push) Successful in 13s
2026-05-09 12:34:47 +02:00
JonKazama-Hellion b81c50b433 renovat update
Security / scan (push) Successful in 11s
Signed-off-by: Jon Kazama <kontakt@hellion-media.de>
2026-05-09 10:18:20 +00:00
JonKazama-Hellion 355a57089b Merge pull request 'Configure Renovate' (#8) from renovate/configure into main
Security / scan (push) Successful in 11s
Reviewed-on: #8
2026-05-09 10:17:33 +00:00
renovate-bot cf7ab6226c Add renovate.json 2026-05-09 10:17:33 +00:00
JonKazama-Hellion 03da6d58a4 ci: fix semgrep rule ID for csharp-sqli exclusion
Security / scan (push) Successful in 14s
Semgrep rule IDs follow the pattern <pack>.<rule>. The pack name is
csharp.lang.security.sqli.csharp-sqli and the rule inside it is also
called csharp-sqli, so the full ID needs the trailing .csharp-sqli
again. Without it the exclude flag silently filters a different
subset of rules and the actual rule still runs.
2026-05-09 12:08:08 +02:00
JonKazama-Hellion 90a4544ab2 ci: exclude csharp-sqli rule from MessageStore.cs scans
Security / scan (push) Failing after 33s
Semgrep flags eight CommandText-with-string-interpolation call sites
in MessageStore.cs as SQL-injection patterns. All are safe in this
context: table names and clause fragments come from internal code
constants, the actual values are bound via SqlParameter, and the
plugin SQL surface is local-only with no external input vector.

CodeQL would not flag these because it does dataflow analysis and
sees the constants. Semgrep only matches patterns. Excluding the rule
for this repo only via the new semgrep-exclude-rules input keeps the
rule active for the other Hellion repos where it might catch real
issues (e.g. the web apps).
2026-05-09 11:54:24 +02:00
JonKazama-Hellion 9b4557f197 chore: add reusable security scan workflow
Security / scan (push) Failing after 6m33s
Calls JonKazama-Hellion/security-workflows for Semgrep SAST + Trivy
filesystem vulnerability scan. Runs on push to main/master, on every
PR, and weekly Monday 06:00 UTC.
2026-05-09 11:28:09 +02:00
JonKazama-Hellion e594258cf3 Migrate residual URLs and security-report path to Forge
Build / Build (Release) (push) Successful in 41s
Release / Build and attach release ZIP (push) Successful in 2m4s
Forge Announce / Post changelog to Hellion Forge (push) Successful in 11s
Cleanup pass after the v1.4.3 cutover. Five files still carried
gitea.com hosts or dead github.com security-advisory links because
they were not touched in the prior URL sweep.

- forge-announce.yml: Discord embed avatar and tag link
- release-footer.md: custom-repo URL plus six doc/license links
- bug_report.yml, config.yml, PULL_REQUEST_TEMPLATE.md: replace
  github.com/.../security/advisories/new with mailto:kontakt@
  hellion-media.de. Gitea has no privately-reportable advisory
  feature; e-mail is the closest functional equivalent.

Pure string replacement, no logic change.
2026-05-09 08:39:19 +02:00
JonKazama-Hellion bb863c5b32 Merge feature/v1.4.3 into main
Hellion Chat 1.4.3 - Plugin-Load Async-Init + Repo-Cutover

- IAsyncDalamudPlugin two-phase load (Phase 1 ctor minimal, Phase 2 LoadAsync)
- Schema-gate replaces v9 to v16 migration chain
- AutoTranslate.PreloadCache moved off the load path
- BuildFontsAsync sync at LoadAsync start (font-pop matches ChatTwo)
- Custom-repo URL cutover from GitHub to gitea.hellion-forge.cloud
- Build-Suite floor 663/663 green
2026-05-09 08:30:32 +02:00
JonKazama-Hellion 0797d1a517 docs: add v1.4.3 forge-post 2026-05-08 22:28:15 +02:00
JonKazama-Hellion 8dc8b87580 Bump version to 1.4.3 and sync manifest files 2026-05-08 22:22:22 +02:00
JonKazama-Hellion baeec369e6 Cutover custom-repo URL from GitHub to Gitea 2026-05-08 22:12:40 +02:00
JonKazama-Hellion a1f2b22b19 Drop schema migrations and move AutoTranslate.PreloadCache off the load path
Migrations: all current users are on schema v16, the v9 to v16 migration
chain ran in v1.2.1 and earlier. Replace the seven in-LoadAsync migration
blocks with a hard schema-gate in the Phase-1 ctor; older configs trigger
a clear "install v1.4.2 first" error. Code-hygiene change, fast-path
saving is negligible. Remove the now-unused TryReadPreV13ThemeOpacity
helper that only served the v13 to v14 block.

AutoTranslate.PreloadCache: was sync ~300 ms in LoadAsync. Move to
Task.Run so plugin-load returns ~300 ms earlier. Trade-off: first
auto-translate use of a session may have a sub-second hitch if the
cache hasn't finished warming. Acceptable, it is first-use cost
instead of every-load cost.
2026-05-08 21:59:29 +02:00
JonKazama-Hellion 5931f2f301 Use sync FontManager allocation in LoadAsync to avoid first-draw race
The previous fire-and-forget Task.Run pattern could leave Plugin.FontManager
null when the first UiBuilder.Draw tick fires (ChatLogWindow dereferences
FontManager.FontAwesome / RegularFont / ItalicFont in its draw paths).
Allocate FontManager and call BuildFonts() synchronously, mirroring
ChatTwo Plugin.cs:152. BuildFonts itself is non-blocking — it just
registers IFontHandles with Dalamud's atlas; the actual atlas rebuild
runs on Dalamud's pipeline a few frames later, so the perceived-load
win still holds (LoadAsync no longer waits for atlas build).

BuildFontsAsync in FontManager.cs stays for the Settings-driven manual
rebuild path.
2026-05-08 21:42:57 +02:00
JonKazama-Hellion 0b25df0ea7 Move migrations and service allocations from Phase-1 ctor to LoadAsync
Phase-1 was still doing 7 schema migrations and 25+ service allocations
synchronously, blocking the ctor return. Move all of that to LoadAsync,
keeping only bootstrap-essentials in the ctor: conflict detection,
config load, language init, ImGui init, WindowSystem skeleton.

Decouple the font task from the LoadAsync await — font-build runs
fire-and-forget, so first frames render with Dalamud's default font
until the Hellion-Exo2/NotoSans atlas rebuild completes (visible
"font-pop"). Mirrors ChatTwo's pattern; the perceived-load win comes
from "Finished loading" landing earlier, not from a faster atlas build.
2026-05-08 21:38:44 +02:00
JonKazama-Hellion b75c7b177a Move RunRetentionSweepIfDue to Phase 2 (depends on MessageManager.Store)
Smoke test in Task 6 surfaced a NullReferenceException at Plugin.cs:885 —
the retention sweep was scheduled in Phase 1 but dereferences
MessageManager.Store, which is only allocated in Phase 2 (LoadAsync).
Move the call after MessageManager init. Drop the comment that wrongly
claimed independence from Phase-2 services.
2026-05-08 21:00:19 +02:00
JonKazama-Hellion ccc5a4e17a Add BuildFontsAsync for parallel font/theme init 2026-05-08 20:34:05 +02:00
JonKazama-Hellion daa800c8b1 Apply code-quality fixes to Plugin.cs IAsyncDalamudPlugin refactor
I-1: rewrite property-shape comment to reflect that all properties (not
just Phase-2 ones) moved to { get; private set; } = null!;.
I-3: drop plan-jargon (Q1=A / Q3=B / Task 5) from source comments;
replace with durable rationale and a version-anchored TODO for the
FontManager.BuildFontsAsync follow-up.
I-4: remove German-word leak ("pflicht") from English comment in
DisposeAsync.
M-5: wrap each cleanup line inside Framework.RunOnFrameworkThread with
CaptureFailure so a single Dispose throw no longer strands subsequent
cleanup. Drops the inline try/swallow on SetChatInteractable. Mirrors
Lightless DisposeFrameworkBoundServicesAsync pattern.
2026-05-08 19:46:11 +02:00
JonKazama-Hellion a531973c0d Refactor Plugin to IAsyncDalamudPlugin two-phase load 2026-05-08 19:23:53 +02:00
JonKazama-Hellion 4c8b0da3da ci: drop upload-artifact step from build.yml
actions/upload-artifact@v7 fails on Gitea Actions — the GitHub
artifact API has compatibility gaps the Gitea runtime layer does not
fully cover, and v7 specifically tripped exitcode 1 on the Strato
runner. The build itself runs fine; the artefact was never consumed
by anything (release.yml does its own latest.zip lookup), so the
cleanest fix is to make build.yml a pure compile-health check
without artefact upload.
2026-05-08 15:11:46 +02:00
JonKazama-Hellion 9a8a014795 docs: close active upstream cherry-pick pipeline
Chat 2 has entered a major rework that Infi confirmed makes selective
patches no longer portable. The cherry-pick pipeline as a routine
workflow stops with the v1.4.x cycle. Documentation reflects the new
state across all touchpoints.

UPSTREAM_SYNC.md rewritten: replaces the "How I Cherry-Pick" /
"Reviewing What Is New Upstream" / "Conflict Handling" sections with
"Why Cherry-Picking Stopped", "What Closing the Pipeline Means in
Practice", "What Does Not Change", "What Could Re-Open Later".
Existing cherry-pick trails in the git history stay intact, EUPL-1.2
anchor lines and NOTICE.md remain canonical.

README.md, CONTRIBUTING.md, ROADMAP.md, THIRD_PARTY_NOTICES.md and
the PR template updated to match: cherry-pick references reframed as
historical or pointed at UPSTREAM_SYNC.md for the current state.
NOTICE.md keeps the BetterTTV cherry-pick example as a concrete past
case but adds a paragraph that the pipeline is closed and clarifies
the attribution standard is preserved unchanged.

PULL_REQUEST_TEMPLATE.md drops the "Upstream cherry-pick from Chat 2"
checkbox and the cherry-pick-path compatibility prompt. The upstream
git remote was already removed locally on 2026-05-08 (separate change,
not in this commit).

No source-file edits, no manifest version bump, no changelog entry —
this is documentation-only and ships with the next release.
2026-05-08 15:00:30 +02:00
JonKazama-Hellion 9640d336a6 Migrate Actions workflows to Gitea
- codeql.yml removed: GitHub-only (uses github/codeql-action/*).
- build.yml + release.yml: runs-on switched to ubuntu-latest (Gitea Cloud
  has no Windows runner). Dalamud staging is now downloaded via curl/unzip
  into $HOME/.xlcore/dalamud/Hooks/dev/, the path the Dalamud SDK 15 uses
  on Linux. Locate-step uses find instead of Get-ChildItem.
- release.yml: softprops/action-gh-release replaced with the Gitea-native
  https://gitea.com/actions/release-action. Auto-injected GITHUB_TOKEN on
  Gitea Actions has Gitea-API scope and is sufficient.
- forge-announce.yml: environment: Webhook removed (Gitea has no
  environments — DISCORD_FORGE_WEBHOOK is a repo-level Actions secret).
  avatar_url and embed url switched from raw.githubusercontent.com /
  github.com to gitea.com.
- release-footer.md: install URL plus the five doc links (README, PRIVACY,
  THIRD_PARTY_NOTICES, SECURITY, SUPPORT) and LICENSE link switched to
  gitea.com/.../src/branch/main/. ChatTwo upstream link stays on GitHub.
2026-05-08 14:06:44 +02:00
JonKazama-Hellion 12ce015d83 test: add TEST-MIRROR pointer to Build-Suite MigrationLogic 2026-05-08 13:27:39 +02:00
JonKazama-Hellion f455bf4736 chore: drop stale Cycle reference from BrandingLinks comment
The comment on BrandingLinks claimed a follow-up housekeeping sweep was
"out of scope for this Cycle" — that Cycle framing no longer matches how
Plan v4 schedules the work. Trim the trailing clause; the rest of the
comment still documents the housekeeping intent.
2026-05-08 08:51:27 +02:00
JonKazama-Hellion 9bc66c7cf3 chore: optimize image assets and add Florian Eck brand logos
Re-encodes the four existing screenshots and the docs/images forge banner
to 8-bit indexed-color PNGs. Total asset payload drops from ~3.87 MB to
~311 KB (92% smaller) without visible quality loss in the README/forge
post rendering.

Adds the four brand-logo variants designed by Florian Eck and credited
in COPYRIGHT (Visual assets section): the Hellion Online Media wordmark,
the square Hellion crest, the horizontal Hellion Forge color logo and
the Discord-sized hammer mark. All variants live in docs/images/ so the
forge post and README can reference them without polluting the in-game
plugin payload under HellionChat/images/.

Visual assets are NOT covered by the EUPL-1.2 source code licence; their
licensing terms are documented in COPYRIGHT.
2026-05-08 08:51:22 +02:00
JonKazama-Hellion e9022de150 refactor: rename SelfTest/ to SelfTests/ for plan v4 consistency
Renames HellionChat/SelfTest/ to HellionChat/SelfTests/ (plural) to
match the folder convention used throughout the Build Suite Plan v4
Phase 6 file list. The singular name was introduced as a known
discrepancy in cb327b8 and is now resolved.

- git mv preserves full history via rename detection
- Namespace updated: HellionChat.SelfTest → HellionChat.SelfTests
- Plugin.cs qualifier updated: SelfTest. → SelfTests.
- Build: 0 errors, 0 warnings
2026-05-08 08:34:48 +02:00
JonKazama-Hellion cb327b8073 feat: add ThemeSwitchSelfTestStep + ISelfTestRegistry wiring
Registers a single SelfTestStep that exercises Plugin.ThemeRegistry.Switch
through the live theme list. Verified in-game via /xldev SelfTest tab on
2026-05-08; Plugin loads cleanly with the RegisterTestSteps call and the
step runs the theme cycle as expected.

Folder is HellionChat/SelfTest/ (singular). Future steps may rename to
SelfTests/ to match the local Plan v4 convention.
2026-05-08 08:21:21 +02:00
JonKazama-Hellion 1c354d18bb refactor: extract chat-input pure helpers for unit-testable submit + history math
ChatBox.SendMessage reads bytes from ValidateMessage so Encoding.UTF8.GetBytes
runs once per send. ValidateMessage takes an injectable sanitiser so xUnit can
exercise the length-equality gate without ClientStructs game memory.

CompactInputSubmitter and CompactInputHistoryNavigator lift the deterministic
parts of ChatInputBar's pop-out submit and history-up/down callback into POCO
helpers under HellionChat/_Helpers/. The ImGui buffer splice
(DeleteChars/InsertChars) stays at the call site because it needs the live
callback data.

Behavior is identical to the previous inline implementation; tests in the
local Build Suite repo pin the contracts.
2026-05-08 08:21:13 +02:00
JonKazama-Hellion 0ed88691c2 build: add preflight validator family for versions/manifest/changelog drift
Establishes the local pre-push gate. preflight.sh runs four blocks: version
consistency, manifest shape (Icon plus all ImageUrls), changelog sync, plus a
release build as compile-health smoke. setup-hooks.sh wires core.hooksPath to
.githooks. .gitignore opens scripts/ for tracking (setup-dev-env.sh stays
private). Test execution itself lives in a separate local repository and is
not part of this codebase.
2026-05-08 07:23:54 +02:00
JonKazama-Hellion c64fcfd4d1 docs: add v1.4.2 forge-post 2026-05-07 22:47:09 +02:00
JonKazama-Hellion 6689cdb968 chore: bump version to 1.4.2 and document ChatLog Frame-Hot-Path 2026-05-07 22:47:09 +02:00
JonKazama-Hellion 345aa3ea2a perf(ui): gate status-bar aggregation behind the cache check 2026-05-07 22:15:57 +02:00
JonKazama-Hellion 1ffc41f97d perf(ui): cache auto-tell tab tint and icon per tab 2026-05-07 22:06:18 +02:00
JonKazama-Hellion 36b92f0520 perf(ui): hoist invariants out of the chat-log card border loop 2026-05-07 21:34:19 +02:00
JonKazama-Hellion cb612044ea Merge branch 'feature/v1.4.1-theme-engine-performance' 2026-05-07 20:05:14 +02:00
JonKazama-Hellion 71081d8344 docs: add v1.4.1 forge-post 2026-05-07 20:00:29 +02:00
JonKazama-Hellion 54bfeb0f6f chore: bump version to 1.4.1 and document Theme Engine Performance 2026-05-07 19:58:50 +02:00
JonKazama-Hellion 5f83c70292 feat(themes): add Synthwave Sunset built-in, refresh author credits 2026-05-07 19:51:43 +02:00
JonKazama-Hellion 3d7883ee01 fix(themes): refresh abgr cache defensively on theme switch 2026-05-07 19:51:43 +02:00
JonKazama-Hellion e4ee7aaafa fix(themes): keep last-known-good custom theme on transient file-lock 2026-05-07 19:51:43 +02:00
JonKazama-Hellion aff2528a6f perf(themes): read abgr from theme cache in PushGlobal and Push 2026-05-07 19:51:43 +02:00
JonKazama-Hellion 0d2ee63420 perf(themes): add pre-computed ABGR cache on theme records 2026-05-07 19:51:43 +02:00
JonKazama-Hellion de9d1ac60b Merge branch 'feature/v1.4.0-critical-lifecycle-fixes'
Hellion Chat 1.4.0 — Critical Lifecycle Fixes

Seven P0 lifecycle and race bugs eliminated before any performance refactor.
Plus version bump, manifest sync, changelog, forge-post.
2026-05-07 19:06:56 +02:00
JonKazama-Hellion 19f7099af0 docs: add v1.4.0 forge-post 2026-05-07 19:04:24 +02:00
JonKazama-Hellion f8a734d93f chore: bump version to 1.4.0 and document Critical Lifecycle Fixes 2026-05-07 19:04:20 +02:00
JonKazama-Hellion 3f7e86b32e fix(migration): pull HellionThemeWindowOpacity from pre-v13 backup in v13->v14 2026-05-07 08:03:57 +02:00
JonKazama-Hellion e5bf375b42 fix(plugin): flush DeferredSaveFrames in Dispose before service teardown 2026-05-07 07:53:52 +02:00
JonKazama-Hellion 93329087a9 fix(messagemanager): warn loudly when DisposeAsync 10s timeout hits 2026-05-07 07:52:14 +02:00
JonKazama-Hellion 72d568e5b3 fix(emotecache): replace async void Load with async Task tracker 2026-05-07 07:41:50 +02:00
JonKazama-Hellion c9dfd024b2 docs(comments): trim verbose dispose and thread rationale
Match the new HellionChat comment-length convention: 1-3 lines for
standard pitfall notes, 5+ only for non-trivial workarounds. The
previous Dispose comment was 14 lines of textbook prose, which veered
into AI-slop territory and would rot on the next refactor.
2026-05-07 01:10:50 +02:00
JonKazama-Hellion 8c624a0032 fix(threads): mark PendingMessage thread as background, document RetentionSweep rationale 2026-05-07 00:54:43 +02:00
JonKazama-Hellion 079e280226 fix(messagestore): drop GC.Collect from Dispose, rely on Pooling=false 2026-05-07 00:42:26 +02:00
JonKazama-Hellion 3bdf45c29c Datein in falschen ordner verschoben xD 2026-05-06 22:32:01 +02:00
JonKazama-Hellion d257a41660 fix(release): add v1.3.0 forge-post in expected workflow path 2026-05-06 22:23:13 +02:00
JonKazama-Hellion 36f2bbd8d1 Merge branch 'feature/v1.3.0-honorific-integration' 2026-05-06 22:13:33 +02:00
JonKazama-Hellion da291b7fca docs: add v1.3.0 release-notes drafts and trim manifest changelog 2026-05-06 22:06:58 +02:00
JonKazama-Hellion c8485233d5 chore: bump version to 1.3.0 and document Plugin Integrations Cycle 1 2026-05-06 21:54:58 +02:00
JonKazama-Hellion 2d768e4edb refactor(integrations): apply review findings (constant, util move, prose cleanup) 2026-05-06 21:08:50 +02:00
JonKazama-Hellion e58376bf50 fix(ui): use ImGui.Button for Hellion Forge Discord link 2026-05-06 20:39:41 +02:00
JonKazama-Hellion dceb028184 feat(integrations): link Honorific repo and Caraxi attribution 2026-05-06 20:34:03 +02:00
JonKazama-Hellion 33a4d94c44 fix(ui): use FontAwesome Hourglass for coming-soon items 2026-05-06 20:25:44 +02:00
JonKazama-Hellion b2f158f893 fix(ui): add Crown icon and hover tooltip to Honorific title slot 2026-05-06 20:17:22 +02:00
JonKazama-Hellion da6da32651 fix(ui): add Integrations card to settings overview grid 2026-05-06 20:14:29 +02:00
JonKazama-Hellion 477591e2fa feat(ui): render Honorific title in chat header above message log 2026-05-06 20:02:10 +02:00
JonKazama-Hellion ddb293399e feat(ui): register Integrations tab in settings window 2026-05-06 19:59:13 +02:00
JonKazama-Hellion 7494b001a2 fix(integrations): schedule Honorific initial pull on framework thread 2026-05-06 19:41:50 +02:00
JonKazama-Hellion 9f0a40bedc feat(ui): add Integrations settings tab 2026-05-06 19:30:59 +02:00
JonKazama-Hellion 8da05c3080 feat(i18n): add localisation keys for Integrations settings tab 2026-05-06 19:27:04 +02:00
JonKazama-Hellion 5b5f52f86e feat(integrations): wire HonorificService into Plugin lifecycle 2026-05-06 19:22:23 +02:00
JonKazama-Hellion af3caa9b96 feat(config): add ShowHonorificTitleInHeader toggle (default on) 2026-05-06 19:20:17 +02:00
JonKazama-Hellion 206b25b8d6 fix(integrations): address review findings on HonorificService 2026-05-06 19:18:20 +02:00
JonKazama-Hellion 00deef01a4 feat(integrations): wire HonorificService to Honorific IPC gates 2026-05-06 19:13:10 +02:00
JonKazama-Hellion 74e2c655f0 feat(integrations): add IsApiVersionCompatible and ShouldRenderSlot helpers 2026-05-06 19:09:36 +02:00
JonKazama-Hellion fa91c4e847 feat(branding): add BrandingLinks with Hellion Forge Discord invite 2026-05-06 19:06:34 +02:00
JonKazama-Hellion 1125caabca feat(integrations): add HonorificTitleData DTO and ParseTitleJson 2026-05-06 19:00:09 +02:00
JonKazama-Hellion eead8d813c chore: re-release Theme Expansion as v1.2.3
Hab vergessen die repo.json wieder mit zu bumpen, deshalb hat
Dalamud den v1.2.2-Release nicht angenommen — komplette Manifest-
Bump-Checkliste diesmal durchgezogen: csproj, yaml-Description +
Changelog, repo.json (AssemblyVersion + TestingAssemblyVersion +
drei DownloadLink*-URLs + Description + Changelog), CHANGELOG.md,
ROADMAP.md, README.md, Forge-Post-Datei. Inhalt unverändert
gegenüber v1.2.2.
2026-05-06 14:24:31 +02:00
JonKazama-Hellion 28b20ad6d3 chore: sync repo.json manifest to 1.2.2 2026-05-06 14:17:13 +02:00
JonKazama-Hellion a88ec1714d Merge branch 'feature/v1.2.2-theme-expansion' 2026-05-06 14:07:07 +02:00
JonKazama-Hellion 0110295e7d feat: set Night Blue and Indigo Violet author to Julia Moon 2026-05-06 14:06:14 +02:00
JonKazama-Hellion 9752206996 docs: add forge-post for v1.2.2 2026-05-06 14:04:22 +02:00
JonKazama-Hellion 2f4e4c33ca docs: refresh ROADMAP for 1.2.0/1.2.1/1.2.2 cycle and 1.3.0 next-cycle 2026-05-06 14:02:12 +02:00
JonKazama-Hellion b30b6b135c docs: update THEME-AUTHORING for 1.2.2 themes 2026-05-06 14:01:42 +02:00
JonKazama-Hellion df0844b737 docs: add 1.2.2 entry to CHANGELOG and backfill missing 1.2.1 2026-05-06 14:01:23 +02:00
JonKazama-Hellion 21d703bf0b docs: update HellionChat.yaml description and changelog for 1.2.2 2026-05-06 14:00:11 +02:00
JonKazama-Hellion 4048f0b8d0 chore: bump version to 1.2.2 2026-05-06 13:59:26 +02:00
JonKazama-Hellion 2d0e9ae70c feat: add Hellion Spectrum CVD-safe theme and finalise registry order 2026-05-06 13:59:05 +02:00
JonKazama-Hellion eaf11dcebe feat: add Forge Merchantman built-in theme 2026-05-06 13:57:39 +02:00
JonKazama-Hellion 9bd8262191 feat: add Indigo Violet built-in theme 2026-05-06 13:56:56 +02:00
JonKazama-Hellion ddb00a0836 feat: add Night Blue built-in theme 2026-05-06 13:56:11 +02:00
JonKazama-Hellion aec8ba15f2 docs: add v1.2.1 forge announce post 2026-05-06 11:46:50 +02:00
JonKazama-Hellion c84eae199b merge: v1.2.1 Settings Cleanup 2026-05-06 11:37:07 +02:00
JonKazama-Hellion 9ead8098f5 fix: card-overview subtext wrap + v16 default bumps + chat-colour preset
UI:
- SettingsOverview cards now wrap subtext to two lines (DrawList wrap-
  width) and the card height grew from 96 to 110 px. Single-line
  fitting clipped most of the bilingual subtitles.
- HellionStyle pushes ChildBg with alpha 0 when WindowOpacity < 1.0
  to keep stacked BeginChild layers from compounding the deckgrade
  past what the slider suggests.
- WindowOpacity slider helpmarker now points to Dalamud's per-window
  hamburger menu for opacity / blur / pin / click-through overrides.

UX defaults (v15 → v16 migration adopts new values only when the user
is still on the previous default — bool flips are heuristic, the prior
defaults are from the v1.2.0 cycle and rarely toggled):
- UseCompactDensity false → true (single-line message style is cleaner)
- HideInNewGamePlusMenu false → true (consistent with other hide-flags)
- HideSameTimestamps false → true (cleaner log)
- MaxLinesToRender 5000 → 2500 (mid-range hardware friendlier)
- ChatColours empty → Hellion brand preset (the first-run wizard does
  not offer a preset choice, so fresh installs get the brand colours
  out of the box)
2026-05-06 11:35:59 +02:00
JonKazama-Hellion b190456005 chore: bump version to 1.2.1 and write changelog 2026-05-06 08:46:07 +02:00
JonKazama-Hellion ebc0999a8e refactor: re-sort settings cards thematically for v1.2.1
- Split Appearance into ThemeAndLayout (theme + window-style + timestamps)
  and FontsAndColours (fonts + per-channel colours)
- Merge Database into DataManagement together with Retention/Cleanup/Export
  from Privacy
- Move HistoryPreload from Privacy to Chat → Auto-Tell-Tabs
- Move KeybindMode from General/Language to General/Input
- Drop OverrideStyle, ChosenStyle, WindowAlpha, ShowThemeQuickPicker
- Migration v15 → v16 maps WindowAlpha → WindowOpacity if Opacity at default
- Add card-subtext per overview card so users do not have to guess where
  a setting lives
2026-05-06 08:43:54 +02:00
JonKazama-Hellion c0b3edb20c feat: add v1.2.1 i18n strings for new card layout 2026-05-06 08:31:52 +02:00
JonKazama-Hellion 64cadcf87b fix(release): shrink v1.2.0 changelog under Discord embed-description 4096 cap
Forge-Auto-Announce workflow failed twice on tag push because the
Discord webhook returned 400 — embed.description hit 5346 chars,
which exceeds Discord's hard 4096-per-field limit. The workflow's
own 5500-total cap (V6 check) didn't catch it because it was a
per-field overflow, not a total-payload overflow.

Both yaml changelog block and forge-post DE-body trimmed:
- yaml v1.2.0 EN-block: 3249 → 2104 chars
- forge-post DE-body: 2069 → 1543 chars
- description final: 3675 chars (with ~420 char headroom)
- total payload: 3740 / 5500

Plugin-Manager-facing changelog still covers all v1.2.0 highlights
plus the post-test bug fixes; just denser. Tag will be force-recreated
on this commit so workflow_dispatch picks up the trimmed files from
the v1.2.0 tag tree.

Backlog item: workflow should add a per-field cap check (4096 for
description, 1024 for field values) so future releases fail-fast
locally before hitting Discord.
2026-05-06 00:37:12 +02:00
JonKazama-Hellion 0165cba966 merge: v1.2.0 Layout Refresh
27 commits brought in from feature/v1.2.0-layout-refresh:
- Sidebar/Top-Tabs visual modernisation (icon-only sidebar with
  44px fixed width and tooltip, vertical accent pill, top-tab
  underline pill).
- TabIconMapping with single-source 15-glyph pool, per-tab
  Icon override via Settings → Tabs combobox.
- AutoTellTabTint hash-based icon+color differentiation
  (84 distinct combinations) for parallel tells.
- Bottom status bar (22px): channel/privacy/counts/tells/version.
- Card-Rows as default message render with Compact-Density
  opt-out toggle.
- Pulsing red unread-dot indicator on sidebar tab icons,
  respects Configuration.ReduceMotion.
- Migration v14 → v15: legacy theme fields removed, Appearance
  bindings cleaned to use Themes tab as single source.
- Settings-Save chat-history preservation: UpdateFrom Identifier-
  mapping for persistent tabs, TempTab skip in ClearAllTabs/
  FilterAllTabs, conditional refilter only for filter-relevant
  changes.
- Hellion font (Exo 2) no longer blocks FontSizeV2 adjustment —
  4K user can scale up the variable font.

Tag v1.2.0 sits on the last feature commit (3da550c).
Forge-Auto-Announce-Action triggers on tag push.
2026-05-06 00:18:37 +02:00
JonKazama-Hellion 3da550c2fc fix(fonts): Hellion-Schrift-Toggle blockt Schriftgröße nicht mehr
Settings → Erscheinungsbild → Schriftarten: bei aktiver
'Mitgelieferte Hellion-Schrift (Exo 2) verwenden' war der
Schriftgrößen-Slider ausgegraut und FontSizeV2 wurde im
FontManager auch nicht angewendet — 4K-User konnten den
Plugin-Font nicht hochskalieren.

Exo 2 ist Variable-Font, FontSize ist also problemlos
adjustierbar. Zwei-teiliger Fix:

- Appearance.cs: UseHellionFont rendert jetzt nur FontSizeCombo +
  SymbolsFontSizeCombo, kein Disabled-Wrap mehr. Der Bestand-
  Custom-Font-Stack mit FontsEnabled-Toggle und Font-Choosern
  bleibt exclusive zur Hellion-Schrift, läuft im else-Pfad.
- FontManager.cs RegularFont-Build: SizePt-Source verzweigt
  jetzt auf UseHellionFont — Hellion-Pfad nutzt FontSizeV2,
  Bestand-Pfad nutzt weiter GlobalFontV2.SizePt aus dem
  Custom-Font-Spec.

Reported by Flo 2026-05-06: '4k monitor ... der standart zu klein'.
2026-05-06 00:11:19 +02:00
JonKazama-Hellion 4b43fdb0ad fix(settings): conditional refilter on save — preserve chat history for cosmetic changes
Settings.Save() unconditionally ran ClearAllTabs + FilterAllTabsAsync
after every save. The cycle reloads messages from the DB, which silently
wipes any in-session message that wasn't persisted — Privacy-First
configurations block most channels from the DB, so all unlogged
channels (Allgemein/Say/Yell/Shout under default filters) showed up
empty after every settings save.

New HasFilterRelevantChanges helper compares Mutable to Plugin.Config
across:
- PrivacyFilterEnabled
- PrivacyPersistChannels (HashSet<ChatType>)
- PrivacyPersistUnknownChannels
- FilterIncludePreviousSessions
- per-persistent-tab: Identifier (reorder/swap), SelectedChannels,
  ExtraChatAll, ExtraChatChannels

Refilter only runs if any of those changed. Cosmetic settings (theme,
tab icons, layout, fonts, language) leave the chat log untouched.
Combined with the prior UpdateFrom Identifier-mapping fix and the
TempTab skip in ClearAllTabs/FilterAllTabs, both persistent and
Auto-Tell tabs now fully survive a settings save.

Reported by Flo from in-game testing 2026-05-05/06: 'der allgemein
chat tab z.b immernoch gecleart wird' / 'alle vom plugin nicht
geloggten channel sind dann leer'.

Also updated yaml changelog, docs/CHANGELOG.md and .github/forge-posts/
v1.2.0.md to describe the actual fix shape rather than the partial
UpdateFrom-only fix that preceded it.
2026-05-06 00:05:49 +02:00
JonKazama-Hellion 56621669b2 release(v1.2.0): finalize changelog, yaml notes, forge announce post
Final release-doc pass for v1.2.0:
- yaml changelog extended with the post-T14 polish notes
  (Auto-Tell variety, unread pulse, layout fixes, settings-save
   wipe fixes for both persistent and TempTabs)
- docs/CHANGELOG.md date filled in (2026-05-05) and same polish
  notes added under Added/Fixed sections
- .github/forge-posts/v1.2.0.md created — DE bullet body, picked
  up by forge-announce.yml on tag push (EN side reads the yaml
  changelog block)

1920 chars in the forge post — comfortably under the 5500-char
total cap that the workflow enforces.
2026-05-06 00:00:44 +02:00
JonKazama-Hellion ed2a0f7374 fix(messages): exclude TempTabs from ClearAllTabs and FilterAllTabs
TempTabs (Auto-Tell-Tabs) are session-only and populated directly by
AutoTellTabsService.HandleTell — they have no DB persistence to refilter
from. The Settings-save flow calls ClearAllTabs() + FilterAllTabsAsync()
to rebuild persistent tabs after potential filter changes; this wiped
TempTabs as collateral because their tells aren't in the DB (either
Privacy-filtered out or simply not yet persisted).

Skip TempTabs in both methods so their live-state survives any settings
save. Live tells continue to land via HandleTell, regardless of the
clear/filter cycle.
2026-05-05 23:51:42 +02:00
JonKazama-Hellion 59e86cd8dd fix(config): preserve persistent-tab message history across settings save
UpdateFrom replaced persistent tabs with Tab.Clone()s. Clone deliberately
omits the NonSerialized Messages list to avoid shared mutable state on
disk-load — but on a settings save (Plugin.Config.UpdateFrom(Mutable))
that path means every persistent tab loses its in-session chat history
the moment the user clicks Save.

Capture the live MessageList plus LastSendUnread counter by Identifier
before the replace and restore them onto the cloned tabs. Tab.Clone()
already preserves Identifier so the lookup matches one-to-one for
unchanged tabs. New tabs added in settings get a fresh empty list,
deleted tabs lose their history (both intended).

Reported by Flo in-game 2026-05-05 — chat got wiped on every settings
save during v1.2.0 testing in Limsa.
2026-05-05 23:48:23 +02:00
JonKazama-Hellion a74e3da030 feat(sidebar): subtle pulse animation on unread-dot indicator
Sin-based alpha scaling between 60% and 100% with a 2-second cycle.
Subtle enough to register peripherally without becoming distracting.
Respects Plugin.Config.ReduceMotion (field exists since v1.1.0,
toggle UI lands in v1.3.0) — static render when disabled.
2026-05-05 23:41:31 +02:00
JonKazama-Hellion b8ed2a1ce5 feat(sidebar): per-tell hashed icon variety + unread-dot indicator 2026-05-05 23:36:52 +02:00
JonKazama-Hellion e6c6c02780 feat(sidebar): hash-color tint for auto-tell tabs to disambiguate parallel conversations 2026-05-05 23:27:41 +02:00
JonKazama-Hellion ab9ebedeee fix(sidebar): suppress child background so top padding doesn't show frame fill
The sidebar child window's ChildBg painted the upper top-padding area
(reserved for header-toolbar alignment) with the theme's frame color,
making it look like a stub block above the buttons. Pushing ChildBg
to transparent keeps the buttons floating on the window background.
Vertical separation to the message column stays intact via the
TabTable's BordersInnerV flag.
2026-05-05 23:12:54 +02:00
JonKazama-Hellion 11af4ce4c4 fix(sidebar): top-padding mirrors header toolbar height, restore standard button height
Sidebar buttons sat at the window top while messages began below the
chat header toolbar — vertical mismatch flagged by Flo. Adding a
GetFrameHeightWithSpacing dummy at the top of the sidebar child shifts
the entire button column down to align with the first message row.

Reverted the previous TextLineHeight+4f button shrink (commit 8a78390):
buttons size was fine, only their vertical position needed correction.
2026-05-05 23:10:16 +02:00
JonKazama-Hellion 8a78390a15 fix(sidebar): tighten button height with explicit FramePadding override 2026-05-05 23:03:53 +02:00
JonKazama-Hellion 23e47e06c0 fix(layout): sidebar button height + status-bar version-slot clipping 2026-05-05 22:59:57 +02:00
JonKazama-Hellion ff60576f3c Update copyright notice and asset licensing details 2026-05-05 21:40:28 +02:00
JonKazama-Hellion 5b5bacfc41 Revise upstream sync documentation for clarity
Updated the documentation to clarify the upstream sync workflow, including changes to cherry-picking practices and conflict handling. Added sections on intent, contributing back, and handling upstream changes.
2026-05-05 21:26:53 +02:00
JonKazama-Hellion eb8b7be2f5 Update AI disclosure for HellionChat 2026-05-05 21:13:31 +02:00
JonKazama-Hellion eb05e04f79 Revise contributing guidelines for clarity and updates
Updated the contributing guidelines to reflect changes in project scope, contribution acceptance criteria, and response times. Clarified sections on translations and continuous integration.
2026-05-05 21:07:18 +02:00
JonKazama-Hellion 2f0affcdbb Update SECURITY.md for clarity and formatting 2026-05-05 21:00:06 +02:00
JonKazama-Hellion dfa7c47887 Revise Code of Conduct for clarity and inclusivity
Updated the Code of Conduct to enhance clarity and inclusivity. Added sections on encouraged and restricted behaviors, and improved formatting.
2026-05-05 20:55:24 +02:00
JonKazama-Hellion acf799440e Revise COPYRIGHT file with updated licensing details
Updated copyright information and license details in the COPYRIGHT file, including new copyright holders and clarifications on asset licensing.
2026-05-05 20:25:51 +02:00
JonKazama-Hellion 3e98b9103f chore(release): bump to v1.2.0 — layout refresh 2026-05-05 19:54:56 +02:00
JonKazama-Hellion 4a613f7acb Update NOTICE.md with maintainer details
Added maintenance information for Hellion Forge.
2026-05-05 19:51:51 +02:00
JonKazama-Hellion af5f4d380a feat(config): migration v14 → v15, removed legacy theme fields and Appearance bindings 2026-05-05 19:51:29 +02:00
JonKazama-Hellion ecf1e93a1b Refine language in SUPPORT.md for clarity
Updated phrasing for clarity and consistency throughout the document.
2026-05-05 19:49:26 +02:00
JonKazama-Hellion e404a2e0d9 Refactor privacy notice for clarity and consistency 2026-05-05 19:47:09 +02:00
JonKazama-Hellion d485f5ea1f feat(messages): card-row default render with compact-density opt-out 2026-05-05 19:44:37 +02:00
JonKazama-Hellion b48684ce5a feat(settings): compact density toggle in Appearance 2026-05-05 19:42:57 +02:00
JonKazama-Hellion a11c8bc6e9 feat(statusbar): wire status bar into ChatLogWindow render pipeline 2026-05-05 19:35:52 +02:00
JonKazama-Hellion 985a284e7d feat(statusbar): cached 1Hz status-bar component with format helpers 2026-05-05 19:34:27 +02:00
JonKazama-Hellion e629518550 feat(settings): per-tab icon combobox in Tabs section 2026-05-05 19:28:04 +02:00
JonKazama-Hellion c28c972ae3 revert(top-tabs): drop icon prefix — Dalamud default font lacks FontAwesome codepoints
Tofu-squares rendered in-game (verified by Flo 2026-05-05 19:21).
ImGui TabItem labels render in a single font frame; mixed-font
(FontAwesome icon + default font for tab name) is not possible
without Font-Atlas merging at FontManager level — out of scope
for v1.2.0.

Top-Tabs visual modernization is now driven by the Underline-Pill
alone (T6, kept). Sidebar (icon-only) remains the use case where
icons earn their keep. v1.2.0 Akzeptanzkriterium AC1 wird auf
"Top-Tabs haben Pill-Underline" reduziert.
2026-05-05 19:23:26 +02:00
JonKazama-Hellion bc0f44712f feat(top-tabs): active-tab accent underline pill 2026-05-05 19:18:18 +02:00
JonKazama-Hellion f663cb3c14 feat(top-tabs): icon glyph prefix in tab label 2026-05-05 19:17:59 +02:00
JonKazama-Hellion 5a9c2018b0 feat(sidebar): active-tab vertical accent pill 2026-05-05 19:09:26 +02:00
JonKazama-Hellion a1cdae05d0 feat(sidebar): icon-only tabs with tooltip and 44px fixed width 2026-05-05 19:08:58 +02:00
JonKazama-Hellion c17f5ae516 refactor(tabs): split TabIconGlyphResolver, single-source glyph pool, polish 2026-05-05 19:00:54 +02:00
JonKazama-Hellion a2db8cb639 feat(tabs): TabIconMapping with default-pool plus override resolver 2026-05-05 18:52:47 +02:00
JonKazama-Hellion 507efc8cda feat(tabs): nullable Tab.Icon field for custom glyph override 2026-05-05 18:43:13 +02:00
JonKazama-Hellion 6f3cf2f3ce Revise README for version 1.1.0 updates
Updated README.md for clarity and consistency in language, including changes to versioning and feature descriptions.
2026-05-05 18:39:37 +02:00
JonKazama-Hellion c979a05d6c Update version number to 1.1.0 in README 2026-05-05 18:21:43 +02:00
JonKazama-Hellion c53e453341 Update username in forge-announce workflow 2026-05-05 18:19:58 +02:00
JonKazama-Hellion 2519b413f8 merge: forge-announce workflow
Adds .github/workflows/forge-announce.yml — auto-posts a bilingual
changelog embed to the Hellion Forge #changelog Discord channel on
every vX.Y.Z tag push. DE bullets come from .github/forge-posts/
<tag>.md (frontmatter: subtitle, versionsnatur), EN block from
HellionChat.yaml.

Hard cap 5500 chars total. Major releases that exceed get a clear
manual-post message and stay off the auto-channel.

Decoupled from release.yml — failures in either workflow don't
block the other.
2026-05-05 15:34:13 +02:00
JonKazama-Hellion e5ac4faf7b ci(forge): auto-announce changelog to hellion forge on tag push
New workflow: when a vX.Y.Z tag is pushed (or workflow_dispatch
runs with a tag input), reads .github/forge-posts/<tag>.md for the
DE bullet body plus frontmatter (subtitle, versionsnatur), pulls the
matching English block from HellionChat.yaml, builds the Discord
webhook embed and posts it to the Hellion Forge #changelog channel.

Decoupled from release.yml — a fail here doesn't block the release,
and a fail there doesn't block the announce. Hard caps at 5500 chars
total (title + description + footer); major releases that exceed
that get a clear fail message and stay manual.

Tag is read via env: TAG_NAME and validated against ^v\d+\.\d+\.\d+$
before any string interpolation; frontmatter is regex-parsed with
explicit length caps (subtitle 60, versionsnatur 40). Curl posts the
payload via stdin so the secret never appears in process args.
Single retry on transient 5xx after 30s, hard fail on 4xx.
2026-05-05 15:33:49 +02:00
JonKazama-Hellion 0c26d1aa67 merge: v1.1.0 Theme Foundation
First major UI cycle after the standalone v1.0.0 cut. Theme engine
with five built-in themes (Hellion Arctic, Chat 2 Klassik, Event
Horizon, Moonlit Bloom, Mint Grove), customisable JSON themes,
modernised settings layout (card-grid overview + breadcrumb detail
view), opt-in per-theme chat-channel colours, and the plugin icon
swap to the Hellion Forge hammer.

Configuration v13 → v14: all users land on Hellion Arctic. Pick
Chat 2 Klassik in Settings → Themes for the upstream look.

See HellionChat/HellionChat.yaml changelog and docs/CHANGELOG.md for
the full release notes; docs/THEME-AUTHORING.md is the new guide for
writing custom themes.
2026-05-05 15:17:14 +02:00
JonKazama-Hellion 8b13ba1fdc release(v1.1.0): updated screenshots and forge announce note
Three new screenshots replace the v1.0.x set: chatWindow (in-game
sidebar with FreeCompany tab), settingsOverview (card grid with all
nine sections), themesPicker (built-in themes plus example custom).
ImageUrls in repo.json + yaml updated; old withSimpleTweaks.png
dropped.

.github/forge-posts/v1.1.0.md seeded for the eventual auto-announce
workflow (Discord changelog post on tag push). Format matches the
forge-announce spec — frontmatter (subtitle, versionsnatur) plus DE
bullet body.
2026-05-05 15:14:50 +02:00
JonKazama-Hellion 52da5d5e23 chore(release): bump to v1.1.0 — theme foundation 2026-05-05 15:04:52 +02:00
JonKazama-Hellion 916640fb60 feat(brand): swap plugin icon to hellion forge hammer
The chat plugin now ships under the Hellion Forge plugin-workshop
brand. Icon is the 512x512 hammer mark from the Forge logo set
(was 256x256 ChatTwo derivative).
2026-05-05 15:00:08 +02:00
JonKazama-Hellion feeb1df4eb docs(themes): theme authoring guide with hellion forge branding 2026-05-05 14:54:58 +02:00
JonKazama-Hellion f2086865ce feat(themes): opt-in chat color apply banner in themes tab
When a theme defines its own chat channel colours and the current
Configuration.ChatColours don't match, a dezent banner offers Apply /
Keep — opt-in, never auto-overwriting user picks. Switching themes
re-arms the banner so each theme can be evaluated separately.
2026-05-05 14:51:16 +02:00
JonKazama-Hellion 15a89dd6e7 feat(themes): chat channel color sets for four built-in themes
Hellion Arctic, Event Horizon, Moonlit Bloom and Mint Grove each
ship a distinct chat-channel palette tinted toward their brand
family while preserving the FFXIV channel identity (Say light, Yell
yellow, Shout orange, Tell pink-magenta, Party blue, FC cyan, NN
green). Chat 2 Klassik intentionally ships without — users picking
that theme keep their existing channel colours.
2026-05-05 14:48:34 +02:00
JonKazama-Hellion 53952717c0 feat(themes): optional chat channel colors in theme schema 2026-05-05 14:44:59 +02:00
JonKazama-Hellion fcbbd174b6 fix(themes): wrap theme cards in begin/end group so the grid wraps
Theme-card grid was stacking diagonally for the same reason the
settings overview did: SetCursorScreenPos plus SameLine in the
caller loop don't compose. Wrap each card in BeginGroup/EndGroup,
draw name and author via DrawList instead of cursor hops, and let
ImGui handle row wrapping naturally.
2026-05-05 14:31:35 +02:00
JonKazama-Hellion d41cea0031 fix(settings): card grid wraps correctly, detail view drops legacy tab list
SettingsOverview now wraps each card in BeginGroup/EndGroup so SameLine
in the loop can wrap rows. The card content is drawn directly into the
DrawList (icon, title, subtext) without cursor hopping that broke the
flow.

DrawDetail no longer renders the second-column tab list — the user has
already picked a section from the overview, the redundant column made
the detail view feel like the old vanilla settings layout. Section
content now uses the full width.
2026-05-05 14:28:24 +02:00
JonKazama-Hellion c943a2cff3 fix(themes): drop legacy StyleModel push from chat log and pop-out
The pre-engine StyleModel override in ChatLogWindow.PreDraw and
Popout.PreDraw was layering an extra Dalamud style on top of the
Hellion theme, locally tinting the chat window back to a non-Hellion
look while every other plugin window rendered correctly. Theme is
now the single source of truth — pick chat2-classic for the upstream
flavour.
2026-05-05 14:23:41 +02:00
JonKazama-Hellion abcd0847ef fix(settings): restore cursor after card draw to keep grid layout intact 2026-05-05 14:22:23 +02:00
JonKazama-Hellion 2f52cbb7d4 feat(themes): seed example custom theme on first start 2026-05-05 14:17:22 +02:00
JonKazama-Hellion 9103bbb892 feat(settings): breadcrumb header and esc to return to overview 2026-05-05 14:15:12 +02:00
JonKazama-Hellion 8f9c01d322 feat(themes): mini-mockup preview in theme cards 2026-05-05 14:13:19 +02:00
JonKazama-Hellion af4651b37e feat(themes): export active theme to json 2026-05-05 14:11:14 +02:00
JonKazama-Hellion 485dc4e1b4 i18n(themes): localize theme settings card grid (en/de) 2026-05-05 14:09:02 +02:00
JonKazama-Hellion c878d24d11 feat(themes): settings tab with built-in and custom theme grids 2026-05-05 14:05:59 +02:00
JonKazama-Hellion cb5c940a84 feat(settings): card-grid overview router 2026-05-05 14:02:13 +02:00
JonKazama-Hellion dd3a0ea069 feat(themes): wire theme engine into plugin draw pipeline + migrate v13→v14
HellionStyle.PushGlobal nimmt jetzt eine Theme-Instance + Window-Opacity
und liest alle Color- und Style-Slots aus dem aktiven Theme statt aus
einer fixen Konstanten-Tabelle. Plugin hält die ThemeRegistry und schaltet
beim Init auf das in Config.Theme gespeicherte Slug.

Configuration v13 → v14:
- Neue Felder Theme (slug), WindowOpacity, ReduceMotion, UseCompactDensity,
  ShowThemeQuickPicker
- HellionThemeEnabled und HellionThemeWindowOpacity sind ab v14 [Obsolete]
  und bleiben bis v1.2.0 als JSON-Safety-Net erhalten
- Migration setzt alle Bestandsuser auf hellion-arctic; chat2-classic
  bleibt im Themes-Tab als Upstream-Look wählbar
- WindowOpacity übernimmt den Wert von HellionThemeWindowOpacity, alte
  HellionThemeEnabled-Flag entfällt funktional (Theme-Engine ist immer aktiv)

Konsumenten der alten Felder (ChatLogWindow.BgAlpha, Popout.BgAlpha) lesen
jetzt das neue WindowOpacity. Die Settings-UI in Appearance.cs schreibt
übergangsweise weiter in die Obsolete-Felder; Phase J ersetzt diesen Block
durch den dedizierten Themes-Tab. CS0612/CS0618 sind dort gezielt mit
pragma gekapselt.
2026-05-05 13:51:31 +02:00
JonKazama-Hellion 4bf6c3ef1f feat(themes): custom theme loading with file-stamp cache 2026-05-05 13:44:15 +02:00
JonKazama-Hellion 2378ce6bf2 feat(themes): json loader with schema validation 2026-05-05 13:42:40 +02:00
JonKazama-Hellion b85db24601 test(themes): sanity tests for all built-in themes 2026-05-05 10:28:08 +02:00
JonKazama-Hellion cae7d76206 feat(themes): theme registry with built-in lookup and fallback 2026-05-05 10:27:50 +02:00
JonKazama-Hellion 4c6d52e652 feat(themes): mint-grove built-in theme 2026-05-05 10:25:22 +02:00
JonKazama-Hellion cbfdfe35be feat(themes): moonlit-bloom built-in theme 2026-05-05 10:25:00 +02:00
JonKazama-Hellion 537b96c79f feat(themes): event-horizon built-in theme 2026-05-05 10:24:39 +02:00
JonKazama-Hellion d3d28924e6 feat(themes): chat2-classic built-in theme 2026-05-05 10:24:17 +02:00
JonKazama-Hellion 48f1fb5ba1 feat(themes): hellion-arctic built-in theme 2026-05-05 10:23:51 +02:00
JonKazama-Hellion 0b13efd0b5 feat(util): add HexToRgba parser for theme JSON 2026-05-05 10:21:46 +02:00
JonKazama-Hellion 289fe2eb78 feat(themes): theme top-level record 2026-05-05 10:19:33 +02:00
JonKazama-Hellion fe9e66b0ff feat(themes): theme typography record 2026-05-05 10:19:18 +02:00
JonKazama-Hellion 990edd8300 feat(themes): theme layout record 2026-05-05 10:19:03 +02:00
JonKazama-Hellion db95ec7dff feat(themes): theme colors record 2026-05-05 10:18:49 +02:00
JonKazama-Hellion 7e036c1d00 chore(csproj): enable nullable reference types
Audit-Tooling hatte einen mehrstündigen Sweep mit 50–200 erwarteten
Warnings prognostiziert. Tatsächliches Resultat: eine Zeile. Genau
eine. Codebase war pro-File längst nullable-konform, wir hatten den
Project-Switch nur nie umgelegt. Reminder dass Audit-Output ein
Hinweis ist, kein Plan, und ein menschlicher Pass davor lohnt sich.
2026-05-05 08:48:04 +02:00
JonKazama-Hellion 1c511a147d fix(stringutil): use InvariantCulture for byte-size formatting
Locale-Bug: BytesToString rendert auf deutscher Locale "1,5GB" statt
"1.5GB". InvariantCulture pinnt den Dezimal-Separator. Plus
InternalsVisibleTo-Hook für ein lokales (gitignored) Test-Projekt.
2026-05-05 08:34:56 +02:00
JonKazama-Hellion f093d93761 perf(messagemanager): switch pending queue to linked list, quiet privacy log
PendingSync läuft jetzt als LinkedList (O(1) Last statt O(n) Linq-Last
im ContentIdResolverHook); Privacy-Filter-Drop-Log auf Verbose runter,
sodass der Default-xllog-Stream nicht mehr pro Nachricht spammt.
2026-05-05 08:25:13 +02:00
JonKazama-Hellion e7c8667497 fix(emotecache): cancel pending texture loads on plugin dispose
Plugin-scoped CancellationTokenSource fließt jetzt durch LoadAsync und
die Texture-Calls; Dispose cancelt in-flight downloads. Smoke (System-
Spam + Reload) sauber, weiter beobachten unter höherem Emote-Volumen.
2026-05-05 08:09:53 +02:00
JonKazama-Hellion 497197eb2c chore(deps): cap major-bump packages with closed version ranges
ImageSharp, MessagePack and Pidgin pinned to [x.y, next-major) so a
lock-file regeneration cannot drift across a major. Resolved versions
unchanged; lock-file diff is request-string only.
2026-05-05 07:54:33 +02:00
JonKazama-Hellion 08b2ffc600 ci(codeql): pin actions to commit SHAs
Replaces floating major-version tags with full commit SHAs (Tag-
Kommentar dahinter), so a tag-republish can't slip a different action
into the workflow.
2026-05-05 07:45:37 +02:00
JonKazama-Hellion 8db3eca46c chore(fontmanager): drop unused Lodestone font download
The FontManager constructor downloaded FFXIV_Lodestone_SSF.ttf from
img.finalfantasyxiv.com on first start (or read it from a local
cache) into a GameSymFont byte array. Both historical readers of
that field are gone:

- BuildFonts() used to feed the bytes into AddFontFromMemory; that
  path was replaced by the Dalamud-provided AddGameSymbol helper.
- The upstream webinterface server wrote the bytes through a
  BinaryWriter to serve them to the Svelte frontend; the entire
  webinterface was intentionally removed in HellionChat.

With no live consumer left, the field, the constructor block, the
HttpClient call and the disk cache are all dead code. Removing them:

- eliminates the synchronous HTTP request on the plugin-load thread
  (no more multi-second startup hang on slow networks)
- closes the implicit "no timeout, no size guard" exposure on that
  request
- removes one outbound network endpoint (Square Enix Lodestone CDN)
  from the privacy footprint

PRIVACY.md and THIRD_PARTY_NOTICES.md updated to reflect that
HellionChat now talks to BetterTTV only (opt-out via setting). Cached
TTF files left over from earlier versions stay in pluginConfigs/
HellionChat/ until a user removes them; they are simply no longer
read.

Build: 0 warnings, 0 errors. No behavioural change for users — symbol
glyphs (job icons, item glyphs, status effects) keep rendering through
Dalamud's built-in symbol font.
2026-05-05 07:37:35 +02:00
JonKazama-Hellion 4d54eabdac chore: code quality sweep 2026-05-04 / 2026-05-05
General code-quality and robustness pass across the plugin: thread-
safety on IPC state, resource-disposal cleanups, input validation,
defensive null-checks and a few small UX glitches. Compliance docs
(THIRD_PARTY_NOTICES, PRIVACY, COPYRIGHT) refreshed to v1.0.3.

Highlights
- ExtraChat IPC state synchronised across threads
- ChatLogWindow autocomplete no longer leaks the unmanaged
  ImGuiListClipper allocation
- ChatLogWindow + Popout style stack stays balanced when config
  toggles mid-frame
- Retention sweep and privacy cleanup wait for the actual filter
  pass instead of the fire-and-forget Task that started it
- Configuration.LatestVersion bumped to 13 to match the active
  migration path
- GameFunctions placeholder buffer guarded against oversized
  replacement names
- TellTarget.IsSet, ResolveTempInputChannel, InputPreview, IconUtil,
  Lender, Payloads, ExtraPayload all hardened against null / empty /
  EOF / cycle inputs
- FontManager Lodestone download stays in scope for a follow-up
  (timeout + lazy init pending)
- AutoTranslate replaced the msvcrt.dll memcmp P/Invoke with a
  managed Span comparison
- Privacy cleanup worker thread marked IsBackground = true
- Database cleanup now removes both legacy files in one click
- Tell-target name redacted in the verbose debug log

Compliance
- THIRD_PARTY_NOTICES: last-reviewed bumped to v1.0.3, Pidgin 3.5.1,
  SQLitePCLRaw.lib.e_sqlite3 3.50.3 listed as direct dependency with
  CVE-2025-6965 / CVE-2025-7709 rationale
- PRIVACY: last-reviewed bumped to v1.0.3, BetterTTV trigger wording
  clarified (list fetch at startup vs. on-demand image fetch)
- COPYRIGHT: upstream attribution range widened

Build: 0 warnings, 0 errors. No behavioural changes that would alter
existing user configuration or stored chat history.
2026-05-05 07:28:12 +02:00
411 changed files with 88907 additions and 14969 deletions
+243 -147
View File
@@ -1,156 +1,252 @@
# ##############################################################
# #
# # .editorconfig – Hellion Forge / Hellion Media
# #
# # Überarbeitet: Mai 2026
# #
# # Strategie:
# # - Standard-.NET-Conventions (private Fields = _camelCase)
# # - CSharpier übernimmt die meiste Formatierung
# # - Hier: Naming, IDE-Hints, Backup-Format-Regeln
# #
# # ##############################################################
root = true
# =====================================================
# Defaults (alle Files)
# =====================================================
[*]
indent_style=space
tab_width=4
indent_size=4
trim_trailing_whitespace=true
insert_final_newline=false
indent_style = space
tab_width = 4
indent_size = 4
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
# JetBrains Rider custom properties for code formatting styles
resharper_csharp_brace_style=next_line
resharper_csharp_braces_for_foreach=not_required
resharper_csharp_braces_for_for=not_required
resharper_csharp_braces_for_while=not_required
charset=utf-8
end_of_line=crlf
# =====================================================
# Markdown: Trailing Spaces erlaubt (2 Spaces = <br>)
# =====================================================
# Microsoft .NET properties
csharp_new_line_before_members_in_object_initializers=false
csharp_preferred_modifier_order=public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
csharp_style_prefer_utf8_string_literals=true:suggestion
csharp_style_var_elsewhere=true:suggestion
csharp_style_var_for_built_in_types=true:suggestion
csharp_style_var_when_type_is_apparent=true:suggestion
dotnet_naming_rule.private_constants_rule.import_to_resharper=True
dotnet_naming_rule.private_constants_rule.resharper_description=Constant fields (private)
dotnet_naming_rule.private_constants_rule.resharper_guid=236f7aa5-7b06-43ca-bf2a-9b31bfcff09a
dotnet_naming_rule.private_constants_rule.severity=warning
dotnet_naming_rule.private_constants_rule.style=upper_camel_case_style
dotnet_naming_rule.private_constants_rule.symbols=private_constants_symbols
dotnet_naming_rule.private_instance_fields_rule.import_to_resharper=True
dotnet_naming_rule.private_instance_fields_rule.resharper_description=Instance fields (private)
dotnet_naming_rule.private_instance_fields_rule.resharper_guid=4a98fdf6-7d98-4f5a-afeb-ea44ad98c70c
dotnet_naming_rule.private_instance_fields_rule.severity=warning
dotnet_naming_rule.private_instance_fields_rule.style=upper_camel_case_style
dotnet_naming_rule.private_instance_fields_rule.symbols=private_instance_fields_symbols
dotnet_naming_rule.private_instance_fields_rule_1.import_to_resharper=True
dotnet_naming_rule.private_instance_fields_rule_1.resharper_description=Instance fields (private)
dotnet_naming_rule.private_instance_fields_rule_1.resharper_guid=4a98fdf6-7d98-4f5a-afeb-ea44ad98c70c
dotnet_naming_rule.private_instance_fields_rule_1.severity=warning
dotnet_naming_rule.private_instance_fields_rule_1.style=upper_camel_case_style
dotnet_naming_rule.private_instance_fields_rule_1.symbols=private_instance_fields_symbols_1
dotnet_naming_rule.private_static_fields_rule.import_to_resharper=True
dotnet_naming_rule.private_static_fields_rule.resharper_description=Static fields (private)
dotnet_naming_rule.private_static_fields_rule.resharper_guid=f9fce829-e6f4-4cb2-80f1-5497c44f51df
dotnet_naming_rule.private_static_fields_rule.severity=warning
dotnet_naming_rule.private_static_fields_rule.style=upper_camel_case_style
dotnet_naming_rule.private_static_fields_rule.symbols=private_static_fields_symbols
dotnet_naming_rule.private_static_readonly_rule.import_to_resharper=True
dotnet_naming_rule.private_static_readonly_rule.resharper_description=Static readonly fields (private)
dotnet_naming_rule.private_static_readonly_rule.resharper_guid=15b5b1f1-457c-4ca6-b278-5615aedc07d3
dotnet_naming_rule.private_static_readonly_rule.severity=warning
dotnet_naming_rule.private_static_readonly_rule.style=upper_camel_case_style
dotnet_naming_rule.private_static_readonly_rule.symbols=private_static_readonly_symbols
dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper=True
dotnet_naming_rule.unity_serialized_field_rule.resharper_description=Unity serialized field
dotnet_naming_rule.unity_serialized_field_rule.resharper_guid=5f0fdb63-c892-4d2c-9324-15c80b22a7ef
dotnet_naming_rule.unity_serialized_field_rule.severity=warning
dotnet_naming_rule.unity_serialized_field_rule.style=lower_camel_case_style_1
dotnet_naming_rule.unity_serialized_field_rule.symbols=unity_serialized_field_symbols
dotnet_naming_rule.unity_serialized_field_rule_1.import_to_resharper=True
dotnet_naming_rule.unity_serialized_field_rule_1.resharper_description=Unity serialized field
dotnet_naming_rule.unity_serialized_field_rule_1.resharper_guid=5f0fdb63-c892-4d2c-9324-15c80b22a7ef
dotnet_naming_rule.unity_serialized_field_rule_1.severity=warning
dotnet_naming_rule.unity_serialized_field_rule_1.style=lower_camel_case_style_1
dotnet_naming_rule.unity_serialized_field_rule_1.symbols=unity_serialized_field_symbols_1
dotnet_naming_style.lower_camel_case_style.capitalization=camel_case
dotnet_naming_style.lower_camel_case_style.required_prefix=_
dotnet_naming_style.lower_camel_case_style_1.capitalization=camel_case
dotnet_naming_style.upper_camel_case_style.capitalization=pascal_case
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_constants_symbols.applicable_kinds=field
dotnet_naming_symbols.private_constants_symbols.required_modifiers=const
dotnet_naming_symbols.private_constants_symbols.resharper_applicable_kinds=constant_field
dotnet_naming_symbols.private_constants_symbols.resharper_required_modifiers=any
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds=field
dotnet_naming_symbols.private_instance_fields_symbols.resharper_applicable_kinds=field,readonly_field
dotnet_naming_symbols.private_instance_fields_symbols.resharper_required_modifiers=instance
dotnet_naming_symbols.private_instance_fields_symbols_1.applicable_accessibilities=private
dotnet_naming_symbols.private_instance_fields_symbols_1.applicable_kinds=field
dotnet_naming_symbols.private_instance_fields_symbols_1.resharper_applicable_kinds=field,readonly_field
dotnet_naming_symbols.private_instance_fields_symbols_1.resharper_required_modifiers=instance
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds=field
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers=static
dotnet_naming_symbols.private_static_fields_symbols.resharper_applicable_kinds=field
dotnet_naming_symbols.private_static_fields_symbols.resharper_required_modifiers=static
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds=field
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers=readonly,static
dotnet_naming_symbols.private_static_readonly_symbols.resharper_applicable_kinds=readonly_field
dotnet_naming_symbols.private_static_readonly_symbols.resharper_required_modifiers=static
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities=*
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds=
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds=unity_serialised_field
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers=instance
dotnet_naming_symbols.unity_serialized_field_symbols_1.applicable_accessibilities=*
dotnet_naming_symbols.unity_serialized_field_symbols_1.applicable_kinds=
dotnet_naming_symbols.unity_serialized_field_symbols_1.resharper_applicable_kinds=unity_serialised_field
dotnet_naming_symbols.unity_serialized_field_symbols_1.resharper_required_modifiers=instance
dotnet_style_parentheses_in_arithmetic_binary_operators=never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators=always_for_clarity:none
dotnet_style_parentheses_in_relational_binary_operators=never_if_unnecessary:none
dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion
dotnet_style_predefined_type_for_member_access=true:suggestion
dotnet_style_qualification_for_event=false:suggestion
dotnet_style_qualification_for_field=false:suggestion
dotnet_style_qualification_for_method=false:suggestion
dotnet_style_qualification_for_property=false:suggestion
dotnet_style_require_accessibility_modifiers=for_non_interface_members:suggestion
[*.md]
trim_trailing_whitespace = false
# ReSharper properties
resharper_autodetect_indent_settings=true
resharper_cpp_insert_final_newline=true
resharper_csharp_insert_final_newline=false
resharper_formatter_off_tag=@formatter:off
resharper_formatter_on_tag=@formatter:on
resharper_formatter_tags_enabled=true
resharper_fsharp_insert_final_newline=false
resharper_html_insert_final_newline=false
resharper_resx_insert_final_newline=false
resharper_shaderlab_insert_final_newline=false
resharper_t4_insert_final_newline=false
resharper_use_indent_from_vs=false
resharper_vb_insert_final_newline=false
resharper_xmldoc_insert_final_newline=false
resharper_xml_insert_final_newline=false
# ReSharper inspection severities
resharper_arrange_redundant_parentheses_highlighting=hint
resharper_arrange_this_qualifier_highlighting=hint
resharper_arrange_type_member_modifiers_highlighting=hint
resharper_arrange_type_modifiers_highlighting=hint
resharper_built_in_type_reference_style_for_member_access_highlighting=hint
resharper_built_in_type_reference_style_highlighting=hint
resharper_razor_assembly_not_resolved_highlighting=warning
resharper_redundant_base_qualifier_highlighting=warning
resharper_suggest_var_or_type_built_in_types_highlighting=hint
resharper_suggest_var_or_type_elsewhere_highlighting=hint
resharper_suggest_var_or_type_simple_types_highlighting=hint
resharper_web_config_module_not_resolved_highlighting=warning
resharper_web_config_type_not_resolved_highlighting=warning
resharper_web_config_wrong_module_highlighting=warning
# =====================================================
# JSON / YAML / Web-Configs: 2-Space-Indent
# Konsistent mit yamllint und Prettier-Override
# =====================================================
[{*.har,*.jsb2,*.jsb3,*.json,*.jsonc,*.postman_collection,*.postman_collection.json,*.postman_environment,*.postman_environment.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,jest.config}]
indent_style=space
indent_size=2
[*.{yaml,yml}]
indent_size = 2
[{*.yaml,*.yml}]
indent_style=space
indent_size=2
[*.{json,jsonc,har,jsb2,jsb3,postman_collection,postman_environment}]
indent_size = 2
[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,c++m,cc,ccm,cginc,compute,cp,cpp,cppm,cs,cshtml,cu,cuh,cxx,cxxm,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,mxx,nuspec,paml,razor,resw,resx,shader,skin,tpp,usf,ush,uxml,vb,xaml,xamlx,xoml,xsd}]
indent_style=space
indent_size=4
tab_width=4
[{.babelrc,.eslintrc,.prettierrc,.markdownlintrc,.stylelintrc,bowerrc}]
indent_size = 2
# =====================================================
# .NET / XAML / Razor / Resources: 4-Space-Indent
# =====================================================
[*.{cs,csx,vb,fs,fsi,fsx}]
indent_size = 4
[*.{xml,xsd,xaml,axaml,paml,resx,resw,nuspec,config}]
indent_size = 4
[*.{cshtml,razor,aspx,ascx,asax,master,axaml}]
indent_size = 4
# ##############################################################
# #
# # C# Sektion: Style, Naming, Format
# #
# ##############################################################
[*.{cs,csx}]
# =====================================================
# C# Style – var-Präferenz
# =====================================================
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = true:suggestion
# =====================================================
# C# Style – Sonstiges
# =====================================================
# UTF-8 String Literals (C# 11+)
csharp_style_prefer_utf8_string_literals = true:suggestion
# Reihenfolge der Access-Modifier (Microsoft-Empfehlung)
csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
# Initializer: nicht alles auf eine Zeile
csharp_new_line_before_members_in_object_initializers = false
# =====================================================
# C# Format – Braces (Backup, falls CSharpier nicht läuft)
# =====================================================
# Allman Style: Klammern auf neue Zeile
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
# =====================================================
# C# Format – Switch-Einrückung
# =====================================================
csharp_indent_case_contents = true
csharp_indent_switch_labels = true
# =====================================================
# .NET Style – Qualification (kein "this." nötig)
# =====================================================
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_property = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_event = false:suggestion
# =====================================================
# .NET Style – Predefined Types (int statt Int32 etc.)
# =====================================================
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
# =====================================================
# .NET Style – Parentheses
# =====================================================
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
# =====================================================
# .NET Style – Accessibility-Modifier erzwingen
# =====================================================
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
# ##############################################################
# #
# # Naming Conventions (.NET-Standard)
# #
# # Private Instance Fields: _camelCase
# # Private Static Fields: _camelCase
# # Private Constants: PascalCase
# # Private Static Readonly: PascalCase
# #
# ##############################################################
# === Style: Underscore + camelCase ===
dotnet_naming_style.underscore_camel_case_style.capitalization = camel_case
dotnet_naming_style.underscore_camel_case_style.required_prefix = _
# === Style: PascalCase ===
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# === Rule: Private Instance Fields → _camelCase ===
dotnet_naming_rule.private_instance_fields.severity = warning
dotnet_naming_rule.private_instance_fields.symbols = private_instance_fields_symbols
dotnet_naming_rule.private_instance_fields.style = underscore_camel_case_style
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds = field
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities = private
# === Rule: Private Static Fields → _camelCase ===
dotnet_naming_rule.private_static_fields.severity = warning
dotnet_naming_rule.private_static_fields.symbols = private_static_fields_symbols
dotnet_naming_rule.private_static_fields.style = underscore_camel_case_style
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers = static
# === Rule: Private Constants → PascalCase ===
dotnet_naming_rule.private_constants.severity = warning
dotnet_naming_rule.private_constants.symbols = private_constants_symbols
dotnet_naming_rule.private_constants.style = pascal_case_style
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
# === Rule: Private Static Readonly → PascalCase ===
dotnet_naming_rule.private_static_readonly.severity = warning
dotnet_naming_rule.private_static_readonly.symbols = private_static_readonly_symbols
dotnet_naming_rule.private_static_readonly.style = pascal_case_style
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static, readonly
# ##############################################################
# #
# # JetBrains Rider / ReSharper Settings
# #
# ##############################################################
# === Brace-Style (für ReSharper-spezifische Formatierung) ===
resharper_csharp_brace_style = next_line
# Kurze Statements ohne Klammern erlaubt (für 1-Zeiler)
resharper_csharp_braces_for_foreach = not_required
resharper_csharp_braces_for_for = not_required
resharper_csharp_braces_for_while = not_required
# === Auto-Detection und Formatter-Tags ===
resharper_autodetect_indent_settings = true
resharper_use_indent_from_vs = false
# Erlaubt @formatter:off / @formatter:on Kommentare im Code
resharper_formatter_off_tag = @formatter:off
resharper_formatter_on_tag = @formatter:on
resharper_formatter_tags_enabled = true
# =====================================================
# ReSharper Inspection Severities
# (Hints = blaue Wellen, Warnings = gelb, Errors = rot)
# =====================================================
# Style-Suggestions: nur als Hint anzeigen
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_suggest_var_or_type_built_in_types_highlighting = hint
resharper_suggest_var_or_type_elsewhere_highlighting = hint
resharper_suggest_var_or_type_simple_types_highlighting = hint
# Echte Probleme: als Warning
resharper_redundant_base_qualifier_highlighting = warning
+47 -16
View File
@@ -1,19 +1,50 @@
# Local development environment template
#
# Copy this file to `.env` and adjust paths to your setup,
# or run: bash scripts/setup-dev-env.sh
#
# `.env` is gitignored — never commit your local paths.
#
# Activate in shell:
# set -a; source .env; set +a
#
# Or use direnv (recommended):
# echo 'dotenv .env' > .envrc && direnv allow
##############################################################
##
## .env.example – Hellion Forge / Hellion Media
##
## Template für lokale Entwicklungsumgebung.
## Kopiere diese Datei nach `.env` und passe die Pfade
## an dein Setup an.
##
## ⚠️ `.env` ist gitignored – niemals lokale Pfade committen!
##
##############################################################
##
## SETUP
##
## 1) Manuell:
## cp .env.example .env
## # Pfade in .env anpassen
##
## 2) Automatisch:
## bash scripts/setup-dev-env.sh
##
## AKTIVIERUNG IN DER SHELL
##
## Variante A – einmalig pro Shell:
## set -a; source .env; set +a
##
## Variante B – mit direnv (empfohlen):
## echo 'dotenv .env' > .envrc
## direnv allow
##
##############################################################
# Path to Dalamud development DLLs (Dalamud.dll, FFXIVClientStructs.dll,
# Lumina.dll, Lumina.Excel.dll). Required for building ChatTwo.Tests project.
# =====================================================
# Build & Development Paths
# =====================================================
# Pfad zu den Dalamud-Development-DLLs:
# - Dalamud.dll
# - FFXIVClientStructs.dll
# - Lumina.dll
# - Lumina.Excel.dll
#
# XIVLauncher Core (Linux): ~/.xlcore/dalamud/Hooks/dev
# XIVLauncher (Windows): %AppData%\XIVLauncher\addon\Hooks\dev
# Wird zum Bauen des HellionChat.Tests-Projekts benötigt.
#
# Standardpfade je nach Plattform:
# XIVLauncher Core (Linux): ~/.xlcore/dalamud/Hooks/dev
# XIVLauncher (Windows): %AppData%\XIVLauncher\addon\Hooks\dev
# XIVLauncher (macOS): ~/Library/Application Support/XIV on Mac/dalamud/Hooks/dev
DALAMUD_HOME=/path/to/dalamud/dev/dlls
+178 -2
View File
@@ -1,2 +1,178 @@
# Generated files
HellionChat/Resources/Language.*.resx linguist-generated=true
##############################################################
##
## .gitattributes – Hellion Forge / Hellion Media
##
## Setup: Linux-First Development
## (Hauptentwicklung auf Linux, Target = Dalamud/Windows)
## Überarbeitet: Mai 2026
##
## Strategie:
## - Default: Alles LF (Linux-Konvention)
## - Windows-Batch-Scripts: CRLF (technische Pflicht!)
## - PowerShell: CRLF (Sicherheit für Windows PS 5.1)
## - Binärdateien: explizit markiert (gegen Korruption)
##
## Hinweis:
## Moderne Visual-Studio- und MSBuild-Versionen kommen
## problemlos mit LF in .sln/.csproj klar.
## Falls jemals Probleme auftauchen: hier umstellen.
##
##############################################################
# =====================================================
# Default: Auto-Detect, alles auf LF normalisieren
# =====================================================
* text=auto eol=lf
# =====================================================
# Source Code (LF)
# =====================================================
*.cs text eol=lf
*.csx text eol=lf
*.vb text eol=lf
*.fs text eol=lf
*.fsx text eol=lf
# =====================================================
# Configs & Daten (LF)
# =====================================================
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.xml text eol=lf
*.md text eol=lf
*.txt text eol=lf
*.config text eol=lf
*.editorconfig text eol=lf
.gitignore text eol=lf
.gitattributes text eol=lf
.env.example text eol=lf
# =====================================================
# Visual Studio / MSBuild Project Files (LF)
# Linux-first: moderne Tools kommen mit LF zurecht
# =====================================================
*.sln text eol=lf
*.csproj text eol=lf
*.vbproj text eol=lf
*.fsproj text eol=lf
*.props text eol=lf
*.targets text eol=lf
# =====================================================
# Resources & Lokalisierung (LF)
# =====================================================
# Linguist soll generierte Sprachdateien nicht mitzählen
HellionChat/Resources/Language.*.resx linguist-generated=true
*.resx text eol=lf
*.resw text eol=lf
# =====================================================
# Linux/Mac-Scripts (LF – Pflicht)
# =====================================================
*.sh text eol=lf
*.bash text eol=lf
*.zsh text eol=lf
# =====================================================
# >>> AUSNAHMEN <<<
# Windows-Scripts brauchen ZWINGEND CRLF.
# Mit LF werden diese auf Windows nicht ausgeführt!
# =====================================================
# Batch-Scripts (cmd.exe braucht CRLF)
*.bat text eol=crlf
*.cmd text eol=crlf
# PowerShell (PS 7+ wäre LF-tolerant,
# aber Windows PowerShell 5.1 zickt teilweise)
*.ps1 text eol=crlf
*.psm1 text eol=crlf
*.psd1 text eol=crlf
# =====================================================
# Binäre Build-Artefakte
# =====================================================
*.dll binary
*.exe binary
*.pdb binary
*.so binary
*.dylib binary
*.nupkg binary
*.snupkg binary
# =====================================================
# Bilder (binary)
# =====================================================
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.bmp binary
*.tiff binary
*.webp binary
# SVG ist eigentlich XML – als Text behandeln
*.svg text eol=lf
# =====================================================
# Fonts (binary)
# =====================================================
*.ttf binary
*.otf binary
*.woff binary
*.woff2 binary
*.eot binary
# =====================================================
# Archive (binary)
# =====================================================
*.zip binary
*.7z binary
*.tar binary
*.gz binary
*.rar binary
# =====================================================
# Audio / Video (binary)
# =====================================================
*.wav binary
*.mp3 binary
*.ogg binary
*.mp4 binary
# =====================================================
# FFXIV / Dalamud spezifische Binär-Formate
# =====================================================
*.tex binary
*.pap binary
*.avfx binary
*.shpk binary
*.scd binary
@@ -3,6 +3,12 @@ name: Build
# Verifies that every push to main and every PR still builds against the
# current Dalamud staging branch. Does not produce release artefacts; the
# release workflow handles that on tag.
#
# Linux runner: gitea.com Cloud Actions provides ubuntu-latest. The plugin
# csproj targets net10.0-windows, but `dotnet build` cross-compiles on
# Linux as long as the Dalamud staging assemblies are present at the
# expected lookup path ($(HOME)/.xlcore/dalamud/Hooks/dev/, which the
# Dalamud SDK 15 uses on Linux).
on:
push:
@@ -21,36 +27,27 @@ permissions:
jobs:
build:
name: Build (Release)
runs-on: windows-latest
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5
with:
dotnet-version: 10.0.x
- name: Download Dalamud staging
shell: pwsh
run: |
$hooks = Join-Path $env:APPDATA "XIVLauncher\addon\Hooks\dev"
New-Item -ItemType Directory -Force -Path $hooks | Out-Null
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile dalamud.zip
Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks
hooks="$HOME/.xlcore/dalamud/Hooks/dev"
mkdir -p "$hooks"
curl -fsSL https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -o dalamud.zip
unzip -oq dalamud.zip -d "$hooks"
- name: Restore
run: dotnet restore HellionChat/HellionChat.csproj
- name: Build (Release)
run: dotnet build HellionChat/HellionChat.csproj --configuration Release --no-restore
- name: Upload build output
uses: actions/upload-artifact@v7
with:
name: HellionChat-build-${{ github.run_number }}
path: HellionChat/bin/Release/**/HellionChat/**
if-no-files-found: warn
retention-days: 14
+255
View File
@@ -0,0 +1,255 @@
name: Forge Announce
# Triggered when a vX.Y.Z tag is pushed. Reads .github/forge-posts/<tag>.md
# (Frontmatter + DE bullet body) and the matching English block from
# HellionChat/HellionChat.yaml, builds a Discord-Webhook embed and posts
# it to the Hellion Forge #changelog channel.
#
# Decoupled from release.yml: a fail here does not block the GitHub
# release, and a fail there does not block the announce. Spec lives in
# the Vault under "Hellion Chat Forge-Auto-Announce Spec".
#
# Security: the only user-controlled inputs that enter run-steps are the
# tag name and the frontmatter values from a repo-internal markdown file.
# Tag name is read via env: (TAG_NAME, $env:TAG_NAME) and validated against
# ^v\d+\.\d+\.\d+$ before any string interpolation. Frontmatter values are
# parsed by regex with explicit length caps. No webhook event payload data
# (issue titles, PR bodies, commit messages, etc.) flows into run-steps.
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Existing tag to (re)post, e.g. v1.1.0'
required: true
type: string
permissions:
contents: read
jobs:
announce:
name: Post changelog to Hellion Forge
runs-on: ubuntu-latest
# The DISCORD_FORGE_WEBHOOK secret is set as a repo-level Actions Secret
# on Gitea (Settings → Actions → Secrets). Repo-level secrets are in
# scope for every job by default, no environment: declaration needed.
timeout-minutes: 5
steps:
# On push:tags github.ref points at the tag commit; on workflow_dispatch
# the user supplies the tag explicitly. Always check out that tag so
# the yaml + forge-posts file are read from the tagged tree, not main.
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.inputs.tag || github.ref }}
# Build embed-payload as a JSON file on disk. PowerShell-Core (pwsh)
# ships pre-installed on ubuntu-latest so we get the same scripting
# patterns release.yml uses on windows-latest. Tag is read via env: to
# treat it as a string variable rather than inline shell text, and
# validated against the semver regex before any interpolation.
- name: Build embed payload
id: build
shell: pwsh
env:
TAG_NAME: ${{ github.event.inputs.tag || github.ref_name }}
run: |
$tag = $env:TAG_NAME
if ($tag -notmatch '^v\d+\.\d+\.\d+$') {
throw "V1: Refusing to announce non-semver tag: $tag"
}
$version = $tag.Substring(1)
# ---------- Forge-Post-Datei lesen ----------
$forgePath = ".github/forge-posts/$tag.md"
if (-not (Test-Path $forgePath)) {
throw "V2: Forge-Post-Datei für $tag fehlt unter .github/forge-posts/. Datei vor dem Tag anlegen, dann Tag re-pushen oder workflow_dispatch."
}
$forgeRaw = Get-Content -Path $forgePath -Raw
# Frontmatter (--- … ---) am Datei-Anfang
if ($forgeRaw -notmatch '(?s)\A---\s*\r?\n(.*?)\r?\n---\s*\r?\n(.*)\z') {
throw "V3: Frontmatter (---) fehlt oder ist defekt in $forgePath"
}
$fmText = $matches[1]
$deBody = $matches[2].Trim()
$subtitle = $null
$versionsnatur = $null
foreach ($line in ($fmText -split "`r?`n")) {
if ($line -match '^subtitle:\s*"?([^"]*)"?\s*$') { $subtitle = $matches[1] }
if ($line -match '^versionsnatur:\s*"?([^"]*)"?\s*$') { $versionsnatur = $matches[1] }
}
if ([string]::IsNullOrWhiteSpace($subtitle)) { throw "V3: Frontmatter-Feld 'subtitle' fehlt in $forgePath" }
if ([string]::IsNullOrWhiteSpace($versionsnatur)) { throw "V3: Frontmatter-Feld 'versionsnatur' fehlt in $forgePath" }
if ($subtitle.Length -gt 60) { throw "V4: Frontmatter-Feld 'subtitle' überschreitet Limit ($($subtitle.Length) Char, max 60)" }
if ($versionsnatur.Length -gt 40) { throw "V4: Frontmatter-Feld 'versionsnatur' überschreitet Limit ($($versionsnatur.Length) Char, max 40)" }
if ([string]::IsNullOrWhiteSpace($deBody)) { throw "V3: DE-Body fehlt in $forgePath" }
# ---------- EN-Block aus HellionChat.yaml ziehen ----------
# 1:1 Pattern aus release.yml — gleicher Header-Marker, gleiches
# Trailer-Verhalten. Bei Drift die zwei Workflows synchron halten.
$yamlPath = "HellionChat/HellionChat.yaml"
$raw = Get-Content -Path $yamlPath -Raw
$marker = "changelog: |-"
$idx = $raw.IndexOf($marker)
if ($idx -lt 0) { throw "V5: changelog-Block nicht gefunden in $yamlPath" }
$afterMarker = $raw.Substring($idx + $marker.Length)
$changelogBody = (($afterMarker -split "`r?`n") | ForEach-Object {
if ($_ -match '^ ') { $_.Substring(4) } else { $_ }
}) -join "`n"
$header = "**v$version "
$start = $changelogBody.IndexOf($header)
if ($start -lt 0) {
throw "V5: No changelog entry for version $version found in $yamlPath. Update the changelog block before tagging."
}
$rest = $changelogBody.Substring($start)
$nextHdr = $rest.IndexOf("`n`n**v", 1)
$trailer = $rest.IndexOf("`n`n---")
if ($nextHdr -ge 0 -and ($trailer -lt 0 -or $nextHdr -lt $trailer)) {
$enBlock = $rest.Substring(0, $nextHdr).TrimEnd()
} elseif ($trailer -ge 0) {
$enBlock = $rest.Substring(0, $trailer).TrimEnd()
} else {
$enBlock = $rest.TrimEnd()
}
# ---------- Embed-Felder + Per-Field-Caps (Discord-Hard-Limits) ----------
# Discord enforces per-embed-field limits separately from the
# combined-total limit. We split the DE and EN blocks into two
# embeds that share the same release URL so Discord stitches
# them into one visual card. Hard caps per Discord docs:
# description: 4096 per embed
# title: 256 per embed
# footer.text: 2048 per embed
# combined sum across all embeds: 6000
$title = "Hellion Chat $version — $subtitle"
$deDesc = "**Deutsch**`n`n$deBody"
$enDesc = "**English**`n`n$enBlock"
$footerText = "Hellion Forge · $versionsnatur"
$releaseUrl = "https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/$tag"
if ($deDesc.Length -gt 4096) {
throw "V6a: DE-Body too long for one embed ($($deDesc.Length) chars, max 4096). Trim .github/forge-posts/$tag.md or post the announcement manually (see forge style §8)."
}
if ($enDesc.Length -gt 4096) {
throw "V6b: EN-Block too long for one embed ($($enDesc.Length) chars, max 4096). Trim the changelog entry in HellionChat/HellionChat.yaml or post manually."
}
$totalChars = $title.Length + $deDesc.Length + $enDesc.Length + $footerText.Length
if ($totalChars -gt 6000) {
throw "V6c: Combined embed chars $totalChars exceed Discord's 6000-total limit. Major-Release detected — post manually via Bot/Multi-Embed (see forge style §8)."
}
Write-Host "Embed-Caps OK: de=$($deDesc.Length)/4096, en=$($enDesc.Length)/4096, total=$totalChars/6000"
# ---------- Embed-Payload bauen (zwei gestapelte Embeds) ----------
# Discord MERGES embeds in one message that share the same `url`
# (the image-gallery merge) and then renders only the FIRST embed's
# description — every following embed contributes images only. So
# only the DE embed carries the release URL; the EN embed stays
# url-less, which makes Discord stack both as separate cards with
# both descriptions visible. Title sits on the first embed, footer
# + timestamp on the last so it still reads as one post.
$payload = [ordered]@{
username = "Forge Herald"
avatar_url = "https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/icon.png"
content = "<@&1500489631555260446>"
allowed_mentions = [ordered]@{
parse = @()
roles = @("1500489631555260446")
}
embeds = @(
[ordered]@{
title = $title
url = $releaseUrl
color = 12730636
description = $deDesc
},
[ordered]@{
# Deliberately no `url` — a shared url would make Discord
# merge this embed into the first and drop the EN body.
color = 12730636
description = $enDesc
footer = [ordered]@{ text = $footerText }
timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffZ")
}
)
}
$payloadJson = $payload | ConvertTo-Json -Depth 8 -Compress
# Ausgabe-Datei ohne trailing newline für sauberes curl --data-binary @-
[System.IO.File]::WriteAllText("$PWD/embed-payload.json", $payloadJson, [System.Text.UTF8Encoding]::new($false))
Write-Host "Payload size: $($payloadJson.Length) chars"
Write-Host "Embed title: $title"
Write-Host "Embed footer: $footerText"
# POST to the Hellion Forge changelog webhook. curl from PowerShell-Core
# so we can pipe the payload via stdin (--data-binary @-) and keep
# secrets out of process arg lists. One retry on 5xx, hard fail on 4xx.
- name: POST to Hellion Forge webhook
shell: pwsh
env:
DISCORD_FORGE_WEBHOOK: ${{ secrets.DISCORD_FORGE_WEBHOOK }}
run: |
if ([string]::IsNullOrEmpty($env:DISCORD_FORGE_WEBHOOK)) {
throw "V7: DISCORD_FORGE_WEBHOOK secret is empty. Check Settings → Environments → Webhook."
}
$payloadFile = "$PWD/embed-payload.json"
if (-not (Test-Path $payloadFile)) {
throw "Embed payload file missing — previous step did not produce embed-payload.json"
}
$maxAttempts = 2
$attempt = 0
while ($attempt -lt $maxAttempts) {
$attempt++
Write-Host "POST attempt $attempt of $maxAttempts"
$tmpResp = "$PWD/.webhook-response"
$tmpHeaders = "$PWD/.webhook-headers"
# --silent suppresses progress; --show-error prints errors so
# the workflow log shows what happened. -w prints HTTP status
# to stdout for inspection. -o captures body for diagnosis,
# -D captures headers.
$rawStatus = Get-Content $payloadFile -Raw |
curl --silent --show-error `
--header 'Content-Type: application/json' `
--data-binary '@-' `
-D $tmpHeaders `
-o $tmpResp `
-w '%{http_code}' `
"$env:DISCORD_FORGE_WEBHOOK"
$status = [int]$rawStatus
Write-Host "HTTP status: $status"
if ($status -ge 200 -and $status -lt 300) {
Write-Host "Forge announce POST succeeded."
exit 0
}
$bodySnippet = ""
if (Test-Path $tmpResp) {
$bodySnippet = (Get-Content $tmpResp -Raw -ErrorAction SilentlyContinue)
if ($bodySnippet.Length -gt 500) { $bodySnippet = $bodySnippet.Substring(0, 500) + " …" }
}
if ($status -ge 400 -and $status -lt 500) {
# E2: 4xx is permanent — webhook revoked, channel deleted,
# payload malformed. No retry.
throw "E2: Discord-Webhook returned permanent $status. Body: $bodySnippet"
}
# E1: 5xx (or transport-level fail with status 0) — wait + retry once
if ($attempt -lt $maxAttempts) {
Write-Host "Transient $status — sleeping 30s before retry."
Start-Sleep -Seconds 30
} else {
throw "E1: Discord-Webhook returned transient $status after $maxAttempts attempts. Body: $bodySnippet"
}
}
+222
View File
@@ -0,0 +1,222 @@
name: Release
# Triggered when a vX.Y.Z tag is pushed. Builds the plugin against the
# current Dalamud staging branch, locates the latest.zip produced by
# DalamudPackager and attaches it to the matching Gitea Release.
#
# User-controlled inputs touched by this workflow:
# - the tag name (filtered by on.tags = v*, validated again at runtime
# against ^v\d+\.\d+\.\d+$ before being used in any string)
# All other values are either repo-controlled (paths under
# HellionChat/bin/Release derived from find / Get-ChildItem) or pinned
# URLs to goatcorp / gitea. Nothing from a webhook event payload (issue/PR
# titles, commit messages, etc.) flows into a run-step.
#
# Linux runner: gitea.com Cloud Actions only ships ubuntu-latest. The
# plugin csproj targets net10.0-windows, `dotnet build` cross-compiles on
# Linux when the Dalamud staging assemblies sit under $(HOME)/.xlcore/...
on:
push:
tags:
- 'v*'
# Manual recovery trigger. Use Gitea's "Run workflow" UI and select the
# tag (e.g. v1.4.4) from the Ref dropdown - not main. The Validate tag
# ref step below hard-fails if a non-tag ref is selected: the release
# name and body are both derived from the tag, so a branch ref would
# publish a release named after a branch.
workflow_dispatch:
permissions:
contents: write
jobs:
release:
name: Build and attach release ZIP
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
# Validate up-front so a manual dispatch from a branch ref fails loud
# here instead of burning a full build before the publish step notices.
- name: Validate tag ref
run: |
if [[ "${GITHUB_REF}" != refs/tags/v* ]]; then
echo "::error::Release workflow must run on a v*.X.Y tag ref, got ${GITHUB_REF}"
echo "::error::Push a tag, or pick the tag (not main) in the workflow_dispatch Ref dropdown."
exit 1
fi
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup .NET 10
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5
with:
dotnet-version: 10.0.x
- name: Download Dalamud staging
run: |
hooks="$HOME/.xlcore/dalamud/Hooks/dev"
mkdir -p "$hooks"
curl -fsSL https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -o dalamud.zip
unzip -oq dalamud.zip -d "$hooks"
- name: Build (Release)
run: dotnet build HellionChat/HellionChat.csproj --configuration Release
- name: Locate latest.zip
id: locate
run: |
zip="$(find HellionChat/bin/Release -name latest.zip -print -quit)"
if [ -z "$zip" ]; then
echo "latest.zip not found under HellionChat/bin/Release" >&2
exit 1
fi
echo "Found: $zip"
echo "path=$zip" >> "$GITHUB_OUTPUT"
# Build a release body from the matching changelog block in
# HellionChat.yaml plus a static install / docs footer. Fails the
# workflow if no block exists for the tagged version, which is the
# automated counterpart to the "yaml + repo.json + release body
# kept in sync" rule.
#
# GITHUB_REF_NAME is read via env: (not ${{ }} interpolation) so the
# tag value is treated as a PowerShell variable, not as inline shell
# text. The strict regex below rejects anything that is not a clean
# semver tag before it is used to build a string.
- name: Generate release body
shell: pwsh
env:
# github.ref_name is the tag because Validate tag ref above
# already enforced refs/tags/v*. Read via env: so the value
# is a PowerShell variable, not inline shell text, and gets
# re-validated against the semver regex below.
TAG_NAME: ${{ github.ref_name }}
run: |
$tag = $env:TAG_NAME
if ($tag -notmatch '^v\d+\.\d+\.\d+$') {
throw "Refusing to generate release body for non-semver tag: $tag"
}
$version = $tag.Substring(1)
$yamlPath = "HellionChat/HellionChat.yaml"
$raw = Get-Content -Path $yamlPath -Raw
$marker = "changelog: |-"
$idx = $raw.IndexOf($marker)
if ($idx -lt 0) { throw "changelog block not found in $yamlPath" }
# changelog: is the last top-level key in the manifest, so
# everything after the marker is the literal block. Strip the
# 4-space yaml indent (prettier convention) from each line.
$afterMarker = $raw.Substring($idx + $marker.Length)
$changelogBody = (($afterMarker -split "`r?`n") | ForEach-Object {
if ($_ -match '^ ') { $_.Substring(4) } else { $_ }
}) -join "`n"
# Subblock convention: "**vX.Y.Z — <subtitle> (<date>)**"
# matches verify-changelog-sync.sh and slim-rule grep.
$header = "**v$version "
$start = $changelogBody.IndexOf($header)
if ($start -lt 0) {
throw "No changelog entry for version $version found in $yamlPath. Update the changelog block before tagging a release."
}
$rest = $changelogBody.Substring($start)
$nextHdr = $rest.IndexOf("`n`n**v", 1)
$trailer = $rest.IndexOf("`n`n---")
if ($nextHdr -ge 0 -and ($trailer -lt 0 -or $nextHdr -lt $trailer)) {
$currentBlock = $rest.Substring(0, $nextHdr).TrimEnd()
} elseif ($trailer -ge 0) {
$currentBlock = $rest.Substring(0, $trailer).TrimEnd()
} else {
$currentBlock = $rest.TrimEnd()
}
# Static install / docs / licence footer is maintained as a
# separate file so the workflow YAML stays clean (no embedded
# heredoc that would have to be indented under the run-block).
$footerPath = ".github/release-footer.md"
if (-not (Test-Path $footerPath)) {
throw "Release footer template not found: $footerPath"
}
$footer = Get-Content -Path $footerPath -Raw
$body = $currentBlock + "`n" + $footer
$body | Out-File -FilePath release-body.md -Encoding utf8 -NoNewline
Write-Host "Generated release body for $tag :"
Write-Host "----------------------------------------"
Write-Host $body
Write-Host "----------------------------------------"
# The tag comes from GITHUB_REF, the body from the step above. Posted with
# curl rather than gitea.com/actions/release-action, which declares
# `using: go` and has to be compiled by the runner -- act cannot do that
# here and the step dies with exec: "go": executable file not found, exit
# 127, after a build that otherwise succeeded. This runs as a plain shell
# step in the job image, which has curl and python3.
#
# Idempotent on purpose: a re-run against an existing release reuses it and
# replaces the asset instead of failing on the duplicate.
- name: Attach to Gitea release
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZIP_PATH: ${{ steps.locate.outputs.path }}
TAG_NAME: ${{ github.ref_name }}
run: |
set -euo pipefail
api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}"
auth="Authorization: token ${GITEA_TOKEN}"
# Responses land in a file before anything reads them, rather than
# being piped straight into an interpreter. The interpreter is inline
# either way and the server only ever supplies data, but a scanner
# cannot tell those apart from curl-pipe-shell -- and holding the
# response makes it inspectable when a call misbehaves.
get_release_id() {
if curl -sf -H "$auth" "$api/releases/tags/${TAG_NAME}" -o release.json; then
python3 -c 'import json; print(json.load(open("release.json")).get("id",""))'
fi
}
rel_id="$(get_release_id || true)"
if [ -z "$rel_id" ]; then
python3 - <<'PYCREATE' > create.json
import json, os
body = open("release-body.md", encoding="utf-8").read()
print(json.dumps({
"tag_name": os.environ["TAG_NAME"],
"name": os.environ["TAG_NAME"],
"body": body,
"draft": False,
"prerelease": False,
}))
PYCREATE
curl -sf -X POST -H "$auth" -H "Content-Type: application/json" \
-d @create.json "$api/releases" -o created.json
rel_id="$(python3 -c 'import json; print(json.load(open("created.json"))["id"])')"
echo "Created release $rel_id for ${TAG_NAME}"
else
echo "Reusing release $rel_id for ${TAG_NAME}"
fi
# A same-named asset from an earlier attempt has to go, or the upload
# collides with it. This is the state a recovery run finds.
curl -sf -H "$auth" "$api/releases/${rel_id}/assets" -o assets.json
old_id="$(python3 -c 'import json; print(next((a["id"] for a in json.load(open("assets.json")) if a["name"]=="latest.zip"), ""))')"
if [ -n "$old_id" ]; then
curl -sf -X DELETE -H "$auth" "$api/releases/${rel_id}/assets/${old_id}"
echo "Replaced existing latest.zip (asset $old_id)"
fi
curl -sf -X POST -H "$auth" \
-F "attachment=@${ZIP_PATH};filename=latest.zip" \
"$api/releases/${rel_id}/assets?name=latest.zip" -o uploaded.json
python3 -c 'import json; a=json.load(open("uploaded.json")); print("Attached", a["name"], a["size"], "bytes")'
+20
View File
@@ -0,0 +1,20 @@
name: Security
# Ruft den zentralen Scan-Workflow in security-workflows auf
# (Semgrep SAST + Trivy filesystem scan).
on:
push:
branches: [main, master]
pull_request:
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:
jobs:
scan:
uses: JonKazama-Hellion/security-workflows/.gitea/workflows/security-scan.yml@main
with:
# MessageStore.cs interpoliert SQL-Strings, die plugin-lokal sicher sind;
# Semgrep matcht das Pattern, CodeQL mit Datenflussanalyse nicht.
semgrep-exclude-rules: 'csharp.lang.security.sqli.csharp-sqli.csharp-sqli'
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
# .githooks/pre-push — invokes preflight.sh (A/B/C/D=build).
exec scripts/preflight.sh
+2 -2
View File
@@ -8,7 +8,7 @@ body:
value: |
Thanks for reporting. Please fill in the fields below so I can
reproduce the issue. If this is a security issue, stop here and
use the [private vulnerability advisory](https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new)
report it privately to [kontakt@hellion-media.de](mailto:kontakt@hellion-media.de?subject=%5BHellionChat%20Security%5D)
instead.
- type: input
@@ -16,7 +16,7 @@ body:
attributes:
label: HellionChat version
description: From Settings → Information → Version
placeholder: "0.5.4"
placeholder: '0.5.4'
validations:
required: true
+4 -3
View File
@@ -2,12 +2,13 @@ blank_issues_enabled: false
contact_links:
- name: Security vulnerability
url: https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new
about: Do not open a public issue for security problems. Use the private advisory instead.
url: mailto:kontakt@hellion-media.de?subject=%5BHellionChat%20Security%5D
about: Do not open a public issue for security problems. Report by e-mail instead.
- name: Upstream Chat 2 issue
url: https://github.com/Infiziert90/ChatTwo/issues
about: If the issue exists in upstream Chat 2 too, please report it there so the original maintainers see it as well.
about:
If the issue exists in upstream Chat 2 too, please report it there so the original maintainers see it as well.
- name: Discord
url: https://discord.com/users/j.j_kazama
+3 -3
View File
@@ -37,9 +37,9 @@ body:
attributes:
label: Scope estimate from your side
options:
- "Small (one tab, one toggle, one filter)"
- "Medium (a settings section, persistent state, one new file)"
- "Large (architectural, touches the message pipeline or the database)"
- 'Small (one tab, one toggle, one filter)'
- 'Medium (a settings section, persistent state, one new file)'
- 'Large (architectural, touches the message pipeline or the database)'
- "I don't know"
validations:
required: true
+11 -16
View File
@@ -3,9 +3,9 @@ Thanks for contributing to HellionChat. Please fill in the sections
below so the review goes quickly. Delete sections that genuinely do
not apply, but do not delete the whole template.
If this is a security fix, stop here and use a private security
advisory instead:
https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new
If this is a security fix, stop here and report it privately by
e-mail instead of opening a public PR:
mailto:kontakt@hellion-media.de?subject=%5BHellionChat%20Security%5D
-->
## Summary
@@ -18,12 +18,11 @@ https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds behaviour)
- [ ] Breaking change (config migration, removed feature, or behaviour
change that user-visible defaults rely on)
- [ ] Breaking change (config migration, removed feature, or behaviour change that user-visible
defaults rely on)
- [ ] Documentation only
- [ ] Translation update
- [ ] Build, CI or tooling change
- [ ] Upstream cherry-pick from Chat 2
## Linked issue
@@ -53,7 +52,6 @@ new commands, new translations, removed behaviour. If none, write
bump and is it covered by the existing migration tests?
- Does this change the schema in MessageStore?
- Does this change the repo.json or HellionChat.yaml manifest fields?
- Does this affect the upstream cherry-pick path? See docs/UPSTREAM_SYNC.md.
-->
## Checklist
@@ -61,12 +59,9 @@ new commands, new translations, removed behaviour. If none, write
- [ ] I have read [CONTRIBUTING.md](../CONTRIBUTING.md) and
[CODE_OF_CONDUCT.md](../CODE_OF_CONDUCT.md).
- [ ] My change matches the existing code style (`.editorconfig`).
- [ ] I added or updated tests where the existing test infrastructure
made that practical, or I have explained why tests are not
applicable.
- [ ] I updated the README, in-plugin strings or documentation if my
change is user-visible.
- [ ] I did not include any AI-generated code without disclosing it
in the PR description (see [AI_DISCLOSURE.md](../docs/AI_DISCLOSURE.md)).
- [ ] I confirm my contribution is released under the
[EUPL-1.2](../LICENSE).
- [ ] I added or updated tests where the existing test infrastructure made that practical, or I have
explained why tests are not applicable.
- [ ] I updated the README, in-plugin strings or documentation if my change is user-visible.
- [ ] I did not include any AI-generated code without disclosing it in the PR description (see
[AI_DISCLOSURE.md](../docs/AI_DISCLOSURE.md)).
- [ ] I confirm my contribution is released under the [EUPL-1.2](../LICENSE).
+4 -4
View File
@@ -9,14 +9,14 @@ updates:
schedule:
interval: weekly
day: monday
time: "07:00"
time: '07:00'
timezone: Europe/Berlin
open-pull-requests-limit: 5
labels:
- dependencies
- nuget
commit-message:
prefix: "chore(deps)"
prefix: 'chore(deps)'
groups:
patches:
update-types:
@@ -32,11 +32,11 @@ updates:
directory: /
schedule:
interval: monthly
time: "07:00"
time: '07:00'
timezone: Europe/Berlin
open-pull-requests-limit: 3
labels:
- dependencies
- github-actions
commit-message:
prefix: "chore(actions)"
prefix: 'chore(actions)'
+18
View File
@@ -0,0 +1,18 @@
---
subtitle: "Theme Foundation"
versionsnatur: "Major-UI-Cycle"
---
- Theme-Engine mit fünf Built-In-Themes: Hellion Arctic (Default), Chat 2 Klassik, Event Horizon,
Moonlit Bloom, Mint Grove
- Settings öffnet jetzt eine Card-Grid-Übersicht — Klick auf eine Card führt in den Detail-View,
Breadcrumb und ESC zurück zur Übersicht
- Themes-Tab mit Mini-Mockup pro Theme, Live-Switch beim Klick
- Eigene Themes als JSON in `pluginConfigs/HellionChat/themes/` — Beispiel-Vorlage wird beim ersten
Start automatisch abgelegt
- Optional pro Theme eigene Chat-Channel-Farben mit Übernehmen/Behalten-Banner — niemals automatisch
überschrieben
- Plugin-Icon zum Hellion-Forge-Hammer gewechselt
- Migration v13 → v14: alle User landen auf Hellion Arctic. Wer den Upstream-Look will, wählt Chat 2
Klassik in Settings → Themes
- Anleitung zum Schreiben eigener Themes: `docs/THEME-AUTHORING.md`
+25
View File
@@ -0,0 +1,25 @@
---
subtitle: "Layout Refresh"
versionsnatur: "Major-UI-Cycle"
---
- Sidebar im neuen Look: fix 44 px breit, nur Icons, Tab-Name als Tooltip beim Hover, vertikale
Akzent-Pill markiert den aktiven Tab
- Top-Tabs bekommen eine Akzent-Underline statt Background-Fill am aktiven Tab
- Pro Tab eigenes Icon wählbar in Einstellungen → Tabs (FontAwesome-Pool)
- Auto-Tell-Tabs sind jetzt visuell unterscheidbar: jeder Tell-Partner bekommt ein eigenes Icon
(envelope/star/heart/bell/bookmark/flag/fire) plus eigene Farbe aus 12-Farb-Palette — 84
Kombinationen, gleicher Partner ergibt konsistent dieselbe
- Pulsierender roter Dot oben rechts am Sidebar-Icon zeigt ungelesene Nachrichten an. Sanft,
2-Sekunden-Cycle, deaktivierbar über `Configuration.ReduceMotion` (UI-Toggle in v1.3.0)
- Bottom-Status-Bar (22 px) mit fünf Live-Slots: aktiver Channel + Color-Dot, Privacy-Badge,
Tab/Message-Counter, Auto-Tell-Counter, Plugin-Version. Update 1×/Sek
- Card-Rows als Default-Message-Render: Sender-Header in Channel-Farbe, Body neue Zeile, dezenter
Trenner. `Compact Density`-Toggle in Aussehen schaltet zurück auf den Einzeiler
- Bug-Fix: Settings speichern löscht den Chat-Verlauf nicht mehr. Refilter läuft jetzt nur wenn
Filter-relevante Settings geändert wurden — Cosmetic-Änderungen lassen den Chat unverändert.
Persistente und Auto-Tell-Tabs überleben beide
- Bug-Fix: Hellion-Schrift (Exo 2) blockt die Schriftgröße nicht mehr — 4K-User können hochskalieren
- Migration v14 → v15: alte Theme-Felder entfernt, alle anderen Settings bleiben
Animation-Polish (Lerps, Theme-Crossfade, Quick-Picker) folgt in v1.3.0.
+33
View File
@@ -0,0 +1,33 @@
---
subtitle: "Settings Cleanup"
versionsnatur: "UX-Polish-Cycle"
---
- Settings-Übersicht thematisch re-sortiert: zusammenhängende Optionen wohnen jetzt zusammen, jede
Card hat einen kurzen Untertitel — kein Raten mehr wo eine Setting steckt
- Drei neue Cards: **Theme & Layout** (Theme-Picker, Fenster-Style, Zeitstempel-Style), **Schriften
& Farben** (Schriftart, Schriftgröße, Chat-Farben pro Channel), **Daten-Verwaltung**
(Aufbewahrung, Cleanup, Export, DB-Viewer, Advanced-Tools — vorher zwischen Datenschutz und
Datenbank verteilt)
- Datenschutz fokussiert sich jetzt auf eine Aufgabe: den Privacy-Filter
- Der Auto-Tell-Tabs-History-Preload-Slider ist von Datenschutz nach Chat → Auto-Tell-Tabs umgezogen
- KeybindMode wohnt jetzt unter Allgemein → Eingabe statt unter Sprache
- Vier tote Schema-Felder entfernt (alle obsolet seit der Theme-Engine in v1.1.0):
`Stilüberschreiben`-Toggle, `Stilname`-Auswahl, alter `WindowAlpha`-Slider, ungenutztes
`ShowThemeQuickPicker`
- Migration v15 → v16: alter `WindowAlpha`-Wert wird automatisch nach
`Theme & Layout → Fenster-Style → Fenster-Transparenz` gemappt (nur wenn der Slider noch auf
Default 0.85 stand, sonst gewinnt der User-Wert). Backup der Pre-v16-Config liegt unter
`pluginConfigs/HellionChat.json.pre-v16-backup`. User die `Stilüberschreiben` aktiv hatten sehen
einen einmaligen Hinweis-Toast
- UX-Default-Bumps für Bestand-User mit Default-Werten: Card-Rows-Layout zurück auf Single-Line, NG+
standardmäßig hidden, gleiche Zeitstempel werden zusammengefasst, MaxLinesToRender auf
konservativere 2500
- Frische Installs starten mit dem Hellion-Brand-Chat-Color-Preset out-of-the-box (der
First-Run-Wizard hat keine Preset-Wahl)
- Hinweis zum Window-Transparenz-Slider in der Beschreibung: Dalamud's per-Window-Hamburger-Menü
(oben rechts in der Titelleiste) bietet eigene Overrides für Deckkraft, Hintergrund-Blur, Anpinnen
und Durchklick — die haben Vorrang über unseren Slider für das jeweilige Fenster
Pure UX-Polish, keine neuen Features. Nächster Cycle (v1.3.0): Animation-Polish (Lerps,
Theme-Crossfade, Quick-Picker) wie ursprünglich geplant.
+25
View File
@@ -0,0 +1,25 @@
---
subtitle: "Theme Expansion"
versionsnatur: "Theme-Pack-Patch"
---
- Vier neue Built-in-Themes verlängern die Auswahl im Picker — keine Engine-Änderung, keine Settings
angefasst, einfach mehr Farboptionen
- **Night Blue** — Royal Blue auf tiefem Marineblau. Kühles Tech-Dashboard-Mood, bewusst neutral
gehalten damit es sich nicht mit den Brand-Themes beißt
- **Indigo Violet** — Royal Violet auf Deep Indigo mit Türkis-Mint-Counter für
Aurora-Glitter-Stimmung. Schwester von Event Horizon, aber dunkler und dichter; der Türkis-Akzent
hält die beiden klar auseinander
- **Forge Merchantman** — Patina-Bronze auf Workshop-Slate mit warmem Bernstein-Counter. Hellion
Forge bekommt ein eigenes Theme im Plugin selbst — Schwester von Hellion Arctic, aber grüner und
wärmer statt kaltem Cyan
- **Hellion Spectrum** — Farbenblind-sichere Channel-Farben (Deuteranopie/Protanopie) auf Basis der
Wong/Okabe-Ito-Palette. Channel-Identität bleibt erhalten (Tell pink, Yell gelb, Shout orange,
Party blau, FC grün); die Töne sind so gewählt dass jeder Channel auch unter Rot-Grün-Schwäche
klar trennbar bleibt. Deckt rund 99 % aller CVD-Fälle ab
- Kein Schema-Bump, keine Migration. Das Default-Theme bleibt **Hellion Arctic**, eigene
Custom-Themes laufen unverändert weiter
- Theme-Katalog wächst damit von fünf auf neun Built-ins
Reines Theme-Pack zwischen v1.2.1 und dem nächsten Polish-Cycle. Eine Tritan-Variante (Spectrum für
Blau-Gelb-Schwäche) kann später nachgeliefert werden, falls Bedarf kommt.
+20
View File
@@ -0,0 +1,20 @@
---
subtitle: "Plugin Integrations: Honorific"
versionsnatur: "Plugin-Integration-Cycle 1"
---
- Erste Plugin-Integration eingebaut, Cycle 1 von 6 auf der Roadmap
- **Honorific-Custom-Titles im Chat-Header** — der Titel den du in Honorific gesetzt hast erscheint
jetzt links über dem Message-Log mit der von dir gewählten Farbe, Auto-Hide wenn Honorific nicht
installiert ist oder kein Custom-Titel aktiv ist
- **Krone-Icon plus Tooltip** vor dem Titel-Text, damit klar ist woher der Slot kommt ohne dass der
User raten muss
- **Neuer Integrations-Settings-Tab** mit Status-Indikator (erkannt, nicht installiert,
inkompatibel) und Toggle. Plus Vorschau-Block der die fünf weiteren geplanten Cycles ankündigt:
Kontextmenü-Aktionen, Smart Notifications (NotificationMaster), RP-Status-Block (Moodles und
LightlessClient), ExtraChat-Channels, Quick-DM-Button (XIVInstantMessenger)
- **Maintainer-Attribution** im Tab als Höflichkeits-Geste, zwei Buttons zum Honorific-Repo und zum
Caraxi-Profil. Plus Hellion-Forge-Discord-Button für Community-Vorschläge zu künftigen
Integrationen
- Keine Migration, keine Schema-Änderung. Wer Honorific eh schon nutzt sieht den Custom-Titel
automatisch sobald HellionChat aktualisiert
+24
View File
@@ -0,0 +1,24 @@
---
subtitle: Critical Lifecycle Fixes
versionsnatur: Stability-Hotfix
---
**Hellion Chat 1.4.0 — Critical Lifecycle Fixes**
Erster Sub-Patch der v1.4.x Polish-Sweep-Serie. Sieben bekannte Lifecycle- und Race-Bugs aus den
Audit-Pässen abgearbeitet, bevor Performance- und Architektur-Refactors draufkommen.
- **SQLite-Dispose** lehnt sich nicht mehr an GC-Druck zur Datei-Freigabe an, Pooling=false auf der
Connection macht den manuellen GC.Collect überflüssig
- **Worker-Threads** (PendingMessage, RetentionSweep) sind jetzt explizit IsBackground=true, das
Plugin-Domain kann sauber unloaden bei XIVLauncher-Reload ohne darauf zu warten
- **EmoteCache-Loader** von async-void auf async-Task mit shared Task-Tracker, drain-on-Dispose.
Kein Schreib-Risiko mehr auf disposed EmoteImages-Einträge nach Plugin-Reload
- **DisposeAsync-Timeout** (10s) warnt jetzt laut statt silent zu failen
- **Plugin-Dispose** flushed pending DeferredSave bevor Services abgebaut werden,
Settings-Änderungen aus den letzten Frames vor Disable überleben jetzt zuverlässig
- **v13→v14 Config-Migration** liest pre-v13-Backup und überträgt HellionThemeWindowOpacity in das
neue WindowOpacity-Feld statt auf 0.85 zurückzufallen
Keine Schema-Bumps, keine User-sichtbaren Funktions-Änderungen außer dass Reload und Shutdown
spürbar sauberer laufen.
+29
View File
@@ -0,0 +1,29 @@
---
subtitle: Theme Engine Performance
versionsnatur: Performance-Patch
---
**Hellion Chat 1.4.1 — Theme Engine Performance**
Zweiter Sub-Patch der v1.4.x Polish-Sweep-Serie. Heap-Pressure aus dem Theme-Engine-Render-Pfad
eliminiert, Custom-Theme- Hot-Reload überlebt transiente File-Locks beim Editor-Save. Plus zehnter
Built-In und überarbeitete Author-Credits.
- **ABGR-Cache auf den Theme-Records.** Beim Theme-Register (Built-In oder Custom) werden alle
Color-Slots einmalig in ABGR-Pack-Form vor-konvertiert. HellionStyle.PushGlobal liest aus dem
Cache statt pro Slot pro Frame durch ColourUtil.RgbaToAbgr zu jagen. Real gemessene
Frame-Time-Recovery: **~13 %** in typischer Render-Szene (Plan-Erwartung war 2-6 % konservativ,
real ~10-15 %)
- **Custom-Theme File-Lock-Härtung.** Wenn der User ein Theme-JSON gerade speichert während
HellionChat reloaden will, fängt der Loader jetzt explizit Sharing-Violation und Lock-Violation
ab. Last-Known-Good-Snapshot bleibt im Picker, beim nächsten Tick wird automatisch retry'd —
vorher fiel das Theme aus der Liste bis zum Plugin-Reload
- **Defensive Cache-Refresh beim Theme-Switch.** Falls ein Theme auf einem alten Pfad ohne
Cache-Fill in den Speicher gekommen ist, holt Switch() das beim Anwenden nach
- **Synthwave Sunset als zehnter Built-In.** Hot Magenta + Cyan auf Mitternachts-Violett,
80s-Neon-Grid-Vibes für Late-Night-Raids
- **Author-Credits konsolidiert.** Brand-Themes laufen jetzt unter „Hellion Forge". Mint Grove und
Forge Merchantman werden Carla Beleandis als Community-Geste zugeschrieben.
Keine Schema-Bumps, keine User-sichtbaren Funktions- Änderungen außer dass die Frames in
Theme-getrieben rendernden Szenen merklich glatter laufen und ein neues Theme im Picker steht.
+27
View File
@@ -0,0 +1,27 @@
---
subtitle: Symbol-Picker und Tell-History Fix
versionsnatur: Feature-Patch + Hotfix
---
- Symbol-Picker im Chat-Eingang: ein kleiner Smile-Button links neben dem Kanal-Indikator öffnet ein
Popup mit zwei Tabs. Der erste listet alle 161 FFXIV-PUA-Glyphen (Dalamuds SeIconChar); der zweite
trägt 97 verifizierte BMP-Symbole (Latin-Marken, Währungen, das ganze griechische Alphabet,
Geometrie, Spielkarten, Noten) — jedes davon über `/echo` und `/say` in einer vierrundigen
Whitelist-Probe durchgereicht, damit der Channel-Render dem entspricht, was der Picker anzeigt.
Klick fügt das Symbol an der Cursor-Position ein, Multi-Insert lässt das Popup offen, eine
Recent-Used-Leiste zeigt die letzten sechzehn Picks über beide Tabs. Toggle in Settings → Chat →
Nachrichten-Verhalten, Default an.
- Verlauf in angepinnten Tell-Tabs lädt wieder vollständig: ein versteckter 500-Zeilen-Scan-Cap in
PreloadHistory hat das User-Setting `AutoTellTabsHistoryPreload` überschrieben, wodurch
weniger-frequente Tell-Partner ihren Backlog verloren haben sobald die Scan-Schicht mit anderen
Chat-Partnern voll lief. Cap ist raus, der Index auf `(Receiver, Date)` hält die Query schnell.
- Slash-Command-Teardown: /hellion, /hellionView, /hellionDebugger (und im Debug-Build
/hellionSeString) sind als private Felder gecached. Plugin-Dispose detached die echte
Registrierung, statt mit identischen Args neu zu registrieren — schließt eine latente
Wartungs-Falle aus v1.4.9.
- v1.4.x-Polish-Sweep endet hier. Der ImGuiListClipper-Refactor von der v1.4.10-Reserve-Liste wurde
gecancelt, nachdem der Cross- Plattform-Smoke gezeigt hat dass das Scroll-Gummi ein Wine/Linux-
Quirk ist — Windows-User haben es nie gesehen. Spike dafür kommt in einem späteren Patch. Nächster
Major-Cycle ist v1.5.0 mit der DI-Container-Adoption (`Microsoft.Extensions.Hosting` +
`ILogger<T>`) nach dem Lightless-Vorbild.
- Migration v17 unverändert: kein Schema-Bump, kein Config-Migrations-Aufwand.
+31
View File
@@ -0,0 +1,31 @@
---
subtitle: ChatLog Frame-Hot-Path
versionsnatur: Performance-Patch
---
**Hellion Chat 1.4.2 — ChatLog Frame-Hot-Path**
Dritter Sub-Patch der v1.4.x Polish-Sweep-Serie. Drei Per-Frame-Allokations-Quellen aus dem
ChatLogWindow-Render- Pfad und der Settings-StatusBar eliminiert.
- **Card-Mode-Border-Loop entlastet.** DrawMessages hebt Theme, DrawList, Window-Left, Window-Right
und die ABGR- Border-Color einmalig vor den Per-Message-Loop. Bei 100 sichtbaren Messages sind das
gut 500 redundante P/Invokes und Property-Reads, die der Hoist eliminiert. Pop-Out- Heavy-Setups
(mehrere parallele Chat-Windows) profitieren proportional, weil der Hoist pro DrawMessages-Call
greift, also pro Window
- **Auto-Tell Tab-Tint und Icon gecached.** Die Hash-Color- Berechnung für Auto-Tell-Tabs lief pro
Tab pro Frame, mit zwei String-Allokationen pro Tab (eine für Tint-Hash, eine für Icon-Hash). Der
neue TabTintCache liest pre-computed Werte aus dem Tab und rechnet nur neu wenn das Tell-Target
drifted. Beide Caches haben separate Validation-Keys, also keine Cross-Invalidation zwischen Tint-
und Icon-Pfad. AutoTellTabTint selbst bleibt pure Hash-Helper, weiterhin ohne Tab-Awareness
- **StatusBar-Aggregation hinter Cache-Gate.** Die Status- Leiste am unteren Window-Rand summiert
die Tab-Message- Counts und zählt die Auto-Tell-Tabs pro Frame. Der Cache- Gate (1 Sekunde) lag
bisher hinter den LINQ-Pfaden, also liefen Sum und Count trotzdem pro Frame. Jetzt vor dem Gate,
plus die LINQ-Pfade durch eine Single-Pass-Foreach ersetzt. Die Aggregation läuft auf etwa 1 % der
Frames
Realistische Frame-Time-Recovery: 2-5 % in typischen Szenen, Pop-Out-Heavy-Setups potenziell mehr
durch die Card-Border- Multiplikation pro Window.
Keine Schema-Bumps, keine User-sichtbaren Funktions- Änderungen außer dass die Frames im Chat-Log
und in der Settings-Statusleiste merklich glatter laufen.
+33
View File
@@ -0,0 +1,33 @@
---
subtitle: Async-Lifecycle + Gitea-Cutover
versionsnatur: Architecture-Refactor
---
**Hellion Chat 1.4.3 — Plugin-Load Async-Init + Repo-Cutover**
Vierter Sub-Patch der v1.4.x Polish-Sweep-Serie. Plugin- Lifecycle auf Dalamud's
`IAsyncDalamudPlugin`-API migriert und das Custom-Repo zieht von GitHub auf Gitea um.
- **Async-Plugin-Architektur.** Konstruktor übernimmt nur noch die Bootstrap-Essentials
(Config-Load, Language-Init, Conflict-Detection). Migrationen, Service-Allokationen,
Window-Konstruktion und Hook-Subscription wandern in LoadAsync, sodass Dalamud die UI während der
schweren Arbeit responsive halten kann. Per-Line-CaptureFailure in DisposeAsync mirrort
LightlessSync's Pattern, plus Idempotency-Guard gegen Reload-Races
- **Custom-Repo-URL umgezogen auf Gitea.** Bestehende Tester müssen einmalig in XIVLauncher die
Custom-Repo-URL auf
`https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/repo.json`
umstellen, dann XIVLauncher neu starten. Das alte GitHub-Repo bleibt als eingefrorener
v1.4.2-Snapshot stehen und wird nicht mehr aktualisiert
- **Schema-Gate statt Migrations-Kette.** Die v9 → v16 Migrationen sind raus, ersetzt durch einen
harten Schema-Check in Phase 1. Configs auf Schema v16+ laden direkt; ältere Configs (vor v1.2.1)
bekommen jetzt eine klare „install v1.4.2 first"-Fehlermeldung statt eines impliziten
Migrations-Pfads
- **AutoTranslate-Cache läuft im Hintergrund.** Der Cache füllt sich jetzt fire-and-forget statt
blockierend im Plugin-Load. Trade-off: die erste Auto-Translate-Nutzung einer Session kann einen
kurzen Hitch haben, dafür kein 300-ms-Block beim Plugin-Start
- **Plugin-Load-Zeit ehrlich.** Median 3,7 s über fünf Reloads, vergleichbar mit v1.4.2. Der
Async-Refactor ist Foundation für künftige Lazy-Init-Optimierungen (v1.4.4) und
Code-Architektur-Hygiene, kein direkter User-spürbarer Speed-Win in dieser Release
Keine User-sichtbaren Funktions-Änderungen außer dem Repo-URL-Update. Settings, Themes und Tabs
bleiben unangetastet.
+37
View File
@@ -0,0 +1,37 @@
---
subtitle: Threading- und IPC-Sicherheits-Politur
versionsnatur: Wartung und Robustheit
---
**Hellion Chat 1.4.4 — Threading- und IPC-Sicherheits-Politur**
Fünfter Sub-Patch der v1.4.x Polish-Sweep-Serie. Threading-Annahmen werden explizit pro Methode
dokumentiert, ein Hot-Path-Lock im Auto-Tell-Tab-Counter fällt weg, IPC-Cleanup wird sichtbar wenn
er fehlschlägt und der Privacy-Filter spricht jetzt bei unbekannten ChatTypes.
- **AutoTellTabsService Hot-Path-Lock entfernt.** `ActiveTempTabCount` hat bisher pro Render-Frame
ein LINQ-Count unter einem Lock gemacht. Jetzt läuft das über einen Interlocked-Counter der
parallel zur Tabs-Liste mitgeführt wird, inklusive Resync-Hook für den Snapshot-Restore-Pfad in
`SaveConfig`. Plus Pure-Helper-Test-Mirror in der Build-Suite damit die Atomicity-Semantik nicht
versehentlich wegrefactored wird
- **HonorificService selbst-dokumentierende Threading-Banner.** Statt eines Block-Comments am
Klassen-Ende hat jede IPC-Callback-Methode jetzt einen 1-Zeilen-Banner darüber, der den
Thread-Kontext direkt am Call-Site benennt (framework only, framework scheduled, any). Mehr Hilfe
für künftige Reviews als ein abstraktes Threading-Kapitel
- **Unsubscribe-Failure ist jetzt sichtbar.** `TryUnsubscribe` hat ein Honorific-Unsubscribe-Failure
bisher als Debug geloggt, was bei Standard-Loglevel verschluckt wurde. Eine geleakte Subscription
kann den Service über Plugin-Reloads hinweg leben lassen, also läuft der Log jetzt auf Warning
- **AutoTranslate-Warmup blockiert den Plugin-Unload nicht mehr.** Der Cache-Warmup-Thread war ohne
`IsBackground=true` unterwegs, was den Unload um 100-300 ms verzögern konnte. Pattern-Match zu
MessageManager und RetentionSweep (beide seit v1.4.0)
- **Privacy-Filter loggt unbekannte ChatTypes.** Wenn FFXIV durch einen Patch einen neuen ChatType
einführt der weder in der Whitelist noch in den Defaults steht, wird er bisher silent durch den
Failsafe geleitet. Jetzt loggt der Filter einmalig pro Runtime eine Warning mit dem Type und dem
Failsafe-Wert. Dedup über ein NonSerialized-HashSet, also kein Log-Spam
- **Default-Flip für neue Installationen.** `PrivacyPersistUnknownChannels` startet bei neuen
Configs jetzt auf `true`, damit ein Patch-bedingt neuer ChatType nicht stillschweigend gedroppt
wird bevor der User entscheiden kann. Bestehende Configs behalten ihre Wahl, weil der Deserializer
den Initializer überschreibt. Keine Migration, kein Schema-Bump
Keine User-sichtbaren Funktions-Änderungen außer dem Default-Flip für neue Installationen. Settings,
Themes, Tabs und das Privacy-Verhalten für Bestand bleiben unangetastet.
+31
View File
@@ -0,0 +1,31 @@
---
subtitle: UX und Robustheit
versionsnatur: UX-Polish-Cycle
---
**Hellion Chat 1.4.5 — UX und Robustheit**
Sechster Sub-Patch der v1.4.x Polish-Sweep-Serie. Render-Fehler im Chat-Fenster werden jetzt
sichtbar, der First-Run-Wizard hat eine explizite Cancel-Schaltfläche, der Eingabe-Verlauf bleibt
nicht mehr über Plugin-Reloads hinweg liegen, und die Statusleiste klippt in schmalen Fenstern nicht
mehr.
- **Fehler-Benachrichtigung im Chat-Fenster.** Wenn ein Render-Fehler in `DrawChatLog` auftritt,
zeigt das Plugin jetzt eine einmalige Warning-Notification mit Verweis aufs `/xllog`, statt das
Fenster stillschweigend leer zu lassen. Der Stack-Trace selbst geht weiter via `Plugin.Log.Error`
ins Logfile. De-Dup über Per-Session-Bool, damit ein wiederkehrender Fehler die Notification-Stack
nicht pro Frame neu vollkippt
- **First-Run-Wizard trennt Accept und Close.** `OnClose` setzt nicht mehr stillschweigend
`FirstRunCompleted=true`, also lässt das X den Wizard schwebend zurück und er kommt beim nächsten
Plugin-Reload wieder. Eine neue „Später — Defaults behalten"-Schaltfläche im Footer ist der
explizite Weg, ohne Profil-Auswahl rauszukommen. Strings bilingual EN+DE plus Tooltip
- **Eingabe-Verlauf wird beim Plugin-Reload geleert.** `InputHistoryService.Reset` hängt jetzt in
`Plugin.DisposeAsync` neben den anderen Pure-Memory-Cleanups, damit der statische Zustand aus der
vorigen Session den nächsten Load nicht mehr erbt
- **Statusleiste klippt nicht mehr.** Der rechtsbündige Versions-Slot wird ausgeblendet wenn die
Chat-Window-Breite abzüglich Versions-Text unter 200 px fällt — vorher überlappte er die vier
linken Slots. Ab ausreichender Breite taucht der Slot wieder auf
- **Intern:** `FontManager` fällt auf System-Font zurück wenn die eingebettete Hellion-Font-Resource
fehlt (Broken-csproj-Pfad, nie ein Produktions-Build), plus expliziter
Session-Only-Invariant-Kommentar für Auto-Tell-Tabs in `Plugin.cs:167-168` mit einem
TempTabCounter-Init-Pin in der Build-Suite. Kein Schema-Bump, keine Migration
+36
View File
@@ -0,0 +1,36 @@
---
subtitle: Code Hygiene and Refactor
versionsnatur: Maintenance-Cycle
---
Wartungs-Patch ohne User-sichtbare Änderungen. Saubere Code-Basis als Vorbereitung auf das
v1.4.7-Backlog-Cleanup, plus zwei geerbte Bugfixes aus dem ChatTwo-Upstream `f35b7d3`.
- **preflight.sh härter**: csharpier-Reflow-Check (Block E) und markdownlint (Block F) laufen jetzt
im Pre-Push-Gate, statt erst beim Pre-Merge-Review aufzufallen.
- **FontManager-Fallback robuster**: Atlas-Toolkit-Throws aus kaputten Font-Configs (IO,
InvalidOperation, ArgumentException) fallen jetzt zuverlässig auf NotoSansCjkRegular, statt den
Atlas-Build mitzureißen. Der Exception-Typ wird im Log mitgegeben für die Diagnose.
- **URL-Validation beim Plugin-Load**: BrandingLinks (5 URLs) und IntegrationLinks (2 URLs) werden
via `[ModuleInitializer]` geprüft. Ein Tippfehler bei einer künftigen URL-Rotation wirft jetzt
sofort beim Plugin-Load, statt still beim Klick zu scheitern.
- **Cherry-Pick aus ChatTwo `f35b7d3`** — Memory-Leak in `Chat.SetChannel`: der native `Utf8String`
wird jetzt auch dann freigegeben, wenn der Linkshell-Check den Channel ablehnt (vorher gefangen im
early-return).
- **Cherry-Pick aus ChatTwo `f35b7d3`** — `Tab.Clone()` Deep-cloned jetzt `UsedChannel` und
`TellTarget`. Vorher Reference-Share-Bug: PopOut- und Temp-Tabs mutierten sich gegenseitig.
- **Aktive-Tab-Underline pixel-perfect bei DPI-Scaling**: Die Underline-Pill skaliert jetzt mit
`ImGuiHelpers.GlobalScale` und rundet die DrawList-Koordinaten auf physische Pixel. Kein
Sub-Pixel-Blur mehr auf 125/150%-Setups.
- **IconButton-Width-Fix**: der manuelle `width - 2 * CellPadding.X`-Subtract verlor den HUD-Scale
(Padding skaliert, der raw int nicht). Gemessene Breite läuft jetzt unverändert durch.
- **Test-Isolation für MessageStore**: `Dalamud.Utility.Util`-Surface (IsWine, OpenLink) läuft jetzt
durch eine `IPlatformUtil`-Indirektion. MessageStores `IsWine`-Probe ist isoliert testbar in der
Build-Suite. Plus: HellionStyle-ChildBgAlpha als Pure-Helper extrahiert, Plugin.SaveConfig kopiert
nur Session-Tabs statt der ganzen Tab-Liste, SettingsOverview cached den DrawList einmal pro
Frame.
- **Built-in-Theme-Roster**: Crystal Nocturne (Royal Sapphire + Electric Magenta auf Obsidian, von
CRYSTALLITE) ersetzt Moonlit Bloom. User mit Moonlit Bloom als aktivem Theme fallen beim ersten
Plugin-Load auf Hellion Arctic zurück.
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
+33
View File
@@ -0,0 +1,33 @@
---
subtitle: Backlog Cleanup and Mid-Features
versionsnatur: Mid-Feature-Patch
---
Achter Sub-Patch der v1.4.x Polish-Sweep-Serie. Erstes User-sichtbares Feature-Bundle seit v1.4.5 —
angepinnte Tell-Tabs die Relog überleben, opt-in Honorific-Glow, plus eine konfigurierbare Sidebar.
- **TempTell anpinnen**: Rechtsklick auf einen TempTell-Tab in der Sidebar → „Tab anpinnen".
Angepinnte Tabs überleben Plugin-Reload und Char-Logout, behalten ihre Konversations-Historie
(wird beim Rehydrate aus dem MessageStore nachgeladen) und bleiben an die gleiche /tell-Person
gebunden. Hard-Cap 5 angepinnte Tabs in einem separaten Pool — die normalen Auto-Tell-Tabs (15er
Cap) sind davon entkoppelt, Gesamt-Decke 20. Die Sidebar gruppiert angepinnte Tabs in einer
eigenen „Angepinnt"-Sektion mit eigenem Trenner.
- **Honorific Glow-Outline**: rendert jetzt eine 8-Richtungs-DrawList-Outline wenn der
Honorific-Titel eine Glow-Farbe trägt. Opt-in via **Settings → Integrationen → Glow-Outline
rendern (Honorific)** (Default OFF). Gradient (Color3 / GradientColourSet / Wave / Pulse) wird
geparst und im DTO weitergereicht, rendert aktuell aber statisch als Primärfarbe — der volle
Gradient-Port (Animations-Algorithmus + Pride-Palette) kommt als eigener Cycle nach.
- **Sidebar-Breite konfigurierbar**: in **Theme & Layout** ein Slider 44–160 px. Default bleibt 44
px (icon-only), aber breiter machen damit Sektion-Header wie „Aktive Tells (3)" oder „Angepinnt
(2)" nicht abgeschnitten werden.
- **Settings-Save Channel-Fix**: ein Save mit aktivem Party- oder Linkshell-Tab konnte den
Chat-Input zurück auf `/tell <angepinnte Person>` springen lassen. `Configuration.UpdateFrom`
bewahrt jetzt den Runtime-`CurrentChannel` über den persistent-Tab-Merge hinweg, und `TabSwitched`
deep-cloned den Seed-Channel statt sich den `UsedChannel` mit dem vorigen Tab zu teilen.
- **Internal**: `IPluginLogProxy`-Indirektion vor Dalamud's `IPluginLog` über alle ~91
`Plugin.Log`-Call-Sites. Damit läuft `MessageStore.Migrate0` voll-isoliert in xUnit (F12.1-Lücke
aus v1.4.6 geschlossen). Plus: TempTab-Counter als abgeleitete Property statt gecachtes
Interlocked-Feld — die neuen Pin/Unpin-Übergänge sind Cold-Path, kein Lock-Free-Vorteil mehr.
Migration v16 → v17 ist rein additiv (neues `Tab.IsPinned`-Bool, Default false).
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
+19
View File
@@ -0,0 +1,19 @@
---
subtitle: Hook-Layer und Polish-Quick-Wins
versionsnatur: Polish-Patch
---
- DbViewer Volltext-Suche: optionaler FTS5-Index über die ganze Chat-Historie. Wird beim ersten
v1.4.8-Start asynchron im Hintergrund gebaut, Progress als Toast. Lokale Page-Suche bleibt
Default. Such-Eingaben werden als exakte Wortfolge gematcht; mehrere Wörter werden nur gefunden,
wenn sie zusammen und in der Reihenfolge stehen. Wer rohe FTS5-MATCH-Syntax nutzen will, setzt
eigene Anführungszeichen um den Suchbegriff.
- Custom-Theme-Files laden sich beim Speichern automatisch neu, wenn das Theme aktiv ist. Kein
Picker-Klick mehr nötig.
- Retention-Sweep blockt nicht mehr den Framework-Thread. Der Mini-Hitch von ~194ms pro Sweep ist
weg.
- Statusleiste rendert sauber bei Windows-Skalierung über 100%.
- Receive-Suppressed-Tells-Routing wurde in diesem Cycle untersucht und auf v1.5.x verschoben: wenn
andere Plugins Tells via CheckMessageHandled unterdrücken, überspringt FFXIVs Chat-Pipeline den
RaptureLogModule-Resolver und HellionChats Tab-Routing verliert den Tell-Partner. Der Fix liegt
architektonisch neben dem geplanten Ad-Block-Hook-Layer und kommt dort mit.
+28
View File
@@ -0,0 +1,28 @@
---
subtitle: Plugin-Load Render Polish
versionsnatur: Performance-Patch
---
- First-Frame-HITCH unter 100 ms: der erste Render-Frame des Plugins liegt jetzt bei ~76 ms Median
(vorher ~127 ms), die Dalamud-Warnung „UiBuilder(Hellion Chat) > 100ms" beim Plugin-Start ist
damit weg. Erreicht durch das Verlagern von sechs nicht-essentiellen Render- Sektionen
(Statusleiste, Kanalname-Chunks, Fenster-Bounds-Check, Hinweis-Banner, Autocomplete,
Input-Preview) auf den zweiten Frame. Bei 60 fps sieht man die deferred-Sektionen ~17 ms später,
was im Atlas-Build-Fenster nach einem Reload unsichtbar bleibt.
- Slash-Commands zentral registriert: /hellion, /hellionView, /hellionSeString und /hellionDebugger
werden jetzt im Plugin-Load zentral registriert statt erst beim ersten Öffnen ihres Ziel-Fensters.
Heißt: die Befehle funktionieren ab dem ersten Tick, auch wenn das jeweilige Fenster nie geöffnet
wurde. Der „Einstellungen"-Button im Plugin-Manager hängt am selben Pfad.
- Plugin-Load-Diagnose-Logs als Tripwire: die Profiling-Logs für MessageStore.Connect,
MessageStore.Migrate, FilterAllTabs und den Auto-Translate-Warmup bleiben auf Information-Level
eingeschaltet. Falls eine zukünftige Änderung die Lade-Zeit wieder über 100 ms drückt, taucht der
Mehrverbrauch direkt im /xllog auf, ohne dass jemand erst den Debug-Filter einschalten muss.
- ChatTwo-IPC-Kompatibilitäts-Layer: HellionChat spiegelt jetzt die komplette ChatTwo-IPC-Surface
(`GetChatInputState`, `ChatInputStateChanged`, `Register`, `Unregister`, `Available`, `Invoke`)
zusätzlich zu unseren eigenen `HellionChat.*`-Gates unter dem `ChatTwo.*`-Namensraum. Drittseitige
Integrationen die nur auf ChatTwo's IPC reagieren, etwa die Kontextmenü-Hooks von Artisan und
AllaganTools, funktionieren damit weiter ohne Code-Änderung auf ihrer Seite. Die
Conflict-Detection blockiert das parallele Laden von ChatTwo, daher kein Namensraum-Konflikt im
Live-Betrieb.
- Migration v17 unverändert: kein Schema-Bump, kein Config-Migrations- Aufwand. Nach dem Update
läuft das Plugin gegen die bestehende v17-Datenbank weiter.
+28
View File
@@ -0,0 +1,28 @@
---
subtitle: DI Foundation und Service-Refactor
versionsnatur: Architektur-Cycle
---
- **Architektur-Umbau ohne User-spürbare Verhaltens-Änderung:** der Plugin-Bootstrap wechselt auf
einen Generic-Host DI-Container (`Microsoft.Extensions.Hosting` + `IServiceCollection`) nach dem
Lightless-Sync-Muster. 18 Service-Klassen wandern von einem statischen `Plugin.LogProxy`-Locator
auf typisierte `ILogger<T>`-Constructor-Injection. `DalamudLogger` brückt
`Microsoft.Extensions.Logging` über auf Dalamuds `IPluginLog` — im xllog erscheinen jetzt
Service-spezifische Spalten wie `[ MessageManager]` und `[Honori...ervice]`.
- **Plugin.LogProxy bleibt für die acht Buckets erhalten,** die Constructor-Injection nicht
erreicht: Static-Helper (EmoteCache, AutoTranslate, MemoryUtil, WrapperUtil), Dalamud-Reflektion
(Configuration), Data-Class mit Massen-Instanziierung (Message) und Instanz-Klassen die nur aus
Static-Methods loggen (FontManager, eine GameFunctions-Stelle).
- **Performance bestätigt durch Cross-Plugin-Baseline:** HellionChat First-Frame-HITCH 77 ms Median,
Chat 2 v1.40.2 74 ms Median — kein DI-Penalty gegenüber dem Upstream-Fork-Origin. Lightless und
XIVInstantMessenger liegen bei ~7 ms weil sie ihren FontAtlas-Build deferren; das wird das
v1.5.1-Item.
- **User-sichtbarer Bug-Fix nebenbei:** Slash-Command-Einfügen in das Chat-Eingabefeld (Friend-List
"/tell"-Action plus Plugin-Inserts von Artisan, AllaganTools und ähnlichen) ersetzt jetzt den
vorhandenen Input, statt anzukonkatenieren. Cherry-Pick aus ChatTwo upstream `ee7768ac` mit
Namespace-Anpassung.
- **Foundation für die Plugin-Integrations-Wave:** v1.5.7-11 (Context-Menu, NotificationMaster,
Moodles, ExtraChat, XIVIM Quick-DM) werden ab jetzt strukturell handhabbar — neue Services sind
ein `services.AddSingleton<T>` plus ein paar Factory-Lambda- Zeilen, kein Plugin.cs-Anflanschen
mehr.
- Migration v17 unverändert: kein Schema-Bump, kein Config-Migrations-Aufwand.
+21
View File
@@ -0,0 +1,21 @@
---
subtitle: "FontAtlas Refactor and Forge Signature"
versionsnatur: "Architecture + Closure + Branding"
---
- **FontManager-Refactor.** Der FontAtlas baut jetzt nur noch einmal pro Plugin-Load statt vier- bis
fünfmal. Weniger CPU- und GPU-Druck in den ersten Sekunden nach einem Reload, weniger
Atlas-Texture-Memory-Churn. Die acht Font-Einstellungen können live über den neuen
`RebuildDelegateFonts`-Pfad geändert werden, ohne dass das Plugin neu geladen werden muss.
- **Hellion Forge Signatur.** Das Plugin trägt jetzt eine ASCII-Fuchs-Signatur. Im `/xllog`
erscheint beim Plugin-Load ein kleiner Fuchs-Kopf, im First-Run-Wizard und unter Settings →
Information taucht eine eingeklappte „Hellion Forge"-Sektion mit dem vollen Fuchs auf. Gezeichnet
von Julia Moon, fest in der Plugin-DLL eingebettet.
- **Honorific-Integration bleibt unverändert.** Der ursprünglich geplante Gradient-Render-Pfad
(Wave/Pulse-Animation) entfällt. Honorific 3.2 stellt keine IPC für den fertig gerenderten
Gradient-Frame zur Verfügung, und ein eigener Port der Pride-Palette wurde verworfen. Die
Honorific-Anzeige bleibt wie in v1.4.7 etabliert (statischer Glow plus Title).
- **Hinweis zum HITCH-Win.** Der ursprünglich angepeilte 10×-First-Frame-Sprung
(Lightless/XIVIM-Pattern, ~7 ms statt ~75 ms) ist in diesem Cycle nicht eingetreten. Die
Render-Kosten liegen im UiBuilder-First-Frame-Pfad, nicht im FontAtlas-Build. Investigation kommt
als eigener späterer Cycle. Keine User-sichtbare Disruption, keine Migration.
+10
View File
@@ -0,0 +1,10 @@
---
subtitle: "First-Run Wizard — neu in 4 Steps, Roleplay-Profil neu"
versionsnatur: "UX-Patch"
---
- **Vier Steps statt Single-Page.** Der First-Run-Wizard öffnet jetzt in vier Bühnen: Willkommen → Privacy-Profil → Power-Settings → Fertig. Pagination-Dots in Forge-Bronze oben rechts, Back/Skip/Next im Footer. Standardgröße 720×480 (Min 600×400) und der Fuchs-Banner sitzt als zugeklappter TreeNode oben in Step 1, damit die Einleitung im Fokus bleibt.
- **Neues Privacy-Profil „Roleplay".** Datensparsamkeit plus Sagen und beide Emote-Typen für Story-Logs. Schreien und Rufen bleiben außen vor, Public-Distance-Lärm von Fremden ist kein Story-Inhalt. Aufbewahrung: Sagen 30 Tage, Emotes 90 Tage. Privacy-Picker wird zum 2×2-Grid, Casual bleibt mit ★-Marker als Empfehlung.
- **Power-Settings sichtbar.** Bislang versteckte Defaults bekommen eine eigene Bühne: Vorherige Session laden, Filter inkl. alter Messages, N Tell-Messages vorladen, Compact-Density, Prettier-Timestamps und Theme-Picker für die 10 Built-in-Themes. Keine neuen Settings, nur das Bestehende sauber sichtbar.
- **Staged-Commit und Test-Hint auf der Fertig-Bühne.** Auswahl wird erst beim Klick auf „Fertig ✓" geschrieben. „Später entscheiden" oder X-Close lässt die bestehende Config unangetastet, ein nicht angefasster Step behält die alten Werte. Direkt darunter sichtbar: „Tipp /tell <Spielername>", plus die aktuelle Preload-Zahl aus Step 3 als Hinweis auf den Auto-Tell-Tab-Spawn.
- **Bestehende User sehen den neuen Wizard einmal.** Wer schon v1.5.1 hatte, bekommt den Multi-Step-Flow beim ersten v1.5.2-Boot aufgepoppt. Neues Config-Feld `WizardLastShownVersion` triggert das einmalig pro Wizard-Rework; Skip oder Finish reicht und danach öffnet er nicht mehr automatisch.
- **Unter der Haube.** Pure-Helper-Tests für alle vier Profile-Sets in der Build-Suite (zwölf neue Facts), plus ein WizardStateSmokeStep für `/xlperf`. Migration v17 bleibt, nur ein optionales Config-Feld kommt dazu.
+9
View File
@@ -0,0 +1,9 @@
---
subtitle: "24 Sprachen, Inter Light statt Exo 2, HITCH 74 → 20 ms"
versionsnatur: "Localisation + Font-Stack"
---
- **24 wählbare UI-Sprachen.** Aus dem ursprünglich nur als FR-Lokalisierung geplanten Cycle ist eine breite Welle geworden: Catalan, Czech, Danish, Dutch, English, Finnish, French, German, Greek, Hungarian, Italian, Japanese, Korean, Norsk bokmål, Polish, Portuguese (BR), Portuguese (PT), Romanian, Russian, Spanish, Swedish, Turkish, Ukrainian, Simplified Chinese, Traditional Chinese. Dropdown sortiert alphabetisch nach Endonym, „None" oben angepinnt. Nicht-native Übersetzungen sind AI-assisted und für Community-Review im Forge-Discord markiert.
- **Inter Light statt Exo 2 als bundled Schrift.** Plus NotoSansCjkRegular als dritte Merge-Schicht. Damit deckt der Stack Latin Extended-A/B, Greek polytonic, Cyrillic Supplement und CJK (inkl. Hangul, Simplified-Han nach Reform) ab — die nicht-vanilla-FFXIV-Sprachen waren mit Exo 2 nicht lesbar.
- **HITCH 74 → ~20 ms als Side-Effect.** Der UiBuilder-First-Frame-Lag lag seit v1.4.x stabil bei 74 ms; v1.5.1 wollte ihn in Richtung 7 ms ziehen, fiel als „Hypothese zu optimistisch" durch. Echter Grund: `Plugin.cs:937` push'te `RegularFont` nur wenn `FontsEnabled` true war — die „Mitgelieferte Schrift verwenden"-Logik setzte `FontsEnabled = false` mit, der bundled-Pfad war die ganze v1.5.x-Reihe tot, FFXIVs Axis-Font übernahm und kostete ~50 ms extra. Fix routet `RegularFont` jetzt auch über `UseHellionFont`. Median ~20 ms im 5-Reload-Stresstest (17.9-23.6 ms, Linux/Wine; Windows-Baseline steht aus).
- **Glyph-Ranges aktivieren sich automatisch beim Sprachwechsel** plus eine One-Shot-Migration für User die schon eine non-Latin-Sprache eingestellt hatten. Neue WarningText unter dem Sprach-Dropdown weist darauf hin, dass FFXIVs Chat-Engine offiziell nur EN/DE/FR/JA-Glyphen rendert — andere Schriften können in der Game-Eingabe Garbled-Output zeigen.
- **Unter der Haube.** Drei-Layer-Font-Stack, zwei neue ExtraGlyphRanges-Flags (`LatinExtended`, `Greek`), `LanguageOverride`-Enum wächst um zehn Locales plus drei reaktivierte (Italian, Korean, Norwegian mit `nb`). Append-only damit User-Configs stabil bleiben. Migration v17 bleibt.
+9
View File
@@ -0,0 +1,9 @@
---
subtitle: "Theme-Crossfade, Quick-Picker, Hover-Animationen"
versionsnatur: "Polish & Motion"
---
- **Theme-Crossfade.** Theme-Wechsel blenden jetzt sanft über rund 300 ms ineinander, statt hart umzuschalten. Alle Hellion-Flächen gleiten mit: Sidebar, Titel, Buttons, Tabs, Scrollbar, Trennlinien. Der Fenster-Hintergrund snappt bewusst weiter, damit das Per-Window-Deckkraft-Setting aus Dalamuds Pinning-Menü unangetastet bleibt.
- **Header-Quick-Picker.** Neuer Paletten-Button links vom Zahnrad im Chat-Header. Ein Klick öffnet ein kompaktes Popup mit zwei Sektionen: alle Built-in- und Custom-Themes sowie alle Tabs. Der aktive Eintrag trägt ein Häkchen, ein Klick wechselt ohne das Popup zu schließen. So lassen sich mehrere Wechsel hintereinander erledigen, ohne den Umweg über die Einstellungen.
- **Sanfte Hover-Animationen.** Sidebar-Icons faden bei Hover sanft von gedimmt auf volle Deckkraft. Card-Mode-Trennlinien heben sich beim Überfahren einer Zeile für den ganzen Tab dezent ab. Beides framerate-unabhängig gerechnet, also auch bei Wine-Stall-Frames stabil.
- **Bewegung reduzieren.** Neuer Toggle im Tab für Theme und Layout. Er deaktiviert Crossfade, Hover-Animationen und das Pulsieren ungelesener Tabs für alle, die eine statische Oberfläche bevorzugen.
- Drei P3-Items plus der Accessibility-Toggle, kein Schema-Bump, keine Migration. Eine kleine Polish-Welle vor den größeren Cycles.
+11
View File
@@ -0,0 +1,11 @@
---
subtitle: "Backlog-Sync Tab-Features"
versionsnatur: "Bundle-Patch (Hälfte 1 von 2)"
---
- **Fehlgeschlagener Tell.** Geht ein gesendeter Tell nicht durch (Empfänger offline, in einer Instanz oder blockiert), erscheint jetzt ein Warn-Toast statt dass die Systemmeldung durchrauscht. Abschaltbar in den Einstellungen unter Chat.
- **Ton pro Tab.** Jeder Chat-Tab kann einen Benachrichtigungston spielen, wenn eine Nachricht eintrifft, während ein anderer Tab aktiv ist. Zur Wahl stehen die 16 Spiel-Chat-Sounds oder drei mitgelieferte Hellion-Sounds, mit einem Vorhör-Knopf. Standardmäßig aus, hört auf den globalen Sound-Schalter.
- **Tab umbenennen.** Das Umbenennen-Feld im Rechtsklick-Menü fokussiert sich beim Öffnen von selbst und nimmt jetzt bis zu 512 Zeichen.
- **Sprung ans Ende.** In der Chat-Kopfleiste erscheint ein Knopf, sobald man vom aktuellen Ende weggescrollt ist. Ein Klick springt zurück zur jüngsten Nachricht.
- **Karten- und Item-Links.** Kartenmarkierung und verlinktes Item lassen sich aus dem Rechtsklick-Menü der Chat-Eingabe einfügen.
- **Fuchs-Banner.** Das Hellion-Forge-Fuchs-Motiv im Einrichtungs-Assistenten und im Informations-Tab ist jetzt ein echtes Bild statt ASCII-Kunst.
- Schema-Bump auf v18, rein additiv.
+11
View File
@@ -0,0 +1,11 @@
---
subtitle: "Settings Overhaul + Filter & Notification Polish"
versionsnatur: "Settings-Overhaul-Release"
---
- **Settings komplett neu strukturiert** — die zehn alten Tabs sind auf sieben zusammengefasst (Allgemein, Aussehen, Chat, Fenster, Kanäle, Daten & Privatsphäre, Über). Jeder Tab gliedert sich jetzt in Sektionen, die beim Reingehen eingeklappt sind. Controls innerhalb einer Sektion sind nach Typ gruppiert. Tabs-Tab im Per-Tab-Panel ebenfalls in Sub-Sektionen aufgeteilt.
- **Absender-Namen anpassbar** — neue Optionen in Chat → Nachrichten für das Namensformat (Voll / Vorname / Initialen) und das Welt-Suffix (Nie / Andere Welten / Immer).
- **Pre-Send-Warnung für Plugin-Symbole** — beim Senden einer Nachricht mit Symbolen, die nur HellionChat-User sehen, kommt eine Warnung. Verhindert leere Kästchen bei anderen.
- **Getrennte Fenster-Deckkraft** — Aktiv vs. Inaktiv. Aktiv wie bisher; Inaktiv über einen zweiten Slider unter Aussehen → Fenster-Stil.
- **Lautstärke für eigene Notification-Sounds** — Slider in Allgemein → Sound, im Kanäle-Tab pro Tab nochmal angezeigt. Wirkt nur auf die drei mitgelieferten Custom-Sounds, die 16 Game-Sounds bleiben unverändert.
- **Regex-Filter pro Tab gestrichen** — kurz dabei, dann verworfen: der eingebaute FFXIV-Blackword-Filter deckt das ab.
- **Lokalisierung erweitert** — neue Section-Titel und v1.5.6-Controls in allen 24 Sprachen, maschinell übersetzt. Native-Review läuft weiter über den Hellion Forge Discord.
+11
View File
@@ -0,0 +1,11 @@
---
subtitle: "Rebuilt, Repaired, Reset"
versionsnatur: "Major-Release mit Config-Reset"
---
- **Deine Einstellungen werden zurückgesetzt.** Neun Zyklen Umbau haben gespeicherte Werte hinterlassen, die auf Oberflächen zeigen, die es nicht mehr gibt. Neu anzufangen ist der einzige Weg, dass alle dieselben Vorgaben haben. **Dein Nachrichtenverlauf bleibt unberührt**, der liegt in einer eigenen Datenbank. Die alten Einstellungen liegen als `HellionChat.json.pre-2.0.0.bak` daneben.
- **Behoben, und mehrere davon haben Daten verloren oder versteckt:** Die rückwirkende Bereinigung ließ sich nie anwenden. Das Verdichten der Datenbank schlug fehl und meldete danach, es sei nichts gelöscht worden, während alles weg war. Gelöschte Nachrichten blieben im Suchindex. Angepinnte Flüster-Tabs kamen eine ganze Sitzung lang leer hoch. Der Export schrieb ungültiges JSON. Ein Auskoppelfenster mit Titelleiste ließ sich nicht schließen. Ein 403 eines Emote-Dienstes riss alle 65 funktionierenden Emotes mit.
- **Was sich am Speichern ändert:** Das Kanalraster entscheidet jetzt allein. Bisher griff die Unbekannt-Absicherung auch bei bekannten Kanälen, ein abgewählter Kanal wurde also trotzdem geschrieben. Wen das betraf, der speichert ab jetzt weniger. Nichts in der Datenbank wird angefasst.
- **Jedes Fenster zeichnet das Plugin selbst** und alle sprechen eine Sprache: Struktur trägt die Typografie, alles Drückbare bekommt eine Fläche, jede Farbe wird gegen ihren Untergrund gemessen. Dazu benannte Typo-Rollen, Zeitstempel in eigener Spalte, kursive Systemmeldungen.
- **Wieder erreichbar:** Export, Tab-Editor, Datenbankpflege und Anpinnen hatten beim Umbau ihre Zugänge verloren. Der Screenshot-Modus erreichte eine von vier Flächen mit Tab-Namen, jetzt alle vier. Der DSGVO-Hinweis beim Profil "Volle Historie" war in 25 Sprachen übersetzt und seit Mai unsichtbar.
- **Gestrichen:** sechs Einstellungen mit Regler, gespeichertem Wert und ohne jeden Leser. Ein Regex-Filter pro Tab, den der spieleigene Wortfilter abdeckt. Ein Assistenten-Häkchen, das abgefragt, als angewendet gemeldet und nie gelesen wurde.
- **Neu:** Emote-Tab im Standard-Layout (Testerwunsch), Orts- und Serverzeit in der Statusleiste, Screenshot-Modus aus der Eingabezeile erreichbar, `/hellion wizard`, ein Stil-Labor unter `/hellion lab`, und ein Hinweis im Assistenten, dass Plugins in FFXIV eine Grauzone sind und nicht in öffentliche Kanäle gehören.
+7
View File
@@ -0,0 +1,7 @@
---
subtitle: "Hotfix"
versionsnatur: "Hotfix ohne sichtbare Änderungen"
---
- **Nichts Neues zu sehen.** Wer 2.0.0 in der ersten Stunde gezogen hat, sollte trotzdem updaten: das 2.0.0-Archiv wurde ohne eine Abhängigkeits-Aktualisierung gebaut, die hier drin ist.
- **MessagePack von 3.1.4 auf 3.1.7.** Das Paket serialisiert die Nachrichten-Payloads in der lokalen Datenbank. Die Meldungen betreffen die Rekursionstiefe in `Skip` und einen Fehler in der LZ4-Dekomprimierung, beide nur über präparierte Eingaben erreichbar. Das Plugin schreibt und liest ausschließlich seine eigenen Bytes in einer lokalen Datei, praktisch bräuchte ein Angreifer also schon Schreibzugriff darauf. Trotzdem gehoben, weil es nichts kostet.
- **Der Release-Workflow hängt sein Archiv wieder selbst an.** Bei 2.0.0 lief der Build sauber durch und scheiterte dann am Veröffentlichen, weshalb dieses Release von Hand fertiggestellt werden musste.
+7
View File
@@ -0,0 +1,7 @@
---
subtitle: "Emotes raus, Platzhalter gefixt"
versionsnatur: "Aufräum-Release"
---
- **BetterTTV-Emotes sind raus.** Der Endpunkt für geteilte Emotes liegt hinter einer Anmeldung, und von dort kam fast alles. Übrig blieben 54 überwiegend statische Bilder aus der Twitch-Frühzeit, davon genau eines animiert, und das wollte 492 Einzelbilder und 37 MB Grafikspeicher. Das Plugin macht jetzt **gar keine ausgehenden Netzwerkaufrufe** mehr. Gespeicherte Nachrichten mit Emotes bleiben lesbar und zeigen den getippten Code.
- **Fünf Beschreibungen im Fenster-Tab zeigten `{0}` statt des Plugin-Namens.** Betroffen waren alle 25 Sprachen, im Deutschen fiel es zuerst auf, weil der Platzhalter dort am Satzanfang steht. Ein Test prüft das jetzt dauerhaft.
- **Neue Vorschaubilder** im Plugin-Installer. Die alten waren vom 8. Mai und zeigten die Oberfläche vor dem Umbau.
+7
View File
@@ -0,0 +1,7 @@
---
subtitle: "Kontextmenü in Pop-outs, Screenshot-Modus"
versionsnatur: "Fehlerbehebung"
---
- **Das Kontextmenü ging in Pop-out-Fenstern nicht auf.** Ein Rechtsklick auf einen Namen oder ein Item hat dort schlicht nichts gemacht. Alle Chat-Flächen teilen sich einen Popup-Zustand, und das zuerst gezeichnete Fenster hat das Menü verworfen, bevor das Pop-out überhaupt an der Reihe war. Das Menü bleibt jetzt bei dem Fenster, aus dem der Klick kam.
- **Der Screenshot-Modus ließ sich nicht ausschalten.** Er wird gespeichert, aber keiner der beiden Schalter hat die Änderung in die Konfiguration geschrieben. Einmal gespeichert kam er bei jedem Laden des Plugins wieder. Beide Schalter speichern jetzt. Wer ihn gerade festhängen hat, klickt ihn einmal aus.
- **Vom Spiel eingefärbter Text konnte unsichtbar werden.** Manche dieser Farben kommen ohne Alpha-Byte an und wurden beim Umsortieren vollständig transparent.
+8
View File
@@ -0,0 +1,8 @@
---
subtitle: "Aufgeräumt: Beschreibung und tote Strings"
versionsnatur: "Aufräum-Release"
---
Am Verhalten des Plugins ändert sich nichts. Zwei Dinge, die überfällig waren.
- **Die Beschreibung im Plugin-Installer war zu lang und an einer Stelle schlicht falsch.** Sie lief über 908 Zeichen und fing damit an, eine Kategorie zu nennen, statt zu sagen was das Plugin tut. Ausserdem stand dort 24 Sprachen, es sind 25. Und die beiden Manifeste trugen unterschiedliche Kurzbeschreibungen, in der Plugin-Liste stand also ein anderer Satz als in den Details. Jetzt sind es 367 Zeichen, überall dieselben.
- **30 Übersetzungsschlüssel für das Webinterface sind raus.** Das Feature selbst, seine HTTP-Routen und sein Frontend haben den Code im Mai verlassen, die Texte blieben in allen 25 Sprachen liegen, dazu je eine erzeugte Property. Vor dem Löschen wurde jeder Schlüssel einzeln gegen das gesamte Repository geprüft.
+15 -12
View File
@@ -1,26 +1,29 @@
---
## How to install
This release is distributed via the HellionChat custom repository, not the
Dalamud main plugin repo. To install:
This release is distributed via the HellionChat custom repository, not the Dalamud main plugin repo.
To install:
1. In XIVLauncher: **Settings → Experimental → Custom Plugin Repositories**
2. Add the URL:
`https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/repo.json`
`https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/repo.json`
3. Enable, save, then `/xlplugins` → search **Hellion Chat** → install
## Project documents
- [README](https://github.com/JonKazama-Hellion/HellionChat/blob/main/README.md) — features, architecture, build
- [Privacy notice](https://github.com/JonKazama-Hellion/HellionChat/blob/main/PRIVACY.md) — what the plugin stores and sends
- [Third-party notices](https://github.com/JonKazama-Hellion/HellionChat/blob/main/docs/THIRD_PARTY_NOTICES.md) — dependencies and licences
- [Security policy](https://github.com/JonKazama-Hellion/HellionChat/blob/main/SECURITY.md) — vulnerability reporting
- [Support](https://github.com/JonKazama-Hellion/HellionChat/blob/main/SUPPORT.md) — bug reports, questions, contact paths
- [README](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/README.md)
— features, architecture, build
- [Privacy notice](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/PRIVACY.md)
— what the plugin stores and sends
- [Third-party notices](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/docs/THIRD_PARTY_NOTICES.md)
— dependencies and licences
- [Security policy](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/SECURITY.md)
— vulnerability reporting
- [Support](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/SUPPORT.md)
— bug reports, questions, contact paths
## Licence
[EUPL-1.2](https://github.com/JonKazama-Hellion/HellionChat/blob/main/LICENSE).
Based on [Chat 2](https://github.com/Infiziert90/ChatTwo) by Infi and Anna,
also EUPL-1.2.
[EUPL-1.2](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/LICENSE).
Based on [Chat 2](https://github.com/Infiziert90/ChatTwo) by Infi and Anna, also EUPL-1.2.
-93
View File
@@ -1,93 +0,0 @@
name: CodeQL
# Replaces the GitHub default-setup CodeQL scan. The default setup runs
# without resolving the Dalamud assemblies (they live in a user-AppData
# path) and reports "Low C# analysis quality" because call-target
# resolution sits at ~64%. This workflow downloads the Dalamud staging
# distribution before the build, runs a manual dotnet build, and then
# lets CodeQL analyse the fully-resolved compilation. Quality climbs
# back above the 85% thresholds.
#
# This workflow only consumes trusted inputs: the tag/branch ref via
# the standard checkout action, and the Dalamud distribution URL which
# is pinned to a goatcorp-controlled GitHub Pages target. No user-
# controlled event payload (issue title, PR body, commit message) flows
# into a run-step.
#
# Disable the default setup in the repo before this workflow lands:
# Settings -> Code security -> Code scanning -> "CodeQL analysis" tile
# -> Switch to advanced.
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '17 6 * * 1'
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze-csharp:
name: Analyze (csharp)
runs-on: windows-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Download Dalamud staging
shell: pwsh
run: |
$hooks = Join-Path $env:APPDATA "XIVLauncher\addon\Hooks\dev"
New-Item -ItemType Directory -Force -Path $hooks | Out-Null
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile dalamud.zip
Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: csharp
build-mode: manual
queries: security-extended
- name: Restore
run: dotnet restore HellionChat/HellionChat.csproj
- name: Build (Release)
run: dotnet build HellionChat/HellionChat.csproj --configuration Release --no-restore
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4
with:
category: /language:csharp
analyze-actions:
name: Analyze (actions)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: actions
build-mode: none
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4
with:
category: /language:actions
-164
View File
@@ -1,164 +0,0 @@
name: Release
# Triggered when a vX.Y.Z tag is pushed. Builds the plugin against the
# current Dalamud staging branch, locates the latest.zip produced by
# DalamudPackager and attaches it to the matching GitHub Release.
#
# User-controlled inputs touched by this workflow:
# - the tag name (filtered by on.tags = v*, validated again at runtime
# against ^v\d+\.\d+\.\d+$ before being used in any string)
# All other values are either repo-controlled (paths under
# HellionChat/bin/Release derived from Get-ChildItem) or pinned URLs to
# goatcorp / GitHub. Nothing from a webhook event payload (issue/PR
# titles, commit messages, etc.) flows into a run-step.
on:
push:
tags:
- 'v*'
# Manual recovery trigger. Use when a tag was pushed but the auto-run
# was missed or failed: `gh workflow run release.yml -f tag=v0.6.1`.
# The tag input is validated against the same semver regex as the
# auto-trigger before any string interpolation happens.
workflow_dispatch:
inputs:
tag:
description: 'Existing tag to (re)release, e.g. v0.6.1'
required: true
type: string
permissions:
contents: write
jobs:
release:
name: Build and attach release ZIP
runs-on: windows-latest
timeout-minutes: 20
steps:
# On push:tags, github.ref_name is the tag — checkout default works.
# On workflow_dispatch, ref defaults to the branch the action was
# invoked from; we need to explicitly check out the tag the user
# supplied so the build comes from the tagged commit, not main.
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref }}
- name: Setup .NET 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Download Dalamud staging
shell: pwsh
run: |
$hooks = Join-Path $env:APPDATA "XIVLauncher\addon\Hooks\dev"
New-Item -ItemType Directory -Force -Path $hooks | Out-Null
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile dalamud.zip
Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks
- name: Build (Release)
run: dotnet build HellionChat/HellionChat.csproj --configuration Release
- name: Locate latest.zip
id: locate
shell: pwsh
run: |
$zip = Get-ChildItem -Path HellionChat\bin\Release -Recurse -Filter latest.zip | Select-Object -First 1
if (-not $zip)
{
throw "latest.zip not found under HellionChat\bin\Release"
}
Write-Host "Found: $($zip.FullName)"
"path=$($zip.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
# Build a release body from the matching changelog block in
# HellionChat.yaml plus a static install / docs footer. Fails the
# workflow if no block exists for the tagged version, which is the
# automated counterpart to the "yaml + repo.json + release body
# kept in sync" rule.
#
# GITHUB_REF_NAME is read via env: (not ${{ }} interpolation) so the
# tag value is treated as a PowerShell variable, not as inline shell
# text. The strict regex below rejects anything that is not a clean
# semver tag before it is used to build a string.
- name: Generate release body
shell: pwsh
env:
# workflow_dispatch carries the user-supplied tag in inputs.tag;
# push:tags carries it in github.ref_name. Either way the value
# is treated as a PowerShell variable (env-var pass), not as
# inline shell text, and validated against the semver regex
# below before any string interpolation.
TAG_NAME: ${{ github.event.inputs.tag || github.ref_name }}
run: |
$tag = $env:TAG_NAME
if ($tag -notmatch '^v\d+\.\d+\.\d+$') {
throw "Refusing to generate release body for non-semver tag: $tag"
}
$version = $tag.Substring(1)
$yamlPath = "HellionChat/HellionChat.yaml"
$raw = Get-Content -Path $yamlPath -Raw
$marker = "changelog: |-"
$idx = $raw.IndexOf($marker)
if ($idx -lt 0) { throw "changelog block not found in $yamlPath" }
# changelog: is the last top-level key in the manifest, so
# everything after the marker is the literal block. Strip the
# 2-space yaml indent from each line.
$afterMarker = $raw.Substring($idx + $marker.Length)
$changelogBody = (($afterMarker -split "`r?`n") | ForEach-Object {
if ($_ -match '^ ') { $_.Substring(2) } else { $_ }
}) -join "`n"
$header = "**Hellion Chat $version"
$start = $changelogBody.IndexOf($header)
if ($start -lt 0) {
throw "No changelog entry for version $version found in $yamlPath. Update the changelog block before tagging a release."
}
$rest = $changelogBody.Substring($start)
$nextHdr = $rest.IndexOf("`n`n**Hellion Chat ", 1)
$trailer = $rest.IndexOf("`n`n---")
if ($nextHdr -ge 0 -and ($trailer -lt 0 -or $nextHdr -lt $trailer)) {
$currentBlock = $rest.Substring(0, $nextHdr).TrimEnd()
} elseif ($trailer -ge 0) {
$currentBlock = $rest.Substring(0, $trailer).TrimEnd()
} else {
$currentBlock = $rest.TrimEnd()
}
# Static install / docs / licence footer is maintained as a
# separate file so the workflow YAML stays clean (no embedded
# heredoc that would have to be indented under the run-block).
$footerPath = ".github/release-footer.md"
if (-not (Test-Path $footerPath)) {
throw "Release footer template not found: $footerPath"
}
$footer = Get-Content -Path $footerPath -Raw
$body = $currentBlock + "`n" + $footer
$body | Out-File -FilePath release-body.md -Encoding utf8 -NoNewline
Write-Host "Generated release body for $tag :"
Write-Host "----------------------------------------"
Write-Host $body
Write-Host "----------------------------------------"
- name: Attach to GitHub release
uses: softprops/action-gh-release@v3
with:
# Explicit tag_name so the action targets the correct release in
# both push:tags (auto) and workflow_dispatch (manual recovery)
# modes. Without this, dispatch runs would default to the branch
# ref (main) and fail to find the release.
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: ${{ steps.locate.outputs.path }}
body_path: release-body.md
fail_on_unmatched_files: true
generate_release_notes: false
+459 -224
View File
@@ -1,33 +1,193 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##############################################################
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
## .gitignore – Hellion Forge / Hellion Media
##
## Basis: github/gitignore VisualStudio.gitignore
## Überarbeitet: Mai 2026
## Status: Original-Patterns vollständig erhalten,
## neu sortiert in logische Sektionen,
## Sicherheits- & Tooling-Sektionen ergänzt.
##
## Markierungen:
## [!! OBSOLET 2026 !!] → Tool offiziell eingestellt,
## Pattern bleibt aus Vorsicht drin.
##
##############################################################
# Local development environment (HellionChat fork)
# =====================================================
# [!! KRITISCH !!] Secrets, Keys & Credentials
# Diese Sachen dürfen NIEMALS im Repo landen!
# =====================================================
# Environment Files
.env
.env.*
.env.bak*
.envrc
!.env.example
!.env.sample
# Private Keys & Zertifikate
*.pem
*.key
*.p12
*.pfx
*.cer
*.crt
*.csr
*.gpg
*.asc
# SSH Keys (falls jemand die ins Repo legt)
id_rsa
id_ed25519
id_ecdsa
known_hosts
# Auth-/Token-Files
auth.json
.npmrc
.pypirc
secrets.json
# ASP.NET / .NET App-Configs mit lokalen Secrets
appsettings.*.local.json
appsettings.Local.json
local.settings.json
# Memory Dumps (können Credentials im Heap enthalten!)
*.dmp
*.mdmp
crash.log
# =====================================================
# Projekt-spezifisch (HellionChat Fork)
# =====================================================
# Lokale Entwicklungsumgebung
.vscode/
scripts/
scripts/setup-dev-env.sh
# Lokales Test-Projekt (bleibt aus dem Plugin-Repo raus;
# pure-function safety net für Refactor-Cycles)
HellionChat.Tests/
ChatTwo.Tests
TestResults
*.db-shm
*.db-wal
# Packaging
pack/
# User-specific files
# Specs und Plan-Dateien
/.superpowers/
# Claude Code lokales Setup (nicht committed)
/.claude/
/CLAUDE.md
# Cycle-Working-Notes (im Vault gepflegt, lokales Repo-Pad bei Bedarf)
/docs/cycle-notes/
# =====================================================
# OS-spezifische Files
# =====================================================
# macOS
.DS_Store
.AppleDouble
.LSOverride
._*
# Windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
# Linux
.directory
.Trash-*
# =====================================================
# AI / LLM Tooling (2026 era)
# =====================================================
# Cursor IDE
.cursor/
.cursorignore
# Aider
.aider*
# Continue.dev
.continue/
.continuerc.json
# Windsurf
.windsurf/
# Sourcegraph Cody
.cody/
# Lokale Prompt-Sammlungen / Scratch-Pads
prompts/local/
# =====================================================
# Editor & IDE (neben Visual Studio)
# =====================================================
# JetBrains (IntelliJ, Rider, etc.)
.idea/
# Vim / Neovim
*.swp
*.swo
*.swn
# Sublime Text
*.sublime-workspace
*.sublime-project
# =====================================================
# IDE & Editor – User-spezifische Files (VS)
# =====================================================
# Visual Studio User Files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
# MonoDevelop/Xamarin Studio
*.userprefs
# Mono auto generated files
mono_crash.*
# Visual Studio Cache/Options Directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto-generated files
Generated\ Files/
# Local History
.localhistory/
# CodeRush personal settings
.cr/personal
# =====================================================
# Build Output
# =====================================================
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
@@ -43,43 +203,24 @@ bld/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
# ATL Project Build Output
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# MigrationBackup (Package Reference Convert Tool)
MigrationBackup/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
# =====================================================
# Build-Artefakte (Files built by Visual Studio)
# =====================================================
*_i.c
*_p.c
*_h.h
@@ -101,6 +242,7 @@ StyleCopReport.xml
*.tmp_proj
*_wpftmp.csproj
*.log
*.binlog
*.vspscc
*.vssscc
.builds
@@ -108,10 +250,87 @@ StyleCopReport.xml
*.svclog
*.scc
# Chutzpah Test files
# =====================================================
# Test Results
# =====================================================
# MSTest
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Benchmark Results
BenchmarkDotNet.Artifacts/
# Verify / Snapshot Testing (modern .NET, Spotty Wisdom)
*.received.*
*.received.txt
# [!! OBSOLET 2026 !!] Chutzpah – Repository auf GitHub archiviert
_Chutzpah*
# =====================================================
# Code Coverage
# =====================================================
# Coverlet
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage
*.coverage
*.coveragexml
# DotCover (JetBrains)
*.dotCover
# AxoCover
.axoCover/*
!.axoCover/settings.json
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# OpenCover UI Analysis
OpenCover/
# [!! OBSOLET 2026 !!] MightyMoose / AutoTest.Net – seit >10 Jahren nicht mehr gepflegt
*.mm.*
AutoTest.Net/
# =====================================================
# Profiler & Trace
# =====================================================
# Visual Studio Profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# NVidia Nsight GPU Debugger
*.nvuser
# =====================================================
# Cache Files (VS, C++, Sass)
# =====================================================
# Visual C++ cache files
# Hinweis: Manche Patterns hier werden auch vom C#-Linter genutzt (z. B. *.lscache)
ipch/
*.aps
*.ncb
@@ -121,101 +340,80 @@ ipch/
*.cachefile
*.VC.db
*.VC.VC.opendb
*.lscache
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio cache (.cache files allgemein, .cache directories behalten)
*.[Cc]ache
!?*.[Cc]ache/
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
# Web Workbench Sass
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# =====================================================
# NuGet & Dependencies
# =====================================================
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Fody – auto-generated XML schema
FodyWeavers.xsd
# Node (falls JS-Tooling im Build genutzt wird)
.ntvs_analysis.dat
node_modules/
# Python Tools für Visual Studio (PTVS)
__pycache__/
*.pyc
# =====================================================
# Mono
# =====================================================
mono_crash.*
# =====================================================
# Publish & Deploy
# =====================================================
# Click-Once
publish/
# Publish Web Output
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.[Pp]ublish.xml
*.azurePubxml
*.pubxml
*.publishproj
# Microsoft Azure Web App Publish Settings
# Comment the next line if you want to checkin your Azure Web App publish settings,
# but sensitive information contained in these scripts will be unencrypted
PublishScripts/
# Microsoft Azure Build Output
csx/
*.build.csdef
@@ -224,7 +422,35 @@ csx/
ecf/
rcf/
# Windows Store app package directories and files
# Service Fabric Backup
ServiceFabricBackup/
# Installshield
[Ee]xpress/
# =====================================================
# Container / Infrastructure-as-Code (Vorsicht: Tokens!)
# =====================================================
# Docker
docker-compose.override.yml
# Terraform
.terraform/
*.tfstate
*.tfstate.*
*.tfvars
!example.tfvars
# Serverless Framework
.serverless/
# =====================================================
# Windows Store / AppX
# =====================================================
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
@@ -233,50 +459,29 @@ _pkginfo.txt
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# =====================================================
# Datenbanken & SQL
# =====================================================
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
# SQL Server
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
# Andere DB-bezogene
*.dbmdl
*.dbproj.schemaview
*.jfm
# [!! OBSOLET 2026 !!] BeatPulse – wurde 2019 umbenannt zu AspNetCore.Diagnostics.HealthChecks
healthchecksdb
# =====================================================
# Business Intelligence / Reporting
# =====================================================
*.rdl.data
*.bim.layout
*.bim_*.settings
@@ -284,27 +489,97 @@ ServiceFabricBackup/
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
*.rptproj.bak
# =====================================================
# Add-ins & Analyzer Tools
# =====================================================
# ReSharper
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity
_TeamCity*
# StyleCop
StyleCopReport.xml
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# Guidance Automation Toolkit
*.gpState
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
# [!! OBSOLET 2026 !!] GhostDoc Plugin – Submain hat das Tool eingestellt
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Tabs Studio
*.tss
# Visual Studio 6 build log
# Telerik JustMock
*.jmconfig
# MFractors (Xamarin productivity tool)
.mfractor/
# DocProject Documentation Generator
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# =====================================================
# Sonstige Sprachen & Tooling
# =====================================================
# Ionide (F# VS Code Tools)
.ionide/
# Azure Stream Analytics Local Run
ASALocalRun/
# BizTalk Build Output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# Orleans
orleans.codegen.cs
# =====================================================
# [!! OBSOLET 2026 !!] Legacy-Tooling (eingestellt)
# Patterns bleiben aus Vorsicht drin.
# =====================================================
# [!! OBSOLET 2026 !!] TFS 2012 Local Workspace – ersetzt durch Azure DevOps
$tf/
# [!! OBSOLET 2026 !!] Visual Studio 6 Build Log – VS6 ist von 1998
*.plg
# Visual Studio 6 workspace options file
# [!! OBSOLET 2026 !!] Visual Studio 6 Workspace Options
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
# [!! OBSOLET 2026 !!] Visual Studio 6 Workspace File
*.vbw
# Visual Studio LightSwitch build output
# [!! OBSOLET 2026 !!] RIA / Silverlight – Microsoft hat das Okt. 2021 eingestellt
Generated_Code/
# [!! OBSOLET 2026 !!] Visual Studio LightSwitch – von Microsoft eingestellt
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
@@ -312,71 +587,31 @@ node_modules/
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# =====================================================
# Upgrade / Backup-Reports
# =====================================================
# CodeRush personal settings
.cr/personal
# Backup-Files vom Konvertieren alter VS-Projekte (wir haben ja git ;-))
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# =====================================================
# Misc / Temp / Backup
# =====================================================
# Tabs Studio
*.tss
ClientBin/
~$*
*~
*.publishsettings
# Telerik's JustMock configuration file
*.jmconfig
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
#Specs und Plan datein
/.superpowers/
#Test Datein
ChatTwo.Tests
TestResults
*.db-shm
*.db-wal
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
+17
View File
@@ -0,0 +1,17 @@
{
"MD003": { "style": "atx" },
"MD004": { "style": "dash" },
"MD007": { "indent": 2 },
"MD009": { "br_spaces": 2, "strict": false, "list_item_empty_lines": false },
"MD013": false,
"MD024": { "siblings_only": true },
"MD029": false,
"MD033": false,
"MD036": false,
"MD040": true,
"MD041": false,
"MD046": { "style": "fenced" },
"MD048": { "style": "backtick" },
"MD049": { "style": "underscore" },
"MD050": { "style": "asterisk" }
}
+50
View File
@@ -0,0 +1,50 @@
# ##############################################################
# #
# # .prettierignore – Hellion Forge / Hellion Media
# #
# # Files die Prettier NICHT anfassen soll.
# # Überarbeitet: Mai 2026
# #
# # Hinweis: Prettier liest auch .gitignore automatisch mit.
# # Hier nur Sachen die zusätzlich ignoriert werden müssen
# # oder die im Repo liegen aber nicht formatiert werden dürfen.
# #
# ##############################################################
# === .NET Build Output ===
bin/
obj/
# === JS / Web Build Output ===
node_modules/
dist/
out/
build/
coverage/
# === Generierte C#-Files (Designer, Source Generators) ===
*.Designer.cs
*.g.cs
*.g.i.cs
*.generated.cs
*.AssemblyInfo.cs
*.AssemblyAttributes.cs
# === Lock-Files (NIE umformatieren – zerschießt den Hash) ===
package-lock.json
yarn.lock
pnpm-lock.yaml
packages.lock.json
# === Minified Files (bewusst kompakt, niemals anfassen) ===
*.min.js
*.min.css
# === Test-Snapshots (z. B. Verify) ===
*.received.*
*.verified.*
**/__snapshots__/
# === Plugin-Manifest (DalamudPackager-Schema, fix lassen) ===
HellionChat/HellionChat.yaml
+35
View File
@@ -0,0 +1,35 @@
{
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always",
"proseWrap": "always",
"endOfLine": "lf",
"overrides": [
{
"files": "*.md",
"options": {
"printWidth": 100,
"tabWidth": 2
}
},
{
"files": ["*.yml", "*.yaml"],
"options": {
"tabWidth": 2,
"singleQuote": true
}
},
{
"files": "*.json",
"options": {
"tabWidth": 4,
"trailingComma": "none"
}
}
]
}
+53
View File
@@ -0,0 +1,53 @@
# ##############################################################
# #
# # .yamllint.yaml – Hellion Forge / Hellion Media
# #
# # YAML-Linting Konfiguration.
# # Überarbeitet: Mai 2026
# #
# # Regel-Doku:
# # https://yamllint.readthedocs.io/en/stable/rules.html
# #
# ##############################################################
extends: default
# Plugin-Manifest folgt DalamudPackager-Konvention (4-space-indent für
# image_urls + tags). yamllint-Default verlangt 2 — Konflikt, daher
# ignorieren statt das Manifest zu reformatieren.
ignore: |
HellionChat/HellionChat.yaml
rules:
# Zeilenlängen-Check aus (konsistent mit markdownlint MD013)
line-length: disable
# YAML ohne führendes "---" erlaubt
document-start: disable
# GitHub Actions nutzt "on:" als Trigger-Key.
# Ohne diesen Override würde yamllint das als boolean "on" beklagen.
truthy:
allowed-values: ['true', 'false', 'on']
# Maximal 1 Leerzeile in Folge (saubere Files)
empty-lines:
max: 1
# YAML-Standard ist 2 Spaces (auch GitHub Actions erwartet das).
# Explizit setzen, um Konsistenz im Repo zu erzwingen.
indentation:
spaces: 2
indent-sequences: true
check-multi-line-strings: false
# Kommentare brauchen Space nach #, müssen mit Content beginnen
comments:
require-starting-space: true
min-spaces-from-content: 1
# Kein Whitespace am Zeilenende
trailing-spaces: enable
# Datei muss mit Newline enden
new-line-at-end-of-file: enable
+91 -48
View File
@@ -1,71 +1,114 @@
# Code of conduct
# Code of Conduct
HellionChat is a small hobby project. The contributor base is tiny and
the moderation overhead I can afford is equally small, so this document
is short and direct.
## A Note on This Project
## What I expect from contributors
HellionChat is a one-person side project developed under Hellion Forge. I maintain this in my spare
time, which means replies can take a few days. Please do not escalate just because a thread is
quiet.
- Be respectful in issues, pull requests, discussions and any other
project space (Discord, email).
- Keep feedback focused on the code, the design or the documentation.
Critique the work, not the person.
- Assume good intent. People come from different backgrounds, time
zones and skill levels. A clarifying question is almost always a
better first move than an accusation.
- Stay on topic. This project is about a Dalamud chat plugin. Off-topic
arguments belong elsewhere.
- Respect that I maintain this in my spare time. Replies can take a
few days. Please do not escalate just because a thread is quiet.
When in doubt, assume good intent. Contributors come from different backgrounds, time zones and
skill levels. A clarifying question is almost always a better first move than an accusation.
## What is not welcome
Please also keep discussions on topic. This project is about a Dalamud chat plugin. Off-topic
arguments belong elsewhere.
- Personal attacks, slurs, doxxing, sustained disruption of threads.
- Unsolicited private contact after I have asked someone to stop.
- Sharing of private conversations without consent.
- Any content that would put other contributors or end users at risk.
---
## Scope
## Our Pledge
This applies to every space the project owns or that I run on its
behalf: the GitHub repository, GitHub Discussions, project-related
Discord conversations and the maintainer email address listed in
`SECURITY.md`.
We pledge to make our community welcoming, safe, and equitable for all.
It also applies when someone is identifiably representing the project
in another space, for example posting as a HellionChat maintainer in
the Dalamud Discord.
We are committed to fostering an environment that respects and promotes the dignity, rights, and
contributions of all individuals, regardless of characteristics including race, ethnicity, caste,
color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or
expression, sexual orientation, language, philosophy or religion, national or social origin,
socio-economic position, level of education, or other status. The same privileges of participation
are extended to everyone who participates in good faith and in accordance with this Covenant.
## Encouraged Behaviors
While acknowledging differences in social norms, we all strive to meet our community's expectations
for positive behavior. We also understand that our words and actions may be interpreted differently
than we intend based on culture, background, or native language.
With these considerations in mind, we agree to behave mindfully toward each other and act in ways
that center our shared values, including:
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
2. Engaging **kindly and honestly** with others.
3. Respecting **different viewpoints** and experiences.
4. **Taking responsibility** for our actions and contributions.
5. Gracefully giving and accepting **constructive feedback**.
6. Committing to **repairing harm** when it occurs.
7. Behaving in other ways that promote and sustain the **well-being of our community**.
## Restricted Behaviors
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of
these behaviors are violations of this Code of Conduct.
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal
attention after any clear request to stop.
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a
community member or group of people.
3. **Stereotyping or discrimination.** Characterizing anyone's personality or behavior on the basis
of immutable identities or traits.
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate
in the context or purpose of the community.
5. **Violating confidentiality.** Sharing or acting on someone's personal or private information
without their permission.
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person
or group.
7. Behaving in other ways that **threaten the well-being** of our community.
### Other Restrictions
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone
else to evade enforcement actions.
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
3. **Promotional materials.** Sharing marketing or other commercial content in a way that is outside
the norms of the community.
4. **Irresponsible communication.** Failing to responsibly present content which includes, links to,
or describes any other restricted behaviors.
## Reporting
If something here is being broken, contact me directly. Do not open a
public issue.
If something here is being broken, contact me directly. Do not open a public issue.
- Email: `kontakt@hellion-media.de`
- Discord DM: `@j.j_kazama`
| Channel | Address |
| ---------- | -------------------------- |
| Email | `kontakt@hellion-media.de` |
| Discord DM | `@j.j_kazama` |
Reports stay private. I will acknowledge within a few weekdays
(European business hours) and tell you what I plan to do.
Reports stay private. I will acknowledge within a few weekdays (European business hours) and tell
you what I plan to do.
## Enforcement
I am the sole maintainer, so enforcement is a single-person process.
Depending on what happened and how the person responds, I will pick
the lightest measure that resolves the issue:
I am the sole maintainer, so enforcement is a single-person process. I will pick the lightest
measure that actually resolves the situation:
1. Private note asking the behaviour to stop.
2. Public correction in the affected thread.
3. Edit or removal of the offending content.
4. Temporary block from the repository or related spaces.
5. Permanent block.
4. Private written warning with a cooldown period.
5. Temporary block from the repository or related spaces.
6. Permanent block.
Severe cases skip the lower steps. I will not negotiate over
harassment or threats.
Severe cases skip the lower steps. I will not negotiate over harassment or threats.
## Acknowledgement
## Scope
This document is intentionally short and project-specific rather than
a copy of a longer template. If you need a more formal reference, the
[Contributor Covenant](https://www.contributor-covenant.org/) is a
widely adopted starting point and the spirit of this document is
compatible with it.
This Code of Conduct applies to all spaces the project owns or that I run on its behalf: the GitHub
repository, GitHub Discussions, project-related Discord conversations, and the maintainer contact
listed in [`SECURITY.md`](SECURITY.md). It also applies when someone is identifiably representing
HellionChat elsewhere, for example when posting as a HellionChat maintainer in the Dalamud Discord.
## Attribution
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, available at
[https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA
4.0. To view a copy of this license, visit
[https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/).
+108 -89
View File
@@ -1,131 +1,150 @@
# Contributing to HellionChat
Thanks for taking a look. HellionChat is a small, opinionated fork of
[Chat 2](https://github.com/Infiziert90/ChatTwo) maintained by one
person in spare time. This document explains what I am looking for,
what I am not, and how to make a contribution land smoothly.
Thanks for taking a look. HellionChat is a one-person side project developed under Hellion Forge. It
started as a fork of [Chat 2](https://github.com/Infiziert90/ChatTwo) and has since become a
standalone plugin under its own namespace, IPC channels and source tree (standalone-cut completed in
v1.0.0). Forking HellionChat itself is explicitly permitted under the EUPL-1.2.
## Before you open anything
This document explains what I am looking for, what I am not, and how to make a contribution land
smoothly.
- Read the [README](README.md) so you understand the scope: this is a
privacy-focused, EUPL-1.2-licensed Dalamud plugin that intentionally
removes the upstream webinterface and ships smaller defaults.
- Read [UPSTREAM_SYNC.md](docs/UPSTREAM_SYNC.md). Cherry-picks from upstream
Chat 2 are selective and conscious; not everything that lands there
belongs here.
- Read [SECURITY.md](SECURITY.md). Anything security-sensitive goes
through a private advisory, never a public issue or PR.
- Read the [code of conduct](CODE_OF_CONDUCT.md).
## Before You Open Anything
## What I will accept
- Read the [README](README.md) so you understand the scope: a privacy-focused, EUPL-1.2-licensed
Dalamud plugin that intentionally removes the upstream webinterface and ships privacy-first
defaults.
- Read [`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md). Active cherry-picking from upstream Chat 2
has ended in the v1.4.x cycle; HellionChat continues as an independent codebase. Existing
upstream-derived code keeps its attribution. New contributions stand on their own and do not need
to be cherry-pick-compatible.
- Read [`SECURITY.md`](SECURITY.md). Anything security-sensitive goes through a private advisory,
never a public issue or PR.
- Read the [Code of Conduct](CODE_OF_CONDUCT.md).
- Bug fixes for behaviour documented in the README, the in-plugin
settings or the changelog.
- Translation contributions for Hellion-specific strings via direct
pull requests against `HellionChat/Resources/HellionStrings.*.resx`.
Translations for the upstream Chat 2 strings (`Language.*.resx`) are
not handled here; they go through the upstream Chat 2 project.
## What I Will Accept
- Bug fixes for behaviour documented in the README, the in-plugin settings or the changelog.
- Translation contributions for Hellion-specific strings via direct pull requests against
`HellionChat/Resources/HellionStrings.*.resx`. Translations for upstream Chat 2 strings
(`Language.*.resx`) are not handled here; those go to the upstream Chat 2 project.
- Documentation improvements (README, comments, this file).
- Performance fixes with a measurable before/after.
- New features that fit the privacy-first scope and do not duplicate
what an existing Dalamud plugin already does well.
- New features that fit the privacy-first scope and do not duplicate what an existing Dalamud plugin
already does well.
## What I will probably decline
## What I Will Probably Decline
- Re-introducing the webinterface or any remote-access feature. It was
removed in v0.2.0 on purpose. See README "Was gegenüber Chat 2 fehlt".
- Features that bypass the privacy filter or weaken the default
retention behaviour without an explicit, documented opt-in.
- Sweeping refactors that touch large parts of the upstream codebase.
They make selective upstream cherry-picks much harder and the
maintenance cost outweighs the benefit for a one-person project.
- Re-introducing the webinterface or any remote-access feature. It was removed in v0.2.0 on purpose.
See the README section "Was gegenüber Chat 2 fehlt".
- Features that bypass the privacy filter or weaken the default retention behaviour without an
explicit, documented opt-in.
- Sweeping refactors that touch large parts of the codebase. The maintenance cost outweighs the
benefit for a one-person project. (This used to be doubly important because of the upstream
cherry-pick path; that path is closed now, but the rule still holds on its own merits.)
- AI-generated code dropped in without disclosure or human review. See
[AI_DISCLOSURE.md](docs/AI_DISCLOSURE.md) for how I handle AI assistance
on my side; I expect comparable transparency from contributors.
[`docs/AI_DISCLOSURE.md`](docs/AI_DISCLOSURE.md) for how I handle AI assistance on my side; I
expect comparable transparency from contributors.
If you are unsure whether an idea fits, open a feature-request issue
first and ask before writing code. I would rather say "no" to a
proposal than to a finished pull request.
If you are unsure whether an idea fits, open a feature-request issue first and ask before writing
code. I would rather say "no" to a proposal than to a finished pull request.
## Workflow
1. Open an issue (bug or feature request) using the templates under
`.github/ISSUE_TEMPLATE/`. Skip this step only for trivial typos.
2. Fork the repository and branch off `main`. Branch naming is
informal; something like `fix/auto-tell-history-empty` or
`feat/adblock-light-mode` is plenty.
3. Match the existing code style. The repository ships an
`.editorconfig` that VS Code and Rider pick up automatically.
4. Keep commits focused. Several small commits with clear messages are
easier to review than one big one. Squash-on-merge happens at the
PR level if needed.
5. If your change touches user-visible behaviour, update the README
and/or the changelog block in `HellionChat/HellionChat.yaml` and
`repo.json` for the next version. I bump the version number myself
at release time, so you do not need to.
6. Open the pull request against `main`. The PR template will ask
you to summarise the change, the testing you did and any
compatibility notes.
1. Open an issue (bug or feature request) using the templates under `.github/ISSUE_TEMPLATE/`. Skip
this for trivial typos.
2. Fork the repository and branch off `main`. Branch naming is informal; something like
`fix/auto-tell-history-empty` or `feat/theme-export` is fine.
3. Match the existing code style. The repository ships an `.editorconfig` that VS Code and Rider
pick up automatically.
4. Keep commits focused. Several small commits with clear messages are easier to review than one
large one. Squash-on-merge happens at the PR level if needed.
5. If your change touches user-visible behaviour, update the README and/or the changelog block in
`HellionChat/HellionChat.yaml` and `repo.json`. I bump the version number myself at release time.
6. Open the pull request against `main`. The PR template will ask you to summarise the change, the
testing you did and any compatibility notes.
## Build and test
## Build and Test
The project targets `net10.0-windows` against Dalamud SDK 15. To build
locally you need:
The project targets `net10.0-windows` against Dalamud SDK 15. To build locally you need:
- .NET 10 SDK
- A working Dalamud development environment with `DALAMUD_HOME` set
(XIVLauncher installed and launched once is the simplest path)
- A working Dalamud dev environment with `DALAMUD_HOME` set (XIVLauncher installed and launched once
is the simplest path)
- VS Code with the C# Dev Kit, Rider, or Visual Studio
```
```bash
dotnet restore
dotnet build HellionChat.sln -c Release
```
Tests are not part of the current `HellionChat.sln`. If you add a test
project, point it at the relevant subsystems (privacy filter,
configuration migration, message store) and mention it in the PR.
There are currently no tests in `HellionChat.sln`. If you add a test project, point it at the
relevant subsystems (privacy filter, configuration migration, message store) and mention it in the
PR.
For a smoke test in-game: build, copy the output into your Dalamud
`devPlugins/HellionChat/` directory and load it through `/xlplugins`.
For a smoke test in-game: build, copy the output into your Dalamud `devPlugins/HellionChat/`
directory and load it via `/xlplugins`.
## Continuous integration
## Continuous Integration
Every push and every pull request runs:
- `build.yml` — `dotnet build` and `dotnet test`
- `codeql.yml` — CodeQL security analysis
| Workflow | What it checks |
| ------------ | -------------------------------- |
| `build.yml` | `dotnet build` and `dotnet test` |
| `codeql.yml` | CodeQL security analysis |
A pull request will not be merged while either of these is failing.
CodeQL findings on changed code need to be addressed; pre-existing
findings on untouched code are tracked separately.
A pull request will not be merged while either of these is failing. CodeQL findings on changed code
need to be addressed; pre-existing findings on untouched code are tracked separately.
## Translations
Hellion-specific strings live in `HellionChat/Resources/HellionStrings.resx` (English source) and
`HellionStrings.<lang>.resx` (per-language). These are accepted as direct pull requests.
The upstream Chat 2 strings in `HellionChat/Resources/Language.*.resx` are **not** translated here.
They are kept as-is from the last upstream sync and remain the work of the Chat 2 Crowdin community.
Active cherry-picking from upstream ended in the v1.4.x cycle (see
[`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md)), so future translation improvements to those
upstream strings will not flow into HellionChat automatically anymore. If you have improvements for
the original Chat 2 strings, please contribute them to
[Infiziert90/ChatTwo](https://github.com/Infiziert90/ChatTwo) directly.
## Licensing
By submitting a pull request you confirm that:
- Your contribution is your own work, or you have the right to
contribute it under the project licence.
- You agree that your contribution will be released under the
[EUPL-1.2](LICENSE), the same licence as the rest of the project.
- Your contribution is your own work, or you have the right to contribute it under the project
licence.
- You agree that your contribution will be released under the [EUPL-1.2](LICENSE), the same licence
as the rest of the project.
There is no separate CLA.
There is no separate CLA. Forking HellionChat is explicitly permitted under the EUPL-1.2, as with
any EUPL-licensed project.
## Translations
## Response Times
Hellion-specific strings live in `HellionChat/Resources/HellionStrings.resx`
(English source) and `HellionStrings.<lang>.resx` (per-language).
Translations are accepted as direct pull requests against those files.
| Channel | Address |
| ------------- | --------------------------------------- |
| GitHub Issues | Preferred for bugs and feature requests |
| Discord DM | `@j.j_kazama` |
| Email | `kontakt@hellion-media.de` |
The upstream Chat 2 strings in `HellionChat/Resources/Language.*.resx` are
**not** translated in this repository. They are owned by the upstream
Chat 2 project and synced in via cherry-pick. Please contribute
upstream-string translations to
[Infiziert90/ChatTwo](https://github.com/Infiziert90/ChatTwo) instead.
I respond on weekdays during European business hours and take weekends and FFXIV patch days off. A
pull request that sits for a few days has not been ignored. Pinging once after a week is fine;
please do not ping daily.
## A note on response times
## First-time setup
I respond on weekdays during European business hours and I take
weekends and FFXIV patch days off. A pull request that sits for a few
days has not been ignored; I just have not gotten to it yet. Pinging
once after a week is fine; please do not ping daily.
After cloning, run once:
```bash
./scripts/setup-hooks.sh
```
This wires `core.hooksPath` to `.githooks/`. The pre-push hook runs preflight
(versions/manifest/changelog/build).
### Test suite
The plugin's test suite lives in a separate local repository and is not part of this codebase. If
you need access for development, contact the maintainer.
+39 -15
View File
@@ -1,27 +1,51 @@
HellionChat — a privacy-focused fork of ChatTwo for FINAL FANTASY XIV
Copyright (c) 2024-2025 Infiziert90 (Infi) and Anna Clemens (ascclemens)
Original ChatTwo authors and copyright holders of the upstream
plugin this fork is built on. Their work covers the message store,
the channel filtering, the sidebar tab system, the FFXIV chat
hooks, the localisation infrastructure and most of the
architecture HellionChat still relies on.
═══════════════════════════════════════════════════════════════════
Source code
═══════════════════════════════════════════════════════════════════
Copyright (c) 2022-2026 **[Infiziert90 (Infi)](https://github.com/Infiziert90)** and **[Anna](https://github.com/anna-is-cute)**
Original ChatTwo authors and copyright holders of the upstream
plugin this fork is built on. Their work covers the message store,
the channel filtering, the sidebar tab system, the FFXIV chat
hooks, the localisation infrastructure and most of the
architecture HellionChat still relies on.
Copyright (c) 2025-2026 Florian Wathling / Hellion Online Media
HellionChat-specific modifications, including the privacy filter,
per-channel retention sweep, export pipeline, Auto-Tell-Tabs,
Hellion theme and font integration, German localisation and the
EUPL-1.2 fork maintenance.
HellionChat-specific modifications, including the privacy filter,
per-channel retention sweep, export pipeline, Auto-Tell-Tabs,
German localisation and the EUPL-1.2 fork maintenance.
Licensed under the European Union Public Licence (EUPL), Version 1.2
only. The full Licence text lives in the LICENSE file at the root of
this repository. The official Licence website is at:
https://eupl.eu/1.2/en/
Source code is licensed under the European Union Public Licence
(EUPL), Version 1.2 only. The full Licence text lives in the LICENSE
file at the root of this repository. The official Licence website is
at: <https://eupl.eu/1.2/en/>
This Work is provided "AS IS" without warranties of any kind. See
Article 7 (Disclaimer of Warranty) and Article 8 (Disclaimer of
Liability) of the Licence for the legally binding wording.
═══════════════════════════════════════════════════════════════════
Visual assets
═══════════════════════════════════════════════════════════════════
Copyright (c) 2026 Florian Eck
Designer of the Hellion Forge logo and Hellion Online Media logo
(variants located in docs/images and HellionChat/images).
Exclusive usage and marketing rights licensed to Hellion Online
Media. These assets are NOT covered by the EUPL-1.2 source code
licence above and may not be reused, modified, or redistributed
without separate permission from the copyright holder.
═══════════════════════════════════════════════════════════════════
Bundled assets
═══════════════════════════════════════════════════════════════════
Exo 2 font (HellionChat/Resources/HellionFont.ttf)
SIL Open Font License 1.1, full text in HellionFont-OFL.txt.
Bundled with permission per the OFL terms.
═══════════════════════════════════════════════════════════════════
Acknowledgements directed at the upstream ChatTwo authors live in
NOTICE.md. The manual upstream-sync workflow lives in UPSTREAM_SYNC.md.
+16 -1
View File
@@ -1,16 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HellionChat", "HellionChat\HellionChat.csproj", "{739F75E6-B65F-41EF-9D90-F7BC519E4875}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Debug|Any CPU.Build.0 = Debug|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Debug|x64.ActiveCfg = Debug|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Debug|x64.Build.0 = Debug|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Debug|x86.ActiveCfg = Debug|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Debug|x86.Build.0 = Debug|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|Any CPU.ActiveCfg = Release|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|Any CPU.Build.0 = Release|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|x64.ActiveCfg = Release|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|x64.Build.0 = Release|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|x86.ActiveCfg = Release|Any CPU
{739F75E6-B65F-41EF-9D90-F7BC519E4875}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
+36
View File
@@ -0,0 +1,36 @@
using Lumina.Excel.Sheets;
namespace HellionChat;
// Ported 1:1 from v1.5.6 ChatLogWindow.SetUpAllCommands. Provides a fast
// lookup from slash-command string to the game's TextCommand row so the
// InputBar callback can feed descriptions to CommandHelpWindow without
// hitting the sheet on every keystroke.
internal static class AllCommands
{
private static readonly Dictionary<string, TextCommand> Commands = BuildCommands();
private static Dictionary<string, TextCommand> BuildCommands()
{
var dict = new Dictionary<string, TextCommand>(StringComparer.Ordinal);
foreach (var command in Sheets.TextCommandSheet)
{
if (!command.Command.IsEmpty)
dict.TryAdd(command.Command.ToString(), command);
if (!command.ShortCommand.IsEmpty)
dict.TryAdd(command.ShortCommand.ToString(), command);
if (!command.Alias.IsEmpty)
dict.TryAdd(command.Alias.ToString(), command);
if (!command.ShortAlias.IsEmpty)
dict.TryAdd(command.ShortAlias.ToString(), command);
}
return dict;
}
public static bool TryGetValue(string command, out TextCommand textCommand) =>
Commands.TryGetValue(command, out textCommand);
}
+391 -161
View File
@@ -1,49 +1,69 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Interface.ImGuiNotification;
using HellionChat.Code;
using HellionChat.GameFunctions.Types;
using HellionChat.Resources;
using HellionChat.Util;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Microsoft.Extensions.Logging;
namespace HellionChat;
// Hellion Chat — Auto-Tell-Tabs.
//
// Spawns a session-only tab per /tell partner so a club greeter can track
// multiple parallel conversations without losing context. Subscribes to
// MessageManager.MessageProcessed for live tells and to ClientState.Logout
// for the cleanup pass; everything else hangs off these two entry points.
//
// See spec: Hellion Chat Auto-Tell-Tabs Spec (Obsidian vault).
// Auto-Tell-Tabs: spawns session-only tabs per /tell partner.
// Subscribes to MessageManager.MessageProcessed and ClientState.Logout.
internal sealed class AutoTellTabsService : IDisposable
{
private readonly Plugin _plugin;
private readonly MessageManager _messageManager;
private readonly MessageStore _store;
private readonly object _tempTabsLock = new();
private readonly ILogger<AutoTellTabsService> _logger;
// Tabs-list structure lock now lives on Plugin (neutral owner) so the
// MessageManager refilter can share it. See Plugin.TabsListLock.
private object TabsListLock => _plugin.TabsListLock;
// Bumped whenever something wipes unpinned temp tabs wholesale (logout).
// HandleTell reads it before releasing the lock and re-checks after, so a
// tab built in between is discarded instead of outliving the wipe.
private int _tabGeneration;
// Hard cap on pinned TempTabs so the sidebar doesn't inflate over years
// of usage. Separate pool from AutoTellTabsLimit (15) — pinned tabs live
// in their own bucket. A configurable cap is a vault-backlog anchor for
// a later cycle if tester feedback demands it.
internal const int MaxPinnedTempTabs = 5;
private bool _initialized;
internal AutoTellTabsService(Plugin plugin, MessageManager messageManager, MessageStore store)
// Set when Initialize ran before a character was available; cleared once the
// history has actually been loaded.
private bool _rehydratePending;
internal AutoTellTabsService(
Plugin plugin,
MessageManager messageManager,
MessageStore store,
ILogger<AutoTellTabsService> logger
)
{
_plugin = plugin;
_messageManager = messageManager;
_store = store;
_logger = logger;
}
internal int ActiveTempTabCount
{
get
{
lock (_tempTabsLock)
{
return Plugin.Config.Tabs.Count(t => t.IsTempTab);
}
}
}
// Derived from the tab list on read. Pin/Unpin/Promote/Logout simply
// mutate IsPinned or remove tabs — the count adapts automatically.
// Replaces an Interlocked counter: the pin-state transitions are cold-path
// and don't need lock-free reads.
internal int ActiveTempTabCount =>
Plugin.Config.Tabs.Count(TabLifecycleHelpers.IsInUnpinnedPool);
internal int PinnedTempTabCount => Plugin.Config.Tabs.Count(TabLifecycleHelpers.IsInPinnedPool);
internal void Initialize()
{
@@ -52,11 +72,71 @@ internal sealed class AutoTellTabsService : IDisposable
return;
}
// Pinned tabs come out of the JSON with TellTarget set but
// CurrentChannel reset (NonSerialized). Without re-seeding, the chat
// input has no tell-target on the active pinned tab, and the
// game-side channel hook only repaints CurrentChannel once the user
// triggers a /tell or channel switch.
RehydratePinnedTabs();
_messageManager.MessageProcessed += HandleTell;
Plugin.ClientState.Login += OnLogin;
Plugin.ClientState.Logout += OnLogout;
_initialized = true;
}
// Deferred when the plugin starts before a character is logged in, which is
// the normal case: the game loads plugins at boot. CurrentContentId is 0
// until then, so the history query would look up tells for character zero,
// find none, and leave every pinned tab blank for the whole session.
//
// Only visible to someone who actually pins a tell tab AND starts the game
// with the plugin already installed. Reloading the plugin in a running
// session -- what a developer does all day -- hides it completely.
private void RehydratePinnedTabs()
{
if (_messageManager.CurrentContentId == 0)
{
_logger.LogDebug("[Pin] Rehydrate deferred: no character yet, waiting for login");
_rehydratePending = true;
return;
}
_rehydratePending = false;
var pinned = Plugin.Config.Tabs.Count(TabLifecycleHelpers.IsInPinnedPool);
_logger.LogDebug($"[Pin] Rehydrate scan: {pinned} pinned tab(s) found");
foreach (var tab in Plugin.Config.Tabs)
{
if (!TabLifecycleHelpers.IsInPinnedPool(tab))
continue;
if (tab.TellTarget is null || !tab.TellTarget.IsSet())
{
_logger.LogWarning(
$"[Pin] Pinned tab '{tab.Name}' has no usable TellTarget "
+ $"(Name={tab.TellTarget?.Name ?? "<null>"} World={tab.TellTarget?.World ?? 0}). "
+ "Chat input on this tab will be empty until the partner sends a tell or you /tell manually."
);
continue;
}
tab.Channel ??= InputChannel.Tell;
tab.CurrentChannel.Channel = InputChannel.Tell;
tab.CurrentChannel.TellTarget = tab.TellTarget.Clone();
// MessageList is NonSerialized so pinned tabs come back empty.
// Preload the same history window the spawn path uses so the user
// sees the recent conversation, not a blank tab.
PreloadHistory(tab, tab.TellTarget.Name, tab.TellTarget.World, Guid.Empty);
_logger.LogDebug(
$"[Pin] Rehydrated '{tab.Name}' -> Tell target {tab.TellTarget.Name}@{tab.TellTarget.World}"
);
}
}
public void Dispose()
{
if (!_initialized)
@@ -64,6 +144,7 @@ internal sealed class AutoTellTabsService : IDisposable
return;
}
Plugin.ClientState.Login -= OnLogin;
Plugin.ClientState.Logout -= OnLogout;
_messageManager.MessageProcessed -= HandleTell;
_initialized = false;
@@ -76,7 +157,10 @@ internal sealed class AutoTellTabsService : IDisposable
return;
}
if (message.Code.Type != ChatType.TellIncoming && message.Code.Type != ChatType.TellOutgoing)
if (
message.Code.Type != ChatType.TellIncoming
&& message.Code.Type != ChatType.TellOutgoing
)
{
return;
}
@@ -84,35 +168,68 @@ internal sealed class AutoTellTabsService : IDisposable
var partner = ExtractTellPartner(message);
if (partner == null)
{
// Real message without a player payload — e.g. GM tells, which
// we deliberately skip. The diagnostics make future regressions
// (FFXIV changing tell payload shape, new edge cases) findable
// without having to crank up debug logging at the source.
Plugin.Log.Warning(
$"[AutoTellTabs] Could not extract tell partner. type={message.Code.Type}, " +
$"senderChunks={message.Sender.Count}, contentChunks={message.Content.Count}, " +
$"senderSourcePayloads={message.SenderSource?.Payloads?.Count ?? 0}, " +
$"contentSourcePayloads={message.ContentSource?.Payloads?.Count ?? 0}");
// Diagnostics: helps detect regressions (FFXIV payload changes, new edge cases)
_logger.LogWarning(
$"[AutoTellTabs] Could not extract tell partner. type={message.Code.Type}, "
+ $"senderChunks={message.Sender.Count}, contentChunks={message.Content.Count}, "
+ $"senderSourcePayloads={message.SenderSource?.Payloads?.Count ?? 0}, "
+ $"contentSourcePayloads={message.ContentSource?.Payloads?.Count ?? 0}"
);
return;
}
lock (_tempTabsLock)
// Three steps, because building the tab pulls history out of the store and
// that must not happen under TabsListLock (the query sorts the whole
// receiver history). Step 1 and 3 are locked, step 2 is not.
int generation;
lock (TabsListLock)
{
var existing = FindTempTab(partner.Value.Name, partner.Value.World);
if (existing != null)
{
// Tab already exists; Tab.Matches has already routed this
// message via the MessageManager pipeline (see Task 2 sender
// filter).
// Already routed via MessageManager pipeline — no AddMessage here,
// HandleTell runs after the delivery loop. Repair the tell-target if
// the fallback hit a pinned tab whose TellTarget didn't survive a
// previous round-trip — keeps FindTempTab fast on the next message.
if (
existing.IsPinned
&& (existing.TellTarget is null || !existing.TellTarget.IsSet())
)
{
existing.TellTarget = new TellTarget(
partner.Value.Name,
partner.Value.World,
0,
TellReason.Direct
);
_plugin.SaveConfig();
}
return;
}
if (ActiveTempTabCount >= Plugin.Config.AutoTellTabsLimit)
generation = _tabGeneration;
}
var tab = BuildTempTabWithHistory(partner.Value, message);
lock (TabsListLock)
{
// A logout in between wiped the unpinned pool; committing now would
// resurrect a tab for a character we already left.
if (generation != _tabGeneration)
return;
// Someone else (self-test, UI) may have created the tab while we built
// ours. Hand the message to theirs and drop what we built — unlike the
// early return above, this tab appeared after the delivery loop ran.
var raced = FindTempTab(partner.Value.Name, partner.Value.World);
if (raced != null)
{
DropOldestTempTab();
raced.AddMessage(message, unread: true);
return;
}
SpawnTempTab(partner.Value, message);
CommitTempTab(tab);
}
}
@@ -120,12 +237,10 @@ internal sealed class AutoTellTabsService : IDisposable
{
if (message.Code.Type == ChatType.TellIncoming)
{
// Incoming tell: the sender is the conversation partner. The
// PlayerPayload normally rides on a chunk's Link slot, but for
// some tell types FFXIV only puts it in the raw SeString —
// fall back to that before giving up.
var fromSender = ChunkUtil.TryGetPlayerPayload(message.Sender)
?? ChunkUtil.TryGetPlayerPayload(message.SenderSource);
// Sender is the partner; check chunks first, then raw SeString as fallback
var fromSender =
ChunkUtil.TryGetPlayerPayload(message.Sender)
?? ChunkUtil.TryGetPlayerPayload(message.SenderSource);
if (fromSender != null)
{
return (fromSender.PlayerName, fromSender.World.RowId);
@@ -133,21 +248,20 @@ internal sealed class AutoTellTabsService : IDisposable
return null;
}
// Outgoing tell: the local player is the sender, the partner shows
// up either as a payload in the content (for tells typed via the
// Chat 2 input bar) or as the channel's tracked tell target (set by
// the SetContextTellTarget game hook). Same SeString fallback.
var fromContent = ChunkUtil.TryGetPlayerPayload(message.Content)
?? ChunkUtil.TryGetPlayerPayload(message.ContentSource)
?? ChunkUtil.TryGetPlayerPayload(message.Sender)
?? ChunkUtil.TryGetPlayerPayload(message.SenderSource);
// Outgoing tell: check content first, then channels's TellTarget as fallback
var fromContent =
ChunkUtil.TryGetPlayerPayload(message.Content)
?? ChunkUtil.TryGetPlayerPayload(message.ContentSource)
?? ChunkUtil.TryGetPlayerPayload(message.Sender)
?? ChunkUtil.TryGetPlayerPayload(message.SenderSource);
if (fromContent != null)
{
return (fromContent.PlayerName, fromContent.World.RowId);
}
var current = _plugin.CurrentTab.CurrentChannel.TellTarget
?? _plugin.CurrentTab.CurrentChannel.TempTellTarget;
var current =
_plugin.CurrentTab.CurrentChannel.TellTarget
?? _plugin.CurrentTab.CurrentChannel.TempTellTarget;
if (current != null && current.IsSet())
{
return (current.Name, current.World);
@@ -156,85 +270,123 @@ internal sealed class AutoTellTabsService : IDisposable
return null;
}
private Tab? FindTempTab(string name, uint world)
internal static Tab? FindTempTab(string name, uint world)
{
return Plugin.Config.Tabs.FirstOrDefault(t =>
var byTarget = Plugin.Config.Tabs.FirstOrDefault(t =>
t.IsTempTab
&& t.TellTarget != null
&& string.Equals(t.TellTarget.Name, name, StringComparison.OrdinalIgnoreCase)
&& t.TellTarget.World == world);
&& t.TellTarget.World == world
);
if (byTarget != null)
return byTarget;
// Fallback: match by tab name. Pinned tabs are named via
// FormatTabName(player, world) at spawn time, so the name is a
// stable secondary key when TellTarget didn't survive a save/load
// (older configs from a renamed pin, malformed migrations, etc.).
var expectedName = FormatTabName(name, world);
return Plugin.Config.Tabs.FirstOrDefault(t =>
t.IsTempTab && string.Equals(t.Name, expectedName, StringComparison.OrdinalIgnoreCase)
);
}
private void DropOldestTempTab()
// Lock-protected lookup for the framework-thread caller (TellRouterService).
// Config.Tabs is mutated under the shared Plugin.TabsListLock on the worker thread,
// so a framework-tick reader must take the same lock to avoid enumerating the list
// mid-mutation.
internal Tab? FindTempTabSafe(string name, uint world)
{
// Greeted tabs are dropped before un-greeted ones (the user said
// "I'm done with that conversation"), and within each bucket we
// pick the oldest LastActivity. This protects active conversations
// and unfinished greetings while still freeing up a slot.
var victim = Plugin.Config.Tabs
.Select((tab, idx) => (Tab: tab, Index: idx))
.Where(t => t.Tab.IsTempTab)
.OrderByDescending(t => t.Tab.IsGreeted)
.ThenBy(t => t.Tab.LastActivity)
.FirstOrDefault();
lock (TabsListLock)
return FindTempTab(name, world);
}
if (victim.Tab == null)
internal void DropOldestTempTab()
{
// Lock the list-structure ops so the (currently caller-less) Unpin path
// can't race the worker; re-entrant when HandleTell already holds the lock.
lock (TabsListLock)
{
return;
}
// Pinned tabs live in their own bucket (MaxPinnedTempTabs) and are
// never drop candidates. They leave the bucket only via Unpin or
// PromoteToPermanent.
var victim = Plugin
.Config.Tabs.Select((tab, idx) => (Tab: tab, Index: idx))
.Where(t => TabLifecycleHelpers.IsInUnpinnedPool(t.Tab))
.OrderByDescending(t => t.Tab.IsGreeted)
.ThenBy(t => t.Tab.LastActivity)
.FirstOrDefault();
// v0.6.1 — if the victim is currently popped out, tear down the
// matching Popout window first. Otherwise the window stays in
// PopOutWindows + WindowSystem and renders empty / re-spawns on the
// next AddPopOutsToDraw tick. Latent since pop-outs were introduced;
// becomes visible with AutoTellTabsOpenAsPopout where dropping a
// popped tab is now a routine code path.
if (victim.Tab.PopOut)
{
var popout = _plugin.ChatLogWindow.ActivePopouts
.FirstOrDefault(p => p.TabIdentifier == victim.Tab.Identifier);
if (popout != null)
if (victim.Tab == null)
{
popout.IsOpen = false;
return;
}
}
Plugin.Config.Tabs.RemoveAt(victim.Index);
var dropped = victim.Tab;
// By reference, not by index: the index came from a Select() earlier in
// this block and would point at the wrong tab if anything shifted the list.
Plugin.Config.Tabs.Remove(dropped);
// Re-anchor the active tab so the user does not silently end up on
// a different conversation when their tab gets dropped or shifted.
if (victim.Index <= _plugin.LastTab)
{
_plugin.WantedTab = 0;
// Re-anchor the UI selection if it pointed at the dropped tab, and close any
// pop-out window the dropped tab owned. Both run on the PendingMessage worker
// thread and touch window state the Draw path reads (OnTabActivated re-seed +
// the pool's Unbind), so marshal onto the framework thread to serialize with
// Draw (reference_dalamud_framework_thread). TryClose is idempotent: a tab that
// was never popped is a silent no-op.
Plugin.Framework.RunOnFrameworkThread(() =>
{
_plugin.ChannelPopoutPool.TryClose(dropped.Identifier);
_plugin.MainWindow?.ResetActiveTabIfRemoved(dropped);
});
}
}
private void SpawnTempTab((string Name, uint World) partner, Message currentMessage)
// Runs WITHOUT TabsListLock: PreloadHistory hits the store, which used to hold
// the lock across a query that sorted the whole receiver history. The tab is not
// public until CommitTempTab adds it, so building it unlocked is safe.
private Tab BuildTempTabWithHistory((string Name, uint World) partner, Message currentMessage)
{
var tab = BuildTempTab(partner.Name, partner.World);
// Preload first so the tab opens with chronological history above
// the current message — and so a slow DB query never causes a
// visible "empty tab, then history pops in" effect on screen.
// The current message is already persisted in the store by the
// time MessageProcessed fires (see MessageManager.cs: UpsertMessage
// runs before the event), so we have to exclude it explicitly to
// avoid the separator landing below the live tell.
// Preload history: chronological order with current message already persisted
PreloadHistory(tab, partner.Name, partner.World, currentMessage.Id);
tab.AddMessage(currentMessage, unread: true);
// Hellion Chat v0.6.1 — opt-in: open new /tell tabs directly as a
// pop-out window. Set BEFORE Tabs.Add so the next render-tick's
// AddPopOutsToDraw() sees PopOut=true and spawns the Popout window
// alongside the tab going into the list. No SaveConfig() because
// auto-tell tabs are IsTempTab (session-only, never persisted).
// Flag the tab as a pop-out if configured; the marshalled TryOpen below reads
// that flag to open the real window.
if (Plugin.Config.AutoTellTabsOpenAsPopout)
{
tab.PopOut = true;
}
return tab;
}
// Caller MUST hold TabsListLock.
private void CommitTempTab(Tab tab)
{
if (ActiveTempTabCount >= Plugin.Config.AutoTellTabsLimit)
{
DropOldestTempTab();
}
Plugin.Config.Tabs.Add(tab);
// Actually open the pop-out window for the flagged tab — without this the
// flag was dead (a PopOut tab with no window). CommitTempTab runs on the
// PendingMessage worker thread under Plugin.TabsListLock; TryOpen does
// OnTabActivated + Bind (window state Draw reads), so marshal onto the
// framework thread. If the pool is full, drop the flag so it never claims a
// window it didn't get (flag/window parity).
if (tab.PopOut)
{
Plugin.Framework.RunOnFrameworkThread(() =>
{
if (!_plugin.ChannelPopoutPool.TryOpen(tab))
tab.PopOut = false;
});
}
}
private static Tab BuildTempTab(string playerName, uint worldRowId)
@@ -242,6 +394,7 @@ internal sealed class AutoTellTabsService : IDisposable
return new Tab
{
Name = FormatTabName(playerName, worldRowId),
NameCameFromPartner = true,
IsTempTab = true,
AllSenderMessages = true,
TellTarget = new TellTarget(playerName, worldRowId, 0, TellReason.Direct),
@@ -263,9 +416,7 @@ internal sealed class AutoTellTabsService : IDisposable
{
return $"{playerName}@{worldRow.Name}";
}
// World sheet lookup miss is rare (only for FFXIV worlds Dalamud has
// not yet seen). Fall back to the raw RowId so the user still has a
// unique, readable label.
// Fallback if world lookup misses (rare; only for unseen worlds)
return $"{playerName}@World{worldRowId}";
}
@@ -279,14 +430,13 @@ internal sealed class AutoTellTabsService : IDisposable
try
{
// Pull one extra row because the live tell that triggered this
// spawn is already in the store and would otherwise eat one of
// the user's preload-budget slots.
// Pull one extra row: current message is already in store and would eat a preload slot
var history = _store.GetTellHistoryWithSender(
_messageManager.CurrentContentId,
senderName,
senderWorld,
preloadCount + 1);
preloadCount + 1
);
var historicMessages = history
.Where(m => m.Id != currentMessageId)
@@ -295,36 +445,30 @@ internal sealed class AutoTellTabsService : IDisposable
if (historicMessages.Count == 0)
{
// No prior tells with this player — leave the tab to start
// empty so the user does not see a "history loaded" marker
// sitting alone above the very first message.
// No prior tells; leave tab empty to avoid orphaned "history loaded" marker
return;
}
// The history list is already oldest-first, so a plain AddPrune
// loop produces the chronological order the user expects to see
// when the tab opens.
// History is oldest-first; add in order for chronological display
foreach (var message in historicMessages)
{
tab.Messages.AddPrune(message, MessageManager.MessageDisplayLimit);
}
// Visible separator between the loaded history and the live
// tell that triggered this spawn. Goes in last so it sorts
// after the historical messages but before the current one.
// Separator between history and live tell (sorts after history but before current)
tab.Messages.AddPrune(
MakeSystemMarker(HellionStrings.AutoTellTabs_HistorySeparator),
MessageManager.MessageDisplayLimit);
MessageManager.MessageDisplayLimit
);
}
catch (Exception ex)
{
// Non-fatal: the tab still spawns, but the user gets a visible
// notice instead of silently missing history. The error logs
// once with full stack trace for diagnosis.
Plugin.Log.Error(ex, "[AutoTellTabs] History preload failed");
// Non-fatal: tab still spawns with visible error notice instead of silent history loss
_logger.LogError(ex, "[AutoTellTabs] History preload failed");
tab.Messages.AddPrune(
MakeSystemMarker(HellionStrings.AutoTellTabs_HistoryLoadError),
MessageManager.MessageDisplayLimit);
MessageManager.MessageDisplayLimit
);
}
}
@@ -358,11 +502,9 @@ internal sealed class AutoTellTabsService : IDisposable
return;
}
lock (_tempTabsLock)
lock (TabsListLock)
{
// Frame-race guard (E5): the sidebar might still render a tab
// that has already been removed by LRU drop or logout cleanup.
// Silently skip the toggle so we don't mutate stale state.
// Guard against frame-race: sidebar might render a tab already removed by LRU or logout
if (!Plugin.Config.Tabs.Contains(tab))
{
return;
@@ -372,47 +514,135 @@ internal sealed class AutoTellTabsService : IDisposable
}
}
// Fires on the login that follows a boot-time start, and on every character
// switch after one. Guarded by the pending flag so a switch does not append
// a second copy of the history to tabs that already have it.
private void OnLogin()
{
if (!_rehydratePending)
return;
RehydratePinnedTabs();
}
private void OnLogout(int type, int code)
{
lock (_tempTabsLock)
lock (TabsListLock)
{
// Snapshot whether the active tab is about to be removed, BEFORE
// we mutate the list — index lookups would lie to us afterwards.
var lastIndex = _plugin.LastTab;
var lastIndexValid = lastIndex >= 0 && lastIndex < Plugin.Config.Tabs.Count;
var currentWasTempTab = lastIndexValid && Plugin.Config.Tabs[lastIndex].IsTempTab;
// Pinned TempTabs must survive char-switch — that's the whole point
// of pinning. Only unpinned ones get stripped.
var active = _plugin.MainWindow?.ActiveTab;
// v0.6.1 — symmetric to DropOldestTempTab cleanup: tear down any
// popped-out temp tab windows before removing the tabs themselves,
// otherwise PopOutWindows + WindowSystem keep ghost entries until
// the next plugin reload. Especially relevant once Auto-Pop-Out is
// enabled — every logout would otherwise leak as many ghosts as
// there were active /tell pop-outs.
var poppedTempTabIds = Plugin.Config.Tabs
.Where(t => t.IsTempTab && t.PopOut)
var poppedTempTabIds = Plugin
.Config.Tabs.Where(t =>
TabLifecycleHelpers.IsInUnpinnedPool(t)
&& _plugin.ChannelPopoutPool.IsOpen(t.Identifier)
)
.Select(t => t.Identifier)
.ToList();
if (poppedTempTabIds.Count > 0)
{
var poppedSet = poppedTempTabIds.ToHashSet();
foreach (var popout in _plugin.ChatLogWindow.ActivePopouts
.Where(p => poppedSet.Contains(p.TabIdentifier))
.ToList())
{
popout.IsOpen = false;
}
}
Plugin.Config.Tabs.RemoveAll(t => t.IsTempTab);
// Close any pop-out window an unpinned temp tab owns before the tabs leave
// the list. Filtering on the live pool (not the PopOut flag) also catches
// manually right-clicked pop-outs, which never set the flag.
foreach (var id in poppedTempTabIds)
_plugin.ChannelPopoutPool.TryClose(id);
// Force a switch to tab 0 if the active tab was a temp tab OR
// if drops before the active index pushed LastTab out of range.
// Otherwise the user keeps their current persistent tab.
var stillValid = lastIndex >= 0 && lastIndex < Plugin.Config.Tabs.Count;
if (currentWasTempTab || !stillValid)
Plugin.Config.Tabs.RemoveAll(TabLifecycleHelpers.IsInUnpinnedPool);
// HandleTell builds a tab outside the lock; bumping here lets it detect
// that the world moved on and drop what it built. Read and compared under
// the same lock, so no volatile needed.
_tabGeneration++;
// Re-anchor the UI selection if the active tab was one of the stripped
// unpinned temp tabs (reference predicate, not an index). Logout is a
// framework-thread event, so this is already serialized with Draw — no
// marshalling needed here, unlike the worker-thread eviction path.
if (active is { } a && TabLifecycleHelpers.IsInUnpinnedPool(a))
{
_plugin.WantedTab = 0;
_plugin.MainWindow?.ResetActiveTabIfRemoved(a);
}
}
}
internal bool TryPin(Tab tab)
{
if (!tab.IsTempTab || tab.IsPinned)
{
_logger.LogDebug(
$"[Pin] TryPin skipped: IsTempTab={tab.IsTempTab} IsPinned={tab.IsPinned}"
);
return false;
}
// Count and flag under one lock so the cap can't be raced. SaveConfig stays
// OUTSIDE -- holding TabsListLock across a save would put an fsync on the
// click path, which is what a later cycle just removed elsewhere.
lock (TabsListLock)
{
if (PinnedTempTabCount >= MaxPinnedTempTabs)
{
WrapperUtil.AddNotification(
string.Format(HellionStrings.PinTab_LimitReached, MaxPinnedTempTabs),
NotificationType.Warning
);
return false;
}
tab.IsPinned = true;
}
_logger.LogDebug(
$"[Pin] Pinned tab '{tab.Name}' target={tab.TellTarget?.Name}@{tab.TellTarget?.World}"
);
_plugin.SaveConfig();
return true;
}
internal void Unpin(Tab tab)
{
if (!tab.IsPinned)
{
return;
}
// If the unpinned pool is already full, dropping the oldest before
// flipping the flag avoids counting the just-unpinned tab as a drop
// candidate. Under lock, since DropOldestTempTab mutates the list.
// SaveConfig stays outside, see TryPin.
lock (TabsListLock)
{
if (ActiveTempTabCount >= Plugin.Config.AutoTellTabsLimit)
{
DropOldestTempTab();
}
tab.IsPinned = false;
}
_logger.LogDebug("[Pin] Unpinned tab '{TabName}'", tab.Name);
_plugin.SaveConfig();
}
internal void PromoteToPermanent(Tab tab)
{
if (!tab.IsTempTab)
{
return;
}
// Drops the temp/pin flags, the persisted tell target AND the runtime
// channel's tell state. The runtime-channel clear is the CORR-1 guard —
// see StripTellBindingOnPromote; clearing Tab.TellTarget alone would leave
// CurrentChannel.Channel == Tell + a stale target and route a typed line
// silently as /tell to the old partner.
// Flips IsTempTab/IsPinned, which decide pool membership and whether a save
// strips the tab. Under lock so a concurrent save sees one or the other, never
// half. SaveConfig stays outside, see TryPin.
lock (TabsListLock)
TabLifecycleHelpers.StripTellBindingOnPromote(tab);
_logger.LogDebug($"[Pin] Promoted tab '{tab.Name}' to permanent (tell-binding dropped)");
_plugin.SaveConfig();
}
}
+36
View File
@@ -0,0 +1,36 @@
using System.Runtime.CompilerServices;
using HellionChat.Util;
namespace HellionChat.Branding;
// Centralised — a future invite/URL rotation only touches this file.
internal static class BrandingLinks
{
public const string HellionForgeDiscordInvite = "https://discord.gg/X9V7Kcv5gR";
public const string HellionForgeGitea = "https://gitea.hellion-forge.cloud/Hellion-Forge";
public const string HellionChatRepo =
"https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat";
public const string HellionChatCustomRepoManifest =
"https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/repo.json";
public const string HellionForgeWebsite = "https://hellion-forge.cloud";
public const string HellionMediaWebsite = "https://hellion-media.de/de";
// CA2255 warns against [ModuleInitializer] in library code, but Dalamud
// loads the plugin DLL directly so the module-init pass is the right hook
// for a one-shot URL sanity check at plugin load.
#pragma warning disable CA2255
[ModuleInitializer]
#pragma warning restore CA2255
internal static void ValidateUrls()
{
UrlValidation.ValidateAll(
nameof(BrandingLinks),
HellionForgeDiscordInvite,
HellionForgeGitea,
HellionChatRepo,
HellionChatCustomRepoManifest,
HellionForgeWebsite,
HellionMediaWebsite
);
}
}
+22
View File
@@ -0,0 +1,22 @@
using Dalamud.Interface.Textures;
namespace HellionChat.Branding;
// UI sibling of HellionForgeAscii.FoxMini: the embedded Hellion Forge fox
// banner PNG. Uses ITextureProvider.GetFromManifestResource, a "Get" shared
// texture, so Dalamud owns the cache and lifetime. No manual dispose, no async
// handling in the plugin. Static to mirror HellionForgeAscii (zero injectable
// deps; Plugin.TextureProvider is a static [PluginService]).
internal static class FoxBannerTexture
{
private const string ResourceName = "HellionChat.Branding.fox-banner.png";
// Resolved fresh on every access. Dalamud keeps the shared texture cached
// internally and decodes it asynchronously, so GetWrapOrDefault() returns
// null for the first few frames until the decode finishes.
public static ISharedImmediateTexture Shared =>
Plugin.TextureProvider.GetFromManifestResource(
typeof(FoxBannerTexture).Assembly,
ResourceName
);
}
+29
View File
@@ -0,0 +1,29 @@
namespace HellionChat.Branding;
// Lazy-loaded ASCII art that ships embedded with the DLL.
//
// - FoxMini: the four-line fox-head + curly-tail that gets stitched
// into the DI-logger bootstrap line so an xllog reader sees the
// same signature on every plugin load.
//
// The file lives as an embedded resource under HellionChat.Branding.* so
// the plugin DLL is self-contained; no on-disk asset lookup that could
// silently miss after a partial deploy.
internal static class HellionForgeAscii
{
private static string? _foxMini;
public static string FoxMini => _foxMini ??= Load("HellionChat.Branding.fox-mini.txt");
private static string Load(string resourceName)
{
using var stream = typeof(HellionForgeAscii).Assembly.GetManifestResourceStream(
resourceName
);
if (stream is null)
return string.Empty;
using var reader = new StreamReader(stream);
return reader.ReadToEnd();
}
}
+10 -8
View File
@@ -1,6 +1,6 @@
using System.Linq;
using HellionChat.Resources;
using Dalamud.Plugin;
using HellionChat.Resources;
namespace HellionChat;
@@ -10,17 +10,19 @@ internal static class ChatTwoConflictDetector
public static void ThrowIfChatTwoIsLoaded(IDalamudPluginInterface pluginInterface)
{
var conflict = pluginInterface.InstalledPlugins
.FirstOrDefault(p =>
p.InternalName == UpstreamInternalName &&
p.IsLoaded);
var conflict = pluginInterface.InstalledPlugins.FirstOrDefault(p =>
p.InternalName == UpstreamInternalName && p.IsLoaded
);
if (conflict is null)
return;
var message = HellionStrings.ChatTwoConflictTitle + "\n\n" +
HellionStrings.ChatTwoConflictBody + "\n\n" +
HellionStrings.ChatTwoConflictAction;
var message =
HellionStrings.ChatTwoConflictTitle
+ "\n\n"
+ HellionStrings.ChatTwoConflictBody
+ "\n\n"
+ HellionStrings.ChatTwoConflictAction;
throw new System.InvalidOperationException(message);
}
+41 -27
View File
@@ -1,5 +1,5 @@
using HellionChat.Code;
using Dalamud.Game.Text.SeStringHandling;
using HellionChat.Code;
using MessagePack;
namespace HellionChat;
@@ -25,24 +25,23 @@ public abstract class Chunk
Link = link;
}
internal SeString? GetSeString() => Source switch
{
ChunkSource.None => null,
ChunkSource.Sender => Message?.SenderSource,
ChunkSource.Content => Message?.ContentSource,
_ => null,
};
internal SeString? GetSeString() =>
Source switch
{
ChunkSource.None => null,
ChunkSource.Sender => Message?.SenderSource,
ChunkSource.Content => Message?.ContentSource,
_ => null,
};
/// <summary>
/// Get some basic text for use in generating hashes.
/// </summary>
// Returns basic text for hashing (content for TextChunk, icon name for IconChunk)
internal string StringValue()
{
return this switch
{
TextChunk text => text.Content,
IconChunk icon => icon.Icon.ToString(),
_ => ""
_ => "",
};
}
}
@@ -57,18 +56,29 @@ public enum ChunkSource
[MessagePackObject(AllowPrivate = true)]
public class TextChunk : Chunk
{
[Key(2)] public ChatType? FallbackColour;
[Key(3)] public uint? Foreground;
[Key(4)] public uint? Glow;
[Key(5)] public bool Italic;
[Key(6)] public string Content;
[Key(2)]
public ChatType? FallbackColour;
private TextChunk(Chunk chunk, string content) : base(chunk.Source, chunk.Link)
[Key(3)]
public uint? Foreground;
[Key(4)]
public uint? Glow;
[Key(5)]
public bool Italic;
[Key(6)]
public string Content;
private TextChunk(Chunk chunk, string content)
: base(chunk.Source, chunk.Link)
{
Content = content;
}
internal TextChunk(ChunkSource source, Payload? link, string content) : base(source, link)
internal TextChunk(ChunkSource source, Payload? link, string content)
: base(source, link)
{
// This has been null in the past, and it broke rendering code.
// ReSharper disable once NullCoalescingConditionIsAlwaysNotNullAccordingToAPIContract
@@ -76,7 +86,16 @@ public class TextChunk : Chunk
}
// ReSharper disable once UnusedMember.Global // Used by MessagePack
public TextChunk(ChunkSource source, Payload? link, ChatType? fallbackColour, uint? foreground, uint? glow, bool italic, string content) : base(source, link)
public TextChunk(
ChunkSource source,
Payload? link,
ChatType? fallbackColour,
uint? foreground,
uint? glow,
bool italic,
string content
)
: base(source, link)
{
FallbackColour = fallbackColour;
Foreground = foreground;
@@ -87,9 +106,6 @@ public class TextChunk : Chunk
Content = content ?? "";
}
/// <summary>
/// Creates a new TextChunk with identical styling to this one.
/// </summary>
public TextChunk NewWithStyle(ChunkSource source, Payload? link, string content)
{
return new TextChunk(source, link, content)
@@ -101,9 +117,6 @@ public class TextChunk : Chunk
};
}
/// <summary>
/// Creates a new TextChunk with identical styling to this one.
/// </summary>
public TextChunk NewWithStyle(Chunk chunk, string content)
{
return new TextChunk(chunk, content)
@@ -122,7 +135,8 @@ public class IconChunk : Chunk
[Key(2)]
public BitmapFontIcon Icon { get; set; }
public IconChunk(ChunkSource source, Payload? link, BitmapFontIcon icon) : base(source, link)
public IconChunk(ChunkSource source, Payload? link, BitmapFontIcon icon)
: base(source, link)
{
Icon = icon;
}
+26
View File
@@ -0,0 +1,26 @@
namespace HellionChat;
// Reduced CJK fallback coverage for the v1.5.3 NotoSansCjk fallback merge.
// Before that the fallback merged over the full `Ranges` array (Default + endonyms),
// duplicating the Latin/Default work already done by the global/Japanese fonts.
// This is the trimmed remainder the fallback is actually the sole source for:
// - Hangul Syllables (AC00-D7A3): no other merged font ships Korean glyphs.
// - The full CJK Unified Ideographs (Han) block: at UseHellionFont=true the global
// font is Inter-Light (no CJK), so the fallback is the SOLE Han source. The JpRange
// overlap is harmless (MergeMode: the Japanese font wins for shared kanji).
// Deliberately excluded: ONLY the ASCII/Latin Default block (0x20-0xFF), which the
// global font already owns -- that doubled Latin merge is the waste being removed.
// Kept as plain start/end pairs so it is unit-testable without the unsafe ImGui
// glyph-range builder (mirrors FontSizeResolver's split-for-test rationale).
internal static class CjkFallbackRange
{
// Hangul Syllables + the full CJK Unified Ideographs (Han) block. Rationale: see
// class comment. Plain start/end pairs so it stays unit-testable.
internal static readonly ushort[] Pairs =
[
0xAC00,
0xD7A3, // Hangul Syllables
0x4E00,
0x9FFF, // CJK Unified Ideographs (full Han) -- sole source at UseHellionFont
];
}
+1 -1
View File
@@ -16,7 +16,7 @@ public class ChatCode
}
public ChatCode(byte type, byte source, byte target)
: this((XivChatType)type, (XivChatRelationKind)source, (XivChatRelationKind)target) {}
: this((XivChatType)type, (XivChatRelationKind)source, (XivChatRelationKind)target) { }
public bool IsBattle()
{
+11 -11
View File
@@ -7,36 +7,36 @@ public enum ChatSource : ushort
{
None = 0,
/// <summary>The player currently controlled by the local client.</summary>
// The player controlled by this client
LocalPlayer = 1 << XivChatRelationKind.LocalPlayer,
/// <summary>A player in the same 4-man or 8-man party as the local player.</summary>
// Member of the local party
PartyMember = 1 << XivChatRelationKind.PartyMember,
/// <summary>A player in the same alliance raid.</summary>
// Member of the alliance
AllianceMember = 1 << XivChatRelationKind.AllianceMember,
/// <summary>A player not in the local player's party or alliance.</summary>
// Other player
OtherPlayer = 1 << XivChatRelationKind.OtherPlayer,
/// <summary>An enemy entity that is currently in combat with the player or party.</summary>
// Enemy in combat
EngagedEnemy = 1 << XivChatRelationKind.EngagedEnemy,
/// <summary>An enemy entity that is not yet in combat or claimed.</summary>
// Enemy out of combat
UnengagedEnemy = 1 << XivChatRelationKind.UnengagedEnemy,
/// <summary>An NPC that is friendly or neutral to the player (e.g., EventNPCs).</summary>
// Friendly NPC
FriendlyNpc = 1 << XivChatRelationKind.FriendlyNpc,
/// <summary>A pet (Summoner/Scholar) or companion (Chocobo) belonging to the local player.</summary>
// Own pet or companion
PetOrCompanion = 1 << XivChatRelationKind.PetOrCompanion,
/// <summary>A pet or companion belonging to a member of the local player's party.</summary>
// Pet or companion of party members
PetOrCompanionParty = 1 << XivChatRelationKind.PetOrCompanionParty,
/// <summary>A pet or companion belonging to a member of the alliance.</summary>
// Pet or companion of alliance members
PetOrCompanionAlliance = 1 << XivChatRelationKind.PetOrCompanionAlliance,
/// <summary>A pet or companion belonging to a player not in the party or alliance.</summary>
// Pet or companion of other players
PetOrCompanionOther = 1 << XivChatRelationKind.PetOrCompanionOther,
}
+27 -19
View File
@@ -5,24 +5,32 @@ namespace HellionChat.Code;
internal static class ChatSourceExt
{
internal const ChatSource All =
ChatSource.LocalPlayer | ChatSource.PartyMember | ChatSource.AllianceMember |
ChatSource.OtherPlayer | ChatSource.EngagedEnemy | ChatSource.UnengagedEnemy |
ChatSource.FriendlyNpc | ChatSource.PetOrCompanion | ChatSource.PetOrCompanionParty |
ChatSource.PetOrCompanionAlliance | ChatSource.PetOrCompanionOther;
ChatSource.LocalPlayer
| ChatSource.PartyMember
| ChatSource.AllianceMember
| ChatSource.OtherPlayer
| ChatSource.EngagedEnemy
| ChatSource.UnengagedEnemy
| ChatSource.FriendlyNpc
| ChatSource.PetOrCompanion
| ChatSource.PetOrCompanionParty
| ChatSource.PetOrCompanionAlliance
| ChatSource.PetOrCompanionOther;
internal static string Name(this ChatSource source) => source switch
{
ChatSource.LocalPlayer => Language.ChatSource_Self,
ChatSource.PartyMember => Language.ChatSource_PartyMember,
ChatSource.AllianceMember => Language.ChatSource_AllianceMember,
ChatSource.OtherPlayer => Language.ChatSource_Other,
ChatSource.EngagedEnemy => Language.ChatSource_EngagedEnemy,
ChatSource.UnengagedEnemy => Language.ChatSource_UnengagedEnemy,
ChatSource.FriendlyNpc => Language.ChatSource_FriendlyNpc,
ChatSource.PetOrCompanion => Language.ChatSource_SelfPet,
ChatSource.PetOrCompanionParty => Language.ChatSource_PartyPet,
ChatSource.PetOrCompanionAlliance => Language.ChatSource_AlliancePet,
ChatSource.PetOrCompanionOther => Language.ChatSource_OtherPet,
_ => throw new ArgumentOutOfRangeException(nameof(source), source, null),
};
internal static string Name(this ChatSource source) =>
source switch
{
ChatSource.LocalPlayer => Language.ChatSource_Self,
ChatSource.PartyMember => Language.ChatSource_PartyMember,
ChatSource.AllianceMember => Language.ChatSource_AllianceMember,
ChatSource.OtherPlayer => Language.ChatSource_Other,
ChatSource.EngagedEnemy => Language.ChatSource_EngagedEnemy,
ChatSource.UnengagedEnemy => Language.ChatSource_UnengagedEnemy,
ChatSource.FriendlyNpc => Language.ChatSource_FriendlyNpc,
ChatSource.PetOrCompanion => Language.ChatSource_SelfPet,
ChatSource.PetOrCompanionParty => Language.ChatSource_PartyPet,
ChatSource.PetOrCompanionAlliance => Language.ChatSource_AlliancePet,
ChatSource.PetOrCompanionOther => Language.ChatSource_OtherPet,
_ => throw new ArgumentOutOfRangeException(nameof(source), source, null),
};
}
+265 -252
View File
@@ -1,92 +1,98 @@
using Dalamud.Game.Config;
using HellionChat.Resources;
using HellionChat.Util;
using Dalamud.Game.Config;
namespace HellionChat.Code;
internal static class ChatTypeExt
{
internal static IEnumerable<(string, ChatType[])> SortOrder =>
[
(Language.Options_Tabs_ChannelTypes_Special, [ChatType.Debug, ChatType.Urgent, ChatType.Notice]),
(Language.Options_Tabs_ChannelTypes_Chat,
[
ChatType.Say,
ChatType.Yell,
ChatType.Shout,
ChatType.TellIncoming,
ChatType.TellOutgoing,
ChatType.Party,
ChatType.CrossParty,
ChatType.Alliance,
ChatType.FreeCompany,
ChatType.PvpTeam,
ChatType.CrossLinkshell1,
ChatType.CrossLinkshell2,
ChatType.CrossLinkshell3,
ChatType.CrossLinkshell4,
ChatType.CrossLinkshell5,
ChatType.CrossLinkshell6,
ChatType.CrossLinkshell7,
ChatType.CrossLinkshell8,
ChatType.Linkshell1,
ChatType.Linkshell2,
ChatType.Linkshell3,
ChatType.Linkshell4,
ChatType.Linkshell5,
ChatType.Linkshell6,
ChatType.Linkshell7,
ChatType.Linkshell8,
ChatType.NoviceNetwork,
ChatType.StandardEmote,
ChatType.CustomEmote
]),
(Language.Options_Tabs_ChannelTypes_Battle,
[
ChatType.Damage,
ChatType.Miss,
ChatType.Action,
ChatType.Item,
ChatType.Healing,
ChatType.GainBuff,
ChatType.LoseBuff,
ChatType.GainDebuff,
ChatType.LoseDebuff
]),
(Language.Options_Tabs_ChannelTypes_Announcements,
[
ChatType.System,
ChatType.BattleSystem,
ChatType.GatheringSystem,
ChatType.Error,
ChatType.Echo,
ChatType.NoviceNetworkSystem,
ChatType.FreeCompanyAnnouncement,
ChatType.PvpTeamAnnouncement,
ChatType.FreeCompanyLoginLogout,
ChatType.PvpTeamLoginLogout,
ChatType.RetainerSale,
ChatType.NpcDialogue,
ChatType.NpcAnnouncement,
ChatType.LootNotice,
ChatType.Progress,
ChatType.LootRoll,
ChatType.Crafting,
ChatType.Gathering,
ChatType.PeriodicRecruitmentNotification,
ChatType.Sign,
ChatType.RandomNumber,
ChatType.Orchestrion,
ChatType.MessageBook,
ChatType.Alarm,
ChatType.GlamourNotifications
])
// Note: ExtraChat linkshells are handled separately in the tab settings
// UI.
];
(
Language.Options_Tabs_ChannelTypes_Special,
[ChatType.Debug, ChatType.Urgent, ChatType.Notice]
),
(
Language.Options_Tabs_ChannelTypes_Chat,
[
ChatType.Say,
ChatType.Yell,
ChatType.Shout,
ChatType.TellIncoming,
ChatType.TellOutgoing,
ChatType.Party,
ChatType.CrossParty,
ChatType.Alliance,
ChatType.FreeCompany,
ChatType.PvpTeam,
ChatType.CrossLinkshell1,
ChatType.CrossLinkshell2,
ChatType.CrossLinkshell3,
ChatType.CrossLinkshell4,
ChatType.CrossLinkshell5,
ChatType.CrossLinkshell6,
ChatType.CrossLinkshell7,
ChatType.CrossLinkshell8,
ChatType.Linkshell1,
ChatType.Linkshell2,
ChatType.Linkshell3,
ChatType.Linkshell4,
ChatType.Linkshell5,
ChatType.Linkshell6,
ChatType.Linkshell7,
ChatType.Linkshell8,
ChatType.NoviceNetwork,
ChatType.StandardEmote,
ChatType.CustomEmote,
]
),
(
Language.Options_Tabs_ChannelTypes_Battle,
[
ChatType.Damage,
ChatType.Miss,
ChatType.Action,
ChatType.Item,
ChatType.Healing,
ChatType.GainBuff,
ChatType.LoseBuff,
ChatType.GainDebuff,
ChatType.LoseDebuff,
]
),
(
Language.Options_Tabs_ChannelTypes_Announcements,
[
ChatType.System,
ChatType.BattleSystem,
ChatType.GatheringSystem,
ChatType.Error,
ChatType.Echo,
ChatType.NoviceNetworkSystem,
ChatType.FreeCompanyAnnouncement,
ChatType.PvpTeamAnnouncement,
ChatType.FreeCompanyLoginLogout,
ChatType.PvpTeamLoginLogout,
ChatType.RetainerSale,
ChatType.NpcDialogue,
ChatType.NpcAnnouncement,
ChatType.LootNotice,
ChatType.Progress,
ChatType.LootRoll,
ChatType.Crafting,
ChatType.Gathering,
ChatType.PeriodicRecruitmentNotification,
ChatType.Sign,
ChatType.RandomNumber,
ChatType.Orchestrion,
ChatType.MessageBook,
ChatType.Alarm,
ChatType.GlamourNotifications,
]
),
// Note: ExtraChat linkshells are handled separately in the tab settings
// UI.
];
internal static string Name(this ChatType type)
{
@@ -143,7 +149,8 @@ internal static class ChatTypeExt
ChatType.FreeCompanyAnnouncement => Language.ChatType_FreeCompanyAnnouncement,
ChatType.FreeCompanyLoginLogout => Language.ChatType_FreeCompanyLoginLogout,
ChatType.RetainerSale => Language.ChatType_RetainerSale,
ChatType.PeriodicRecruitmentNotification => Language.ChatType_PeriodicRecruitmentNotification,
ChatType.PeriodicRecruitmentNotification =>
Language.ChatType_PeriodicRecruitmentNotification,
ChatType.Sign => Language.ChatType_Sign,
ChatType.RandomNumber => Language.ChatType_RandomNumber,
ChatType.NoviceNetworkSystem => Language.ChatType_NoviceNetworkSystem,
@@ -306,181 +313,187 @@ internal static class ChatTypeExt
}
}
internal static InputChannel? ToInputChannel(this ChatType type) => type switch
{
ChatType.TellOutgoing => InputChannel.Tell,
ChatType.Say => InputChannel.Say,
ChatType.Party => InputChannel.Party,
ChatType.Alliance => InputChannel.Alliance,
ChatType.Yell => InputChannel.Yell,
ChatType.Shout => InputChannel.Shout,
ChatType.FreeCompany => InputChannel.FreeCompany,
ChatType.PvpTeam => InputChannel.PvpTeam,
ChatType.NoviceNetwork => InputChannel.NoviceNetwork,
ChatType.CrossLinkshell1 => InputChannel.CrossLinkshell1,
ChatType.CrossLinkshell2 => InputChannel.CrossLinkshell2,
ChatType.CrossLinkshell3 => InputChannel.CrossLinkshell3,
ChatType.CrossLinkshell4 => InputChannel.CrossLinkshell4,
ChatType.CrossLinkshell5 => InputChannel.CrossLinkshell5,
ChatType.CrossLinkshell6 => InputChannel.CrossLinkshell6,
ChatType.CrossLinkshell7 => InputChannel.CrossLinkshell7,
ChatType.CrossLinkshell8 => InputChannel.CrossLinkshell8,
ChatType.Linkshell1 => InputChannel.Linkshell1,
ChatType.Linkshell2 => InputChannel.Linkshell2,
ChatType.Linkshell3 => InputChannel.Linkshell3,
ChatType.Linkshell4 => InputChannel.Linkshell4,
ChatType.Linkshell5 => InputChannel.Linkshell5,
ChatType.Linkshell6 => InputChannel.Linkshell6,
ChatType.Linkshell7 => InputChannel.Linkshell7,
ChatType.Linkshell8 => InputChannel.Linkshell8,
_ => null,
};
internal static InputChannel? ToInputChannel(this ChatType type) =>
type switch
{
ChatType.TellOutgoing => InputChannel.Tell,
ChatType.Say => InputChannel.Say,
ChatType.Party => InputChannel.Party,
ChatType.Alliance => InputChannel.Alliance,
ChatType.Yell => InputChannel.Yell,
ChatType.Shout => InputChannel.Shout,
ChatType.FreeCompany => InputChannel.FreeCompany,
ChatType.PvpTeam => InputChannel.PvpTeam,
ChatType.NoviceNetwork => InputChannel.NoviceNetwork,
ChatType.CrossLinkshell1 => InputChannel.CrossLinkshell1,
ChatType.CrossLinkshell2 => InputChannel.CrossLinkshell2,
ChatType.CrossLinkshell3 => InputChannel.CrossLinkshell3,
ChatType.CrossLinkshell4 => InputChannel.CrossLinkshell4,
ChatType.CrossLinkshell5 => InputChannel.CrossLinkshell5,
ChatType.CrossLinkshell6 => InputChannel.CrossLinkshell6,
ChatType.CrossLinkshell7 => InputChannel.CrossLinkshell7,
ChatType.CrossLinkshell8 => InputChannel.CrossLinkshell8,
ChatType.Linkshell1 => InputChannel.Linkshell1,
ChatType.Linkshell2 => InputChannel.Linkshell2,
ChatType.Linkshell3 => InputChannel.Linkshell3,
ChatType.Linkshell4 => InputChannel.Linkshell4,
ChatType.Linkshell5 => InputChannel.Linkshell5,
ChatType.Linkshell6 => InputChannel.Linkshell6,
ChatType.Linkshell7 => InputChannel.Linkshell7,
ChatType.Linkshell8 => InputChannel.Linkshell8,
_ => null,
};
internal static bool IsGm(this ChatType type) => type switch
{
ChatType.GmTell => true,
ChatType.GmSay => true,
ChatType.GmShout => true,
ChatType.GmYell => true,
ChatType.GmParty => true,
ChatType.GmFreeCompany => true,
ChatType.GmLinkshell1 => true,
ChatType.GmLinkshell2 => true,
ChatType.GmLinkshell3 => true,
ChatType.GmLinkshell4 => true,
ChatType.GmLinkshell5 => true,
ChatType.GmLinkshell6 => true,
ChatType.GmLinkshell7 => true,
ChatType.GmLinkshell8 => true,
ChatType.GmNoviceNetwork => true,
_ => false,
};
internal static bool IsGm(this ChatType type) =>
type switch
{
ChatType.GmTell => true,
ChatType.GmSay => true,
ChatType.GmShout => true,
ChatType.GmYell => true,
ChatType.GmParty => true,
ChatType.GmFreeCompany => true,
ChatType.GmLinkshell1 => true,
ChatType.GmLinkshell2 => true,
ChatType.GmLinkshell3 => true,
ChatType.GmLinkshell4 => true,
ChatType.GmLinkshell5 => true,
ChatType.GmLinkshell6 => true,
ChatType.GmLinkshell7 => true,
ChatType.GmLinkshell8 => true,
ChatType.GmNoviceNetwork => true,
_ => false,
};
internal static bool IsExtraChatLinkshell(this ChatType type) => type switch
{
ChatType.ExtraChatLinkshell1 => true,
ChatType.ExtraChatLinkshell2 => true,
ChatType.ExtraChatLinkshell3 => true,
ChatType.ExtraChatLinkshell4 => true,
ChatType.ExtraChatLinkshell5 => true,
ChatType.ExtraChatLinkshell6 => true,
ChatType.ExtraChatLinkshell7 => true,
ChatType.ExtraChatLinkshell8 => true,
_ => false,
};
internal static bool IsExtraChatLinkshell(this ChatType type) =>
type switch
{
ChatType.ExtraChatLinkshell1 => true,
ChatType.ExtraChatLinkshell2 => true,
ChatType.ExtraChatLinkshell3 => true,
ChatType.ExtraChatLinkshell4 => true,
ChatType.ExtraChatLinkshell5 => true,
ChatType.ExtraChatLinkshell6 => true,
ChatType.ExtraChatLinkshell7 => true,
ChatType.ExtraChatLinkshell8 => true,
_ => false,
};
public static UiConfigOption ToConfigEntry(this ChatType type) => type switch
{
ChatType.Say => UiConfigOption.ColorSay,
ChatType.Shout => UiConfigOption.ColorShout,
ChatType.TellOutgoing => UiConfigOption.ColorTell,
ChatType.Party => UiConfigOption.ColorParty,
ChatType.Linkshell1 => UiConfigOption.ColorLS1,
ChatType.Linkshell2 => UiConfigOption.ColorLS2,
ChatType.Linkshell3 => UiConfigOption.ColorLS3,
ChatType.Linkshell4 => UiConfigOption.ColorLS4,
ChatType.Linkshell5 => UiConfigOption.ColorLS5,
ChatType.Linkshell6 => UiConfigOption.ColorLS6,
ChatType.Linkshell7 => UiConfigOption.ColorLS7,
ChatType.Linkshell8 => UiConfigOption.ColorLS8,
ChatType.FreeCompany => UiConfigOption.ColorFCompany,
ChatType.NoviceNetwork => UiConfigOption.ColorBeginner,
ChatType.CustomEmote => UiConfigOption.ColorEmoteUser,
ChatType.StandardEmote => UiConfigOption.ColorEmote,
ChatType.Yell => UiConfigOption.ColorYell,
ChatType.GainBuff => UiConfigOption.ColorBuffGive,
ChatType.GainDebuff => UiConfigOption.ColorDebuffGive,
ChatType.System => UiConfigOption.ColorSysMsg,
ChatType.NpcDialogue => UiConfigOption.ColorNpcSay,
ChatType.LootRoll => UiConfigOption.ColorLoot,
ChatType.FreeCompanyAnnouncement => UiConfigOption.ColorFCAnnounce,
ChatType.PvpTeamAnnouncement => UiConfigOption.ColorPvPGroupAnnounce,
_ => UiConfigOption.ColorSay,
};
public static UiConfigOption ToConfigEntry(this ChatType type) =>
type switch
{
ChatType.Say => UiConfigOption.ColorSay,
ChatType.Shout => UiConfigOption.ColorShout,
ChatType.TellOutgoing => UiConfigOption.ColorTell,
ChatType.Party => UiConfigOption.ColorParty,
ChatType.Linkshell1 => UiConfigOption.ColorLS1,
ChatType.Linkshell2 => UiConfigOption.ColorLS2,
ChatType.Linkshell3 => UiConfigOption.ColorLS3,
ChatType.Linkshell4 => UiConfigOption.ColorLS4,
ChatType.Linkshell5 => UiConfigOption.ColorLS5,
ChatType.Linkshell6 => UiConfigOption.ColorLS6,
ChatType.Linkshell7 => UiConfigOption.ColorLS7,
ChatType.Linkshell8 => UiConfigOption.ColorLS8,
ChatType.FreeCompany => UiConfigOption.ColorFCompany,
ChatType.NoviceNetwork => UiConfigOption.ColorBeginner,
ChatType.CustomEmote => UiConfigOption.ColorEmoteUser,
ChatType.StandardEmote => UiConfigOption.ColorEmote,
ChatType.Yell => UiConfigOption.ColorYell,
ChatType.GainBuff => UiConfigOption.ColorBuffGive,
ChatType.GainDebuff => UiConfigOption.ColorDebuffGive,
ChatType.System => UiConfigOption.ColorSysMsg,
ChatType.NpcDialogue => UiConfigOption.ColorNpcSay,
ChatType.LootRoll => UiConfigOption.ColorLoot,
ChatType.FreeCompanyAnnouncement => UiConfigOption.ColorFCAnnounce,
ChatType.PvpTeamAnnouncement => UiConfigOption.ColorPvPGroupAnnounce,
_ => UiConfigOption.ColorSay,
};
internal static bool HasSource(this ChatType type) => type switch
{
// Battle
ChatType.Damage => true,
ChatType.Miss => true,
ChatType.Action => true,
ChatType.Item => true,
ChatType.Healing => true,
ChatType.GainBuff => true,
ChatType.LoseBuff => true,
ChatType.GainDebuff => true,
ChatType.LoseDebuff => true,
internal static bool HasSource(this ChatType type) =>
type switch
{
// Battle
ChatType.Damage => true,
ChatType.Miss => true,
ChatType.Action => true,
ChatType.Item => true,
ChatType.Healing => true,
ChatType.GainBuff => true,
ChatType.LoseBuff => true,
ChatType.GainDebuff => true,
ChatType.LoseDebuff => true,
// Announcements
ChatType.System => true,
ChatType.BattleSystem => true,
ChatType.Error => true,
ChatType.LootNotice => true,
ChatType.Progress => true,
ChatType.LootRoll => true,
ChatType.Crafting => true,
ChatType.Gathering => true,
ChatType.FreeCompanyLoginLogout => true,
ChatType.PvpTeamLoginLogout => true,
_ => false,
};
// Announcements
ChatType.System => true,
ChatType.BattleSystem => true,
ChatType.Error => true,
ChatType.LootNotice => true,
ChatType.Progress => true,
ChatType.LootRoll => true,
ChatType.Crafting => true,
ChatType.Gathering => true,
ChatType.FreeCompanyLoginLogout => true,
ChatType.PvpTeamLoginLogout => true,
_ => false,
};
internal static ChatType Parent(this ChatType type) => type switch
{
ChatType.Say => ChatType.Say,
ChatType.GmSay => ChatType.Say,
ChatType.Shout => ChatType.Shout,
ChatType.GmShout => ChatType.Shout,
ChatType.TellOutgoing => ChatType.TellOutgoing,
ChatType.TellIncoming => ChatType.TellOutgoing,
ChatType.GmTell => ChatType.TellOutgoing,
ChatType.Party => ChatType.Party,
ChatType.CrossParty => ChatType.Party,
ChatType.GmParty => ChatType.Party,
ChatType.Linkshell1 => ChatType.Linkshell1,
ChatType.GmLinkshell1 => ChatType.Linkshell1,
ChatType.Linkshell2 => ChatType.Linkshell2,
ChatType.GmLinkshell2 => ChatType.Linkshell2,
ChatType.Linkshell3 => ChatType.Linkshell3,
ChatType.GmLinkshell3 => ChatType.Linkshell3,
ChatType.Linkshell4 => ChatType.Linkshell4,
ChatType.GmLinkshell4 => ChatType.Linkshell4,
ChatType.Linkshell5 => ChatType.Linkshell5,
ChatType.GmLinkshell5 => ChatType.Linkshell5,
ChatType.Linkshell6 => ChatType.Linkshell6,
ChatType.GmLinkshell6 => ChatType.Linkshell6,
ChatType.Linkshell7 => ChatType.Linkshell7,
ChatType.GmLinkshell7 => ChatType.Linkshell7,
ChatType.Linkshell8 => ChatType.Linkshell8,
ChatType.GmLinkshell8 => ChatType.Linkshell8,
ChatType.FreeCompany => ChatType.FreeCompany,
ChatType.GmFreeCompany => ChatType.FreeCompany,
ChatType.NoviceNetwork => ChatType.NoviceNetwork,
ChatType.GmNoviceNetwork => ChatType.NoviceNetwork,
ChatType.CustomEmote => ChatType.CustomEmote,
ChatType.StandardEmote => ChatType.StandardEmote,
ChatType.Yell => ChatType.Yell,
ChatType.GmYell => ChatType.Yell,
ChatType.GainBuff => ChatType.GainBuff,
ChatType.LoseBuff => ChatType.GainBuff,
ChatType.GainDebuff => ChatType.GainDebuff,
ChatType.LoseDebuff => ChatType.GainDebuff,
ChatType.System => ChatType.System,
ChatType.Alarm => ChatType.System,
ChatType.GlamourNotifications => ChatType.System,
ChatType.RetainerSale => ChatType.System,
ChatType.PeriodicRecruitmentNotification => ChatType.System,
ChatType.Sign => ChatType.System,
ChatType.Orchestrion => ChatType.System,
ChatType.MessageBook => ChatType.System,
ChatType.NpcDialogue => ChatType.NpcDialogue,
ChatType.NpcAnnouncement => ChatType.NpcDialogue,
ChatType.LootRoll => ChatType.LootRoll,
ChatType.RandomNumber => ChatType.LootRoll,
ChatType.FreeCompanyAnnouncement => ChatType.FreeCompanyAnnouncement,
ChatType.FreeCompanyLoginLogout => ChatType.FreeCompanyAnnouncement,
ChatType.PvpTeamAnnouncement => ChatType.PvpTeamAnnouncement,
ChatType.PvpTeamLoginLogout => ChatType.PvpTeamAnnouncement,
_ => type,
};
internal static ChatType Parent(this ChatType type) =>
type switch
{
ChatType.Say => ChatType.Say,
ChatType.GmSay => ChatType.Say,
ChatType.Shout => ChatType.Shout,
ChatType.GmShout => ChatType.Shout,
ChatType.TellOutgoing => ChatType.TellOutgoing,
ChatType.TellIncoming => ChatType.TellOutgoing,
ChatType.GmTell => ChatType.TellOutgoing,
ChatType.Party => ChatType.Party,
ChatType.CrossParty => ChatType.Party,
ChatType.GmParty => ChatType.Party,
ChatType.Linkshell1 => ChatType.Linkshell1,
ChatType.GmLinkshell1 => ChatType.Linkshell1,
ChatType.Linkshell2 => ChatType.Linkshell2,
ChatType.GmLinkshell2 => ChatType.Linkshell2,
ChatType.Linkshell3 => ChatType.Linkshell3,
ChatType.GmLinkshell3 => ChatType.Linkshell3,
ChatType.Linkshell4 => ChatType.Linkshell4,
ChatType.GmLinkshell4 => ChatType.Linkshell4,
ChatType.Linkshell5 => ChatType.Linkshell5,
ChatType.GmLinkshell5 => ChatType.Linkshell5,
ChatType.Linkshell6 => ChatType.Linkshell6,
ChatType.GmLinkshell6 => ChatType.Linkshell6,
ChatType.Linkshell7 => ChatType.Linkshell7,
ChatType.GmLinkshell7 => ChatType.Linkshell7,
ChatType.Linkshell8 => ChatType.Linkshell8,
ChatType.GmLinkshell8 => ChatType.Linkshell8,
ChatType.FreeCompany => ChatType.FreeCompany,
ChatType.GmFreeCompany => ChatType.FreeCompany,
ChatType.NoviceNetwork => ChatType.NoviceNetwork,
ChatType.GmNoviceNetwork => ChatType.NoviceNetwork,
ChatType.CustomEmote => ChatType.CustomEmote,
ChatType.StandardEmote => ChatType.StandardEmote,
ChatType.Yell => ChatType.Yell,
ChatType.GmYell => ChatType.Yell,
ChatType.GainBuff => ChatType.GainBuff,
ChatType.LoseBuff => ChatType.GainBuff,
ChatType.GainDebuff => ChatType.GainDebuff,
ChatType.LoseDebuff => ChatType.GainDebuff,
ChatType.System => ChatType.System,
ChatType.Alarm => ChatType.System,
ChatType.GlamourNotifications => ChatType.System,
ChatType.RetainerSale => ChatType.System,
ChatType.PeriodicRecruitmentNotification => ChatType.System,
ChatType.Sign => ChatType.System,
ChatType.Orchestrion => ChatType.System,
ChatType.MessageBook => ChatType.System,
ChatType.NpcDialogue => ChatType.NpcDialogue,
ChatType.NpcAnnouncement => ChatType.NpcDialogue,
ChatType.LootRoll => ChatType.LootRoll,
ChatType.RandomNumber => ChatType.LootRoll,
ChatType.FreeCompanyAnnouncement => ChatType.FreeCompanyAnnouncement,
ChatType.FreeCompanyLoginLogout => ChatType.FreeCompanyAnnouncement,
ChatType.PvpTeamAnnouncement => ChatType.PvpTeamAnnouncement,
ChatType.PvpTeamLoginLogout => ChatType.PvpTeamAnnouncement,
_ => type,
};
}
+153 -145
View File
@@ -4,111 +4,114 @@ namespace HellionChat.Code;
internal static class InputChannelExt
{
internal static ChatType ToChatType(this InputChannel input) => input switch
{
InputChannel.Tell => ChatType.TellOutgoing,
InputChannel.Say => ChatType.Say,
InputChannel.Party => ChatType.Party,
InputChannel.Alliance => ChatType.Alliance,
InputChannel.Yell => ChatType.Yell,
InputChannel.Shout => ChatType.Shout,
InputChannel.FreeCompany => ChatType.FreeCompany,
InputChannel.PvpTeam => ChatType.PvpTeam,
InputChannel.NoviceNetwork => ChatType.NoviceNetwork,
InputChannel.CrossLinkshell1 => ChatType.CrossLinkshell1,
InputChannel.CrossLinkshell2 => ChatType.CrossLinkshell2,
InputChannel.CrossLinkshell3 => ChatType.CrossLinkshell3,
InputChannel.CrossLinkshell4 => ChatType.CrossLinkshell4,
InputChannel.CrossLinkshell5 => ChatType.CrossLinkshell5,
InputChannel.CrossLinkshell6 => ChatType.CrossLinkshell6,
InputChannel.CrossLinkshell7 => ChatType.CrossLinkshell7,
InputChannel.CrossLinkshell8 => ChatType.CrossLinkshell8,
InputChannel.Linkshell1 => ChatType.Linkshell1,
InputChannel.Linkshell2 => ChatType.Linkshell2,
InputChannel.Linkshell3 => ChatType.Linkshell3,
InputChannel.Linkshell4 => ChatType.Linkshell4,
InputChannel.Linkshell5 => ChatType.Linkshell5,
InputChannel.Linkshell6 => ChatType.Linkshell6,
InputChannel.Linkshell7 => ChatType.Linkshell7,
InputChannel.Linkshell8 => ChatType.Linkshell8,
InputChannel.ExtraChatLinkshell1 => ChatType.ExtraChatLinkshell1,
InputChannel.ExtraChatLinkshell2 => ChatType.ExtraChatLinkshell2,
InputChannel.ExtraChatLinkshell3 => ChatType.ExtraChatLinkshell3,
InputChannel.ExtraChatLinkshell4 => ChatType.ExtraChatLinkshell4,
InputChannel.ExtraChatLinkshell5 => ChatType.ExtraChatLinkshell5,
InputChannel.ExtraChatLinkshell6 => ChatType.ExtraChatLinkshell6,
InputChannel.ExtraChatLinkshell7 => ChatType.ExtraChatLinkshell7,
InputChannel.ExtraChatLinkshell8 => ChatType.ExtraChatLinkshell8,
InputChannel.Invalid => ChatType.Echo,
_ => throw new ArgumentOutOfRangeException(nameof(input), input, null),
};
internal static ChatType ToChatType(this InputChannel input) =>
input switch
{
InputChannel.Tell => ChatType.TellOutgoing,
InputChannel.Say => ChatType.Say,
InputChannel.Party => ChatType.Party,
InputChannel.Alliance => ChatType.Alliance,
InputChannel.Yell => ChatType.Yell,
InputChannel.Shout => ChatType.Shout,
InputChannel.FreeCompany => ChatType.FreeCompany,
InputChannel.PvpTeam => ChatType.PvpTeam,
InputChannel.NoviceNetwork => ChatType.NoviceNetwork,
InputChannel.CrossLinkshell1 => ChatType.CrossLinkshell1,
InputChannel.CrossLinkshell2 => ChatType.CrossLinkshell2,
InputChannel.CrossLinkshell3 => ChatType.CrossLinkshell3,
InputChannel.CrossLinkshell4 => ChatType.CrossLinkshell4,
InputChannel.CrossLinkshell5 => ChatType.CrossLinkshell5,
InputChannel.CrossLinkshell6 => ChatType.CrossLinkshell6,
InputChannel.CrossLinkshell7 => ChatType.CrossLinkshell7,
InputChannel.CrossLinkshell8 => ChatType.CrossLinkshell8,
InputChannel.Linkshell1 => ChatType.Linkshell1,
InputChannel.Linkshell2 => ChatType.Linkshell2,
InputChannel.Linkshell3 => ChatType.Linkshell3,
InputChannel.Linkshell4 => ChatType.Linkshell4,
InputChannel.Linkshell5 => ChatType.Linkshell5,
InputChannel.Linkshell6 => ChatType.Linkshell6,
InputChannel.Linkshell7 => ChatType.Linkshell7,
InputChannel.Linkshell8 => ChatType.Linkshell8,
InputChannel.ExtraChatLinkshell1 => ChatType.ExtraChatLinkshell1,
InputChannel.ExtraChatLinkshell2 => ChatType.ExtraChatLinkshell2,
InputChannel.ExtraChatLinkshell3 => ChatType.ExtraChatLinkshell3,
InputChannel.ExtraChatLinkshell4 => ChatType.ExtraChatLinkshell4,
InputChannel.ExtraChatLinkshell5 => ChatType.ExtraChatLinkshell5,
InputChannel.ExtraChatLinkshell6 => ChatType.ExtraChatLinkshell6,
InputChannel.ExtraChatLinkshell7 => ChatType.ExtraChatLinkshell7,
InputChannel.ExtraChatLinkshell8 => ChatType.ExtraChatLinkshell8,
InputChannel.Invalid => ChatType.Echo,
_ => throw new ArgumentOutOfRangeException(nameof(input), input, null),
};
public static uint LinkshellIndex(this InputChannel channel) => channel switch
{
InputChannel.Linkshell1 => 0,
InputChannel.Linkshell2 => 1,
InputChannel.Linkshell3 => 2,
InputChannel.Linkshell4 => 3,
InputChannel.Linkshell5 => 4,
InputChannel.Linkshell6 => 5,
InputChannel.Linkshell7 => 6,
InputChannel.Linkshell8 => 7,
InputChannel.CrossLinkshell1 => 0,
InputChannel.CrossLinkshell2 => 1,
InputChannel.CrossLinkshell3 => 2,
InputChannel.CrossLinkshell4 => 3,
InputChannel.CrossLinkshell5 => 4,
InputChannel.CrossLinkshell6 => 5,
InputChannel.CrossLinkshell7 => 6,
InputChannel.CrossLinkshell8 => 7,
InputChannel.ExtraChatLinkshell1 => 0,
InputChannel.ExtraChatLinkshell2 => 1,
InputChannel.ExtraChatLinkshell3 => 2,
InputChannel.ExtraChatLinkshell4 => 3,
InputChannel.ExtraChatLinkshell5 => 4,
InputChannel.ExtraChatLinkshell6 => 5,
InputChannel.ExtraChatLinkshell7 => 6,
InputChannel.ExtraChatLinkshell8 => 7,
_ => uint.MaxValue,
};
public static uint LinkshellIndex(this InputChannel channel) =>
channel switch
{
InputChannel.Linkshell1 => 0,
InputChannel.Linkshell2 => 1,
InputChannel.Linkshell3 => 2,
InputChannel.Linkshell4 => 3,
InputChannel.Linkshell5 => 4,
InputChannel.Linkshell6 => 5,
InputChannel.Linkshell7 => 6,
InputChannel.Linkshell8 => 7,
InputChannel.CrossLinkshell1 => 0,
InputChannel.CrossLinkshell2 => 1,
InputChannel.CrossLinkshell3 => 2,
InputChannel.CrossLinkshell4 => 3,
InputChannel.CrossLinkshell5 => 4,
InputChannel.CrossLinkshell6 => 5,
InputChannel.CrossLinkshell7 => 6,
InputChannel.CrossLinkshell8 => 7,
InputChannel.ExtraChatLinkshell1 => 0,
InputChannel.ExtraChatLinkshell2 => 1,
InputChannel.ExtraChatLinkshell3 => 2,
InputChannel.ExtraChatLinkshell4 => 3,
InputChannel.ExtraChatLinkshell5 => 4,
InputChannel.ExtraChatLinkshell6 => 5,
InputChannel.ExtraChatLinkshell7 => 6,
InputChannel.ExtraChatLinkshell8 => 7,
_ => uint.MaxValue,
};
public static string Prefix(this InputChannel channel) => channel switch
{
InputChannel.Tell => "/t",
InputChannel.Say => "/s",
InputChannel.Party => "/p",
InputChannel.Alliance => "/a",
InputChannel.Yell => "/y",
InputChannel.Shout => "/sh",
InputChannel.FreeCompany => "/fc",
InputChannel.PvpTeam => "/pt",
InputChannel.NoviceNetwork => "/b",
InputChannel.CrossLinkshell1 => "/cwl1",
InputChannel.CrossLinkshell2 => "/cwl2",
InputChannel.CrossLinkshell3 => "/cwl3",
InputChannel.CrossLinkshell4 => "/cwl4",
InputChannel.CrossLinkshell5 => "/cwl5",
InputChannel.CrossLinkshell6 => "/cwl6",
InputChannel.CrossLinkshell7 => "/cwl7",
InputChannel.CrossLinkshell8 => "/cwl8",
InputChannel.Linkshell1 => "/l1",
InputChannel.Linkshell2 => "/l2",
InputChannel.Linkshell3 => "/l3",
InputChannel.Linkshell4 => "/l4",
InputChannel.Linkshell5 => "/l5",
InputChannel.Linkshell6 => "/l6",
InputChannel.Linkshell7 => "/l7",
InputChannel.Linkshell8 => "/l8",
InputChannel.ExtraChatLinkshell1 => "/ecl1",
InputChannel.ExtraChatLinkshell2 => "/ecl2",
InputChannel.ExtraChatLinkshell3 => "/ecl3",
InputChannel.ExtraChatLinkshell4 => "/ecl4",
InputChannel.ExtraChatLinkshell5 => "/ecl5",
InputChannel.ExtraChatLinkshell6 => "/ecl6",
InputChannel.ExtraChatLinkshell7 => "/ecl7",
InputChannel.ExtraChatLinkshell8 => "/ecl8",
_ => "/e",
};
public static string Prefix(this InputChannel channel) =>
channel switch
{
InputChannel.Tell => "/t",
InputChannel.Say => "/s",
InputChannel.Party => "/p",
InputChannel.Alliance => "/a",
InputChannel.Yell => "/y",
InputChannel.Shout => "/sh",
InputChannel.FreeCompany => "/fc",
InputChannel.PvpTeam => "/pt",
InputChannel.NoviceNetwork => "/b",
InputChannel.CrossLinkshell1 => "/cwl1",
InputChannel.CrossLinkshell2 => "/cwl2",
InputChannel.CrossLinkshell3 => "/cwl3",
InputChannel.CrossLinkshell4 => "/cwl4",
InputChannel.CrossLinkshell5 => "/cwl5",
InputChannel.CrossLinkshell6 => "/cwl6",
InputChannel.CrossLinkshell7 => "/cwl7",
InputChannel.CrossLinkshell8 => "/cwl8",
InputChannel.Linkshell1 => "/l1",
InputChannel.Linkshell2 => "/l2",
InputChannel.Linkshell3 => "/l3",
InputChannel.Linkshell4 => "/l4",
InputChannel.Linkshell5 => "/l5",
InputChannel.Linkshell6 => "/l6",
InputChannel.Linkshell7 => "/l7",
InputChannel.Linkshell8 => "/l8",
InputChannel.ExtraChatLinkshell1 => "/ecl1",
InputChannel.ExtraChatLinkshell2 => "/ecl2",
InputChannel.ExtraChatLinkshell3 => "/ecl3",
InputChannel.ExtraChatLinkshell4 => "/ecl4",
InputChannel.ExtraChatLinkshell5 => "/ecl5",
InputChannel.ExtraChatLinkshell6 => "/ecl6",
InputChannel.ExtraChatLinkshell7 => "/ecl7",
InputChannel.ExtraChatLinkshell8 => "/ecl8",
_ => "/e",
};
public static IEnumerable<TextCommand>? TextCommands(this InputChannel channel)
{
@@ -145,51 +148,56 @@ internal static class InputChannelExt
if (ids.Length == 0)
return null;
return ids.Where(id => Sheets.TextCommandSheet.HasRow(id)).Select(id => Sheets.TextCommandSheet.GetRow(id));
return ids.Where(id => Sheets.TextCommandSheet.HasRow(id))
.Select(id => Sheets.TextCommandSheet.GetRow(id));
}
internal static bool IsLinkshell(this InputChannel channel) => channel switch
{
InputChannel.Linkshell1 => true,
InputChannel.Linkshell2 => true,
InputChannel.Linkshell3 => true,
InputChannel.Linkshell4 => true,
InputChannel.Linkshell5 => true,
InputChannel.Linkshell6 => true,
InputChannel.Linkshell7 => true,
InputChannel.Linkshell8 => true,
_ => false,
};
internal static bool IsLinkshell(this InputChannel channel) =>
channel switch
{
InputChannel.Linkshell1 => true,
InputChannel.Linkshell2 => true,
InputChannel.Linkshell3 => true,
InputChannel.Linkshell4 => true,
InputChannel.Linkshell5 => true,
InputChannel.Linkshell6 => true,
InputChannel.Linkshell7 => true,
InputChannel.Linkshell8 => true,
_ => false,
};
internal static bool IsCrossLinkshell(this InputChannel channel) => channel switch
{
InputChannel.CrossLinkshell1 => true,
InputChannel.CrossLinkshell2 => true,
InputChannel.CrossLinkshell3 => true,
InputChannel.CrossLinkshell4 => true,
InputChannel.CrossLinkshell5 => true,
InputChannel.CrossLinkshell6 => true,
InputChannel.CrossLinkshell7 => true,
InputChannel.CrossLinkshell8 => true,
_ => false,
};
internal static bool IsCrossLinkshell(this InputChannel channel) =>
channel switch
{
InputChannel.CrossLinkshell1 => true,
InputChannel.CrossLinkshell2 => true,
InputChannel.CrossLinkshell3 => true,
InputChannel.CrossLinkshell4 => true,
InputChannel.CrossLinkshell5 => true,
InputChannel.CrossLinkshell6 => true,
InputChannel.CrossLinkshell7 => true,
InputChannel.CrossLinkshell8 => true,
_ => false,
};
internal static bool IsExtraChatLinkshell(this InputChannel channel) => channel switch
{
InputChannel.ExtraChatLinkshell1 => true,
InputChannel.ExtraChatLinkshell2 => true,
InputChannel.ExtraChatLinkshell3 => true,
InputChannel.ExtraChatLinkshell4 => true,
InputChannel.ExtraChatLinkshell5 => true,
InputChannel.ExtraChatLinkshell6 => true,
InputChannel.ExtraChatLinkshell7 => true,
InputChannel.ExtraChatLinkshell8 => true,
_ => false,
};
internal static bool IsExtraChatLinkshell(this InputChannel channel) =>
channel switch
{
InputChannel.ExtraChatLinkshell1 => true,
InputChannel.ExtraChatLinkshell2 => true,
InputChannel.ExtraChatLinkshell3 => true,
InputChannel.ExtraChatLinkshell4 => true,
InputChannel.ExtraChatLinkshell5 => true,
InputChannel.ExtraChatLinkshell6 => true,
InputChannel.ExtraChatLinkshell7 => true,
InputChannel.ExtraChatLinkshell8 => true,
_ => false,
};
internal static bool IsValid(this InputChannel channel) => channel switch
{
InputChannel.Invalid => false,
_ => true,
};
internal static bool IsValid(this InputChannel channel) =>
channel switch
{
InputChannel.Invalid => false,
_ => true,
};
}
+22 -8
View File
@@ -1,10 +1,17 @@
using Dalamud.Game.Command;
using Microsoft.Extensions.Logging;
namespace HellionChat;
internal sealed class Commands : IDisposable
{
private readonly Dictionary<string, CommandWrapper> Registered = [];
private readonly ILogger<Commands> _logger;
public Commands(ILogger<Commands> logger)
{
_logger = logger;
}
public void Dispose()
{
@@ -16,15 +23,22 @@ internal sealed class Commands : IDisposable
{
foreach (var wrapper in Registered.Values)
{
Plugin.CommandManager.AddHandler(wrapper.Name, new CommandInfo(Invoke)
{
HelpMessage = wrapper.Description ?? string.Empty,
ShowInHelp = wrapper.ShowInHelp,
});
Plugin.CommandManager.AddHandler(
wrapper.Name,
new CommandInfo(Invoke)
{
HelpMessage = wrapper.Description ?? string.Empty,
ShowInHelp = wrapper.ShowInHelp,
}
);
}
}
internal CommandWrapper Register(string name, string? description = null, bool? showInHelp = null)
internal CommandWrapper Register(
string name,
string? description = null,
bool? showInHelp = null
)
{
if (Registered.TryGetValue(name, out var wrapper))
{
@@ -45,7 +59,7 @@ internal sealed class Commands : IDisposable
{
if (!Registered.TryGetValue(command, out var wrapper))
{
Plugin.Log.Warning($"Missing registration for command {command}");
_logger.LogWarning($"Missing registration for command {command}");
return;
}
@@ -55,7 +69,7 @@ internal sealed class Commands : IDisposable
}
catch (Exception ex)
{
Plugin.Log.Error(ex, $"Error while executing command {command}");
_logger.LogError(ex, $"Error while executing command {command}");
}
}
}
File diff suppressed because it is too large Load Diff
-324
View File
@@ -1,324 +0,0 @@
using System.Numerics;
using System.Text.Json;
using System.Text.Json.Serialization;
using Dalamud.Interface.Textures;
using Dalamud.Interface.Textures.TextureWraps;
using Dalamud.Utility;
using Dalamud.Bindings.ImGui;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
namespace HellionChat;
public static class EmoteCache
{
private static readonly string[] NotWorking =
[
":tf:", "(ditto)", "c!", "h!", "l!", "M&Mjc", "LUL3D", "p!",
"POLICE2", "r!", "Pussy", "s!", "v!", "w!", "x0r6ztGiggle",
"z!", "xar2EDM", "iron95Pls", "Clap2", "AlienPls3", "Life",
"peepoPogClimbingTreeHard4House", "monkaGIGAftRobertDowneyJr",
"DogLookingSussyAndCold", "DICKS"
];
private static readonly HttpClient Client = new();
private const string BetterTTV = "https://api.betterttv.net/3";
private const string GlobalEmotes = $"{BetterTTV}/cached/emotes/global";
private const string Top100Emotes = "{0}/emotes/shared/top?before={1}&limit=100";
private const string EmotePath = "https://cdn.betterttv.net/emote/{0}/3x";
[Serializable]
private struct Top100()
{
[JsonPropertyName("emote")]
public Emote Emote { get; set; }
[JsonPropertyName("id")]
public required string Id { get; set; }
}
[Serializable]
public struct Emote()
{
[JsonPropertyName("id")]
public required string Id { get; set; }
[JsonPropertyName("code")]
public required string Code { get; set; }
[JsonPropertyName("imageType")]
public required string ImageType { get; set; }
}
public enum LoadingState
{
Unloaded,
Loading,
Done
}
// All of this data is uninitalized while State is not `LoadingState.Done`
public static LoadingState State = LoadingState.Unloaded;
private static readonly Dictionary<string, Emote> Cache = new();
private static readonly Dictionary<string, EmoteBase> EmoteImages = new();
public static string[] SortedCodeArray = [];
public static async Task LoadData()
{
if (State is not LoadingState.Unloaded)
return;
State = LoadingState.Loading;
try
{
var global = await Client.GetAsync(GlobalEmotes);
var globalList = await global.Content.ReadAsStringAsync();
foreach (var emote in JsonSerializer.Deserialize<Emote[]>(globalList)!)
if (!string.IsNullOrEmpty(emote.Code) && !NotWorking.Contains(emote.Code))
Cache.TryAdd(emote.Code, emote);
var lastId = string.Empty;
for (var i = 0; i < 15; i++)
{
var top = await Client.GetAsync(Top100Emotes.Format(BetterTTV, lastId));
var topList = await top.Content.ReadAsStringAsync();
var jsonList = JsonSerializer.Deserialize<List<Top100>>(topList)!;
// BetterTTV occasionally returns entries with a null Code; the
// upstream code passed those straight into Dictionary.TryAdd
// and tripped ArgumentNullException, killing the whole emote
// load. Skip them defensively so a single bad row no longer
// breaks the cache for everyone else.
foreach (var emote in jsonList)
if (!string.IsNullOrEmpty(emote.Emote.Code) && !NotWorking.Contains(emote.Emote.Code))
Cache.TryAdd(emote.Emote.Code, emote.Emote);
lastId = jsonList.Last().Id;
}
SortedCodeArray = Cache.Keys.Order().ToArray();
State = LoadingState.Done;
}
catch (Exception ex)
{
// Reset to Unloaded so a later trigger (e.g. the user reopening
// the Emotes tab after the network recovers) can retry. Without
// this the State stays on Loading and the early-out at the top
// of LoadData blocks every further attempt until plugin reload.
State = LoadingState.Unloaded;
Plugin.Log.Error(ex, "BetterTTV cache wasn't initialized");
}
}
public static void Dispose()
{
foreach (var emote in EmoteImages.Values)
emote.InnerDispose();
}
internal static bool Exists(string code)
{
return State is LoadingState.Done && SortedCodeArray.Contains(code);
}
internal static EmoteBase? GetEmote(string code)
{
if (State is not LoadingState.Done)
return null;
if (!Cache.TryGetValue(code, out var emoteDetail))
return null;
if (EmoteImages.TryGetValue(emoteDetail.Id, out var emote))
return emote;
try
{
if (emoteDetail.ImageType == "gif")
{
var animatedEmote = new ImGuiGif().Prepare(emoteDetail);
EmoteImages.Add(emoteDetail.Id, animatedEmote);
return animatedEmote;
}
var staticEmote = new ImGuiEmote().Prepare(emoteDetail);
EmoteImages.Add(emoteDetail.Id, staticEmote);
return staticEmote;
}
catch
{
Plugin.Log.Error("Failed to convert");
return null;
}
}
public abstract class EmoteBase
{
public bool Failed;
public bool IsLoaded;
public byte[] RawData = [];
protected IDalamudTextureWrap? Texture;
public virtual void Draw(Vector2 size)
{
ImGui.Image(Texture!.Handle, size);
}
internal async Task<byte[]> LoadAsync(Emote emote)
{
// BetterTTV-supplied Id and ImageType are interpolated straight
// into the filename. HTTPS protects the wire, but a compromised
// upstream could still hand us "../foo" and write into the
// pluginConfigs root (or worse). Resolve the candidate path and
// refuse anything that escapes the cache directory.
var dir = Path.GetFullPath(Path.Join(Plugin.Interface.ConfigDirectory.FullName, "EmoteCacheV1"));
Directory.CreateDirectory(dir);
var dirPrefix = dir.EndsWith(Path.DirectorySeparatorChar) ? dir : dir + Path.DirectorySeparatorChar;
var filePath = Path.GetFullPath(Path.Join(dir, $"{emote.Id}.{emote.ImageType}"));
if (!filePath.StartsWith(dirPrefix, StringComparison.Ordinal))
throw new InvalidOperationException($"Emote path escapes cache directory: id={emote.Id}, type={emote.ImageType}");
if (File.Exists(filePath))
{
RawData = await File.ReadAllBytesAsync(filePath);
}
else
{
var content = await Client.GetAsync(EmotePath.Format(emote.Id));
RawData = await content.Content.ReadAsByteArrayAsync();
await using var stream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.Read);
stream.Write(RawData, 0, RawData.Length);
}
return RawData;
}
public abstract void InnerDispose();
}
public sealed class ImGuiEmote : EmoteBase
{
public ImGuiEmote Prepare(Emote emote)
{
Task.Run(() => Load(emote));
return this;
}
private async void Load(Emote emote)
{
try
{
var image = await LoadAsync(emote);
if (image.Length <= 0)
return;
Texture = await Plugin.TextureProvider.CreateFromImageAsync(image);
IsLoaded = true;
}
catch (Exception ex)
{
Failed = true;
Plugin.Log.Error(ex, $"Unable to load {emote.Code} with id {emote.Id}");
}
}
public override void InnerDispose()
{
Texture?.Dispose();
}
}
public sealed class ImGuiGif : EmoteBase
{
private List<(IDalamudTextureWrap Texture, float Delay)> Frames = [];
private float FrameTimer;
private int CurrentFrame;
private ulong GlobalFrameCount;
public override void Draw(Vector2 size)
{
if (Frames.Count == 0)
return;
if (CurrentFrame >= Frames.Count)
{
CurrentFrame = 0;
FrameTimer = -1f;
}
var frame = Frames[CurrentFrame];
if (FrameTimer <= 0.0f)
FrameTimer = frame.Delay;
ImGui.Image(frame.Texture.Handle, size);
if (GlobalFrameCount == Plugin.Interface.UiBuilder.FrameCount)
return;
GlobalFrameCount = Plugin.Interface.UiBuilder.FrameCount;
FrameTimer -= ImGui.GetIO().DeltaTime;
if (FrameTimer <= 0f)
CurrentFrame++;
}
public override void InnerDispose()
{
Frames.ForEach(f => f.Texture.Dispose());
Frames.Clear();
}
public ImGuiGif Prepare(Emote emote)
{
Task.Run(() => Load(emote));
return this;
}
private async void Load(Emote emote)
{
try
{
var image = await LoadAsync(emote);
if (image.Length <= 0)
return;
using var ms = new MemoryStream(image);
using var img = Image.Load<Rgba32>(ms);
if (img.Frames.Count == 0)
return;
var frames = new List<(IDalamudTextureWrap Tex, float Delay)>();
foreach (var frame in img.Frames)
{
var delay = frame.Metadata.GetGifMetadata().FrameDelay / 100f;
// Follows the same pattern as browsers, anything under 0.02s delay will be rounded up to 0.1s
if (delay < 0.02f)
delay = 0.1f;
var buffer = new byte[4 * frame.Width * frame.Height];
frame.CopyPixelDataTo(buffer);
var tex = await Plugin.TextureProvider.CreateFromRawAsync(RawImageSpecification.Rgba32(frame.Width, frame.Height), buffer);
frames.Add((tex, delay));
}
Frames = frames;
IsLoaded = true;
}
catch (Exception ex)
{
Failed = true;
Plugin.Log.Error(ex, $"Unable to load {emote.Code} with id {emote.Id}");
}
}
}
}
+181 -55
View File
@@ -1,6 +1,7 @@
using System.Globalization;
using System.Text;
using HellionChat.Code;
using HellionChat.Util;
namespace HellionChat.Export;
@@ -13,61 +14,140 @@ internal enum ExportFormat
internal static class ExportFormatExt
{
internal static string Extension(this ExportFormat fmt) => fmt switch
{
ExportFormat.Markdown => "md",
ExportFormat.Json => "json",
ExportFormat.Csv => "csv",
_ => "txt",
};
internal static string Extension(this ExportFormat fmt) =>
fmt switch
{
ExportFormat.Markdown => "md",
ExportFormat.Json => "json",
ExportFormat.Csv => "csv",
_ => "txt",
};
internal static string Filter(this ExportFormat fmt) => fmt switch
{
ExportFormat.Markdown => ".md",
ExportFormat.Json => ".json",
ExportFormat.Csv => ".csv",
_ => ".txt",
};
internal static string Filter(this ExportFormat fmt) =>
fmt switch
{
ExportFormat.Markdown => ".md",
ExportFormat.Json => ".json",
ExportFormat.Csv => ".csv",
_ => ".txt",
};
}
/// <summary>
/// Serializes message snapshots into Markdown, JSON, or CSV. The caller is
/// expected to filter the input enumerable; this class only handles
/// formatting and writes to the supplied path. Sender substring filtering
/// happens here because it requires deserialized SeString.TextValue.
/// </summary>
// Serializes message snapshots to Markdown, JSON, or CSV.
//
// Text comes from the chunk lists, never from SenderSource/ContentSource. Those
// are raw SeStrings, and reading TextValue on one containing an auto-translate
// phrase reaches SeStringEvaluator, which asserts it is on the main thread and
// throws unconditionally when a macro resolves a global number. An export runs on
// a worker, so that would abort it partway and leave half a file behind.
//
// The chunks are already resolved: ChunkUtil turns auto-translate into text at
// ingest, and the full-text index reads them exactly this way. Same strings, no
// evaluator, no thread affinity.
//
// The caller pre-filters by channel and date via StreamForExport; only the sender
// substring is applied here.
internal static class MessageExporter
{
private static readonly UTF8Encoding Utf8NoBom = new(encoderShouldEmitUTF8Identifier: false);
internal record FilterDescription(
IReadOnlyCollection<int>? ChatTypes,
DateTimeOffset? From,
DateTimeOffset? To,
string? SenderSubstring);
string? SenderSubstring
);
internal static int ExportToFile(
string path,
ExportFormat format,
IEnumerable<Message> messages,
FilterDescription filter)
FilterDescription filter
)
{
// Rejected before the file is touched. The old order opened the stream
// first, so an unknown format left a zero-byte file where the user's
// previous export had been.
if (!Enum.IsDefined(format))
throw new ArgumentOutOfRangeException(nameof(format), format, null);
var matching = filter.SenderSubstring is { Length: > 0 } needle
? messages.Where(m => MatchesSender(m, needle))
: messages;
using var writer = new StreamWriter(path, append: false, encoding: Encoding.UTF8);
return format switch
// Written beside the target and moved into place at the end. A crash or
// an unplugged drive halfway through would otherwise leave a file that
// opens fine and is quietly incomplete -- and this is the path a GDPR
// access request goes out on, where "looks complete" is the dangerous
// failure.
var temp = path + ".part";
int written;
try
{
ExportFormat.Markdown => WriteMarkdown(writer, matching, filter),
ExportFormat.Json => WriteJson(writer, matching, filter),
ExportFormat.Csv => WriteCsv(writer, matching, filter),
_ => throw new ArgumentOutOfRangeException(nameof(format), format, null),
};
// Encoding.UTF8 writes a byte order mark, and that is not a
// cosmetic detail here: a leading U+FEFF makes the JSON invalid for
// every strict parser, Python's json.load included. CSV is the one
// format that wants it -- without a BOM Excel guesses the codepage
// and mangles every non-ASCII name in the file.
var encoding = format == ExportFormat.Csv ? Encoding.UTF8 : Utf8NoBom;
using (var writer = new StreamWriter(temp, append: false, encoding))
{
written = format switch
{
ExportFormat.Markdown => WriteMarkdown(writer, matching, filter),
ExportFormat.Json => WriteJson(writer, matching, filter),
_ => WriteCsv(writer, matching, filter),
};
}
// An export that matched nothing does not replace anything. The
// file still has a header and a footer, so moving it would put a
// near-empty file where the user's previous export was -- and then
// report "no message matched the filter", which reads as "nothing
// happened". Dalamud's save dialog has no overwrite confirmation to
// fall back on.
if (written == 0)
{
TryDeleteTemp(temp);
return 0;
}
File.Move(temp, path, overwrite: true);
return written;
}
catch
{
TryDeleteTemp(temp);
throw;
}
}
private static bool MatchesSender(Message m, string needle)
=> m.SenderSource.TextValue.Contains(needle, StringComparison.OrdinalIgnoreCase);
// Best effort: the export already failed, and a leftover .part file is a
// smaller problem than masking the original exception with an IO one.
private static void TryDeleteTemp(string temp)
{
try
{
if (File.Exists(temp))
File.Delete(temp);
}
catch (IOException) { }
catch (UnauthorizedAccessException) { }
}
private static int WriteMarkdown(StreamWriter w, IEnumerable<Message> messages, FilterDescription filter)
private static bool MatchesSender(Message m, string needle) =>
SenderText(m).Contains(needle, StringComparison.OrdinalIgnoreCase);
private static string SenderText(Message m) => ChunkUtil.ToRawString(m.Sender);
private static string ContentText(Message m) => ChunkUtil.ToRawString(m.Content);
private static int WriteMarkdown(
StreamWriter w,
IEnumerable<Message> messages,
FilterDescription filter
)
{
w.WriteLine("# Hellion Chat Export");
w.WriteLine();
@@ -90,8 +170,9 @@ internal static class MessageExporter
}
var chatType = (ChatType)(ushort)m.Code.Type;
var sender = m.SenderSource.TextValue.Trim().Trim('<', '>', '[', ']', ':').Trim();
var content = m.ContentSource.TextValue;
var sender = SenderText(m).Trim().Trim('<', '>', '[', ']', ':').Trim();
var content = ContentText(m);
if (string.IsNullOrEmpty(sender))
w.WriteLine($"**[{localDate:HH:mm}] {chatType}:** {content}");
else
@@ -107,7 +188,9 @@ internal static class MessageExporter
private static void WriteFilterSummaryMarkdown(StreamWriter w, FilterDescription filter)
{
if (filter.ChatTypes is { Count: > 0 })
w.WriteLine($"ChatTypes: {string.Join(", ", filter.ChatTypes.Select(t => $"{(ChatType)(ushort)t}({t})"))}");
w.WriteLine(
$"ChatTypes: {string.Join(", ", filter.ChatTypes.Select(t => $"{(ChatType)(ushort)t}({t})"))}"
);
if (filter.From is not null)
w.WriteLine($"From: {filter.From.Value.ToLocalTime():yyyy-MM-dd HH:mm}");
if (filter.To is not null)
@@ -116,10 +199,13 @@ internal static class MessageExporter
w.WriteLine($"Sender contains: \"{filter.SenderSubstring}\"");
}
private static int WriteJson(StreamWriter w, IEnumerable<Message> messages, FilterDescription filter)
private static int WriteJson(
StreamWriter w,
IEnumerable<Message> messages,
FilterDescription filter
)
{
// Manual JSON to avoid pulling in System.Text.Json policy choices.
// Output is a single object with metadata and an array of messages.
// Manual JSON to avoid System.Text.Json policy coupling.
w.Write("{\n \"exported_at\": \"");
w.Write(DateTimeOffset.UtcNow.ToString("O", CultureInfo.InvariantCulture));
w.Write("\",\n \"plugin\": \"Hellion Chat\",\n");
@@ -130,9 +216,17 @@ internal static class MessageExporter
else
w.Write("null");
w.Write(",\n \"from\": ");
w.Write(filter.From is null ? "null" : "\"" + filter.From.Value.ToString("O", CultureInfo.InvariantCulture) + "\"");
w.Write(
filter.From is null
? "null"
: "\"" + filter.From.Value.ToString("O", CultureInfo.InvariantCulture) + "\""
);
w.Write(",\n \"to\": ");
w.Write(filter.To is null ? "null" : "\"" + filter.To.Value.ToString("O", CultureInfo.InvariantCulture) + "\"");
w.Write(
filter.To is null
? "null"
: "\"" + filter.To.Value.ToString("O", CultureInfo.InvariantCulture) + "\""
);
w.Write(",\n \"sender_substring\": ");
w.Write(filter.SenderSubstring is null ? "null" : JsonString(filter.SenderSubstring));
w.Write("\n },\n \"messages\": [\n");
@@ -152,12 +246,17 @@ internal static class MessageExporter
w.Write($",\"date\":\"{m.Date.ToString("O", CultureInfo.InvariantCulture)}\"");
w.Write($",\"chat_type\":{(int)m.Code.Type}");
w.Write($",\"chat_type_name\":\"{chatType}\"");
w.Write($",\"source_kind\":{m.Code.Source}");
w.Write($",\"target_kind\":{m.Code.Target}");
// Cast, not interpolate. These are XivChatRelationKind, and string
// interpolation of an enum writes the member name -- so every
// message with a recognised relation produced
// "source_kind":LocalPlayer, which no parser accepts. This is the
// file an access request goes out on.
w.Write($",\"source_kind\":{(int)m.Code.Source}");
w.Write($",\"target_kind\":{(int)m.Code.Target}");
w.Write($",\"receiver\":{m.Receiver}");
w.Write($",\"content_id\":{m.ContentId}");
w.Write($",\"sender\":{JsonString(m.SenderSource.TextValue)}");
w.Write($",\"content\":{JsonString(m.ContentSource.TextValue)}");
w.Write($",\"sender\":{JsonString(SenderText(m))}");
w.Write($",\"content\":{JsonString(ContentText(m))}");
w.Write("}");
}
@@ -166,9 +265,13 @@ internal static class MessageExporter
return count;
}
private static int WriteCsv(StreamWriter w, IEnumerable<Message> messages, FilterDescription filter)
private static int WriteCsv(
StreamWriter w,
IEnumerable<Message> messages,
FilterDescription filter
)
{
// Header line always written so empty exports are still importable.
// Header always written so empty exports remain importable.
w.WriteLine("Date,ChatType,ChatTypeName,Sender,Content,Receiver,ContentId");
var count = 0;
foreach (var m in messages)
@@ -181,9 +284,9 @@ internal static class MessageExporter
w.Write(',');
w.Write(CsvString(chatType.ToString()));
w.Write(',');
w.Write(CsvString(m.SenderSource.TextValue));
w.Write(CsvString(SenderText(m)));
w.Write(',');
w.Write(CsvString(m.ContentSource.TextValue));
w.Write(CsvString(ContentText(m)));
w.Write(',');
w.Write(m.Receiver);
w.Write(',');
@@ -201,13 +304,27 @@ internal static class MessageExporter
{
switch (c)
{
case '"': sb.Append("\\\""); break;
case '\\': sb.Append("\\\\"); break;
case '\b': sb.Append("\\b"); break;
case '\f': sb.Append("\\f"); break;
case '\n': sb.Append("\\n"); break;
case '\r': sb.Append("\\r"); break;
case '\t': sb.Append("\\t"); break;
case '"':
sb.Append("\\\"");
break;
case '\\':
sb.Append("\\\\");
break;
case '\b':
sb.Append("\\b");
break;
case '\f':
sb.Append("\\f");
break;
case '\n':
sb.Append("\\n");
break;
case '\r':
sb.Append("\\r");
break;
case '\t':
sb.Append("\\t");
break;
default:
if (c < 0x20)
sb.Append($"\\u{(int)c:x4}");
@@ -222,8 +339,17 @@ internal static class MessageExporter
private static string CsvString(string s)
{
// Leading =, +, - and @ make a spreadsheet treat the cell as a formula.
// Every value here is text somebody else typed into a chat channel, and
// this file exists to be opened in Excel, so a prefixed apostrophe goes
// in front. It is the standard defence and it costs one character that
// spreadsheets hide.
if (s.Length > 0 && s[0] is '=' or '+' or '-' or '@' or '\t' or '\r')
s = "'" + s;
if (s.IndexOfAny(['"', ',', '\n', '\r']) < 0)
return s;
return "\"" + s.Replace("\"", "\"\"") + "\"";
}
}
+478 -146
View File
@@ -1,92 +1,418 @@
using Dalamud;
using Dalamud;
using Dalamud.Bindings.ImGui;
using Dalamud.Interface;
using Dalamud.Interface.FontIdentifier;
using Dalamud.Interface.GameFonts;
using Dalamud.Interface.ManagedFontAtlas;
using Dalamud.Interface.Utility;
using Dalamud.Bindings.ImGui;
using Dalamud.Plugin;
using HellionChat.Themes;
using HellionChat.Ui.StyleEngine;
namespace HellionChat;
public class FontManager
// Two LogProxy sites live in static methods (TryGetBundledFontBytes,
// AddFontWithFallback); a ctor-injected ILogger would not be reachable
// from those scopes, so the class stays on Plugin.LogProxy.
//
// Hybrid handle model: Axis and AxisItalic mirror the game's current
// font state and are init-only. FontAwesome reuses Dalamud's UiBuilder
// fixed-width icon handle and is likewise init-only. RegularFont and
// ItalicFont depend on user-toggleable settings and get replaced live
// via RebuildDelegateFonts when those settings change; they stay as
// mutable nullable fields.
//
// The four atlas-owned handles register inside a single
// SuppressAutoRebuild block so the font atlas only rebuilds once for the
// whole plugin start instead of once per handle. FontAwesome lives
// outside that accounting because the UiBuilder already owns it.
public sealed class FontManager : IDisposable
{
internal IFontHandle Axis = null!;
internal IFontHandle AxisItalic = null!;
private readonly IDalamudPluginInterface _pluginInterface;
internal IFontHandle RegularFont = null!;
internal IFontHandle Axis { get; init; }
internal IFontHandle AxisItalic { get; init; }
internal IFontHandle FontAwesome { get; init; }
// Mutable because the live font settings replace these via
// RebuildDelegateFonts. Reference replacement is atomic for reference
// types, so push sites that read the field once per frame see at most
// one stale handle.
internal IFontHandle? RegularFont;
internal IFontHandle? ItalicFont;
internal IFontHandle FontAwesome = null!;
// v1.13.0: one handle per type role that needs a face of its own. Sender
// carries extra weight, Meta a smaller size on a tiny glyph range.
internal IFontHandle? SenderFont;
internal IFontHandle? MetaFont;
internal readonly byte[] GameSymFont;
// The mockup asks for weight 600 on the sender. There is no bold face in the
// plugin and none in the bundled file, so the weight comes from a denser
// rasterisation of the same outline. 1.0 is the SafeFontConfig default;
// below ~1.2 the difference is not visible, above ~1.4 the glyphs smear.
//
// Note on cost: all three delegate handles now carry the full glyph range.
// The meta face started with an ASCII-sized one, on the assumption it would
// only ever draw clocks and world names -- then the channel header wanted
// to use it, and tab names are free user input. An umlaut would have been
// enough to break it.
//
// Not const: the smoke test compares three values side by side, and the
// widget gallery exposes it.
internal static float SenderWeight = 1.3f;
// Wired post-build; a Func keeps FontManager off the theme layer.
private Func<ThemeTypography?>? _typographySource;
// Lets RebuildDelegateFontsIfChanged skip rebuilds when the size is unchanged.
private (
float Global,
float Symbols,
float Sender,
float Meta,
float Italic
) _lastBuiltFingerprint;
// True once every required atlas-owned handle reports Available. Components
// gate their first-frame draw on this — without it the layout math would
// run against placeholder font metrics and snap when the real atlas
// finishes building. ItalicFont being null means italics are disabled in
// config, which is a ready state, not a pending one.
public bool FontsReady =>
Axis.Available
&& AxisItalic.Available
&& FontAwesome.Available
&& RegularFont is { Available: true }
&& (ItalicFont is null || ItalicFont.Available)
// Unconditional, unlike ItalicFont: these two are always built. A handle
// that is not ready yet makes SimplePushedFont push nothing at all --
// silently -- so the first frame after a rebuild would measure the wrong
// face and write those heights into the row cache.
&& SenderFont is { Available: true }
&& MetaFont is { Available: true };
private ushort[] Ranges = [];
private ushort[] JpRange = [];
// Trimmed remainder the NotoSansCjk fallback is the sole source for
// (Hangul + full Han); excludes the Default/Latin block already merged
// by the global font, so the fallback no longer re-merges the full Ranges array.
private ushort[] CjkFallbackGlyphRange = [];
// Report accessor for the ctor self-test: built glyph-range array lengths so
// the step can show the dedup effect (a small trimmed fallback vs the large
// primary range) in its on-disk report instead of a bare Pass.
internal (int Ranges, int JpRange, int CjkFallback) GlyphRangeLengths =>
(Ranges.Length, JpRange.Length, CjkFallbackGlyphRange.Length);
public static readonly HashSet<float> AxisFontSizeList =
[
9.6f, 10f, 12f, 14f, 16f,
18f, 18.4f, 20f, 23f, 34f,
36f, 40f, 45f, 46f, 68f, 90f,
9.6f,
10f,
12f,
14f,
16f,
18f,
18.4f,
20f,
23f,
34f,
36f,
40f,
45f,
46f,
68f,
90f,
];
public FontManager()
{
var filePath = Path.Combine(Plugin.Interface.ConfigDirectory.FullName, "FFXIV_Lodestone_SSF.ttf");
if (File.Exists(filePath))
{
GameSymFont = File.ReadAllBytes(filePath);
}
else
{
// Dispose HttpClient and HttpResponseMessage to avoid socket
// exhaustion on repeated cold-start downloads. GetAwaiter().GetResult()
// unwraps AggregateException so failures surface cleanly. A full
// async refactor of the constructor would be cleaner but is out of
// scope for v1.0.0 — tracked in the backlog.
using var client = new HttpClient();
using var response = client
.GetAsync("https://img.finalfantasyxiv.com/lds/pc/global/fonts/FFXIV_Lodestone_SSF.ttf")
.GetAwaiter()
.GetResult();
response.EnsureSuccessStatusCode();
GameSymFont = response.Content.ReadAsByteArrayAsync().GetAwaiter().GetResult();
// Bundled UI font bytes (Inter Light, OFL-1.1); lazily loaded from manifest resources
private static byte[]? BundledFontBytes;
Dalamud.Utility.FilesystemUtil.WriteAllBytesSafe(filePath, GameSymFont);
public FontManager(IDalamudPluginInterface pluginInterface)
{
_pluginInterface = pluginInterface;
SetUpRanges();
var atlas = _pluginInterface.UiBuilder.FontAtlas;
using (atlas.SuppressAutoRebuild())
{
Axis = atlas.NewGameFontHandle(
new GameFontStyle(GameFontFamily.Axis, SizeInPx(Plugin.Config.FontSizeV2))
);
AxisItalic = atlas.NewGameFontHandle(
new GameFontStyle(GameFontFamily.Axis, SizeInPx(Plugin.Config.FontSizeV2))
{
SkewStrength = SizeInPx(Plugin.Config.FontSizeV2) / 6,
}
);
FontAwesome = _pluginInterface.UiBuilder.IconFontFixedWidthHandle;
RegularFont = BuildRegularFontHandle(atlas);
if (Plugin.Config.ItalicEnabled)
ItalicFont = BuildItalicFontHandle(atlas);
SenderFont = BuildSenderFontHandle(atlas);
MetaFont = BuildMetaFontHandle(atlas);
}
// Source is still null here, so this is the config-only baseline.
_lastBuiltFingerprint = EffectiveFontFingerprint();
}
// Called from the settings save path when one of the font-related
// settings changed. Game fonts and FontAwesome stay untouched because
// none of those settings affect them.
//
// Thread model: the settings save path runs on the ImGui draw thread,
// same as every push site. The rebuild finishes synchronously before
// the next push reads the field in the same frame, so there is no
// cross-thread race on the handle reference.
public void RebuildDelegateFonts()
{
SetUpRanges();
var atlas = _pluginInterface.UiBuilder.FontAtlas;
// Without the suppression each handle triggers its own atlas rebuild.
// With two handles that was tolerable; with four it is four rebuilds for
// one size change.
using (atlas.SuppressAutoRebuild())
{
RegularFont?.Dispose();
RegularFont = BuildRegularFontHandle(atlas);
ItalicFont?.Dispose();
ItalicFont = Plugin.Config.ItalicEnabled ? BuildItalicFontHandle(atlas) : null;
SenderFont?.Dispose();
SenderFont = BuildSenderFontHandle(atlas);
MetaFont?.Dispose();
MetaFont = BuildMetaFontHandle(atlas);
}
_lastBuiltFingerprint = EffectiveFontFingerprint();
}
public void SetTypographySource(Func<ThemeTypography?> source) => _typographySource = source;
internal float ResolveGlobalFontPt() =>
FontSizeResolver.ResolveGlobalPt(
_typographySource?.Invoke(),
Plugin.Config.UseHellionFont,
Plugin.Config.FontSizeV2,
Plugin.Config.GlobalFontV2.SizePt
);
internal float ResolveSymbolsFontPt() =>
FontSizeResolver.ResolveSymbolsPt(
_typographySource?.Invoke(),
Plugin.Config.SymbolsFontSizeV2
);
// Every size that can land in one message row. Roles follow the base size
// arithmetically, but the resolved value is what the height cache has to key
// on -- a theme override moves the base without moving any factor.
internal (
float Global,
float Symbols,
float Sender,
float Meta,
float Italic
) EffectiveFontFingerprint()
{
var basePt = ResolveGlobalFontPt();
return (
basePt,
ResolveSymbolsFontPt(),
TypeScale.SizePtOf(TypeRole.Sender, basePt),
TypeScale.SizePtOf(TypeRole.Meta, basePt),
Plugin.Config.ItalicFontV2.SizePt
);
}
// Rebuilds only when the effective size changed (live fingerprint, TOCTOU-free).
// The atlas rebuild must run on the framework/draw thread — callers ensure that.
internal void RebuildDelegateFontsIfChanged()
{
if (EffectiveFontFingerprint() != _lastBuiltFingerprint)
{
RebuildDelegateFonts();
}
}
/// <summary>
/// Backing bytes for the bundled Hellion font (Exo 2, OFL-1.1). Lazily
/// extracted from the assembly's manifest resources on first use; the
/// load happens inside the font atlas build callback so we keep the
/// allocation off the plugin constructor's hot path.
/// </summary>
private static byte[]? HellionFontBytes;
private static byte[] GetHellionFontBytes()
// Instance method so Ranges / JpRange are reachable without parameter
// plumbing; PascalCase field names follow the existing class style.
// Shared CJK + symbols tail for both the regular and italic delegate
// fonts. Earlier-merged fonts win for shared codepoints (imgui MergeMode),
// so this runs AFTER the primary font is set as config.MergeFont. The CJK
// fallback is the sole Hangul/Simplified-Han source when UseHellionFont=true
// (global=Inter-Light), so it stays in the chain — only its glyph range is
// trimmed (CjkFallbackGlyphRange) to drop the Default-block/endonym overlap.
// The Japanese merge keeps its own configured size and the full JpRange (which
// owns Traditional Han such as 體 U+9AD4), so japanese↔fallback no longer overlap.
private void AddCjkAndSymbols(
IFontAtlasBuildToolkitPreBuild tk,
SafeFontConfig config,
float basePt
)
{
if (HellionFontBytes is not null)
return HellionFontBytes;
config.SizePt = Plugin.Config.JapaneseFontV2.SizePt;
config.GlyphRanges = JpRange;
AddFontWithFallback(tk, Plugin.Config.JapaneseFontV2.FontId, config, "japanese");
// NotoSansCjk fallback, trimmed to CjkFallbackGlyphRange. Merged last so earlier fonts win.
config.SizePt = basePt;
config.GlyphRanges = CjkFallbackGlyphRange;
AddFontWithFallback(
tk,
new DalamudAssetFontAndFamilyId(DalamudAsset.NotoSansCjkRegular),
config,
"noto-cjk-fallback"
);
config.SizePt = ResolveSymbolsFontPt();
tk.AddGameSymbol(config);
}
private IFontHandle BuildRegularFontHandle(IFontAtlas atlas) =>
atlas.NewDelegateFontHandle(e =>
e.OnPreBuild(tk =>
{
var basePt = ResolveGlobalFontPt();
var config = new SafeFontConfig { SizePt = basePt, GlyphRanges = Ranges };
// Missing embedded resource falls back to the configured
// system font instead of taking the whole UiBuilder down.
var bundledBytes = Plugin.Config.UseHellionFont ? TryGetBundledFontBytes() : null;
config.MergeFont = bundledBytes is not null
? tk.AddFontFromMemory(bundledBytes, config, "Inter-Light")
: AddFontWithFallback(tk, Plugin.Config.GlobalFontV2.FontId, config, "global");
AddCjkAndSymbols(tk, config, basePt);
tk.Font = config.MergeFont;
})
);
// Same outline as the body face, rasterised denser. Only works on the
// delegate path: with FontsEnabled and UseHellionFont both off the game's own
// Axis handle draws, and a game font handle has no such knob. The sender then
// leans on channel colour alone, which is a deliberate limitation.
private IFontHandle BuildSenderFontHandle(IFontAtlas atlas) =>
atlas.NewDelegateFontHandle(e =>
e.OnPreBuild(tk =>
{
var basePt = TypeScale.SizePtOf(TypeRole.Sender, ResolveGlobalFontPt());
var config = new SafeFontConfig
{
SizePt = basePt,
GlyphRanges = Ranges,
RasterizerMultiply = SenderWeight,
};
var bundledBytes = Plugin.Config.UseHellionFont ? TryGetBundledFontBytes() : null;
config.MergeFont = bundledBytes is not null
? tk.AddFontFromMemory(bundledBytes, config, "Inter-Light-Sender")
: AddFontWithFallback(tk, Plugin.Config.GlobalFontV2.FontId, config, "sender");
AddCjkAndSymbols(tk, config, basePt);
tk.Font = config.MergeFont;
})
);
private IFontHandle BuildMetaFontHandle(IFontAtlas atlas) =>
atlas.NewDelegateFontHandle(e =>
e.OnPreBuild(tk =>
{
var basePt = TypeScale.SizePtOf(TypeRole.Meta, ResolveGlobalFontPt());
var config = new SafeFontConfig { SizePt = basePt, GlyphRanges = Ranges };
var bundledBytes = Plugin.Config.UseHellionFont ? TryGetBundledFontBytes() : null;
config.MergeFont = bundledBytes is not null
? tk.AddFontFromMemory(bundledBytes, config, "Inter-Light-Meta")
: AddFontWithFallback(tk, Plugin.Config.GlobalFontV2.FontId, config, "meta");
AddCjkAndSymbols(tk, config, basePt);
tk.Font = config.MergeFont;
})
);
private IFontHandle BuildItalicFontHandle(IFontAtlas atlas) =>
atlas.NewDelegateFontHandle(e =>
e.OnPreBuild(tk =>
{
var config = new SafeFontConfig
{
SizePt = Plugin.Config.ItalicFontV2.SizePt,
GlyphRanges = Ranges,
};
config.MergeFont = AddFontWithFallback(
tk,
Plugin.Config.ItalicFontV2.FontId,
config,
"italic"
);
AddCjkAndSymbols(tk, config, Plugin.Config.ItalicFontV2.SizePt);
tk.Font = config.MergeFont;
})
);
public void Dispose()
{
Axis.Dispose();
AxisItalic.Dispose();
// FontAwesome is shared with the UiBuilder; the host owns its
// lifetime, so the plugin must not dispose it.
RegularFont?.Dispose();
ItalicFont?.Dispose();
SenderFont?.Dispose();
MetaFont?.Dispose();
}
// Returns null when the embedded font resource is missing. Should not
// happen on a signed release build, but a broken csproj or hand-rolled
// dev build can land here. Caller falls back to the system font path
// so the plugin still loads instead of crashing the whole UiBuilder.
private static byte[]? TryGetBundledFontBytes()
{
if (BundledFontBytes is not null)
return BundledFontBytes;
using var stream = typeof(FontManager).Assembly.GetManifestResourceStream(
"Inter-Light.ttf"
);
if (stream is null)
{
Plugin.LogProxy.Warning(
"Bundled Inter Light font resource missing, falling back to system default font."
);
return null;
}
using var stream = typeof(FontManager).Assembly.GetManifestResourceStream("HellionFont.ttf")
?? throw new FileNotFoundException("Hellion font resource not embedded in the assembly");
using var ms = new MemoryStream();
stream.CopyTo(ms);
HellionFontBytes = ms.ToArray();
return HellionFontBytes;
BundledFontBytes = ms.ToArray();
return BundledFontBytes;
}
private unsafe void SetUpRanges()
{
ushort[] BuildRange(IReadOnlyList<ushort>? chars, params nint[] ranges)
ushort[] BuildRange(
IReadOnlyList<ushort>? chars,
bool includeCommonExtras,
params nint[] ranges
)
{
var builder = new ImFontGlyphRangesBuilderPtr(ImGuiNative.ImFontGlyphRangesBuilder());
// text
foreach (var range in ranges)
builder.AddRanges((ushort*)range);
// chars
if (chars != null)
{
for (var i = 0; i < chars.Count; i += 2)
@@ -94,124 +420,130 @@ public class FontManager
if (chars[i] == 0)
break;
for (var j = (uint) chars[i]; j <= chars[i + 1]; j++)
builder.AddChar((ushort) j);
for (var j = (uint)chars[i]; j <= chars[i + 1]; j++)
builder.AddChar((ushort)j);
}
}
// Ingame supported ranges
var reader = new FdtReader(Plugin.DataManager.GetFile("common/font/axis_12.fdt")!.Data);
foreach (var c in reader.Glyphs)
builder.AddChar(c.Char);
// Common extras (Axis ingame glyphs, endonyms, enclosed alphanumerics)
// belong to the primary/Japanese ranges only. The trimmed CJK fallback
// skips them so it stays a pure Hangul/Simplified-Han remainder and
// does not re-merge the Default-block work the global font already did.
if (includeCommonExtras)
{
// Ingame supported ranges
var reader = new FdtReader(
Plugin.DataManager.GetFile("common/font/axis_12.fdt")!.Data
);
foreach (var c in reader.Glyphs)
builder.AddChar(c.Char);
// various symbols
// French
// Romanian
// builder.AddText("←→↑↓《》■※☀★★☆♥♡ヅツッシ☀☁☂℃℉°♀♂♠♣♦♣♧®©™€$£♯♭♪✓√◎◆◇♦■□〇●△▽▼▲‹›≤≥<«“”─\~");
builder.AddText("Œœ");
builder.AddText("ĂăÂâÎîȘșȚț");
// French
// Romanian
builder.AddText("Œœ");
builder.AddText("ĂăÂâÎîȘșȚț");
// "Enclosed Alphanumerics" (partial) https://www.compart.com/en/unicode/block/U+2460
for (var i = 0x2460; i <= 0x24B5; i++)
builder.AddChar((char) i);
// v1.5.3: language-dropdown endonyms. The dropdown renders
// with the currently active font range; without these glyphs
// a user on an English UI cannot read non-Latin language names
// before switching. Auto-activation in Settings.Apply then
// pulls in the full ExtraGlyphRange for the chosen locale.
builder.AddText(
"Català Čeština Dansk Deutsch Ελληνικά English Español Suomi"
+ " Français Magyar Italiano 日本語 한국어 Norsk bokmål Nederlands"
+ " Polski Português Brasil (Portugal) Română Русский Svenska"
+ " Türkçe Українська 简体中文 繁體中文"
);
// "Enclosed Alphanumerics" (partial) https://www.compart.com/en/unicode/block/U+2460
for (var i = 0x2460; i <= 0x24B5; i++)
builder.AddChar((char)i);
builder.AddChar('⓪');
}
builder.AddChar('⓪');
return builder.BuildRangesToArray();
}
var ranges = new List<nint> { (nint)ImGui.GetIO().Fonts.GetGlyphRangesDefault() };
var customChars = new List<ushort>();
foreach (var extraRange in Enum.GetValues<ExtraGlyphRanges>())
if (Plugin.Config.ExtraGlyphRanges.HasFlag(extraRange))
ranges.Add(extraRange.Range());
{
if (!Plugin.Config.ExtraGlyphRanges.HasFlag(extraRange))
continue;
Ranges = BuildRange(null, ranges.ToArray());
JpRange = BuildRange(GlyphRangesJapanese.GlyphRanges);
// LatinExtended and Greek use AddChar pairs because they have no
// built-in ImGui range helper; everything else points to a native
// ImGui glyph-range table.
switch (extraRange)
{
case ExtraGlyphRanges.LatinExtended:
customChars.AddRange(ExtraGlyphRangesExt.LatinExtendedPairs);
break;
case ExtraGlyphRanges.Greek:
customChars.AddRange(ExtraGlyphRangesExt.GreekPairs);
break;
default:
var ptr = extraRange.Range();
if (ptr != 0)
ranges.Add(ptr);
break;
}
}
Ranges = BuildRange(
customChars.Count > 0 ? customChars : null,
includeCommonExtras: true,
ranges.ToArray()
);
JpRange = BuildRange(GlyphRangesJapanese.GlyphRanges, includeCommonExtras: true);
// The fallback gets only the trimmed Hangul/Simplified-Han remainder.
// No Default block, no endonyms — those are already merged by the global and
// Japanese fonts, so re-merging them on the fallback was wasted atlas work.
CjkFallbackGlyphRange = BuildRange(CjkFallbackRange.Pairs, includeCommonExtras: false);
}
public void BuildFonts()
{
SetUpRanges();
Axis = Plugin.Interface.UiBuilder.FontAtlas.NewGameFontHandle(new GameFontStyle(GameFontFamily.Axis, SizeInPx(Plugin.Config.FontSizeV2)));
AxisItalic = Plugin.Interface.UiBuilder.FontAtlas.NewGameFontHandle(new GameFontStyle(GameFontFamily.Axis, SizeInPx(Plugin.Config.FontSizeV2))
{
SkewStrength = SizeInPx(Plugin.Config.FontSizeV2) / 6
});
FontAwesome = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(e =>
{
e.OnPreBuild(tk => tk.AddFontAwesomeIconFont(new SafeFontConfig { SizePx = GetFontSize() }));
e.OnPostBuild(tk => tk.FitRatio(tk.Font));
});
RegularFont = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(
e => e.OnPreBuild(
tk =>
{
var config = new SafeFontConfig {SizePt = Plugin.Config.GlobalFontV2.SizePt, GlyphRanges = Ranges};
config.MergeFont = Plugin.Config.UseHellionFont
? tk.AddFontFromMemory(GetHellionFontBytes(), config, "Hellion-Exo2")
: AddFontWithFallback(tk, Plugin.Config.GlobalFontV2.FontId, config, "global");
config.SizePt = Plugin.Config.JapaneseFontV2.SizePt;
config.GlyphRanges = JpRange;
AddFontWithFallback(tk, Plugin.Config.JapaneseFontV2.FontId, config, "japanese");
config.SizePt = Plugin.Config.SymbolsFontSizeV2;
tk.AddGameSymbol(config);
tk.Font = config.MergeFont;
}
));
if (Plugin.Config.ItalicEnabled)
{
ItalicFont = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(
e => e.OnPreBuild(
tk =>
{
var config = new SafeFontConfig {SizePt = Plugin.Config.ItalicFontV2.SizePt, GlyphRanges = Ranges};
config.MergeFont = AddFontWithFallback(tk, Plugin.Config.ItalicFontV2.FontId, config, "italic");
config.SizePt = Plugin.Config.JapaneseFontV2.SizePt;
config.GlyphRanges = JpRange;
AddFontWithFallback(tk, Plugin.Config.JapaneseFontV2.FontId, config, "japanese");
config.SizePt = Plugin.Config.SymbolsFontSizeV2;
tk.AddGameSymbol(config);
tk.Font = config.MergeFont;
}
));
}
else
{
ItalicFont = null;
}
}
/// <summary>
/// Try to add a user-configured font to the build toolkit, falling back to
/// the bundled NotoSansCjkRegular asset if the configured font isn't
/// available on the system. Without this guard a stale SystemFontId
/// pointing at a font the user uninstalled or that never existed on
/// Linux (e.g. "Crimson Text") tears down the entire font atlas build.
/// </summary>
private static ImFontPtr AddFontWithFallback(IFontAtlasBuildToolkitPreBuild tk, IFontId fontId, SafeFontConfig config, string slot)
// Add font with fallback to NotoSansCjkRegular if unavailable
private static ImFontPtr AddFontWithFallback(
IFontAtlasBuildToolkitPreBuild tk,
IFontId fontId,
SafeFontConfig config,
string slot
)
{
try
{
return fontId.AddToBuildToolkit(tk, config);
}
catch (Exception e) when (e is FileNotFoundException or DirectoryNotFoundException or IOException)
catch (Exception e)
when (e
is FileNotFoundException
or DirectoryNotFoundException
or IOException
or InvalidOperationException
or ArgumentException
)
{
Plugin.Log.Warning(e, $"Configured {slot} font unavailable, falling back to NotoSansCjkRegular");
// Atlas-toolkit throws span IO and validation failures; routing
// the wider set through the fallback keeps a corrupt font config
// from taking down the whole atlas build.
Plugin.LogProxy.Warning(
e,
$"Configured {slot} font failed to load ({e.GetType().Name}), "
+ "falling back to NotoSansCjkRegular"
);
var fallback = new DalamudAssetFontAndFamilyId(DalamudAsset.NotoSansCjkRegular);
return fallback.AddToBuildToolkit(tk, config);
}
}
public static float SizeInPt(float px) => (float) (px * 3.0 / 4.0);
public static float SizeInPx(float pt) => (float) (pt * 4.0 / 3.0);
public static float GetFontSize() => Plugin.Config.FontsEnabled ? Plugin.Config.GlobalFontV2.SizePx : SizeInPx(Plugin.Config.FontSizeV2);
public static float SizeInPt(float px) => (float)(px * 3.0 / 4.0);
public static float SizeInPx(float pt) => (float)(pt * 4.0 / 3.0);
public static float GetFontSize() =>
Plugin.Config.FontsEnabled
? Plugin.Config.GlobalFontV2.SizePx
: SizeInPx(Plugin.Config.FontSizeV2);
}
+18
View File
@@ -0,0 +1,18 @@
using HellionChat.Themes;
namespace HellionChat;
// Pure size resolution, split out of FontManager so it is unit-testable without
// building the font atlas. A typography override wins; null falls back to config.
internal static class FontSizeResolver
{
internal static float ResolveGlobalPt(
ThemeTypography? typography,
bool useHellionFont,
float fontSizeV2,
float globalSizePt
) => typography?.OverrideGlobalFontSizePt ?? (useHellionFont ? fontSizeV2 : globalSizePt);
internal static float ResolveSymbolsPt(ThemeTypography? typography, float symbolsSizePt) =>
typography?.OverrideSymbolsFontSizePt ?? symbolsSizePt;
}
+312 -143
View File
@@ -1,8 +1,4 @@
using System.Text;
using HellionChat.Code;
using HellionChat.GameFunctions.Types;
using HellionChat.Resources;
using HellionChat.Util;
using Dalamud.Game.Config;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Hooking;
@@ -17,9 +13,13 @@ using FFXIVClientStructs.FFXIV.Client.UI.Info;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using FFXIVClientStructs.FFXIV.Client.UI.Shell;
using FFXIVClientStructs.FFXIV.Component.GUI;
using HellionChat.Code;
using HellionChat.GameFunctions.Types;
using HellionChat.Resources;
using HellionChat.Util;
using InteropGenerator.Runtime;
using Lumina.Text.ReadOnly;
using Microsoft.Extensions.Logging;
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.AtkValueType;
namespace HellionChat.GameFunctions;
@@ -28,20 +28,55 @@ internal sealed unsafe class Chat : IDisposable
{
// Functions
[Signature("48 89 5C 24 ?? 48 89 74 24 ?? 57 48 83 EC ?? 48 8D B9 ?? ?? ?? ?? 33 C0")]
private readonly delegate* unmanaged<RaptureLogModule*, ushort, Utf8String*, Utf8String*, ulong, ulong, ushort, byte, int, byte, void> PrintTellNative = null!;
private readonly delegate* unmanaged<
RaptureLogModule*,
ushort,
Utf8String*,
Utf8String*,
ulong,
ulong,
ushort,
byte,
int,
byte,
void> PrintTellNative = null!;
[Signature("E8 ?? ?? ?? ?? 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8D 8C 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? B0 ?? 48 8B 8C 24")]
private readonly delegate* unmanaged<NetworkModule*, ulong, ushort, Utf8String*, Utf8String*, ushort, ushort, byte> SendTellNative = null!;
[Signature(
"E8 ?? ?? ?? ?? 48 8D 4C 24 ?? E8 ?? ?? ?? ?? 48 8D 8C 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? B0 ?? 48 8B 8C 24"
)]
private readonly delegate* unmanaged<
NetworkModule*,
ulong,
ushort,
Utf8String*,
Utf8String*,
ushort,
ushort,
byte> SendTellNative = null!;
// Client::UI::AddonChatLog.OnRefresh
[Signature("40 53 57 41 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 4D 8B F8", DetourName = nameof(ChatLogRefreshDetour))]
[Signature(
"40 53 57 41 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 4D 8B F8",
DetourName = nameof(ChatLogRefreshDetour)
)]
private Hook<ChatLogRefreshDelegate>? ChatLogRefreshHook = null!;
private delegate byte ChatLogRefreshDelegate(nint log, ushort eventId, AtkValue* value);
// Replace with CS version later
[Signature("48 89 5C 24 ?? 55 56 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 83 B9", DetourName = nameof(ContextMenuTellInForayDetour))]
[Signature(
"48 89 5C 24 ?? 55 56 57 48 81 EC ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 ?? ?? ?? ?? 83 B9",
DetourName = nameof(ContextMenuTellInForayDetour)
)]
private Hook<ContextMenuTellInForayDelegate>? ContextMenuTellInForayHook = null!;
private delegate void ContextMenuTellInForayDelegate(RaptureShellModule* module, Utf8String* playerName, Utf8String* worldName, ushort worldId, ulong accountId, ulong contentId, ushort reason);
private delegate void ContextMenuTellInForayDelegate(
RaptureShellModule* module,
Utf8String* playerName,
Utf8String* worldName,
ushort worldId,
ulong accountId,
ulong contentId,
ushort reason
);
private readonly Hook<AgentChatLog.Delegates.ChangeChannelName>? ChangeChannelNameHook;
private readonly Hook<RaptureShellModule.Delegates.ReplyInSelectedChatMode>? ReplyInSelectedChatModeHook;
@@ -58,27 +93,42 @@ internal sealed unsafe class Chat : IDisposable
FullName = 0,
SurnameAbbreviated = 1,
ForenameAbbreviated = 2,
Initials = 3
Initials = 3,
}
private long LastPlayerNameDisplayTypeRefresh;
private PlayerNameDisplayType CurrentPlayerNameDisplayType = PlayerNameDisplayType.FullName;
public Chat(Plugin plugin)
private readonly ILogger<Chat> _logger;
public Chat(Plugin plugin, ILogger<Chat> logger)
{
Plugin = plugin;
_logger = logger;
Plugin.GameInteropProvider.InitializeFromAttributes(this);
ChatLogRefreshHook?.Enable();
ContextMenuTellInForayHook?.Enable();
ChangeChannelNameHook = Plugin.GameInteropProvider.HookFromAddress<AgentChatLog.Delegates.ChangeChannelName>(AgentChatLog.MemberFunctionPointers.ChangeChannelName, ChangeChannelNameDetour);
ChangeChannelNameHook =
Plugin.GameInteropProvider.HookFromAddress<AgentChatLog.Delegates.ChangeChannelName>(
AgentChatLog.MemberFunctionPointers.ChangeChannelName,
ChangeChannelNameDetour
);
ChangeChannelNameHook.Enable();
ReplyInSelectedChatModeHook = Plugin.GameInteropProvider.HookFromAddress<RaptureShellModule.Delegates.ReplyInSelectedChatMode>(RaptureShellModule.MemberFunctionPointers.ReplyInSelectedChatMode, ReplyInSelectedChatModeDetour);
ReplyInSelectedChatModeHook =
Plugin.GameInteropProvider.HookFromAddress<RaptureShellModule.Delegates.ReplyInSelectedChatMode>(
RaptureShellModule.MemberFunctionPointers.ReplyInSelectedChatMode,
ReplyInSelectedChatModeDetour
);
ReplyInSelectedChatModeHook.Enable();
SetChatLogTellTargetHook = Plugin.GameInteropProvider.HookFromAddress<RaptureShellModule.Delegates.SetContextTellTarget>(RaptureShellModule.MemberFunctionPointers.SetContextTellTarget, SetContextTellTarget);
SetChatLogTellTargetHook =
Plugin.GameInteropProvider.HookFromAddress<RaptureShellModule.Delegates.SetContextTellTarget>(
RaptureShellModule.MemberFunctionPointers.SetContextTellTarget,
SetContextTellTarget
);
SetChatLogTellTargetHook.Enable();
Plugin.ClientState.Login += Login;
@@ -108,12 +158,13 @@ internal sealed unsafe class Chat : IDisposable
return utf == null ? null : utf->ToString();
}
private static int GetRotateIdx(RotateMode mode) => mode switch
{
RotateMode.Forward => 1,
RotateMode.Reverse => -1,
_ => 0,
};
private static int GetRotateIdx(RotateMode mode) =>
mode switch
{
RotateMode.Forward => 1,
RotateMode.Reverse => -1,
_ => 0,
};
internal static void RotateLinkshellHistory(RotateMode mode)
{
@@ -127,8 +178,7 @@ internal sealed unsafe class Chat : IDisposable
internal static void RotateCrossLinkshellHistory(RotateMode mode) =>
UIModule.Instance()->RotateCrossLinkshellHistory(GetRotateIdx(mode));
// This function looks up a channel's user-defined color.
// If this function ever returns 0, it returns null instead.
// Look up a channel's user-defined color, returns null if 0
internal uint? GetChannelColor(ChatType type)
{
var parent = type.Parent();
@@ -168,13 +218,12 @@ internal sealed unsafe class Chat : IDisposable
if (Plugin.Functions.KeybindManager.DirectChat && LastTypedCharacter != null)
{
// FIXME: this whole system sucks
// FIXME v2: I hate everything about this, but it works
// Capture the just-typed character input
Plugin.Framework.RunOnTick(() =>
{
string? input = null;
var utf8Bytes = MemoryHelper.ReadRaw((nint)LastTypedCharacter+0x4, 2);
var utf8Bytes = MemoryHelper.ReadRaw((nint)LastTypedCharacter + 0x4, 2);
var chars = Encoding.UTF8.GetString(utf8Bytes).ToCharArray();
if (chars.Length == 0)
return;
@@ -183,13 +232,13 @@ internal sealed unsafe class Chat : IDisposable
if (c != '\0' && !char.IsControl(c))
input = c.ToString();
try
// Seed the just-typed character into our input field and focus it, the
// same InputBar.AppendPending + Activate prefill path inventory item-links
// use. Prefill only, deliberately: no tab switch.
if (input != null)
{
Plugin.ChatLogWindow.Activated(new ChatActivatedArgs(new ChannelSwitchInfo(null)) { Input = input, });
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error in chat Activated event");
Plugin.InputBar.AppendPending(input);
Plugin.InputBar.Activate = true;
}
});
}
@@ -197,32 +246,22 @@ internal sealed unsafe class Chat : IDisposable
string? addIfNotPresent = null;
var str = value + 2;
if (str != null && ((int) str->Type & 0xF) == (int) ValueType.String && str->String.HasValue)
if (str != null && ((int)str->Type & 0xF) == (int)ValueType.String && str->String.HasValue)
{
var add = str->String.ToString();
if (add.Length > 0)
addIfNotPresent = add;
}
try
// Route the addIfNotPresent token into the InputBar so inventory
// right-click "Link item" reaches our input field instead of being lost.
if (addIfNotPresent != null && !Plugin.InputBar.PendingMessage.Contains(addIfNotPresent))
{
// We already called this function once, so we skip the duplicated call
// Also return the original value here so that vanilla chat receives all information
if (Plugin.ChatLogWindow.TellSpecial)
{
Plugin.Log.Information("Return early to prevent duplicated call...");
return ChatLogRefreshHook!.Original(log, eventId, value);
}
Plugin.ChatLogWindow.Activated(new ChatActivatedArgs(new ChannelSwitchInfo(null)) { AddIfNotPresent = addIfNotPresent, });
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error in chat Activated event");
Plugin.InputBar.AppendPending(addIfNotPresent);
Plugin.InputBar.Activate = true;
}
// prevent the game from focusing the chat log
return 1;
return 1; // Prevent vanilla chat log from gaining focus
}
private CStringPointer ChangeChannelNameDetour(AgentChatLog* agent)
@@ -231,9 +270,9 @@ internal sealed unsafe class Chat : IDisposable
if (agent == null)
return ret;
var channel = (uint) RaptureShellModule.Instance()->ChatType;
var channel = (uint)RaptureShellModule.Instance()->ChatType;
if (channel is 17 or 18)
channel = (uint) InputChannel.Tell;
channel = (uint)InputChannel.Tell;
var name = SeString.Parse(agent->ChannelLabel);
if (name.Payloads.Count == 0)
@@ -248,18 +287,18 @@ internal sealed unsafe class Chat : IDisposable
string? playerName = null;
ushort worldId = 0;
if (channel == (uint) InputChannel.Tell)
if (channel == (uint)InputChannel.Tell)
{
playerName = SeString.Parse(agent->TellPlayerName).TextValue;
worldId = agent->TellWorldId;
Plugin.Log.Debug($"Detected tell target '{playerName}'@{worldId}");
_logger.LogDebug($"Detected tell target '[redacted]'@{worldId}");
}
Plugin.CurrentTab.CurrentChannel = new UsedChannel
{
Channel = (InputChannel) channel,
Channel = (InputChannel)channel,
Name = nameChunks,
TellTarget = playerName != null ? new TellTarget(playerName, worldId, 0, 0) : null
TellTarget = playerName != null ? new TellTarget(playerName, worldId, 0, 0) : null,
};
return ret;
@@ -274,71 +313,122 @@ internal sealed unsafe class Chat : IDisposable
return;
}
SetChannel((InputChannel) replyMode);
SetChannel((InputChannel)replyMode);
ReplyInSelectedChatModeHook!.Original(agent);
}
private bool SetContextTellTarget(RaptureShellModule* a1, Utf8String* playerName, Utf8String* worldName, ushort worldId, ulong accountId, ulong contentId, ushort reason, bool setChatType)
// Pure /tell-prefill command builder, shared by the two native SetTellTarget
// detours and the PayloadHandler Send-Tell payload. Empty/null world drops the
// @World suffix (matches the old IsNullOrEmpty guard); trailing space lets the
// user type straight after. internal static so the Build-Suite can pin it
// frame-free. TEST-MIRROR: ../../../Hellion Build test/GameFunctions/PrefillTellCommandTests.cs
internal static string BuildTellCommand(string name, string? world)
{
var command = $"/tell {name}";
if (!string.IsNullOrEmpty(world))
command += $"@{world}";
command += " ";
return command;
}
// Prefills + focuses our own input bar with a /tell command. The DI/Dalamud
// plumbing (Plugin.InputBar) lives here; the string assembly is BuildTellCommand.
// The in-foray TellSpecial routing (SetEurekaTellChannel) is NOT this helper's
// job — it stays at the call-site (v1.8.1 deferral).
private void PrefillTellInput(string name, string? world)
{
Plugin.InputBar.SetPendingMessage(BuildTellCommand(name, world));
Plugin.InputBar.Activate = true;
}
private bool SetContextTellTarget(
RaptureShellModule* a1,
Utf8String* playerName,
Utf8String* worldName,
ushort worldId,
ulong accountId,
ulong contentId,
ushort reason,
bool setChatType
)
{
if (playerName != null)
{
try
{
var target = new TellTarget(playerName->ToString(), worldId, contentId, (TellReason) reason);
Plugin.ChatLogWindow.Activated(new ChatActivatedArgs(new ChannelSwitchInfo(InputChannel.Tell, permanent: setChatType))
{
TellReason = (TellReason) reason,
TellTarget = target,
});
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error in chat Activated event");
}
// Right-click -> Send Tell: prefill our input the same way our own
// "Send Tell" payload menu does (PayloadHandler), then focus. Prefill
// only, deliberately: no tab switch, no ChatActivatedArgs revival.
// The game supplies worldName here, so no sheet lookup.
PrefillTellInput(
playerName->ToString(),
worldName != null ? worldName->ToString() : null
);
}
return SetChatLogTellTargetHook!.Original(a1, playerName, worldName, worldId, accountId, contentId, reason, setChatType);
return SetChatLogTellTargetHook!.Original(
a1,
playerName,
worldName,
worldId,
accountId,
contentId,
reason,
setChatType
);
}
private void ContextMenuTellInForayDetour(RaptureShellModule* a1, Utf8String* playerName, Utf8String* worldName, ushort worldId, ulong accountId, ulong contentId, ushort reason)
private void ContextMenuTellInForayDetour(
RaptureShellModule* a1,
Utf8String* playerName,
Utf8String* worldName,
ushort worldId,
ulong accountId,
ulong contentId,
ushort reason
)
{
if (!Plugin.CurrentTab.CurrentChannel.UseTempChannel)
Plugin.CurrentTab.CurrentChannel.UseTempChannel = true;
if (playerName != null)
{
try
{
var target = new TellTarget(playerName->ToString(), worldId, contentId, (TellReason) reason);
Plugin.ChatLogWindow.Activated(new ChatActivatedArgs(new ChannelSwitchInfo(InputChannel.Tell))
{
TellReason = (TellReason) reason,
TellTarget = target,
TellSpecial = Sheets.IsInForay(), // Handle Eureka/Bozja special
});
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error in chat Activated event");
}
// In-foray right-click -> Send Tell: same prefill path as the non-foray
// tell. The foray-specific TellSpecial channel routing stays deferred
// (v1.8.1, SetEurekaTellChannel) -- prefill only here as well.
PrefillTellInput(
playerName->ToString(),
worldName != null ? worldName->ToString() : null
);
}
ContextMenuTellInForayHook!.Original(a1, playerName, worldName, worldId, accountId, contentId, reason);
ContextMenuTellInForayHook!.Original(
a1,
playerName,
worldName,
worldId,
accountId,
contentId,
reason
);
}
/// <summary>
/// Returns true if the channel is any non-linkshell channel, or if the
/// linkshell actually exists.
/// </summary>
internal static bool ValidAnyLinkshell(InputChannel channel)
// ---------------------------------------------------------------
// Cherry-picked from ChatTwo upstream f35b7d3 (Infiziert90, 2026-05-12)
// - Renamed ValidAnyLinkshell -> IsChannelOrExistingLinkshell. The
// name now states intent: returns true for any non-linkshell
// channel, or a linkshell index that actually exists.
// ---------------------------------------------------------------
internal static bool IsChannelOrExistingLinkshell(InputChannel channel)
{
var idx = channel.LinkshellIndex();
if (idx == uint.MaxValue || channel.IsExtraChatLinkshell())
return true;
if (channel.IsLinkshell() && ValidLinkshell(idx))
return true;
if (channel.IsCrossLinkshell() && ValidCrossLinkshell(idx))
return true;
if (channel.IsLinkshell())
return ValidLinkshell(idx);
if (channel.IsCrossLinkshell())
return ValidCrossLinkshell(idx);
return false;
}
@@ -346,17 +436,33 @@ internal sealed unsafe class Chat : IDisposable
{
if (idx > 7)
return false;
return InfoProxyLinkshell.Instance()->LinkShells[(int) idx].Id != 0;
return InfoProxyLinkshell.Instance()->LinkShells[(int)idx].Id != 0;
}
internal static bool ValidCrossLinkshell(uint idx)
{
if (idx > 7)
return false;
return InfoProxyCrossWorldLinkshell.Instance()->CrossWorldLinkshells[(int) idx].Name.Length > 0;
return InfoProxyCrossWorldLinkshell.Instance()->CrossWorldLinkshells[(int)idx].Name.Length
> 0;
}
private static uint? RotateLinkshell(uint currentIndex, RotateMode rotate, Func<uint, bool> validFn)
private static uint? RotateLinkshell(
uint currentIndex,
RotateMode rotate,
Func<uint, bool> validFn
) => RotateLinkshellIndex(currentIndex, rotate, validFn);
// Pure index-stepper (Dalamud-free): wrap (8 + currentIndex + delta) % 8 and return the
// first index validFn accepts within 8 iterations, else null. Extracted so the
// modulo/termination logic is unit-testable with a synthetic predicate; the
// production caller binds validFn to InfoProxyLinkshell (in-game only).
// TEST-MIRROR: ../../../Hellion Build test/_Helpers/RotateLinkshellIndexTests.cs
internal static uint? RotateLinkshellIndex(
uint currentIndex,
RotateMode rotate,
Func<uint, bool> validFn
)
{
if (rotate == RotateMode.None)
return null;
@@ -365,13 +471,12 @@ internal sealed unsafe class Chat : IDisposable
{
RotateMode.Forward => 1,
RotateMode.Reverse => -1,
_ => 1
_ => 1,
};
// Iterate up to 8 times to find a valid linkshell.
for (var i = 0; i < 8; i++)
for (var i = 0; i < 8; i++) // Find valid linkshell within 8 iterations
{
currentIndex = (uint) ((8 + currentIndex + delta) % 8);
currentIndex = (uint)((8 + currentIndex + delta) % 8);
if (validFn(currentIndex))
return currentIndex;
}
@@ -379,28 +484,43 @@ internal sealed unsafe class Chat : IDisposable
return null;
}
internal static InputChannel? ResolveTempInputChannel(InputChannel? currentTempChannel, InputChannel channel, RotateMode rotate)
internal static InputChannel? ResolveTempInputChannel(
InputChannel? currentTempChannel,
InputChannel channel,
RotateMode rotate
)
{
switch (channel)
{
case InputChannel.Linkshell1 or InputChannel.CrossLinkshell1 when rotate != RotateMode.None:
case InputChannel.Linkshell1
or InputChannel.CrossLinkshell1 when rotate != RotateMode.None:
{
var module = UIModule.Instance();
var currentIndex = channel is InputChannel.Linkshell1 ? (uint) module->LinkshellCycle : (uint) module->CrossWorldLinkshellCycle;
var currentIndex =
channel is InputChannel.Linkshell1
? (uint)module->LinkshellCycle
: (uint)module->CrossWorldLinkshellCycle;
if (currentTempChannel != null)
{
switch (channel)
{
case InputChannel.Linkshell1 when currentTempChannel.Value.IsLinkshell():
case InputChannel.CrossLinkshell1 when currentTempChannel.Value.IsCrossLinkshell():
case InputChannel.CrossLinkshell1
when currentTempChannel.Value.IsCrossLinkshell():
currentIndex = currentTempChannel.Value.LinkshellIndex();
break;
}
}
var idx = RotateLinkshell(currentIndex, rotate, channel == InputChannel.Linkshell1 ? ValidLinkshell : ValidCrossLinkshell);
return channel + idx;
var idx = RotateLinkshell(
currentIndex,
rotate,
channel == InputChannel.Linkshell1 ? ValidLinkshell : ValidCrossLinkshell
);
// RotateLinkshell returns null when no valid linkshell is found within 8 iterations.
// Forward the null so the caller can keep the existing channel instead of crashing on nullable arithmetic.
return idx is null ? null : channel + idx.Value; // null if not found, otherwise new channel
}
default:
return channel;
@@ -409,11 +529,7 @@ internal sealed unsafe class Chat : IDisposable
internal void SetChannel(InputChannel channel, TellTarget? tellTarget = null)
{
// ExtraChat linkshells aren't supported in game so we never want to
// call the ChangeChatChannel function with them.
//
// Callers should call ChatLogWindow.SetChannel() which handles
// ExtraChat channels
// Ignore ExtraChat linkshells (use ChatLogWindow.SetChannel() instead)
if (channel.IsExtraChatLinkshell())
return;
@@ -422,29 +538,50 @@ internal sealed unsafe class Chat : IDisposable
if (idx == uint.MaxValue)
idx = 0;
if (!ValidAnyLinkshell(channel))
return;
// ---------------------------------------------------------------
// Cherry-picked from ChatTwo upstream f35b7d3 (Infiziert90, 2026-05-12)
// - Wrap ChangeChatChannel in the validity check instead of
// early-returning. The previous early return skipped Dtor and
// leaked the native Utf8String allocated a few lines above.
// ---------------------------------------------------------------
if (IsChannelOrExistingLinkshell(channel))
RaptureShellModule
.Instance()
->ChangeChatChannel(tellTarget != null ? 17 : (int)channel, idx, target, true);
RaptureShellModule.Instance()->ChangeChatChannel(tellTarget != null ? 17 : (int)channel, idx, target, true);
target->Dtor(true);
}
internal void SetEurekaTellChannel(string name, string worldName, ushort worldId, ulong accountId, ulong objectId, ushort reason, bool setChatType)
internal void SetEurekaTellChannel(
string name,
string worldName,
ushort worldId,
ulong accountId,
ulong objectId,
ushort reason,
bool setChatType
)
{
// param6 is 0 for contentId and 1 for objectId
// param7 is always 0 ?
if (!Plugin.CurrentTab.CurrentChannel.UseTempChannel)
Plugin.CurrentTab.CurrentChannel.UseTempChannel = true;
// Send tell via CommandInner later and let the game handle it
// Only works because we use the SetTellTargetInForay function to set all required information
Plugin.ChatLogWindow.TellSpecial = true;
// Send tell via CommandInner later and let the game handle it.
// TellSpecial gate is offline until the new chat layer reads it.
var utfName = Utf8String.FromString(name);
var utfWorld = Utf8String.FromString(worldName);
RaptureShellModule.Instance()->SetTellTargetInForay(utfName, utfWorld, worldId, accountId, objectId, reason, setChatType);
RaptureShellModule
.Instance()
->SetTellTargetInForay(
utfName,
utfWorld,
worldId,
accountId,
objectId,
reason,
setChatType
);
utfName->Dtor(true);
utfWorld->Dtor(true);
@@ -473,19 +610,30 @@ internal sealed unsafe class Chat : IDisposable
mes->Dtor(true);
}
internal void SendTell(TellReason reason, ulong contentId, string name, ushort homeWorld, byte[] message, string rawText)
internal void SendTell(
TellReason reason,
ulong contentId,
string name,
ushort homeWorld,
byte[] message,
string rawText
)
{
if (contentId == 0)
{
Plugin.ChatGui.PrintError(Language.Chat_SendTell_Error);
Plugin.Log.Warning("Tried to send a tell with ContentId being 0, sorry this is an internal error.");
_logger.LogWarning(
"Tried to send a tell with ContentId being 0, sorry this is an internal error."
);
return;
}
var uName = Utf8String.FromString(name);
var uMessage = Utf8String.FromSequence(message.NullTerminate());
var encoded = Utf8String.FromUtf8String(PronounModule.Instance()->ProcessString(uMessage, true));
var encoded = Utf8String.FromUtf8String(
PronounModule.Instance()->ProcessString(uMessage, true)
);
var decoded = EncodeMessage(rawText);
AutoTranslate.ReplaceWithPayload(ref decoded);
@@ -498,9 +646,28 @@ internal sealed unsafe class Chat : IDisposable
if (reason == TellReason.Direct)
reason = TellReason.Friend;
var ok = SendTellNative(networkModule, contentId, homeWorld, uName, encoded, (ushort) reason, homeWorld);
var ok = SendTellNative(
networkModule,
contentId,
homeWorld,
uName,
encoded,
(ushort)reason,
homeWorld
);
if (ok == 1)
PrintTellNative(logModule, 33, uName, &decodedUtf8String, 0, contentId, homeWorld, 255, 0, 0);
PrintTellNative(
logModule,
33,
uName,
&decodedUtf8String,
0,
contentId,
homeWorld,
255,
0,
0
);
else
Plugin.ChatGui.PrintError(Language.Chat_SendTell_Error);
@@ -509,7 +676,8 @@ internal sealed unsafe class Chat : IDisposable
uMessage->Dtor(true);
}
private static byte[] EncodeMessage(string str) {
private static byte[] EncodeMessage(string str)
{
using var input = new Utf8String(str);
using var output = new Utf8String();
@@ -522,7 +690,7 @@ internal sealed unsafe class Chat : IDisposable
{
var uC = Utf8String.FromString(c.ToString());
uC->SanitizeString((AllowedEntities) 0x27F);
uC->SanitizeString((AllowedEntities)0x27F);
var wasValid = uC->ToString().Length > 0;
uC->Dtor(true);
@@ -535,7 +703,7 @@ internal sealed unsafe class Chat : IDisposable
var ok = Plugin.GameConfig.TryGet(UiConfigOption.LogNameType, out uint type);
if (!ok || !Enum.IsDefined(typeof(PlayerNameDisplayType), type))
return PlayerNameDisplayType.FullName;
return (PlayerNameDisplayType) type;
return (PlayerNameDisplayType)type;
}
internal string AbbreviatePlayerName(string playerName)
@@ -555,20 +723,21 @@ internal sealed unsafe class Chat : IDisposable
return CurrentPlayerNameDisplayType switch
{
PlayerNameDisplayType.SurnameAbbreviated => $"{split.First()} {split.Last().FirstOrDefault('A')}.",
PlayerNameDisplayType.ForenameAbbreviated => $"{split.First().FirstOrDefault('A')}. {split.Last()}",
PlayerNameDisplayType.Initials => $"{split.First().FirstOrDefault('A')}. {split.Last().FirstOrDefault('A')}.",
_ => playerName
PlayerNameDisplayType.SurnameAbbreviated =>
$"{split.First()} {split.Last().FirstOrDefault('A')}.",
PlayerNameDisplayType.ForenameAbbreviated =>
$"{split.First().FirstOrDefault('A')}. {split.Last()}",
PlayerNameDisplayType.Initials =>
$"{split.First().FirstOrDefault('A')}. {split.Last().FirstOrDefault('A')}.",
_ => playerName,
};
}
internal bool CheckHideFlags()
{
// Only hide the chat in a cutscene when the vanilla chat would've
// also been hidden. This prevents Chat 2 from hiding for a split
// second before the cutscene actually starts, because the game sets
// the cutscene conditions before processing the skip.
// Only hide chat in cutscene when vanilla chat would also be hidden
var raptureAtkUnitManager = RaptureAtkUnitManager.Instance();
return raptureAtkUnitManager == null || raptureAtkUnitManager->UiFlags.HasFlag(UiFlags.Chat);
return raptureAtkUnitManager == null
|| raptureAtkUnitManager->UiFlags.HasFlag(UiFlags.Chat);
}
}
+15 -8
View File
@@ -1,8 +1,8 @@
using System.Text;
using HellionChat.Resources;
using Dalamud.Memory;
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI;
using HellionChat.Resources;
namespace HellionChat.GameFunctions;
@@ -15,7 +15,15 @@ public unsafe class ChatBox
mes->Dtor(true);
}
public static void SendMessage(string message)
public static void SendMessage(string message) => SendMessageUnsafe(ValidateMessage(message));
// sanitiserOverride allows xUnit to bypass Utf8String->SanitizeString (game memory only).
// Returns encoded bytes so SendMessage avoids a second GetBytes call.
// TEST-MIRROR: ../../../Hellion Build test/GameFunctions/ChatBoxTests.cs
internal static byte[] ValidateMessage(
string message,
Func<string, string>? sanitiserOverride = null
)
{
var bytes = Encoding.UTF8.GetBytes(message);
if (bytes.Length == 0)
@@ -24,20 +32,19 @@ public unsafe class ChatBox
if (bytes.Length > 500)
throw new ArgumentException(Language.ChatBox_Error_Too_Long, nameof(message));
if (message.Length != SanitiseText(message).Length)
var sanitiser = sanitiserOverride ?? SanitiseText;
if (message.Length != sanitiser(message).Length)
throw new ArgumentException(Language.ChatBox_Error_Invalid, nameof(message));
SendMessageUnsafe(bytes);
return bytes;
}
private static string SanitiseText(string text)
{
var uText = Utf8String.FromString(text);
uText->SanitizeString((AllowedEntities) 0x27F);
uText->SanitizeString((AllowedEntities)0x27F);
var sanitised = uText->ToString();
uText->Dtor(true);
return sanitised;
}
}
}
+4 -2
View File
@@ -1,7 +1,7 @@
using HellionChat.Util;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using FFXIVClientStructs.FFXIV.Client.UI.Info;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using HellionChat.Util;
namespace HellionChat.GameFunctions;
@@ -10,7 +10,9 @@ internal sealed unsafe class Context
internal static void InviteToNoviceNetwork(string name, ushort world)
{
// can specify content id if we have it, but there's no need
InfoProxyNoviceNetwork.Instance()->InviteToNoviceNetwork(0, 0, world, name.ToTerminatedBytes());
InfoProxyNoviceNetwork
.Instance()
->InviteToNoviceNetwork(0, 0, world, name.ToTerminatedBytes());
}
internal static void TryOn(uint itemId, byte stainId)
+75 -67
View File
@@ -14,6 +14,7 @@ using FFXIVClientStructs.FFXIV.Client.UI.Info;
using FFXIVClientStructs.FFXIV.Component.GUI;
using Lumina.Excel;
using Lumina.Excel.Sheets;
using Microsoft.Extensions.Logging;
using ValueType = FFXIVClientStructs.FFXIV.Component.GUI.AtkValueType;
namespace HellionChat.GameFunctions;
@@ -23,23 +24,36 @@ internal unsafe class GameFunctions : IDisposable
internal const string NewGamePlusAddonName = "QuestRedo";
#region Hooks
[Signature("E8 ?? ?? ?? ?? 48 85 C0 0F 84 ?? ?? ?? ?? 48 8B D0 49 8D 4F", DetourName = nameof(ResolveTextCommandPlaceholderDetour))]
[Signature(
"E8 ?? ?? ?? ?? 48 85 C0 0F 84 ?? ?? ?? ?? 48 8B D0 49 8D 4F",
DetourName = nameof(ResolveTextCommandPlaceholderDetour)
)]
private Hook<ResolveTextCommandPlaceholderDelegate>? ResolveTextCommandPlaceholderHook = null!;
private delegate nint ResolveTextCommandPlaceholderDelegate(nint a1, byte* placeholderText, byte a3, byte a4);
private delegate nint ResolveTextCommandPlaceholderDelegate(
nint a1,
byte* placeholderText,
byte a3,
byte a4
);
#endregion
private Plugin Plugin { get; }
private readonly ILogger<GameFunctions> _logger;
internal KeybindManager KeybindManager { get; }
internal Chat Chat { get; }
internal GameFunctions(Plugin plugin)
internal GameFunctions(
Plugin plugin,
ILogger<GameFunctions> logger,
ILoggerFactory loggerFactory
)
{
Plugin = plugin;
KeybindManager = new KeybindManager(plugin);
Chat = new Chat(Plugin);
_logger = logger;
KeybindManager = new KeybindManager(plugin, loggerFactory.CreateLogger<KeybindManager>());
Chat = new Chat(Plugin, loggerFactory.CreateLogger<Chat>());
Plugin.GameInteropProvider.InitializeFromAttributes(this);
ResolveTextCommandPlaceholderHook?.Enable();
}
@@ -47,41 +61,30 @@ internal unsafe class GameFunctions : IDisposable
{
Chat.Dispose();
KeybindManager.Dispose();
ResolveTextCommandPlaceholderHook?.Dispose();
Marshal.FreeHGlobal(PlaceholderNamePtr);
}
internal void SendFriendRequest(string name, ushort world)
{
internal void SendFriendRequest(string name, ushort world) =>
ListCommand(name, world, "friendlist");
}
internal void AddToBlacklist(string name, ushort world)
{
ListCommand(name, world, "blist");
}
internal void AddToBlacklist(string name, ushort world) => ListCommand(name, world, "blist");
internal void AddToMuteList(ulong accountId, ulong contentId, string name, short worldId)
{
internal void AddToMuteList(ulong accountId, ulong contentId, string name, short worldId) =>
AgentMutelist.Instance()->Add(accountId, contentId, name, worldId);
}
internal void AddToTermsList(SeString content)
{
internal void AddToTermsList(SeString content) =>
AgentTermFilter.Instance()->OpenNewFilterWindow(content.EncodeWithNullTerminator());
}
private void ListCommand(string name, ushort world, string commandName)
{
var worldRow = Sheets.WorldSheet.GetRow(world);
ReplacementName = $"{name}@{worldRow.Name.ToString()}";
ChatBox.SendMessage($"/{commandName} add {Placeholder}");
}
private static T* GetAddon<T>(string name) where T : unmanaged
private static T* GetAddon<T>(string name)
where T : unmanaged
{
var addon = RaptureAtkModule.Instance()->RaptureAtkUnitManager.GetAddonByName(name);
return addon != null && addon->IsReady ? (T*)addon : null;
@@ -99,7 +102,6 @@ internal unsafe class GameFunctions : IDisposable
{
for (var i = 0; i < 4; i++)
SetAddonInteractable($"ChatLogPanel_{i}", interactable);
SetAddonInteractable("ChatLog", interactable);
}
@@ -115,7 +117,6 @@ internal unsafe class GameFunctions : IDisposable
var agent = AgentItemDetail.Instance();
var addon = GetAddon<AtkUnitBase>("ItemDetail");
// atkStage ain't gonna be null or we have bigger problems
if (agent == null || addon == null)
return;
@@ -124,23 +125,19 @@ internal unsafe class GameFunctions : IDisposable
agent->Index = 0;
agent->Flag1 &= 0xEF;
agent->ItemId = id;
// agent->Flag2 = 1;
// agent->Flag3 = 0;
// TODO: Revert whenever CS is merged
// TODO: Revert when CS offset lands in a release build.
*(byte*)((nint)agent + 0x21A) = 1;
*(byte*)((nint)agent + 0x21E) = 0;
// This just probably needs to be set
agent->AddonId = addon->Id;
// Skips early return
atkStage->TooltipManager.TooltipType |= 2;
addon->Show(false, 15);
}
internal static void CloseItemTooltip()
{
// hide addon first to prevent the "addon close" sound
// Hide addon first to suppress the "addon close" sound.
var addon = GetAddon<AtkUnitBase>("ItemDetail");
if (addon != null)
addon->Hide(true, false, 0);
@@ -158,35 +155,31 @@ internal unsafe class GameFunctions : IDisposable
internal static void OpenPartyFinder()
{
// this whole method: 6.05: 84433A (FF 97 ?? ?? ?? ?? 41 B4 01)
// 6.05: 84433A (FF 97 ?? ?? ?? ?? 41 B4 01)
var lfg = AgentLookingForGroup.Instance();
if (lfg->IsAgentActive())
{
var addonId = lfg->GetAddonId();
var atkModule = RaptureAtkModule.Instance();
var atkModuleVtbl = (void**) atkModule->AtkModule.VirtualTable;
var vf27 = (delegate* unmanaged<RaptureAtkModule*, ulong, ulong, byte>) atkModuleVtbl[27];
var atkModuleVtbl = (void**)atkModule->AtkModule.VirtualTable;
var vf27 = (delegate* unmanaged<RaptureAtkModule*, ulong, ulong, byte>)
atkModuleVtbl[27];
vf27(atkModule, addonId, 1);
}
else
{
// 6.05: 8443DD
if (*(uint*) ((nint) lfg + 0x2C20) > 0)
if (*(uint*)((nint)lfg + 0x2C20) > 0)
lfg->Hide();
else
lfg->Show();
}
}
internal static bool IsMentor()
{
return PlayerState.Instance()->IsMentor();
}
internal static bool IsMentor() => PlayerState.Instance()->IsMentor();
internal static InfoProxyCommonList.CharacterData[] GetFriends()
{
return InfoProxyFriendList.Instance()->CharDataSpan.ToArray();
}
internal static InfoProxyCommonList.CharacterData[] GetFriends() =>
InfoProxyFriendList.Instance()->CharDataSpan.ToArray();
internal static void OpenQuestLog(RowRef<Quest> quest)
{
@@ -197,7 +190,14 @@ internal unsafe class GameFunctions : IDisposable
return;
}
if (!uint.TryParse(splits[1], NumberStyles.Any, CultureInfo.InvariantCulture, out var questId))
if (
!uint.TryParse(
splits[1],
NumberStyles.Any,
CultureInfo.InvariantCulture,
out var questId
)
)
{
Plugin.ChatGui.Print("Unable to parse quest id");
return;
@@ -206,20 +206,12 @@ internal unsafe class GameFunctions : IDisposable
AgentQuestJournal.Instance()->OpenForQuest(questId, 1);
}
internal static void OpenPartyFinder(uint id)
{
internal static void OpenPartyFinder(uint id) =>
AgentLookingForGroup.Instance()->OpenListing(id);
}
internal static void OpenAchievement(uint id)
{
AgentAchievement.Instance()->OpenById(id);
}
internal static void OpenAchievement(uint id) => AgentAchievement.Instance()->OpenById(id);
internal static bool IsInInstance()
{
return Plugin.Condition[ConditionFlag.BoundByDuty56];
}
internal static bool IsInInstance() => Plugin.Condition[ConditionFlag.BoundByDuty56];
internal static bool TryOpenAdventurerPlate(ulong playerId)
{
@@ -230,7 +222,8 @@ internal unsafe class GameFunctions : IDisposable
}
catch (Exception e)
{
Plugin.Log.Warning(e, "Unable to open adventurer plate");
// Static method, no instance _logger reachable here.
Plugin.LogProxy.Warning(e, "Unable to open adventurer plate");
return false;
}
}
@@ -238,32 +231,47 @@ internal unsafe class GameFunctions : IDisposable
internal static void ClickNoviceNetworkButton()
{
var agent = AgentChatLog.Instance();
// case 3
var value = new AtkValue { Type = ValueType.Int, Int = 3, };
var value = new AtkValue { Type = ValueType.Int, Int = 3 }; // case 3
var result = 0;
var vf0 = *(delegate* unmanaged<AgentChatLog*, int*, AtkValue*, ulong, ulong, int*>*) agent->VirtualTable;
var vf0 = *(delegate* unmanaged<AgentChatLog*, int*, AtkValue*, ulong, ulong, int*>*)
agent->VirtualTable;
vf0(agent, &result, &value, 0, 0);
}
private readonly nint PlaceholderNamePtr = Marshal.AllocHGlobal(128);
private const int PlaceholderBufferSize = 128;
private readonly nint PlaceholderNamePtr = Marshal.AllocHGlobal(PlaceholderBufferSize);
private readonly string Placeholder = $"<{Guid.NewGuid():N}>";
private string? ReplacementName;
private nint ResolveTextCommandPlaceholderDetour(nint a1, byte* placeholderText, byte a3, byte a4)
private nint ResolveTextCommandPlaceholderDetour(
nint a1,
byte* placeholderText,
byte a3,
byte a4
)
{
// The detour is only invoked through the hook, so the hook should
// never be null here, but the nullable field declaration forces us
// to handle the theoretical race during teardown.
// Hook field is nullable due to the Signature attribute, but will never
// be null during normal execution; guard covers the teardown race only.
if (ResolveTextCommandPlaceholderHook is null)
return nint.Zero;
var placeholder = MemoryHelper.ReadStringNullTerminated((nint) placeholderText);
var placeholder = MemoryHelper.ReadStringNullTerminated((nint)placeholderText);
if (ReplacementName == null || placeholder != Placeholder)
return ResolveTextCommandPlaceholderHook.Original(a1, placeholderText, a3, a4);
// Guard against a malformed ReplacementName overflowing the 128-byte buffer.
var byteCount = System.Text.Encoding.UTF8.GetByteCount(ReplacementName);
if (byteCount >= PlaceholderBufferSize)
{
_logger.LogWarning(
$"Replacement name too long for placeholder buffer ({byteCount} bytes >= {PlaceholderBufferSize}); falling back to original."
);
ReplacementName = null;
return ResolveTextCommandPlaceholderHook.Original(a1, placeholderText, a3, a4);
}
MemoryHelper.WriteString(PlaceholderNamePtr, ReplacementName);
ReplacementName = null;
return PlaceholderNamePtr;
}
}
+313 -107
View File
@@ -1,23 +1,27 @@
using System.Numerics;
using HellionChat.Code;
using HellionChat.GameFunctions.Types;
using HellionChat.Util;
using Dalamud.Bindings.ImGui;
using Dalamud.Game.ClientState.Keys;
using Dalamud.Game.Config;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI;
using Dalamud.Bindings.ImGui;
using HellionChat.Code;
using HellionChat.GameFunctions.Types;
using HellionChat.Ui.Windows;
using HellionChat.Util;
using Microsoft.Extensions.Logging;
using ModifierFlag = HellionChat.GameFunctions.Types.ModifierFlag;
namespace HellionChat.GameFunctions;
internal enum KeyboardSource {
internal enum KeyboardSource
{
Game,
ImGui
ImGui,
}
internal unsafe class KeybindManager : IDisposable {
internal unsafe class KeybindManager : IDisposable
{
private Plugin Plugin { get; }
internal bool DirectChat;
@@ -26,70 +30,79 @@ internal unsafe class KeybindManager : IDisposable {
private bool VanillaTextInputHasFocus;
private readonly Dictionary<string, Keybind> Keybinds = new();
private static readonly IReadOnlyDictionary<string, ChannelSwitchInfo> KeybindsToIntercept = new Dictionary<string, ChannelSwitchInfo>
{
["CMD_CHAT"] = new(null),
["CMD_COMMAND"] = new(null, text: "/"),
["CMD_REPLY"] = new(InputChannel.Tell, rotate: RotateMode.Forward),
["CMD_REPLY_REV"] = new(InputChannel.Tell, rotate: RotateMode.Reverse),
["CMD_SAY"] = new(InputChannel.Say),
["CMD_YELL"] = new(InputChannel.Yell),
["CMD_SHOUT"] = new(InputChannel.Shout),
["CMD_PARTY"] = new(InputChannel.Party),
["CMD_ALLIANCE"] = new(InputChannel.Alliance),
["CMD_FREECOM"] = new(InputChannel.FreeCompany),
["PVPTEAM_CHAT"] = new(InputChannel.PvpTeam),
["CMD_CWLINKSHELL"] = new(InputChannel.CrossLinkshell1, rotate: RotateMode.Forward),
["CMD_CWLINKSHELL_REV"] = new(InputChannel.CrossLinkshell1, rotate: RotateMode.Reverse),
["CMD_CWLINKSHELL_1"] = new(InputChannel.CrossLinkshell1),
["CMD_CWLINKSHELL_2"] = new(InputChannel.CrossLinkshell2),
["CMD_CWLINKSHELL_3"] = new(InputChannel.CrossLinkshell3),
["CMD_CWLINKSHELL_4"] = new(InputChannel.CrossLinkshell4),
["CMD_CWLINKSHELL_5"] = new(InputChannel.CrossLinkshell5),
["CMD_CWLINKSHELL_6"] = new(InputChannel.CrossLinkshell6),
["CMD_CWLINKSHELL_7"] = new(InputChannel.CrossLinkshell7),
["CMD_CWLINKSHELL_8"] = new(InputChannel.CrossLinkshell8),
["CMD_LINKSHELL"] = new(InputChannel.Linkshell1, rotate: RotateMode.Forward),
["CMD_LINKSHELL_REV"] = new(InputChannel.Linkshell1, rotate: RotateMode.Reverse),
["CMD_LINKSHELL_1"] = new(InputChannel.Linkshell1),
["CMD_LINKSHELL_2"] = new(InputChannel.Linkshell2),
["CMD_LINKSHELL_3"] = new(InputChannel.Linkshell3),
["CMD_LINKSHELL_4"] = new(InputChannel.Linkshell4),
["CMD_LINKSHELL_5"] = new(InputChannel.Linkshell5),
["CMD_LINKSHELL_6"] = new(InputChannel.Linkshell6),
["CMD_LINKSHELL_7"] = new(InputChannel.Linkshell7),
["CMD_LINKSHELL_8"] = new(InputChannel.Linkshell8),
["CMD_BEGINNER"] = new(InputChannel.NoviceNetwork),
["CMD_REPLY_ALWAYS"] = new(InputChannel.Tell, true, RotateMode.Forward),
["CMD_REPLY_REV_ALWAYS"] = new(InputChannel.Tell, true, RotateMode.Reverse),
["CMD_SAY_ALWAYS"] = new(InputChannel.Say, true),
["CMD_YELL_ALWAYS"] = new(InputChannel.Yell, true),
["CMD_PARTY_ALWAYS"] = new(InputChannel.Party, true),
["CMD_ALLIANCE_ALWAYS"] = new(InputChannel.Alliance, true),
["CMD_FREECOM_ALWAYS"] = new(InputChannel.FreeCompany, true),
["PVPTEAM_CHAT_ALWAYS"] = new(InputChannel.PvpTeam, true),
["CMD_CWLINKSHELL_ALWAYS"] = new(InputChannel.CrossLinkshell1, true, RotateMode.Forward),
["CMD_CWLINKSHELL_ALWAYS_REV"] = new(InputChannel.CrossLinkshell1, true, RotateMode.Reverse),
["CMD_CWLINKSHELL_1_ALWAYS"] = new(InputChannel.CrossLinkshell1, true),
["CMD_CWLINKSHELL_2_ALWAYS"] = new(InputChannel.CrossLinkshell2, true),
["CMD_CWLINKSHELL_3_ALWAYS"] = new(InputChannel.CrossLinkshell3, true),
["CMD_CWLINKSHELL_4_ALWAYS"] = new(InputChannel.CrossLinkshell4, true),
["CMD_CWLINKSHELL_5_ALWAYS"] = new(InputChannel.CrossLinkshell5, true),
["CMD_CWLINKSHELL_6_ALWAYS"] = new(InputChannel.CrossLinkshell6, true),
["CMD_CWLINKSHELL_7_ALWAYS"] = new(InputChannel.CrossLinkshell7, true),
["CMD_CWLINKSHELL_8_ALWAYS"] = new(InputChannel.CrossLinkshell8, true),
["CMD_LINKSHELL_ALWAYS"] = new(InputChannel.Linkshell1, true, RotateMode.Forward),
["CMD_LINKSHELL_REV_ALWAYS"] = new(InputChannel.Linkshell1, true, RotateMode.Reverse),
["CMD_LINKSHELL_1_ALWAYS"] = new(InputChannel.Linkshell1, true),
["CMD_LINKSHELL_2_ALWAYS"] = new(InputChannel.Linkshell2, true),
["CMD_LINKSHELL_3_ALWAYS"] = new(InputChannel.Linkshell3, true),
["CMD_LINKSHELL_4_ALWAYS"] = new(InputChannel.Linkshell4, true),
["CMD_LINKSHELL_5_ALWAYS"] = new(InputChannel.Linkshell5, true),
["CMD_LINKSHELL_6_ALWAYS"] = new(InputChannel.Linkshell6, true),
["CMD_LINKSHELL_7_ALWAYS"] = new(InputChannel.Linkshell7, true),
["CMD_LINKSHELL_8_ALWAYS"] = new(InputChannel.Linkshell8, true),
["CMD_BEGINNER_ALWAYS"] = new(InputChannel.NoviceNetwork, true)
};
private static readonly IReadOnlyDictionary<string, ChannelSwitchInfo> KeybindsToIntercept =
new Dictionary<string, ChannelSwitchInfo>
{
["CMD_CHAT"] = new(null),
["CMD_COMMAND"] = new(null, text: "/"),
["CMD_REPLY"] = new(InputChannel.Tell, rotate: RotateMode.Forward),
["CMD_REPLY_REV"] = new(InputChannel.Tell, rotate: RotateMode.Reverse),
["CMD_SAY"] = new(InputChannel.Say),
["CMD_YELL"] = new(InputChannel.Yell),
["CMD_SHOUT"] = new(InputChannel.Shout),
["CMD_PARTY"] = new(InputChannel.Party),
["CMD_ALLIANCE"] = new(InputChannel.Alliance),
["CMD_FREECOM"] = new(InputChannel.FreeCompany),
["PVPTEAM_CHAT"] = new(InputChannel.PvpTeam),
["CMD_CWLINKSHELL"] = new(InputChannel.CrossLinkshell1, rotate: RotateMode.Forward),
["CMD_CWLINKSHELL_REV"] = new(InputChannel.CrossLinkshell1, rotate: RotateMode.Reverse),
["CMD_CWLINKSHELL_1"] = new(InputChannel.CrossLinkshell1),
["CMD_CWLINKSHELL_2"] = new(InputChannel.CrossLinkshell2),
["CMD_CWLINKSHELL_3"] = new(InputChannel.CrossLinkshell3),
["CMD_CWLINKSHELL_4"] = new(InputChannel.CrossLinkshell4),
["CMD_CWLINKSHELL_5"] = new(InputChannel.CrossLinkshell5),
["CMD_CWLINKSHELL_6"] = new(InputChannel.CrossLinkshell6),
["CMD_CWLINKSHELL_7"] = new(InputChannel.CrossLinkshell7),
["CMD_CWLINKSHELL_8"] = new(InputChannel.CrossLinkshell8),
["CMD_LINKSHELL"] = new(InputChannel.Linkshell1, rotate: RotateMode.Forward),
["CMD_LINKSHELL_REV"] = new(InputChannel.Linkshell1, rotate: RotateMode.Reverse),
["CMD_LINKSHELL_1"] = new(InputChannel.Linkshell1),
["CMD_LINKSHELL_2"] = new(InputChannel.Linkshell2),
["CMD_LINKSHELL_3"] = new(InputChannel.Linkshell3),
["CMD_LINKSHELL_4"] = new(InputChannel.Linkshell4),
["CMD_LINKSHELL_5"] = new(InputChannel.Linkshell5),
["CMD_LINKSHELL_6"] = new(InputChannel.Linkshell6),
["CMD_LINKSHELL_7"] = new(InputChannel.Linkshell7),
["CMD_LINKSHELL_8"] = new(InputChannel.Linkshell8),
["CMD_BEGINNER"] = new(InputChannel.NoviceNetwork),
["CMD_REPLY_ALWAYS"] = new(InputChannel.Tell, true, RotateMode.Forward),
["CMD_REPLY_REV_ALWAYS"] = new(InputChannel.Tell, true, RotateMode.Reverse),
["CMD_SAY_ALWAYS"] = new(InputChannel.Say, true),
["CMD_YELL_ALWAYS"] = new(InputChannel.Yell, true),
["CMD_PARTY_ALWAYS"] = new(InputChannel.Party, true),
["CMD_ALLIANCE_ALWAYS"] = new(InputChannel.Alliance, true),
["CMD_FREECOM_ALWAYS"] = new(InputChannel.FreeCompany, true),
["PVPTEAM_CHAT_ALWAYS"] = new(InputChannel.PvpTeam, true),
["CMD_CWLINKSHELL_ALWAYS"] = new(
InputChannel.CrossLinkshell1,
true,
RotateMode.Forward
),
["CMD_CWLINKSHELL_ALWAYS_REV"] = new(
InputChannel.CrossLinkshell1,
true,
RotateMode.Reverse
),
["CMD_CWLINKSHELL_1_ALWAYS"] = new(InputChannel.CrossLinkshell1, true),
["CMD_CWLINKSHELL_2_ALWAYS"] = new(InputChannel.CrossLinkshell2, true),
["CMD_CWLINKSHELL_3_ALWAYS"] = new(InputChannel.CrossLinkshell3, true),
["CMD_CWLINKSHELL_4_ALWAYS"] = new(InputChannel.CrossLinkshell4, true),
["CMD_CWLINKSHELL_5_ALWAYS"] = new(InputChannel.CrossLinkshell5, true),
["CMD_CWLINKSHELL_6_ALWAYS"] = new(InputChannel.CrossLinkshell6, true),
["CMD_CWLINKSHELL_7_ALWAYS"] = new(InputChannel.CrossLinkshell7, true),
["CMD_CWLINKSHELL_8_ALWAYS"] = new(InputChannel.CrossLinkshell8, true),
["CMD_LINKSHELL_ALWAYS"] = new(InputChannel.Linkshell1, true, RotateMode.Forward),
["CMD_LINKSHELL_REV_ALWAYS"] = new(InputChannel.Linkshell1, true, RotateMode.Reverse),
["CMD_LINKSHELL_1_ALWAYS"] = new(InputChannel.Linkshell1, true),
["CMD_LINKSHELL_2_ALWAYS"] = new(InputChannel.Linkshell2, true),
["CMD_LINKSHELL_3_ALWAYS"] = new(InputChannel.Linkshell3, true),
["CMD_LINKSHELL_4_ALWAYS"] = new(InputChannel.Linkshell4, true),
["CMD_LINKSHELL_5_ALWAYS"] = new(InputChannel.Linkshell5, true),
["CMD_LINKSHELL_6_ALWAYS"] = new(InputChannel.Linkshell6, true),
["CMD_LINKSHELL_7_ALWAYS"] = new(InputChannel.Linkshell7, true),
["CMD_LINKSHELL_8_ALWAYS"] = new(InputChannel.Linkshell8, true),
["CMD_BEGINNER_ALWAYS"] = new(InputChannel.NoviceNetwork, true),
};
// List of keys that can be used as a part of keybinds while the chat is
// focused WITHOUT modifiers. All other keys can only be used if their
@@ -295,9 +308,12 @@ internal unsafe class KeybindManager : IDisposable {
// VirtualKey.OEM_CLEAR,
};
internal KeybindManager(Plugin plugin)
private readonly ILogger<KeybindManager> _logger;
internal KeybindManager(Plugin plugin, ILogger<KeybindManager> logger)
{
Plugin = plugin;
_logger = logger;
Plugin.GameInteropProvider.InitializeFromAttributes(this);
// Handle keybinds from the game on every tick.
@@ -353,12 +369,22 @@ internal unsafe class KeybindManager : IDisposable {
return key.TryToImGui(out var imguiKey) && ImGui.IsKeyPressed(imguiKey);
}
private static bool ComboPressed(KeyboardSource source, VirtualKey key, ModifierFlag modifier, ModifierFlag? modifierState = null, bool modifiersOnly = false)
private static bool ComboPressed(
KeyboardSource source,
VirtualKey key,
ModifierFlag modifier,
ModifierFlag? modifierState = null,
bool modifiersOnly = false
)
{
// When we're in an input, we don't want to process any keybinds that
// don't have a modifier (or only use shift) and are not explicitly
// whitelisted.
if (modifiersOnly && !ModifierlessChatKeys.Contains(key) && modifier is ModifierFlag.None or ModifierFlag.Shift)
if (
modifiersOnly
&& !ModifierlessChatKeys.Contains(key)
&& modifier is ModifierFlag.None or ModifierFlag.Shift
)
return false;
modifierState ??= GetModifiers(source);
@@ -366,26 +392,43 @@ internal unsafe class KeybindManager : IDisposable {
{
KeybindMode.Strict => modifier == modifierState.Value,
KeybindMode.Flexible => modifierState.Value.HasFlag(modifier),
_ => false
_ => false,
};
return KeyPressed(source, key) && modifierPressed;
}
private static bool ConfigKeybindPressed(KeyboardSource source, ConfigKeyBind? bind, ModifierFlag? modifierState = null, bool modifiersOnly = false)
private static bool ConfigKeybindPressed(
KeyboardSource source,
ConfigKeyBind? bind,
ModifierFlag? modifierState = null,
bool modifiersOnly = false
)
{
return bind != null && ComboPressed(source, bind.Key, bind.Modifier, modifierState: modifierState, modifiersOnly: modifiersOnly);
return bind != null
&& ComboPressed(
source,
bind.Key,
bind.Modifier,
modifierState: modifierState,
modifiersOnly: modifiersOnly
);
}
private void HandleKeybinds(IFramework _ ) => HandleKeybinds(KeyboardSource.Game);
private void HandleKeybinds(IFramework _) => HandleKeybinds(KeyboardSource.Game);
internal void HandleKeybinds(KeyboardSource source, bool ignoreChatOpen = false, bool modifiersOnly = false)
internal void HandleKeybinds(
KeyboardSource source,
bool ignoreChatOpen = false,
bool modifiersOnly = false
)
{
// Refresh current keybinds every 5s
if (LastRefresh + 5 * 1000 < Environment.TickCount64)
{
UpdateKeybinds();
DirectChat = Plugin.GameConfig.TryGet(UiControlOption.DirectChat, out bool option) && option;
DirectChat =
Plugin.GameConfig.TryGet(UiControlOption.DirectChat, out bool option) && option;
LastRefresh = Environment.TickCount64;
}
@@ -433,10 +476,18 @@ internal unsafe class KeybindManager : IDisposable {
void Intercept(VirtualKey vk, ModifierFlag modifier)
{
if (!ComboPressed(source, vk, modifier, modifierState: modifierState, modifiersOnly: modifiersOnly))
if (
!ComboPressed(
source,
vk,
modifier,
modifierState: modifierState,
modifiersOnly: modifiersOnly
)
)
return;
var bits = BitOperations.PopCount((uint) modifier);
var bits = BitOperations.PopCount((uint)modifier);
if (bits < currentBest.Item3)
return;
@@ -454,33 +505,188 @@ internal unsafe class KeybindManager : IDisposable {
if (!KeybindsToIntercept.TryGetValue(currentBest.Item2, out var info))
return;
// Resolve the surface this keybind acts on FIRST: a focused pop-out otherwise
// the main window. Channel-set/REPLY/prefill all write here so the action
// follows the input the user is typing in.
var (targetWindow, targetTab) = ResolveKeybindTarget();
// Surface + focus the resolved target ONCE, before routing. Main: ActivateChat
// re-surfaces it from a hide/closed state (the chat-activation entry point
// retired in v1.6.0). Pop-out: arm only its focus — NOT ActivateChat, which
// would yank the main window to front and un-hide it on every pop-out-targeted
// keybind: stay where the user types. Exactly one window arms focus per
// keybind, so the next frame has no SetKeyboardFocusHere race.
if (targetWindow is ChannelPopoutWindow)
targetWindow.RequestInputFocus();
else
Plugin.Instance.MainWindow?.ActivateChat();
// The routing tail makes native game calls (GetTellHistoryInfo, UIModule,
// RotateLinkshellHistory) on the framework tick — wrap it so one bad frame logs
// instead of throwing into Dalamud's update loop (v1.5.6 parity).
try
{
TellReason? reason = info.Channel == InputChannel.Tell ? TellReason.Reply : null;
Plugin.ChatLogWindow.Activated(new ChatActivatedArgs(info) { TellReason = reason, });
if (info.Channel is { } channel && info.Rotate == RotateMode.None)
{
// Direct channel-switch binds (CMD_SAY/PARTY/numbered linkshells/…): switch
// the game channel AND mirror it onto the resolved tab so the input pill
// shows the real send target (pill-sync).
Plugin.Instance.Functions.Chat.SetChannel(channel);
// Only mirror onto the tab when the game actually accepted the switch — an
// empty linkshell slot leaves the game channel untouched, so the pill must
// stay put rather than show a target the game will not send to.
if (Chat.IsChannelOrExistingLinkshell(channel) && targetTab is { } directTab)
{
directTab.CurrentChannel.SetChannel(channel);
directTab.CurrentChannel.TellTarget = null;
directTab.CurrentChannel.ResetTempChannel();
}
}
else if (info.Channel is { } rotateChannel && info.Rotate != RotateMode.None)
{
// Rotation binds (REPLY / linkshell-cycle). Ported from v1.5.6's
// ChatLogWindow.Activated (1d3b429:240-334) without the ChatActivatedArgs
// indirection (gone in the rewrite). Writes onto the resolved surface's
// tab, not Plugin.CurrentTab.
if (targetTab is { } rotTab)
{
var targetChannel = (InputChannel?)rotateChannel;
// REPLY rotation: the reply target is ALWAYS temp (never permanent —
// a permanent reply would leak the partner onto the tab) and ALWAYS
// TellReason.Reply. info.Permanent does not gate this step; only the
// channel-set tail below honours the _ALWAYS binds' permanence.
if (rotateChannel == InputChannel.Tell)
{
var idx =
rotTab.CurrentChannel.TempChannel != InputChannel.Tell ? 0
: info.Rotate == RotateMode.Reverse ? -1
: 1;
var tellInfo = Plugin.Instance.Functions.Chat.GetTellHistoryInfo(idx);
if (tellInfo != null)
rotTab.CurrentChannel.TempTellTarget = new TellTarget(
tellInfo.Name,
tellInfo.World,
tellInfo.ContentId,
TellReason.Reply
);
}
else
{
// Cycling AWAY from Tell to a linkshell: drop any stale permanent
// tell target so a typed line cannot silently route to the old
// partner (v1.5.6 ChatLogWindow.cs:280, privacy guard).
rotTab.CurrentChannel.TellTarget = null;
}
// LS/CWLS cycle: permanent rotates the game's own history and reads the
// landed cycle index back; temp resolves the next valid linkshell index
// without touching game state. Both leave targetChannel null on failure
// (no valid linkshell in 8 iterations) so the tail below logs + skips.
if (rotateChannel is InputChannel.Linkshell1 or InputChannel.CrossLinkshell1)
{
var module = UIModule.Instance();
if (info.Permanent)
{
if (rotateChannel == InputChannel.Linkshell1)
{
Chat.RotateLinkshellHistory(info.Rotate);
targetChannel = rotateChannel + (uint)module->LinkshellCycle;
}
else
{
Chat.RotateCrossLinkshellHistory(info.Rotate);
targetChannel =
rotateChannel + (uint)module->CrossWorldLinkshellCycle;
}
}
else
{
targetChannel = Chat.ResolveTempInputChannel(
rotTab.CurrentChannel.TempChannel,
rotateChannel,
info.Rotate
);
}
}
// Shared channel-set tail (runs for Tell too: IsChannelOrExistingLinkshell
// is true for Tell and targetChannel stays Tell). Permanent => commit the
// game channel; temp => arm UseTempChannel/TempChannel only. This is the
// ONLY place info.Permanent decides temp vs permanent for the channel.
if (
targetChannel is null
|| !Chat.IsChannelOrExistingLinkshell(targetChannel.Value)
)
{
_logger.LogWarning(
"Rotation channel resolved to an invalid value '{Channel}', ignoring",
targetChannel
);
return;
}
if (info.Permanent)
{
// 1.5.6 parity (ChatLogWindow.SetChannel, 1d3b429:1476-1479):
// committing the game channel also pre-targets the game's native input.
// Forward the tab's reply target for Tell so the partner is armed
// game-side (ChangeChatChannel code 17); null for a linkshell —
// targetChannel is the FINAL resolved value (9..16/19..26 for LS, never
// 0=Tell), so a stale TempTellTarget can never flip an LS cycle to Tell.
var gameTarget =
targetChannel.Value == InputChannel.Tell
? rotTab.CurrentChannel.TempTellTarget
?? rotTab.CurrentChannel.TellTarget
: null;
Plugin.Instance.Functions.Chat.SetChannel(targetChannel.Value, gameTarget);
rotTab.CurrentChannel.SetChannel(targetChannel.Value);
}
else
{
rotTab.CurrentChannel.UseTempChannel = true;
rotTab.CurrentChannel.TempChannel = targetChannel.Value;
}
}
}
// Prefill text binds (CMD_COMMAND seeds "/"): the token always goes to the
// main InputBar (the focus contract does not expose pop-out buffers); a
// focused pop-out already received focus above, so only token routing matters
// here -- a documented scope limit.
if (info.Text is { } text)
Plugin.Instance.InputBar.SetPendingMessage(text);
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error in chat Activated event");
_logger.LogError(ex, "Keybind routing failed for channel {Channel}", info.Channel);
}
}
// v0.6.0 — central dispatch for ChatTabForward/Backward. If a pop-out
// window currently has its compact input focused, the keybind is
// forwarded into that pop-out's ChatInputBar so the user navigates
// tabs in the window they are typing in. Otherwise the main window
// handles it (= v0.5.x behavior).
// Resolve which chat surface a keybind action targets: the open pop-out whose
// input currently has focus, otherwise the main window. Both paths share it so a
// channel-switch/REPLY/prefill follows the surface the user is typing in. The
// returned tab is that surface's bound tab (pop-out: Bound; main: ActiveTab).
// Null tab => skip the tab-write (early-load window where no tab exists yet).
private (IFocusableChatWindow Window, Tab? Tab) ResolveKeybindTarget()
{
foreach (var popout in Plugin.Instance.ChannelPopoutPool.Instances)
{
if (popout.Bound is { } bound && popout.IsOpen && popout.HasFocusedInput)
return (popout, bound);
}
var main = Plugin.Instance.MainWindow;
return (main!, main?.ActiveTab);
}
// Tab-delta keybinds (ChatTabForward/Backward) stay main-window-only by design:
// a channel-bound pop-out has no tab list to cycle. The focus contract is
// consumed by the channel-set/REPLY/prefill tail, not here.
private void DispatchTabDelta(int delta)
{
foreach (var popout in Plugin.ChatLogWindow.ActivePopouts)
{
if (popout.HasFocusedInputBar && popout.InputBar != null)
{
popout.InputBar.HandleKeybindForward(delta);
return;
}
}
Plugin.ChatLogWindow.ChangeTabDelta(delta);
Plugin.Instance.MainWindow?.ChangeTabDelta(delta);
}
private static Keybind GetKeybind(string id)
@@ -494,11 +700,11 @@ internal unsafe class KeybindManager : IDisposable {
var key2 = outData.KeySettings[1];
return new Keybind
{
Key1 = RemapInvalidVirtualKey((VirtualKey) key1.Key),
Modifier1 = (ModifierFlag) key1.KeyModifier,
Key1 = RemapInvalidVirtualKey((VirtualKey)key1.Key),
Modifier1 = (ModifierFlag)key1.KeyModifier,
Key2 = RemapInvalidVirtualKey((VirtualKey) key2.Key),
Modifier2 = (ModifierFlag) key2.KeyModifier,
Key2 = RemapInvalidVirtualKey((VirtualKey)key2.Key),
Modifier2 = (ModifierFlag)key2.KeyModifier,
};
}
@@ -506,9 +712,9 @@ internal unsafe class KeybindManager : IDisposable {
{
return key switch
{
VirtualKey.F23 => VirtualKey.OEM_2, // /?
(VirtualKey) 140 => VirtualKey.OEM_7, // '"
_ => key
VirtualKey.F23 => VirtualKey.OEM_2, // /?
(VirtualKey)140 => VirtualKey.OEM_7, // '"
_ => key,
};
}
}
}
+8 -5
View File
@@ -1,8 +1,8 @@
using HellionChat.Resources;
using HellionChat.Util;
using Dalamud.Interface.ImGuiNotification;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using FFXIVClientStructs.FFXIV.Client.UI.Info;
using HellionChat.Resources;
using HellionChat.Util;
namespace HellionChat.GameFunctions;
@@ -11,7 +11,8 @@ internal static unsafe class Party
internal static void InviteSameWorld(string name, ushort world, ulong contentId)
{
// this only works if target is on the same world
fixed (byte* namePtr = name.ToTerminatedBytes()) {
fixed (byte* namePtr = name.ToTerminatedBytes())
{
InfoProxyPartyInvite.Instance()->InviteToParty(contentId, namePtr, world);
}
}
@@ -44,14 +45,16 @@ internal static unsafe class Party
internal static void Kick(string name, ulong contentId)
{
fixed (byte* namePtr = name.ToTerminatedBytes()) {
fixed (byte* namePtr = name.ToTerminatedBytes())
{
AgentPartyMember.Instance()->Kick(namePtr, 0, contentId);
}
}
internal static void Promote(string name, ulong contentId)
{
fixed (byte* namePtr = name.ToTerminatedBytes()) {
fixed (byte* namePtr = name.ToTerminatedBytes())
{
AgentPartyMember.Instance()->Promote(namePtr, 0, contentId);
}
}
@@ -2,13 +2,19 @@ using HellionChat.Code;
namespace HellionChat.GameFunctions.Types;
internal class ChannelSwitchInfo {
internal class ChannelSwitchInfo
{
internal InputChannel? Channel { get; }
internal bool Permanent { get; }
internal RotateMode Rotate { get; }
internal string? Text { get; }
internal ChannelSwitchInfo(InputChannel? channel, bool permanent = false, RotateMode rotate = RotateMode.None, string? text = null)
internal ChannelSwitchInfo(
InputChannel? channel,
bool permanent = false,
RotateMode rotate = RotateMode.None,
string? text = null
)
{
Channel = channel;
Permanent = permanent;
+14 -7
View File
@@ -19,14 +19,14 @@ public class TellTarget
Reason = reason;
}
public bool IsSet()
=> Name.Length > 0 && World > 0;
public bool IsSet() => !string.IsNullOrEmpty(Name) && World > 0;
public string ToWorldString()
=> Sheets.WorldSheet.TryGetRow(World, out var worldRow) ? worldRow.Name.ToString() : string.Empty;
public string ToWorldString() =>
Sheets.WorldSheet.TryGetRow(World, out var worldRow)
? worldRow.Name.ToString()
: string.Empty;
public string ToTargetString()
=> $"{Name}@{ToWorldString()}";
public string ToTargetString() => $"{Name}@{ToWorldString()}";
public unsafe void FromTarget(IPlayerCharacter target)
{
@@ -39,5 +39,12 @@ public class TellTarget
}
public static TellTarget Empty() => new(string.Empty, 0, 0, TellReason.Direct);
public static TellTarget From(TellTarget t) => new(t.Name, t.World, t.ContentId, t.Reason);
// ---------------------------------------------------------------
// Cherry-picked from ChatTwo upstream f35b7d3 (Infiziert90, 2026-05-12)
// - Replaced static From(t) with an instance-style Clone() so call
// sites read like a copy operation, not a factory.
// TEST-MIRROR: ../../../Hellion Build test/_Helpers/TellTargetCloneTests.cs
// ---------------------------------------------------------------
public TellTarget Clone() => new(Name, World, ContentId, Reason);
}
+56 -45
View File
@@ -1,35 +1,43 @@
<Project Sdk="Dalamud.NET.Sdk/15.0.0">
<PropertyGroup>
<!-- Hellion Chat versioning runs separately from upstream Chat 2.
0.1.0 is our bootstrap release; the underlying Chat 2 base is
called out in the yaml changelog so users can see what it
derives from. -->
<Version>1.0.3</Version>
<!-- Independent versioning; see yaml changelog for upstream Chat 2 base -->
<Version>2.0.4</Version>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Honor packages.lock.json on restore so floating version ranges
don't silently drift between machines or CI runs. -->
<Nullable>enable</Nullable>
<!-- Use lock file to pin exact versions -->
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- v1.0.0 standalone cut — both AssemblyName and RootNamespace
are HellionChat. The plugin no longer maintains source-level
cherry-pick compatibility with upstream Infiziert90/ChatTwo;
upstream changes are integrated manually if at all. -->
<!-- v1.0.0+: standalone fork, no upstream cherry-pick compatibility -->
<AssemblyName>HellionChat</AssemblyName>
<RootNamespace>HellionChat</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MessagePack" Version="3.1.4" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.7" />
<!-- Override the transitively-referenced native SQLite build to one
that ships SQLite >= 3.50.3 (CVE-2025-6965 memory corruption,
CVE-2025-7709 fixed in 3.50.x). Microsoft.Data.Sqlite 10.0.7
pulls SQLitePCLRaw 2.1.11 which carries the older lib; pinning
the lib package directly forces the newer native binary
without a major bump on the managed wrapper. -->
<!-- Closed ranges prevent surprise major bumps during lock file regeneration -->
<PackageReference Include="MessagePack" Version="[3.1.7, 4.0.0)" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.8" />
<!-- v1.5.0 DI-container foundation; matches Lightless pin (Hosting 10.0.7) -->
<PackageReference
Include="Microsoft.Extensions.DependencyInjection"
Version="[10.0.7, 11.0.0)"
/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="[10.0.7, 11.0.0)" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="[10.0.7, 11.0.0)" />
<PackageReference Include="Microsoft.Extensions.Options" Version="[10.0.7, 11.0.0)" />
<!-- SQLitePCLRaw override for CVE-2025-6965, CVE-2025-7709 (SQLite >= 3.50.3) -->
<PackageReference Include="SQLitePCLRaw.lib.e_sqlite3" Version="3.50.3" />
<PackageReference Include="morelinq" Version="4.4.0" />
<PackageReference Include="Pidgin" Version="3.5.1" />
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
<!-- NAudio.WinMM 2.2.1 MIT - WaveOutEvent/WinMM path is Wine-safe (WaveOut works under Wine,
Media-Foundation-based codecs do not). Using the sub-package avoids pulling in
NAudio.WinForms (which requires WindowsDesktop and does not build on Linux hosts).
WaveOutEvent and WaveFileReader both live in NAudio.WinMM + NAudio.Core. -->
<PackageReference Include="NAudio.WinMM" Version="2.3.0" />
<PackageReference Include="Pidgin" Version="[3.5.1, 4.0.0)" />
<PackageReference Include="SixLabors.ImageSharp" Version="[3.1.12, 4.0.0)" />
</ItemGroup>
<ItemGroup>
<!-- Test assembly needs access to internal helpers (not redistributed) -->
<InternalsVisibleTo Include="HellionChat.Tests" />
</ItemGroup>
<ItemGroup>
@@ -47,37 +55,40 @@
</EmbeddedResource>
</ItemGroup>
<!-- HellionChat — Hellion-specific resource bundle (HellionStrings.resx
+ HellionStrings.<lang>.resx) is picked up automatically by the SDK
default include. Designer.cs is hand-maintained, no auto-gen needed. -->
<!-- Bundled Hellion font (Exo 2, OFL-1.1). Embedded as a manifest
resource with a fixed LogicalName so FontManager can pull the
bytes back at runtime via AddFontFromMemory. The OFL license
text travels with it inside the assembly to satisfy the
"license must be distributed with the font" clause. -->
<!-- Embedded resources: bundled UI font (Inter Light, OFL-1.1) + manifest resource -->
<ItemGroup>
<EmbeddedResource Include="Resources\HellionFont.ttf">
<LogicalName>HellionFont.ttf</LogicalName>
<EmbeddedResource Include="Resources\Inter-Light.ttf">
<LogicalName>Inter-Light.ttf</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\HellionFont-OFL.txt">
<LogicalName>HellionFont-OFL.txt</LogicalName>
<EmbeddedResource Include="Resources\Inter-OFL.txt">
<LogicalName>Inter-OFL.txt</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Branding\fox-banner.png">
<LogicalName>HellionChat.Branding.fox-banner.png</LogicalName>
</EmbeddedResource>
<!-- Bundled custom notification sounds, Mono 44.1 kHz 16-bit PCM WAV (Wine-safe) -->
<EmbeddedResource Include="Resources\Sounds\notification-1.wav">
<LogicalName>HellionChat.Sounds.notification-1.wav</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Sounds\notification-2.wav">
<LogicalName>HellionChat.Sounds.notification-2.wav</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Sounds\notification-3.wav">
<LogicalName>HellionChat.Sounds.notification-3.wav</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Branding\fox-mini.txt">
<LogicalName>HellionChat.Branding.fox-mini.txt</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Themes\Builtin\example-theme.json">
<LogicalName>HellionChat.Themes.Builtin.example-theme.json</LogicalName>
</EmbeddedResource>
</ItemGroup>
<!-- Plugin icon. Copy images/* into the build output so Dalamud
finds the icon next to the DLL, and let the SDK default
DalamudPackager pipeline include the same path in the
release ZIP. Earlier we shipped a custom DalamudPackager
targets override that explicitly set HandleImages and
ImagesPath; that override conflicted with the SDK 15
default and the resulting manifest carried no IconUrl.
Removed in v0.5.2. -->
<!-- Plugin icon: copy images/* to output for Dalamud discovery. ASCII
study folder is source-only material, no need to ship it. -->
<ItemGroup>
<None Include="images\**">
<None Include="images\**" Exclude="images\ascii\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
+35 -216
View File
@@ -1,237 +1,56 @@
name: Hellion Chat
author: JonKazama-Hellion
punchline: Chat replacement with privacy controls aligned to EU, US and JP rules — based on Chat 2 (EUPL-1.2)
author: Jon Kazama (Hellion Forge)
punchline: Chat replacement for FFXIV that keeps your conversations and forgets the rest.
description: |-
Hellion Chat is a privacy-focused chat replacement for FINAL FANTASY XIV
based on the Chat 2 codebase (EUPL-1.2). One feature is intentionally
removed (the optional webinterface) and a stack of privacy controls is
added on top. Tabs, channel filters, RGB colours, emotes, screenshot
mode, IPC integration and the chat replacement window itself work the
same. The webinterface is intentionally not part of Hellion Chat because
it serves a different use case from the smaller default footprint this
plugin is built around.
A chat window that stores your own conversations and nothing else. Public chat, NPC dialogue, system messages and battle logs stay out of the database until you switch them on.
On top of that, Hellion Chat adds privacy and data-handling controls
designed to align with the modern data protection rules that apply
across the EU, the United States and Japan. By default only your own
conversations are stored; messages from strangers, NPCs and system
spam stay out of the database. Retention windows are configurable per
channel, history can be wiped retroactively, and stored data can be
exported on demand.
Retention per channel, retroactive wipe, export to Markdown, JSON or CSV. Setup wizard with four profiles. 25 languages. Its own config and database.
Key privacy and data-handling features:
- Channel whitelist with a Privacy-First default
- Per-channel retention with a daily background sweep
- Retroactive cleanup with a Ctrl+Shift confirm
- Export to Markdown, JSON or CSV
- First-run wizard with three preset profiles (Privacy-First, Casual,
Full History)
- Bilingual UI (English and German) with live language switching
- Independent plugin state — own config file and database directory,
so Hellion Chat does not share state with upstream Chat 2
Based on Chat 2 by Infi and Anna, licensed under EUPL-1.2.
Modding & support: join the Hellion Forge Discord at
https://discord.gg/X9V7Kcv5gR — community for Hellion Chat and
other Hellion Online Media plugins/tools.
repo_url: https://github.com/JonKazama-Hellion/HellionChat
Support: https://discord.gg/X9V7Kcv5gR
repo_url: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat
accepts_feedback: true
icon_url: https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/icon.png
icon_url: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/icon.png
image_urls:
- https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/chatWindow.png
- https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/withSimpleTweaks.png
- https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/chatWindow.png
- https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/settingsOverview.png
- https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/firstRunWizard.png
tags:
- Social
- UI
- Chat
- Replacement
- Privacy
- Social
- UI
- Chat
- Replacement
- Privacy
changelog: |-
**Hellion Chat 1.0.3 — Polish patch**
**v2.0.4 — Housekeeping (2026-08-20)**
- New: optionally hide chat (and every other plugin window) while the
New Game+ menu is open. Toggle in Settings → Window → Frame, default
off. Closing the menu restores all windows.
- New: optionally tint the channel selector button next to the input
field with the currently active channel's colour. Toggle in
Settings → Appearance → Colours, default on. Matches the existing
input-text tint and respects ExtraChat overrides.
- Fix: status, item and other inline hover icons keep their original
aspect ratio. Debuff icons with non-square dimensions are no longer
visually squished into a 32×32 box.
- Diagnostic: hide-state transitions (battle, cutscene, user-hide,
cutscene override) are now logged on Verbose level for easier bug
reports — off by default, enable with `/xllog set HellionChat verbose`.
Nothing changes in how the plugin behaves. Two pieces of tidying that were overdue.
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
- **The installer description was long, and one line of it was wrong.** It ran to 908 characters and opened by naming a category instead of saying what the plugin does. It also claimed 24 interface languages when there are 25, and the two manifests carried different one-line summaries, so the store listing and the plugin details showed different sentences.
- **30 translation keys for the webinterface are gone.** That feature, its HTTP routes and its frontend left the code in May; the strings stayed behind in all 25 languages, along with a generated property for each. Every key was checked against the whole repository before anything was removed.
**Hellion Chat 1.0.1 — Window Position Recovery**
---
- Automatic bounds check on the first draw after plugin load.
When the persisted window position has no overlap with the
primary viewport, the window snaps to a safe top-left default.
Helpful after a monitor disconnect, resolution change or
multi-monitor layout switch between sessions.
- New "Reset Window Position" button in Settings → Window → Frame
as a manual escape hatch for edge cases the automatic check
doesn't catch.
**v2.0.3 — Pop-out context menu, screenshot mode (2026-08-20)**
Tested on Linux/Wayland with a hard-cut three-monitor reduction;
window recovers cleanly without manual JSON editing.
- **The context menu never opened in a pop-out window.** Right-clicking a name or an item there did nothing at all. Every chat surface shares one popup state, and whichever window drew first cleared the menu it had not opened before the pop-out got its turn. The menu now stays with the window the click came from.
- **Screenshot mode could not be turned off.** It is a saved setting, but neither of its two toggles wrote the change to the config file, so switching it off never survived a reload and the mode came back on at every plugin load. Both toggles save now. If it is stuck on for you, one click off is enough.
- **Text the game colours itself could render invisible.** Some of those colours arrive without an alpha byte, and the byte order swap then left them fully transparent.
Housekeeping carried over since v1.0.0:
---
- Documentation restructured into docs/ folder. New CHANGELOG,
CONTRIBUTORS, LEARNING-JOURNEY and ROADMAP added
- Stale ChatTwo/* paths in repo configs updated to HellionChat/*
- Pidgin parser library bumped from 3.3.0 to 3.5.1 (CIString
Unicode fix relevant for non-ASCII channel/tab names)
- GitHub Actions: actions/setup-dotnet bumped 4 → 5,
github/codeql-action bumped 3 → 4
**v2.0.2 — Emotes out, placeholders fixed (2026-08-19)**
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
- **BetterTTV emote support is gone.** Its shared-emote endpoint went behind authentication, and that was where nearly all of them came from — what remained was a 65-entry global set, eleven of which are on the known-broken list, so 54 mostly static images from Twitch's early days. Exactly one was animated, and that one wanted 492 frames and 37 MB of video memory. The plugin now makes no outbound network calls at all. Messages stored with emotes still read fine; they show the code that was typed.
- **Five settings descriptions printed `{0}` instead of the plugin name.** All 25 languages were affected, English included — it just hid better there, since "Hide {0} during cutscenes" still scans as a sentence while German puts the placeholder first. A test now walks every resource string with a placeholder and fails if one reaches a widget unformatted.
- **New preview images.** The ones in the plugin installer were from 8 May and showed the interface as it looked before any of the window rebuilds.
**Hellion Chat 1.0.0 — Standalone Major Release**
---
First fully standalone release. Internal cleanup plus a sweep of
pre-existing correctness, security, threading and resource-leak
fixes carried over from the upstream codebase. No user action
required — auto-update applies cleanly, configuration and database
paths unchanged.
**v2.0.1 — Hotfix (2026-08-19)**
Standalone identity:
A same-day follow-up to 2.0.0 with no user-facing changes. Install it if you picked up 2.0.0 in the first hour; there is nothing new to look at, it just carries a dependency update the 2.0.0 archive was built without.
- Code namespace consolidated from ChatTwo.* to HellionChat.* across
all source files
- IPC channels migrated from ChatTwo.* to HellionChat.* (6 channels:
Register, Available, Unregister, Invoke, GetChatInputState,
ChatInputStateChanged) — third-party plugins that bound to the old
channels need to be updated; none known at release time
- ImGui popup ID renamed to hellionchat-context-popup
- Repository folder restructured (ChatTwo/ → HellionChat/), all CI
and build paths updated accordingly
- Public-facing descriptions reworded from upstream-fork framing to
standalone framing (Chat 2 attribution preserved per EUPL-1.2)
- Colour preset 'ChatTwo Default' is now 'Klassik (Chat 2 Default)'
- MessagePack raised from 3.1.4 to 3.1.7. It handles the payload serialisation behind the message database. The advisories are a recursion-depth limit in `Skip` and a fault in LZ4 decompression, both reachable only through crafted input — this plugin writes and reads its own bytes in a local file, so the practical exposure needs someone who already has write access to it. Lifted anyway, because it costs nothing.
- The release workflow publishes through the Gitea API directly. The 2.0.0 build succeeded and then failed to attach its own archive, which is why that release had to be completed by hand.
Safety:
- Plugin now refuses to load when upstream Chat 2 is also active —
bilingual conflict message in EN/DE, throw before any subsystem
initialization, prevents the runtime crash that previously occurred
when both plugins replaced the same chat window in parallel
- SQLite native binary bumped to 3.50.3 (CVE-2025-6965 memory
corruption from aggregate-term overflow, CVE-2025-7709)
- NuGet restore now honors packages.lock.json so transitive
dependencies don't drift between machines or CI runs
Default tab layout sharpened (one-time tab reset on first start):
The first-run tab layout is reorganized into five thematic tabs
based on external tester feedback. General contains only Say,
Yell and Shout (immediate-surroundings public chat). System
absorbs the gameplay-event streams (NpcDialogue, Loot, Crafting,
Gathering, PF recruitment pings) and announcement noise
(BattleSystem, FreeCompanyAnnouncement, PvpTeamAnnouncement)
that previously lived in General. FreeCompany, Group and
Linkshell each own their channel set. The static Tell tab is
gone — Auto-Tell-Tabs spawns per-conversation tabs on demand.
The Beginner / Novice-Network preset is no longer added by
default but is still available via Settings, Tabs.
This is a one-time tab-layout reset for users on config version
12 or older. Privacy, Retention, Theme and every other setting
is preserved. Your previous tab configuration is written to
pluginConfigs/HellionChat.json.pre-v13-backup so you can restore
it manually if you prefer the old layout.
Crash-class fixes (formerly latent in upstream):
- MathUtil.HasOverlap now uses a correct AABB test; identical or
edge-touching rectangles are no longer reported as non-overlapping
- ChatCode.Equals compares fields directly instead of GetHashCode;
removes the hash-collision anti-pattern
- IpcManager.Dispose uses UnregisterAction to match the matching
RegisterAction call; previous mismatch leaked the action
subscription on every plugin reload
- ExtraChat.Dispose now unsubscribes all three IPC subscriptions
(was only the first); leaks closed
- TellTarget.FromTarget guards against a zero IPlayerCharacter.Address
before dereferencing the unsafe Character* cast
- GameFunctions ResolveTextCommandPlaceholderDetour null-checks the
Hook reference instead of using the null-forgiving operator
- Popout.cs and SettingsTabs/Tabs.cs bounds-check list indexing so
a tab drop or empty-worlds list no longer crashes the UI
- Debugger.cs now declares IDisposable so the existing Dispose runs
Correctness fixes:
- GlobalParametersCache.GetValue captures Cache into a local before
the bounds check, so a concurrent Refresh can't slip a different
array between check and read
- IconUtil binary search bounds initialized to entries.Length-1 and
reset on redirect-restart; entries.Length==0 short-circuits
- Sheets.WorldsOnDatacenter now compares DataCenter.RowId (was
Region.RowId) so it actually returns same-DC worlds
- Message.cs back-reference loop iterates the processed Sender/Content
properties so chunks added by CheckMessageContent get Message set
- Language.zh-Hans Webinterface_Start_Success corrected to
"网页界面已启动" (was "网页界面已停止")
Threading and async:
- AutoTranslate Entries/ValidEntries are now serialized behind a
single lock; the preload worker thread and main thread no longer
race on the underlying dictionary/hash set
- Privacy retention and cleanup workers bound their framework-refresh
waits to 5 seconds with a logged timeout; a hung framework tick can
no longer deadlock the background worker
Resource handling:
- EmoteCache reuses the static HttpClient instead of allocating a new
one per call (closed socket leak)
- FontManager wraps HttpClient/HttpResponseMessage in using-blocks
and adds EnsureSuccessStatusCode; failed downloads no longer
silently produce a zero-byte font file
- SearchSelector mixes the row index into the ImGui ID stack so
selectables don't collapse to a single ambiguous ID
- SettingsTabs/Chat blocked-emote add-button now opens its selector
popup on left-click
Performance:
- DbViewer text export caches filteredHistory.Count once instead of
re-enumerating the IEnumerable on every batch (O(N) instead of
O(N²) on large histories)
License attribution (NOTICE.md, COPYRIGHT, THIRD_PARTY_NOTICES.md
and the Credits section in README) is unchanged.
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
**Hellion Chat 0.6.1 — Pop-Out Discoverability & /tell Auto-Pop-Out**
- Pop-out button now visible in the chat header (no more hunting
through the right-click menu)
- One-time hint banner explains pop-out tabs and the right-click
shortcut
- New setting: open new /tell tabs directly as pop-out windows
(Settings → Chat → Auto-Tell-Tabs)
- Pop-out input is now enabled by default — closing a pop-out still
returns the tab to the sidebar
- Bugfix: dropping or logging out with an LRU/popped auto-tell tab
now also closes its pop-out window (no more ghost windows)
- Bugfix: dead zone below the chat input bar when the v0.6.0 pop-out
hint banner was visible (also fixed retroactively for the v0.6.0
banner inside pop-outs)
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
---
Earlier history: https://github.com/JonKazama-Hellion/HellionChat/releases
Earlier history: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases
@@ -0,0 +1,208 @@
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Plugin;
using HellionChat.Integrations;
using HellionChat.Ipc;
using HellionChat.Themes;
using HellionChat.Ui;
using HellionChat.Ui.Components;
using HellionChat.Ui.Windows;
using Microsoft.Extensions.Hosting;
namespace HellionChat.Infrastructure.Hosting;
// Adapter shells around IHostedService so the host triggers each service's
// existing init method without touching the service class itself. Empty
// adapters still earn their place: registering them forces an eager resolve
// at Build, which runs the service ctor (IPC subscribe etc.) right then
// instead of lazily on first GetRequiredService.
internal sealed class ThemeRegistryInitHostedService(
ThemeRegistry registry,
FontManager fontManager
) : IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
// Materialise the lazy AllCustom enumerable so the slug lookup hits a
// warm cache; otherwise the first Switch falls through to the built-in
// default when Config.Theme points at a custom slug.
foreach (var _ in registry.AllCustom()) { }
registry.SwitchSilent(Plugin.Config.Theme);
// Point font sizes at the active theme's typography, wire future
// theme switches to the atlas rebuild, and apply the boot theme's override.
fontManager.SetTypographySource(() => registry.Active.Typography);
registry.SetActiveChangedCallback(() => fontManager.RebuildDelegateFontsIfChanged());
await Plugin.Framework.RunOnFrameworkThread(() =>
fontManager.RebuildDelegateFontsIfChanged()
);
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
// IPC subscribers do their wiring in the ctor, so StartAsync stays empty —
// the registration alone forces an eager resolve which runs that wiring.
internal sealed class IpcManagerInitHostedService(IpcManager ipc) : IHostedService
{
private readonly IpcManager _ipc = ipc;
public Task StartAsync(CancellationToken cancellationToken) => Task.CompletedTask;
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
internal sealed class TypingIpcInitHostedService(TypingIpc typingIpc) : IHostedService
{
private readonly TypingIpc _typingIpc = typingIpc;
public Task StartAsync(CancellationToken cancellationToken) => Task.CompletedTask;
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
internal sealed class ExtraChatInitHostedService(ExtraChat extraChat) : IHostedService
{
private readonly ExtraChat _extraChat = extraChat;
public Task StartAsync(CancellationToken cancellationToken) => Task.CompletedTask;
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
internal sealed class MessageManagerInitHostedService(
IDalamudPluginInterface pluginInterface,
MessageManager manager
) : IHostedService
{
public Task StartAsync(CancellationToken cancellationToken)
{
// FilterAllTabsAsync rebuilds the per-tab view from the message store;
// on Boot, tabs come up empty and the first chat events fill them, so
// we skip the rebuild to avoid a pointless full-history scan.
if (pluginInterface.Reason is not PluginLoadReason.Boot)
manager.FilterAllTabsAsync();
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
internal sealed class AutoTellTabsServiceInitHostedService(AutoTellTabsService service)
: IHostedService
{
public Task StartAsync(CancellationToken cancellationToken)
{
service.Initialize();
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
internal sealed class TellRouterServiceInitHostedService(Services.TellRouterService service)
: IHostedService
{
public Task StartAsync(CancellationToken cancellationToken)
{
service.Initialize();
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
// Eager-resolve trigger: resolving FailedTellNotifier in this adapter's ctor
// enables its game hook during host startup. StartAsync itself is a no-op.
internal sealed class FailedTellNotifierInitHostedService(FailedTellNotifier notifier)
: IHostedService
{
// No-op adapter: the ctor dependency above is the actual eager-resolve
// trigger. Field kept to match the IpcManager/TypingIpc/ExtraChat no-op
// adapters and to avoid the CS9113 unread-parameter warning.
private readonly FailedTellNotifier _notifier = notifier;
public Task StartAsync(CancellationToken cancellationToken) => Task.CompletedTask;
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
internal sealed class PayloadHandlerInitHostedService(
PayloadHandler payloadHandler,
MessageList messageList
) : IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
// Cycle resolution: both singletons exist by the time HostedServices
// run, so this is the first safe point to wire the setter.
messageList.AttachPayloadHandler(payloadHandler);
// IAddonLifecycle thread-affinity is not explicitly documented; wrap is
// defensive insurance — mirrors the window-registration RunOnFrameworkThread
// pattern established in PluginLifecycle.cs.
await Plugin.Framework.RunOnFrameworkThread(() =>
{
Plugin.AddonLifecycle.RegisterListener(
AddonEvent.PostUpdate,
"ItemDetail",
payloadHandler.MoveTooltip
);
Plugin.AddonLifecycle.RegisterListener(
AddonEvent.PostUpdate,
"ActionDetail",
payloadHandler.MoveTooltip
);
});
}
public async Task StopAsync(CancellationToken cancellationToken)
{
await Plugin.Framework.RunOnFrameworkThread(() =>
{
// Single call using the params-overload removes the delegate from all addons it was registered for (ItemDetail + ActionDetail both cleaned in one shot).
Plugin.AddonLifecycle.UnregisterListener(payloadHandler.MoveTooltip);
});
}
}
// Wires MainWindow into CommandHelpWindow post-container-build. CommandHelpWindow
// cannot take MainWindow as a ctor-param because that would close the cycle
// InputBar -> CommandHelpWindow -> MainWindow -> InputBar (MS.DI does not catch
// it through FactoryCallSite registrations and the resolve recurses silently).
// Both singletons exist by host.StartAsync time, so this is the first safe point
// to wire the setter — same setter-injection pattern as MessageList.AttachPayloadHandler.
internal sealed class CommandHelpWindowInitHostedService(
CommandHelpWindow commandHelpWindow,
MainWindow mainWindow
) : IHostedService
{
public Task StartAsync(CancellationToken cancellationToken)
{
commandHelpWindow.AttachMainWindow(mainWindow);
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
// Attaches the singleton PayloadHandler to every pre-allocated pop-out
// window's MessageList post-container-build. Pool/window cannot take the
// PayloadHandler via ctor (that would close the silent FactoryCallSite cycle —
// same setter-injection reason as MessageList.AttachPayloadHandler / CommandHelpWindow.
// AttachMainWindow). Both singletons exist by host.StartAsync time.
internal sealed class ChannelPopoutInitHostedService(
ChannelPopoutPool pool,
PayloadHandler payloadHandler
) : IHostedService
{
public Task StartAsync(CancellationToken cancellationToken)
{
foreach (var window in pool.Instances)
window.AttachPayloadHandler(payloadHandler);
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
@@ -0,0 +1,64 @@
using System.Text;
using Dalamud.Plugin.Services;
using Microsoft.Extensions.Logging;
namespace HellionChat.Infrastructure.Logging;
internal sealed class DalamudLogger : ILogger
{
private readonly string _name;
private readonly IPluginLog _pluginLog;
public DalamudLogger(string name, IPluginLog pluginLog)
{
_name = name;
_pluginLog = pluginLog;
}
IDisposable? ILogger.BeginScope<TState>(TState state) => default!;
// Filtering happens in Dalamud's /xllog. Letting every level through keeps
// the HellionChat side stateless; if we ever want a per-plugin floor we add
// a Config.LogLevel and tighten this method.
public bool IsEnabled(LogLevel logLevel) => true;
public void Log<TState>(
LogLevel logLevel,
EventId eventId,
TState state,
Exception? exception,
Func<TState, Exception?, string> formatter
)
{
if (!IsEnabled(logLevel))
return;
// U+200B between the bracket and the level is a quiet provenance
// marker; byte-distinguishable from any 1:1 port of this format.
if ((int)logLevel <= (int)LogLevel.Information)
{
_pluginLog.Information($"[{_name}]​{{{(int)logLevel}}} {state}");
return;
}
var sb = new StringBuilder();
sb.Append($"[{_name}]​{{{(int)logLevel}}} {state} {exception?.Message}");
if (!string.IsNullOrWhiteSpace(exception?.StackTrace))
sb.AppendLine(exception.StackTrace);
var inner = exception?.InnerException;
while (inner != null)
{
sb.AppendLine($"InnerException {inner}: {inner.Message}");
sb.AppendLine(inner.StackTrace);
inner = inner.InnerException;
}
if (logLevel == LogLevel.Warning)
_pluginLog.Warning(sb.ToString());
else if (logLevel == LogLevel.Error)
_pluginLog.Error(sb.ToString());
else
_pluginLog.Fatal(sb.ToString());
}
}
@@ -0,0 +1,84 @@
using System.Collections.Concurrent;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using Dalamud.Plugin.Services;
using HellionChat.Branding;
using Microsoft.Extensions.Logging;
namespace HellionChat.Infrastructure.Logging;
[ProviderAlias("Dalamud")]
public sealed class DalamudLoggingProvider : ILoggerProvider
{
// Hellion Forge Bronze (#C2410C). Mixed into the bootstrap fingerprint.
private const string HellionMarker = "HellionForgeBronzeC2410C";
private readonly ConcurrentDictionary<string, DalamudLogger> _loggers = new(
StringComparer.OrdinalIgnoreCase
);
private readonly IPluginLog _pluginLog;
public DalamudLoggingProvider(IPluginLog pluginLog)
{
_pluginLog = pluginLog;
EmitBootstrapBanner();
}
// One-shot per plugin load. Intentionally visible in xllog so uncredited
// ports of the DalamudLogger trio keep announcing their origin — the
// mini fox silhouette goes first, then the textual provenance line.
private void EmitBootstrapBanner()
{
var version =
typeof(DalamudLoggingProvider).Assembly.GetName().Version?.ToString() ?? "0.0.0";
var fingerprint = ComputeFingerprint(version);
foreach (var line in HellionForgeAscii.FoxMini.Split('\n'))
{
var trimmed = line.TrimEnd('\r');
if (trimmed.Length > 0)
_pluginLog.Information(trimmed);
}
_pluginLog.Information("by Julia Moon - Hellion Forge");
_pluginLog.Information(
$"HellionChat DI-Logger bootstrap v{version} fingerprint={fingerprint}"
);
}
private static string ComputeFingerprint(string version)
{
var seed = Encoding.UTF8.GetBytes($"{HellionMarker}-{version}");
var hash = SHA256.HashData(seed);
var sb = new StringBuilder(8);
for (var i = 0; i < 4; i++)
sb.Append(hash[i].ToString("x2"));
return sb.ToString();
}
public ILogger CreateLogger(string categoryName)
{
// Category-name normalisation mirrors Lightless: take the leaf type
// name, then either ellipsis-trim long ones or left-pad short ones to
// 15 chars so the xllog column stays aligned across services.
var catName = categoryName.Split(".", StringSplitOptions.RemoveEmptyEntries).Last();
if (catName.Length > 15)
catName = string.Concat(
catName.AsSpan(0, 6),
"...",
catName.AsSpan(catName.Length - 6, 6)
);
else
catName = catName.PadLeft(15);
return _loggers.GetOrAdd(catName, name => new DalamudLogger(name, _pluginLog));
}
public void Dispose()
{
_loggers.Clear();
GC.SuppressFinalize(this);
}
}
@@ -0,0 +1,23 @@
using Dalamud.Plugin.Services;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
namespace HellionChat.Infrastructure.Logging;
public static class DalamudLoggingProviderExtensions
{
public static ILoggingBuilder AddDalamudLogging(
this ILoggingBuilder builder,
IPluginLog pluginLog
)
{
builder.ClearProviders();
builder.Services.TryAddEnumerable(
ServiceDescriptor.Singleton<ILoggerProvider, DalamudLoggingProvider>(
_ => new DalamudLoggingProvider(pluginLog)
)
);
return builder;
}
}
+12 -10
View File
@@ -2,14 +2,9 @@ using System.Collections.Generic;
namespace HellionChat;
// Hellion Chat — v0.6.0 shared input history. Replaces the embedded
// ChatLogWindow.InputBacklog so that pop-out windows with their own
// ChatInputBar can navigate the same Up/Down history as the main window.
// Index semantics are kept identical to the v0.5.x InputBacklog:
// index 0 = oldest entry
// index Count - 1 = newest entry
// Push performs move-to-newest deduplication: existing entries are
// removed before the new one is appended at the end.
// Shared input history for all ChatInputBars (main and pop-out windows).
// Push deduplicates: existing entries are moved to the end when re-added.
// TEST-MIRROR: ../../Hellion Build test/Util/InputHistoryServiceTests.cs
public static class InputHistoryService
{
private const int MaxSize = 30;
@@ -26,8 +21,7 @@ public static class InputHistoryService
var trimmed = entry.Trim();
// Move-to-newest: existing entries are removed before the append
// so the same line typed twice does not occupy two history slots.
// Move-to-newest: remove existing entry before adding at the end
for (var i = 0; i < _entries.Count; i++)
{
if (_entries[i] == trimmed)
@@ -48,4 +42,12 @@ public static class InputHistoryService
return null;
return _entries[cursor];
}
// Plugin reload doesn't reset static state automatically. Plugin.DisposeAsync
// calls this so the next load starts with an empty history instead of
// inheriting the previous session's entries.
public static void Reset()
{
_entries.Clear();
}
}
@@ -0,0 +1,150 @@
using System;
using System.IO;
using Microsoft.Extensions.Logging;
using NAudio.Wave;
namespace HellionChat.Integrations;
// Plays the three bundled WAV notification sounds via NAudio WaveOutEvent.
// WaveOutEvent/WinMM is the correct backend for FFXIV on Wine: it works
// without Media Foundation (which Wine does not support for MP3/AAC).
//
// Playback volume comes from Configuration.CustomSoundVolume via the Play
// parameter, clamped to [0,1]. The 16 game sounds are unaffected — they go
// through UIGlobals.PlaySoundEffect, which the plugin cannot scale.
internal sealed class CustomAudioPlayer : IDisposable
{
// Sound bytes are read once at construction so each Play() wraps a fresh
// MemoryStream rather than re-reading the manifest stream (which becomes
// unreadable after the first read and would require Seek support).
private readonly byte[][] _soundData;
private readonly ILogger<CustomAudioPlayer> _logger;
private WaveOutEvent? _outputDevice;
private WaveFileReader? _reader;
private readonly object _lock = new();
public CustomAudioPlayer(ILogger<CustomAudioPlayer> logger)
{
_logger = logger;
_soundData = new byte[3][];
for (var i = 0; i < 3; i++)
{
var resourceName = $"HellionChat.Sounds.notification-{i + 1}.wav";
using var stream = typeof(CustomAudioPlayer).Assembly.GetManifestResourceStream(
resourceName
);
if (stream is null)
{
_logger.LogWarning(
"Embedded sound resource not found: {Resource}. "
+ "Custom sound {Index} will be silent.",
resourceName,
i + 1
);
_soundData[i] = Array.Empty<byte>();
continue;
}
using var ms = new MemoryStream();
stream.CopyTo(ms);
_soundData[i] = ms.ToArray();
}
}
// customIndex is 1, 2, or 3, matching the sound file suffix.
// Stops any currently playing sound before starting the new one.
// NAudio playback runs on its own thread; this method returns immediately.
public void Play(int customIndex, float volume)
{
if (customIndex < 1 || customIndex > 3)
{
_logger.LogWarning(
"CustomAudioPlayer.Play called with out-of-range index {Index}",
customIndex
);
return;
}
var data = _soundData[customIndex - 1];
if (data.Length == 0)
{
_logger.LogWarning(
"Sound data for index {Index} is empty; skipping playback",
customIndex
);
return;
}
lock (_lock)
{
try
{
StopCurrent();
var ms = new MemoryStream(data, writable: false);
_reader = new WaveFileReader(ms);
_outputDevice = new WaveOutEvent();
// Init opens the device and creates the WinMM handle. Volume
// must be set after Init, otherwise waveOutSetVolume fails with
// InvalidHandle.
_outputDevice.Init(_reader);
// AUDIO-1: volume comes from Configuration.CustomSoundVolume.
// Clamp here too — a hand-edited config could carry an
// out-of-range value, and WaveOutEvent.Volume rejects those.
_outputDevice.Volume = Math.Clamp(volume, 0f, 1f);
_outputDevice.Play();
}
catch (Exception ex)
{
_logger.LogWarning(
ex,
"Failed to play custom notification sound {Index}",
customIndex
);
StopCurrent();
}
}
}
// Stops and tears down the active WaveOutEvent + WaveFileReader without
// throwing. Called on Play (to interrupt previous sound) and from Dispose.
// Guards Stop() with a PlaybackState check because waveOutReset blocks even
// when playback already finished; under Wine this can stall the WinMM
// callback thread if many sounds arrive in quick succession.
private void StopCurrent()
{
try
{
if (_outputDevice?.PlaybackState == PlaybackState.Playing)
_outputDevice.Stop();
_outputDevice?.Dispose();
_outputDevice = null;
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Exception while stopping current WaveOutEvent");
}
try
{
_reader?.Dispose();
_reader = null;
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Exception while disposing WaveFileReader");
}
}
// At plugin unload the PendingMessageThread is already cancelled and the
// draw loop is gone, so _lock is uncontended here. Calling StopCurrent
// outside the lock avoids holding it across the blocking waveOutReset /
// WaveOutEvent.Dispose, which can freeze on Wine during unload.
public void Dispose()
{
StopCurrent();
}
}
@@ -0,0 +1,74 @@
using System;
using Dalamud.Hooking;
using Dalamud.Interface.ImGuiNotification;
using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using HellionChat._Helpers;
using HellionChat.Resources;
using HellionChat.Util;
using Microsoft.Extensions.Logging;
namespace HellionChat.Integrations;
// A minimal, failed-tell-specific game hook. A locale-robust "tell failed"
// signal is not reachable over the processed message stream (Message carries
// no LogMessage row id, ChatCode 60 is too broad). This hooks the one
// ShowLogMessageString overload and toasts on a pinned id set. It is NOT the
// broad ad-block hook layer.
internal sealed class FailedTellNotifier : IDisposable
{
private readonly ILogger<FailedTellNotifier> _logger;
private readonly Hook<RaptureLogModule.Delegates.ShowLogMessageString>? _hook;
public unsafe FailedTellNotifier(ILogger<FailedTellNotifier> logger)
{
_logger = logger;
// Creating/enabling a hook is safe off the framework thread (the
// ctor runs during host startup on the framework thread,
// eager-resolved via FailedTellNotifierInitHostedService).
_hook =
Plugin.GameInteropProvider.HookFromAddress<RaptureLogModule.Delegates.ShowLogMessageString>(
RaptureLogModule.MemberFunctionPointers.ShowLogMessageString,
ShowLogMessageStringDetour
);
_hook.Enable();
}
private unsafe void ShowLogMessageStringDetour(
RaptureLogModule* module,
uint logMessageId,
Utf8String* value
)
{
try
{
if (
FailedTellMatcher.ShouldNotify(
logMessageId,
Plugin.Config.NotifyFailedTell,
FailedTellMatcher.FailedTellLogMessageIds
)
)
{
var recipient = value is null ? string.Empty : value->ToString();
var content = string.IsNullOrEmpty(recipient)
? HellionStrings.FailedTell_Notification_Generic
: string.Format(HellionStrings.FailedTell_Notification_Named, recipient);
WrapperUtil.AddNotification(content, NotificationType.Warning);
}
}
catch (Exception ex)
{
_logger.LogError(ex, "FailedTellNotifier detour threw");
}
_hook!.Original(module, logMessageId, value);
}
public void Dispose()
{
_hook?.Disable();
_hook?.Dispose();
}
}
@@ -0,0 +1,217 @@
using System;
using Dalamud.Plugin;
using Dalamud.Plugin.Ipc;
using Dalamud.Plugin.Services;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
namespace HellionChat.Integrations;
// Newtonsoft.Json is used here for IPC compatibility with Honorific, which
// serialises TitleData with it. It's a transitive Dalamud dependency — no
// new NuGet entry needed. The rest of HellionChat uses System.Text.Json.
internal sealed class HonorificService : IDisposable
{
private const string IpcNamespace = "Honorific";
// Major version of the Honorific IPC contract we're built against.
internal const uint ExpectedApiMajor = 3;
// IPC gates — kept as fields so Dispose can unsubscribe the same instances.
private readonly ICallGateSubscriber<(uint, uint)> _apiVersion;
private readonly ICallGateSubscriber<string> _getLocalCharacterTitle;
private readonly ICallGateSubscriber<string, object> _localCharacterTitleChanged;
private readonly ICallGateSubscriber<object> _ready;
private readonly ICallGateSubscriber<object> _disposing;
private readonly ILogger<HonorificService> _logger;
private readonly IFramework _framework;
private bool _versionWarningLogged;
// Thread: framework only — IPC delivery + ImGui render both run there.
public HonorificTitleData? CurrentTitle { get; private set; }
public bool IsAvailable { get; private set; }
public (uint Major, uint Minor)? DetectedApiVersion { get; private set; }
public HonorificService(
IDalamudPluginInterface pluginInterface,
ILogger<HonorificService> logger,
IFramework framework
)
{
_framework = framework;
_logger = logger;
// Gate objects are cached per-name by Dalamud and safe to register
// before Honorific loads — they just won't fire until it does.
// Initial pull is scheduled on the framework thread because plugin
// constructors run on the loader thread, and Honorific's IPC handlers
// read ObjectTable.LocalPlayer which throws off the framework thread.
_apiVersion = pluginInterface.GetIpcSubscriber<(uint, uint)>($"{IpcNamespace}.ApiVersion");
_getLocalCharacterTitle = pluginInterface.GetIpcSubscriber<string>(
$"{IpcNamespace}.GetLocalCharacterTitle"
);
_localCharacterTitleChanged = pluginInterface.GetIpcSubscriber<string, object>(
$"{IpcNamespace}.LocalCharacterTitleChanged"
);
_ready = pluginInterface.GetIpcSubscriber<object>($"{IpcNamespace}.Ready");
_disposing = pluginInterface.GetIpcSubscriber<object>($"{IpcNamespace}.Disposing");
_localCharacterTitleChanged.Subscribe(OnTitleChanged);
_ready.Subscribe(OnReady);
_disposing.Subscribe(OnDisposing);
_framework.RunOnFrameworkThread(TryInitialPull);
}
public void Dispose()
{
// Wrap each unsubscribe — a missing gate must not block the others.
// Leaking a subscription keeps this service alive across plugin reloads.
TryUnsubscribe(() => _localCharacterTitleChanged.Unsubscribe(OnTitleChanged));
TryUnsubscribe(() => _ready.Unsubscribe(OnReady));
TryUnsubscribe(() => _disposing.Unsubscribe(OnDisposing));
}
// Thread: framework (scheduled from ctor and OnReady).
private void TryInitialPull()
{
try
{
var version = _apiVersion.InvokeFunc();
DetectedApiVersion = version;
if (!IsApiVersionCompatible(version))
{
if (!_versionWarningLogged)
{
_logger.LogWarning(
"Honorific API version mismatch — expected major 3, "
+ "found {Major}.{Minor}. Disabling Honorific integration.",
version.Item1,
version.Item2
);
_versionWarningLogged = true;
}
IsAvailable = false;
return;
}
IsAvailable = true;
_versionWarningLogged = false;
var json = _getLocalCharacterTitle.InvokeFunc();
CurrentTitle = ParseTitleJson(json);
}
catch (Exception ex)
{
// Honorific not installed or not yet initialised — Ready will retry.
_logger.LogDebug(ex, "Honorific not available at HellionChat startup; awaiting Ready.");
IsAvailable = false;
CurrentTitle = null;
}
}
// Thread: framework (Dalamud IPC delivery contract).
private void OnTitleChanged(string json)
{
// Skip updates on version mismatch; subscription stays live for reload.
if (!IsAvailable)
return;
CurrentTitle = ParseTitleJson(json);
}
// Thread: any (Honorific dispatches NotifyReady from its own thread).
private void OnReady()
{
_framework.RunOnFrameworkThread(TryInitialPull);
}
// Thread: framework (IPC delivery contract); idempotent — Disposing fires once.
private void OnDisposing()
{
// Honorific unloading — clear cached state so the header hides next frame.
// Subscriptions stay registered in case Honorific reloads.
// CurrentTitle is already nulled by OnTitleChanged before this fires,
// re-clearing here is belt-and-braces.
CurrentTitle = null;
IsAvailable = false;
DetectedApiVersion = null;
}
// Thread: framework (called from Dispose, which runs on the framework
// cleanup block in Plugin.DisposeAsync).
private void TryUnsubscribe(Action unsubscribe)
{
try
{
unsubscribe();
}
catch (Exception ex)
{
// Warning not Debug — a silent unsubscribe failure leaks a live
// subscription across plugin reloads.
_logger.LogWarning(
ex,
"Honorific unsubscribe failed (likely API break or gate already gone)."
);
}
}
internal static HonorificTitleData? ParseTitleJson(string json)
{
if (string.IsNullOrEmpty(json))
return null;
try
{
return JsonConvert.DeserializeObject<HonorificTitleData>(json);
}
catch (JsonException)
{
return null;
}
}
internal static bool IsApiVersionCompatible((uint Major, uint Minor) apiVersion)
{
return apiVersion.Major == ExpectedApiMajor;
}
internal static bool ShouldRenderSlot(
bool toggleEnabled,
bool isAvailable,
HonorificTitleData? title
)
{
if (!toggleEnabled)
return false;
if (!isAvailable)
return false;
if (title is null)
return false;
if (title.IsOriginal)
return false;
if (string.IsNullOrEmpty(title.Title))
return false;
return true;
}
// Test seam: the three status fields are private-set and IPC-driven, which a
// headless /xlperf run can't reach (Honorific is usually absent in tests).
// Callers MUST snapshot the prior values and restore them in CleanUp, and
// MUST drive Set -> Draw -> Assert within ONE synchronous RunStep (never
// Waiting between Set and Assert) — a between-frame OnReady/OnTitleChanged
// would otherwise clobber this state and a CleanUp restore can't un-corrupt a
// mid-flight assertion. (A FontsReady precondition gate returning Waiting
// BEFORE the snapshot/Set is fine — nothing is mutated yet.)
internal void TestOnly_SetState(
bool isAvailable,
(uint Major, uint Minor)? detectedApiVersion,
HonorificTitleData? title
)
{
IsAvailable = isAvailable;
DetectedApiVersion = detectedApiVersion;
CurrentTitle = title;
}
}
@@ -0,0 +1,29 @@
namespace HellionChat.Integrations;
internal enum HonorificStatusKind
{
NotInstalled,
Incompatible,
Detected,
}
internal static class HonorificStatus
{
// Mirrors the 1.5.6 three-state discriminator (1d3b429:About.cs:171/183/196):
// it keys on IsAvailable + the *nullability* of DetectedApiVersion, never a
// recomputed major check. IsAvailable already encodes the compatibility
// result HonorificService set during the initial pull. Null-safe: an
// (isAvailable=true, detectedApiVersion=null) state a test seam can produce
// resolves to NotInstalled rather than dereferencing null.
internal static HonorificStatusKind Resolve(
bool isAvailable,
(uint Major, uint Minor)? detectedApiVersion
)
{
if (isAvailable && detectedApiVersion is not null)
return HonorificStatusKind.Detected;
if (detectedApiVersion is not null)
return HonorificStatusKind.Incompatible;
return HonorificStatusKind.NotInstalled;
}
}
@@ -0,0 +1,21 @@
using System.Numerics;
namespace HellionChat.Integrations;
// Local DTO mirroring Honorific's TitleData — no hard reference to Honorific.dll
// so HellionChat loads cleanly when Honorific is absent.
//
// Color is rendered in the header title slot (HonorificHeader). Glow, Color3,
// GradientColourSet and GradientAnimationStyle are parsed but not rendered —
// the animated gradient lives inside Honorific and is not exposed over IPC.
// The fields stay in the DTO so the JSON roundtrip remains lossless.
internal sealed record HonorificTitleData(
string? Title,
bool IsPrefix,
bool IsOriginal,
Vector3? Color,
Vector3? Glow,
Vector3? Color3,
int? GradientColourSet,
string? GradientAnimationStyle
);
@@ -0,0 +1,20 @@
using System.Runtime.CompilerServices;
using HellionChat.Util;
namespace HellionChat.Integrations;
// Third-party plugin URLs — separate from BrandingLinks (Hellion-owned URLs).
internal static class IntegrationLinks
{
public const string HonorificRepo = "https://github.com/Caraxi/Honorific";
public const string HonorificAuthor = "https://github.com/Caraxi";
// See BrandingLinks.ValidateUrls for the CA2255 rationale.
#pragma warning disable CA2255
[ModuleInitializer]
#pragma warning restore CA2255
internal static void ValidateUrls()
{
UrlValidation.ValidateAll(nameof(IntegrationLinks), HonorificRepo, HonorificAuthor);
}
}
+38 -25
View File
@@ -1,9 +1,12 @@
using Dalamud.Plugin.Ipc;
using Microsoft.Extensions.Logging;
namespace HellionChat.Ipc;
public sealed class ExtraChat : IDisposable
{
private readonly ILogger<ExtraChat> _logger;
#pragma warning disable CS0649 // Assigned through IPC
[Serializable]
private struct OverrideInfo
@@ -15,34 +18,55 @@ public sealed class ExtraChat : IDisposable
#pragma warning restore CS0649
private ICallGateSubscriber<OverrideInfo, object> OverrideChannelGate { get; }
private ICallGateSubscriber<Dictionary<string, uint>, Dictionary<string, uint>> ChannelCommandColoursGate { get; }
private ICallGateSubscriber<Dictionary<Guid, string>, Dictionary<Guid, string>> ChannelNamesGate { get; }
private ICallGateSubscriber<
Dictionary<string, uint>,
Dictionary<string, uint>
> ChannelCommandColoursGate { get; }
private ICallGateSubscriber<
Dictionary<Guid, string>,
Dictionary<Guid, string>
> ChannelNamesGate { get; }
internal (string, uint)? ChannelOverride { get; set; }
private Dictionary<string, uint> ChannelCommandColoursInternal { get; set; } = new();
internal IReadOnlyDictionary<string, uint> ChannelCommandColours => ChannelCommandColoursInternal;
// volatile: IPC callbacks fire on a Dalamud thread while ImGui reads these.
// Reference assignment is atomic on x64, but the barrier ensures visibility
// across threads (especially Mono/Wine). Raised in the 2026-05-05 audit.
private volatile Dictionary<string, uint> ChannelCommandColoursInternal = new();
internal IReadOnlyDictionary<string, uint> ChannelCommandColours =>
ChannelCommandColoursInternal;
private Dictionary<Guid, string> ChannelNamesInternal { get; set; } = new();
private volatile Dictionary<Guid, string> ChannelNamesInternal = new();
internal IReadOnlyDictionary<Guid, string> ChannelNames => ChannelNamesInternal;
internal ExtraChat()
internal ExtraChat(ILogger<ExtraChat> logger)
{
OverrideChannelGate = Plugin.Interface.GetIpcSubscriber<OverrideInfo, object>("ExtraChat.OverrideChannelColour");
ChannelCommandColoursGate = Plugin.Interface.GetIpcSubscriber<Dictionary<string, uint>, Dictionary<string, uint>>("ExtraChat.ChannelCommandColours");
ChannelNamesGate = Plugin.Interface.GetIpcSubscriber<Dictionary<Guid, string>, Dictionary<Guid, string>>("ExtraChat.ChannelNames");
_logger = logger;
OverrideChannelGate = Plugin.Interface.GetIpcSubscriber<OverrideInfo, object>(
"ExtraChat.OverrideChannelColour"
);
ChannelCommandColoursGate = Plugin.Interface.GetIpcSubscriber<
Dictionary<string, uint>,
Dictionary<string, uint>
>("ExtraChat.ChannelCommandColours");
ChannelNamesGate = Plugin.Interface.GetIpcSubscriber<
Dictionary<Guid, string>,
Dictionary<Guid, string>
>("ExtraChat.ChannelNames");
OverrideChannelGate.Subscribe(OnOverrideChannel);
ChannelCommandColoursGate.Subscribe(OnChannelCommandColours);
ChannelNamesGate.Subscribe(OnChannelNames);
try
{
ChannelCommandColoursInternal = ChannelCommandColoursGate.InvokeFunc(null!);
ChannelNamesInternal = ChannelNamesGate.InvokeFunc(null!);
}
catch (Exception)
catch (Exception ex)
{
// no-op
// ExtraChat is optional; IPC failure is normal when the plugin isn't loaded.
_logger.LogTrace(ex, "ExtraChat IPC initial state query failed (peer not loaded?)");
}
}
@@ -55,22 +79,11 @@ public sealed class ExtraChat : IDisposable
private void OnOverrideChannel(OverrideInfo info)
{
if (info.Channel == null)
{
ChannelOverride = null;
return;
}
ChannelOverride = (info.Channel, info.Rgba);
ChannelOverride = info.Channel == null ? null : (info.Channel, info.Rgba);
}
private void OnChannelCommandColours(Dictionary<string, uint> obj)
{
private void OnChannelCommandColours(Dictionary<string, uint> obj) =>
ChannelCommandColoursInternal = obj;
}
private void OnChannelNames(Dictionary<Guid, string> obj)
{
ChannelNamesInternal = obj;
}
private void OnChannelNames(Dictionary<Guid, string> obj) => ChannelNamesInternal = obj;
}
+68 -16
View File
@@ -1,9 +1,17 @@
using HellionChat.Code;
using Dalamud.Plugin.Ipc;
using HellionChat.Code;
using Microsoft.Extensions.Logging;
namespace HellionChat.Ipc;
using ChatInputState = (bool InputVisible, bool InputFocused, bool HasText, bool IsTyping, int TextLength, ChatType ChannelType);
using ChatInputState = (
bool InputVisible,
bool InputFocused,
bool HasText,
bool IsTyping,
int TextLength,
ChatType ChannelType
);
internal sealed class TypingIpc : IDisposable
{
@@ -12,37 +20,78 @@ internal sealed class TypingIpc : IDisposable
private ICallGateProvider<ChatInputState> StateQueryGate { get; }
private ICallGateProvider<ChatInputState, object?> StateChangedGate { get; }
// v1.4.9: ChatTwo IPC compatibility mirror. Some third-party plugins
// have a no-fork policy and subscribe only to ChatTwo.*-prefixed IPC
// gates. HellionChat replaces ChatTwo (conflict detection prevents
// parallel loading), so mirroring the ChatTwo provider slots lets those
// plugins keep working without code changes on their side. The tuple
// shape is textually identical to ChatTwo's IPC surface (same member
// order, same underlying types — ChatType is `ushort` in both repos)
// so Dalamud's IPC marshalling matches across plugin boundaries.
private ICallGateProvider<ChatInputState> ChatTwoStateQueryGate { get; }
private ICallGateProvider<ChatInputState, object?> ChatTwoStateChangedGate { get; }
private ChatInputState LastState;
private bool HasState;
internal TypingIpc(Plugin plugin)
private readonly Ui.Components.InputBar _inputBar;
private readonly ILogger<TypingIpc> _logger;
internal TypingIpc(Plugin plugin, Ui.Components.InputBar inputBar, ILogger<TypingIpc> logger)
{
Plugin = plugin;
_inputBar = inputBar;
_logger = logger;
StateQueryGate = Plugin.Interface.GetIpcProvider<ChatInputState>("HellionChat.GetChatInputState");
StateChangedGate = Plugin.Interface.GetIpcProvider<ChatInputState, object?>("HellionChat.ChatInputStateChanged");
StateQueryGate = Plugin.Interface.GetIpcProvider<ChatInputState>(
"HellionChat.GetChatInputState"
);
StateChangedGate = Plugin.Interface.GetIpcProvider<ChatInputState, object?>(
"HellionChat.ChatInputStateChanged"
);
// v1.4.9: ChatTwo-prefixed compatibility slots (see class-level comment).
ChatTwoStateQueryGate = Plugin.Interface.GetIpcProvider<ChatInputState>(
"ChatTwo.GetChatInputState"
);
ChatTwoStateChangedGate = Plugin.Interface.GetIpcProvider<ChatInputState, object?>(
"ChatTwo.ChatInputStateChanged"
);
StateQueryGate.RegisterFunc(GetState);
ChatTwoStateQueryGate.RegisterFunc(GetState);
}
private ChatInputState BuildState()
{
var log = Plugin.ChatLogWindow;
var usedChannel = Plugin.CurrentTab.CurrentChannel;
var inputChannel = usedChannel.UseTempChannel ? usedChannel.TempChannel : usedChannel.Channel;
var inputChannel = usedChannel.UseTempChannel
? usedChannel.TempChannel
: usedChannel.Channel;
var channelType = inputChannel.ToChatType();
return (InputVisible: !log.IsHidden,
log.InputFocused,
HasText: log.Chat.Length > 0,
IsTyping: log is { InputFocused: true, Chat.Length: > 0 },
TextLength: log.Chat.Length,
ChannelType: channelType);
// MainWindow is Phase-1-resolved and never reassigned;
// the `?.` is defense-in-depth for pre-Phase-1 IPC-pulls.
var mainWindowOpen = Plugin.MainWindow?.IsOpen ?? false;
// Stale-state guard: InputBar's focus and pending-buffer fields are
// only written by DrawInputField. Closing MainWindow freezes them, so
// gate all four state fields on mainWindowOpen.
var inputFocused = mainWindowOpen && _inputBar.IsFocused;
var hasText = mainWindowOpen && _inputBar.PendingLength > 0;
var textLength = mainWindowOpen ? _inputBar.PendingLength : 0;
return (
InputVisible: mainWindowOpen,
InputFocused: inputFocused,
HasText: hasText,
IsTyping: hasText,
TextLength: textLength,
ChannelType: channelType
);
}
private ChatInputState GetState()
=> BuildState();
internal ChatInputState GetState() => BuildState();
internal void Update()
{
@@ -53,10 +102,13 @@ internal sealed class TypingIpc : IDisposable
HasState = true;
LastState = state;
StateChangedGate.SendMessage(state);
// v1.4.9: mirror on ChatTwo-prefixed slot for no-fork-policy plugins.
ChatTwoStateChangedGate.SendMessage(state);
}
public void Dispose()
{
StateQueryGate.UnregisterFunc();
ChatTwoStateQueryGate.UnregisterFunc();
}
}
+80 -4
View File
@@ -1,20 +1,52 @@
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Plugin.Ipc;
using Microsoft.Extensions.Logging;
namespace HellionChat;
internal sealed class IpcManager : IDisposable
{
private readonly ILogger<IpcManager> _logger;
private ICallGateProvider<string> RegisterGate { get; }
private ICallGateProvider<string, object?> UnregisterGate { get; }
private ICallGateProvider<object?> AvailableGate { get; }
private ICallGateProvider<string, PlayerPayload?, ulong, Payload?, SeString?, SeString?, object?> InvokeGate { get; }
private ICallGateProvider<
string,
PlayerPayload?,
ulong,
Payload?,
SeString?,
SeString?,
object?
> InvokeGate { get; }
// v1.4.9: ChatTwo IPC compatibility mirror. Third-party plugins with
// a no-fork policy (e.g. Artisan, AllaganTools) only subscribe to the
// ChatTwo.*-prefixed context-menu integration gates. Mirroring all four
// provider slots under the ChatTwo namespace lets those plugins keep
// working without code changes on their side. Conflict detection
// prevents ChatTwo and HellionChat from loading in parallel, so no slot
// collision risk.
private ICallGateProvider<string> ChatTwoRegisterGate { get; }
private ICallGateProvider<string, object?> ChatTwoUnregisterGate { get; }
private ICallGateProvider<object?> ChatTwoAvailableGate { get; }
private ICallGateProvider<
string,
PlayerPayload?,
ulong,
Payload?,
SeString?,
SeString?,
object?
> ChatTwoInvokeGate { get; }
internal List<string> Registered { get; } = [];
public IpcManager()
public IpcManager(ILogger<IpcManager> logger)
{
_logger = logger;
RegisterGate = Plugin.Interface.GetIpcProvider<string>("HellionChat.Register");
RegisterGate.RegisterFunc(Register);
@@ -23,14 +55,56 @@ internal sealed class IpcManager : IDisposable
UnregisterGate = Plugin.Interface.GetIpcProvider<string, object?>("HellionChat.Unregister");
UnregisterGate.RegisterAction(Unregister);
InvokeGate = Plugin.Interface.GetIpcProvider<string, PlayerPayload?, ulong, Payload?, SeString?, SeString?, object?>("HellionChat.Invoke");
InvokeGate = Plugin.Interface.GetIpcProvider<
string,
PlayerPayload?,
ulong,
Payload?,
SeString?,
SeString?,
object?
>("HellionChat.Invoke");
// v1.4.9: ChatTwo-prefixed mirrors of the four context-menu slots
// above. Share the same Register/Unregister backing methods so a
// plugin that subscribes via either namespace lands in the same
// Registered list. SendMessage on Invoke fans out to both gates.
ChatTwoRegisterGate = Plugin.Interface.GetIpcProvider<string>("ChatTwo.Register");
ChatTwoRegisterGate.RegisterFunc(Register);
ChatTwoAvailableGate = Plugin.Interface.GetIpcProvider<object?>("ChatTwo.Available");
ChatTwoUnregisterGate = Plugin.Interface.GetIpcProvider<string, object?>(
"ChatTwo.Unregister"
);
ChatTwoUnregisterGate.RegisterAction(Unregister);
ChatTwoInvokeGate = Plugin.Interface.GetIpcProvider<
string,
PlayerPayload?,
ulong,
Payload?,
SeString?,
SeString?,
object?
>("ChatTwo.Invoke");
AvailableGate.SendMessage();
ChatTwoAvailableGate.SendMessage();
}
internal void Invoke(string id, PlayerPayload? sender, ulong contentId, Payload? payload, SeString? senderString, SeString? content)
internal void Invoke(
string id,
PlayerPayload? sender,
ulong contentId,
Payload? payload,
SeString? senderString,
SeString? content
)
{
InvokeGate.SendMessage(id, sender, contentId, payload, senderString, content);
// v1.4.9: fan out the same event to plugins listening on ChatTwo.Invoke.
ChatTwoInvokeGate.SendMessage(id, sender, contentId, payload, senderString, content);
}
private string Register()
@@ -49,6 +123,8 @@ internal sealed class IpcManager : IDisposable
{
UnregisterGate.UnregisterAction();
RegisterGate.UnregisterFunc();
ChatTwoUnregisterGate.UnregisterAction();
ChatTwoRegisterGate.UnregisterFunc();
Registered.Clear();
}
}
+110 -47
View File
@@ -1,12 +1,12 @@
using System.Text;
using HellionChat.Code;
using HellionChat.Util;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using System.Text.RegularExpressions;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Utility;
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
using HellionChat.Code;
using HellionChat.Util;
namespace HellionChat;
@@ -33,7 +33,16 @@ public partial class Message
public Dictionary<Guid, float?> Height { get; } = new();
public Dictionary<Guid, bool> IsVisible { get; } = new();
public Message(ulong receiver, ulong contentId, ulong accountId, ChatCode code, List<Chunk> sender, List<Chunk> content, SeString senderSource, SeString contentSource)
public Message(
ulong receiver,
ulong contentId,
ulong accountId,
ChatCode code,
List<Chunk> sender,
List<Chunk> content,
SeString senderSource,
SeString contentSource
)
{
var extraChatChannel = ExtractExtraChatChannel(contentSource);
Receiver = receiver;
@@ -56,7 +65,18 @@ public partial class Message
chunk.Message = this;
}
public Message(Guid id, ulong receiver, ulong contentId, DateTimeOffset date, ChatCode code, List<Chunk> sender, List<Chunk> content, SeString senderSource, SeString contentSource, Guid extraChatChannel)
public Message(
Guid id,
ulong receiver,
ulong contentId,
DateTimeOffset date,
ChatCode code,
List<Chunk> sender,
List<Chunk> content,
SeString senderSource,
SeString contentSource,
Guid extraChatChannel
)
{
Id = id;
Receiver = receiver;
@@ -82,7 +102,11 @@ public partial class Message
return new Message(0, 0, 0, code, [], content, new SeString(), new SeString());
}
public bool Matches(Dictionary<ChatType, (ChatSource Source, ChatSource Target)> channels, bool allExtraChatChannels, HashSet<Guid> extraChatChannels)
public bool Matches(
Dictionary<ChatType, (ChatSource Source, ChatSource Target)> channels,
bool allExtraChatChannels,
HashSet<Guid> extraChatChannels
)
{
if (ExtraChatChannel != Guid.Empty)
return allExtraChatChannels || extraChatChannels.Contains(ExtraChatChannel);
@@ -90,16 +114,21 @@ public partial class Message
var source = (ChatSource)(1 << (int)Code.Source);
var target = (ChatSource)(1 << (int)Code.Target);
return Code.Type.IsGm()
|| channels.TryGetValue(Code.Type, out var sources)
&& (Code.Source is 0 || sources.Source.HasFlag(source) || sources.Target.HasFlag(target));
|| channels.TryGetValue(Code.Type, out var sources)
&& (
Code.Source is 0
|| sources.Source.HasFlag(source)
|| sources.Target.HasFlag(target)
);
}
private int GenerateHash()
{
var hash = SortCodeV2.GetHashCode()
^ ExtraChatChannel.GetHashCode()
^ string.Join("", Sender.Select(c => c.StringValue())).GetHashCode()
^ string.Join("", Content.Select(c => c.StringValue())).GetHashCode();
var hash =
SortCodeV2.GetHashCode()
^ ExtraChatChannel.GetHashCode()
^ string.Join("", Sender.Select(c => c.StringValue())).GetHashCode()
^ string.Join("", Content.Select(c => c.StringValue())).GetHashCode();
if (Plugin.Config.CollapseKeepUniqueLinks)
{
@@ -124,8 +153,8 @@ public partial class Message
}
catch (ArgumentException ex)
{
Plugin.Log.Error(ex, "Failed to parse extra chat channel GUID");
Plugin.Log.Error($"Byte Array: ${string.Join(", ", data[4..^1])}");
Plugin.LogProxy.Error(ex, "Failed to parse extra chat channel GUID");
Plugin.LogProxy.Error($"Byte Array: ${string.Join(", ", data[4..^1])}");
return Guid.Empty;
}
}
@@ -146,13 +175,13 @@ public partial class Message
}
var nextIsAutoTranslate = false;
var checkForEmotes = (Code.IsPlayerMessage() || extraChatChannel != Guid.Empty) && Plugin.Config.ShowEmotes;
foreach (var chunk in oldChunks)
{
// Use as is if it's not a text chunk, it already has a payload, or is auto translate
if (chunk is not TextChunk text || chunk.Link != null || nextIsAutoTranslate)
{
nextIsAutoTranslate = chunk is IconChunk { Icon: BitmapFontIcon.AutoTranslateBegin };
nextIsAutoTranslate =
chunk is IconChunk { Icon: BitmapFontIcon.AutoTranslateBegin };
// No need to call AddChunkWithMessage here since the chunk
// already has the Message field set.
@@ -173,32 +202,37 @@ public partial class Message
var word = wordBuilder.ToString();
wordBuilder.Clear();
var wordUsed = false;
var tokenUsed = false;
if (checkForEmotes && EmoteCache.Exists(word) && !Plugin.Config.BlockedEmotes.Contains(word))
{
// Add the previous sentence before adding the emote
AddChunkWithMessage(text.NewWithStyle(chunk, sentenceBuilder.ToString()));
AddChunkWithMessage(new TextChunk(chunk.Source, EmotePayload.ResolveEmote(word), word) { FallbackColour = text.FallbackColour });
wordUsed = true;
sentenceBuilder.Clear();
}
if (token.TokenType == Tokenizer.TokenType.UrlString)
{
// Add the previous sentence before adding the url
AddChunkWithMessage(text.NewWithStyle(chunk.Source, chunk.Link, sentenceBuilder.Append(!wordUsed ? word : "").ToString()));
AddChunkWithMessage(
text.NewWithStyle(
chunk.Source,
chunk.Link,
sentenceBuilder.Append(!wordUsed ? word : "").ToString()
)
);
try
{
AddChunkWithMessage(text.NewWithStyle(chunk.Source, UriPayload.ResolveUri(token.Value), token.Value));
AddChunkWithMessage(
text.NewWithStyle(
chunk.Source,
UriPayload.ResolveUri(token.Value),
token.Value
)
);
}
catch (UriFormatException)
{
AddChunkWithMessage(text.NewWithStyle(chunk.Source, chunk.Link, token.Value));
Plugin.Log.Debug($"Invalid URL accepted by Regex but failed URI parsing: '{token.Value}'");
AddChunkWithMessage(
text.NewWithStyle(chunk.Source, chunk.Link, token.Value)
);
Plugin.LogProxy.Debug(
$"Invalid URL accepted by Regex but failed URI parsing: '{token.Value}'"
);
}
wordUsed = true;
@@ -215,7 +249,12 @@ public partial class Message
}
// End of string reached, we add our leftover
AddChunkWithMessage(text.NewWithStyle(chunk, sentenceBuilder.Append(!wordUsed ? word : "").ToString()));
AddChunkWithMessage(
text.NewWithStyle(
chunk,
sentenceBuilder.Append(!wordUsed ? word : "").ToString()
)
);
}
}
@@ -281,20 +320,30 @@ public partial class Message
< 500_000 => ItemKind.Normal,
< 1_000_000 => ItemKind.Collectible,
< 2_000_000 => ItemKind.Hq,
_ => ItemKind.EventItem
_ => ItemKind.EventItem,
};
var name = kind != ItemKind.EventItem
? Sheets.ItemSheet.GetRow(item.ItemId).Name.ToString()
: Sheets.EventItemSheet.GetRow(item.ItemId).Name.ToString();
var name =
kind != ItemKind.EventItem
? Sheets.ItemSheet.GetRow(item.ItemId).Name.ToString()
: Sheets.EventItemSheet.GetRow(item.ItemId).Name.ToString();
var link = new ItemPayload(item.ItemId, kind, $"{SeIconChar.LinkMarker.ToIconChar()}{name}");
AddChunkWithMessage(text.NewWithStyle(chunk.Source, link, link.DisplayName ?? "Unknown"));
var link = new ItemPayload(
item.ItemId,
kind,
$"{SeIconChar.LinkMarker.ToIconChar()}{name}"
);
AddChunkWithMessage(
text.NewWithStyle(chunk.Source, link, link.DisplayName ?? "Unknown")
);
}
else if (split == "<status>")
{
var statusId = AgentChatLog.Instance()->ContextStatusId;
if (statusId == 0 || !Sheets.StatusSheet.TryGetRow(statusId, out var statusRow))
if (
statusId == 0
|| !Sheets.StatusSheet.TryGetRow(statusId, out var statusRow)
)
{
AddChunkWithMessage(text.NewWithStyle(chunk.Source, chunk.Link, split));
continue;
@@ -305,7 +354,7 @@ public partial class Message
{
1 => $"{SeIconChar.Buff.ToIconString()}{nameValue}",
2 => $"{SeIconChar.Debuff.ToIconString()}{nameValue}",
_ => nameValue
_ => nameValue,
};
var link = new StatusPayload(statusId);
@@ -321,18 +370,32 @@ public partial class Message
}
var mapCoords = agentMap->FlagMapMarkers[0];
var rawX = (int)(MathF.Round(mapCoords.XFloat, 3, MidpointRounding.AwayFromZero) * 1000);
var rawY = (int)(MathF.Round(mapCoords.YFloat, 3, MidpointRounding.AwayFromZero) * 1000);
var rawX = (int)(
MathF.Round(mapCoords.XFloat, 3, MidpointRounding.AwayFromZero) * 1000
);
var rawY = (int)(
MathF.Round(mapCoords.YFloat, 3, MidpointRounding.AwayFromZero) * 1000
);
var link = new MapLinkPayload(mapCoords.TerritoryId, mapCoords.MapId, rawX, rawY);
AddChunkWithMessage(text.NewWithStyle(chunk.Source, link, $"{SeIconChar.LinkMarker.ToIconChar()}{link.PlaceName} {link.CoordinateString}"));
var link = new MapLinkPayload(
mapCoords.TerritoryId,
mapCoords.MapId,
rawX,
rawY
);
AddChunkWithMessage(
text.NewWithStyle(
chunk.Source,
link,
$"{SeIconChar.LinkMarker.ToIconChar()}{link.PlaceName} {link.CoordinateString}"
)
);
}
}
catch (Exception)
{
AddChunkWithMessage(text.NewWithStyle(chunk.Source, chunk.Link, split));
Plugin.Log.Debug($"Failed to parse the text param: '{split}'");
Plugin.LogProxy.Debug($"Failed to parse the text param: '{split}'");
}
}
}
+286 -80
View File
@@ -1,19 +1,22 @@
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Text;
using HellionChat.Code;
using HellionChat.Resources;
using HellionChat.Util;
using Dalamud.Game.Chat;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Hooking;
using Dalamud.Interface.ImGuiNotification;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using HellionChat._Helpers;
using HellionChat.Code;
using HellionChat.Resources;
using HellionChat.Util;
using Lumina.Text.Expressions;
using Lumina.Text.Payloads;
using Lumina.Text.ReadOnly;
using Microsoft.Extensions.Logging;
namespace HellionChat;
@@ -22,19 +25,14 @@ internal class MessageManager : IAsyncDisposable
internal const int MessageDisplayLimit = 10_000;
private Plugin Plugin { get; }
private readonly ILogger<MessageManager> _logger;
internal MessageStore Store { get; }
private Dictionary<ChatType, NameFormatting> Formats { get; } = [];
private ulong LastContentId { get; set; }
// Messages go into the PendingSync queue first, which will be consumed one
// at a time in the main thread. This is to delay the async processing until
// after we've received the content ID from the ContentIdResolver hook.
//
// After that, the message is enqueued in the PendingAsync queue, which will
// be consumed in a separate thread and perform more processing (emotes,
// URLs) as well as inserting the message into the database.
private Queue<PendingMessage> PendingSync { get; } = [];
// PendingSync (main thread) → PendingAsync (worker thread); LinkedList for O(1) Last access
private LinkedList<PendingMessage> PendingSync { get; } = [];
private ConcurrentQueue<PendingMessage> PendingAsync { get; } = [];
private readonly Thread PendingMessageThread;
private readonly CancellationTokenSource PendingThreadCancellationToken = new();
@@ -50,23 +48,39 @@ internal class MessageManager : IAsyncDisposable
}
}
// Hellion Chat — Auto-Tell-Tabs hook. Fires after a fully processed
// message has been routed to all matching persistent tabs and stored
// in the database. The AutoTellTabsService subscribes to spawn or
// refresh temp tabs without having to wedge itself into ProcessMessage
// directly.
// Auto-Tell-Tabs hook: fires after a message is processed and stored, allowing
// AutoTellTabsService to spawn or refresh temp tabs without coupling.
public event Action<Message>? MessageProcessed;
internal unsafe MessageManager(Plugin plugin)
internal unsafe MessageManager(
Plugin plugin,
ILogger<MessageManager> logger,
ILoggerFactory loggerFactory
)
{
Plugin = plugin;
_logger = logger;
Store = new MessageStore(DatabasePath());
Store = new MessageStore(
DatabasePath(),
Plugin.PlatformUtil,
loggerFactory.CreateLogger<MessageStore>(),
loggerFactory
);
PendingMessageThread = new Thread(() => ProcessPendingMessages(PendingThreadCancellationToken.Token));
PendingMessageThread = new Thread(() =>
ProcessPendingMessages(PendingThreadCancellationToken.Token)
)
{
IsBackground = true,
};
PendingMessageThread.Start();
ContentIdResolverHook = Plugin.GameInteropProvider.HookFromAddress<RaptureLogModule.Delegates.AddMsgSourceEntry>(RaptureLogModule.MemberFunctionPointers.AddMsgSourceEntry, ContentIdResolver);
ContentIdResolverHook =
Plugin.GameInteropProvider.HookFromAddress<RaptureLogModule.Delegates.AddMsgSourceEntry>(
RaptureLogModule.MemberFunctionPointers.AddMsgSourceEntry,
ContentIdResolver
);
ContentIdResolverHook.Enable();
Plugin.ChatGui.ChatMessageUnhandled += ChatMessage;
@@ -82,16 +96,21 @@ internal class MessageManager : IAsyncDisposable
Plugin.ChatGui.ChatMessageUnhandled -= ChatMessage;
await PendingThreadCancellationToken.CancelAsync();
var timeout = 10_000; // 10s
while (timeout > 0)
{
if (!PendingMessageThread.IsAlive)
break;
timeout -= 100;
// 10s cooperative window; Thread.Abort is gone since .NET 5, so a
// stuck worker has to ride out the next AppDomain unload.
var deadline = TimeSpan.FromSeconds(10);
var stopwatch = Stopwatch.StartNew();
while (stopwatch.Elapsed < deadline && PendingMessageThread.IsAlive)
await Task.Delay(100);
Plugin.Log.Debug("Sleeping because PendingMessageThread thread still alive");
}
if (PendingMessageThread.IsAlive)
_logger.LogWarning(
"PendingMessageThread did not observe cancellation within 10s. "
+ "Worker remains on background thread; next plugin reload releases it."
);
PendingThreadCancellationToken.Dispose();
Store.Dispose();
}
@@ -113,8 +132,11 @@ internal class MessageManager : IAsyncDisposable
LastContentId = contentId;
// Drain the PendingSync queue into the PendingAsync queue.
while (PendingSync.TryDequeue(out var pending))
PendingAsync.Enqueue(pending);
while (PendingSync.First is { } first)
{
PendingSync.RemoveFirst();
PendingAsync.Enqueue(first.Value);
}
}
private void ProcessPendingMessages(CancellationToken token)
@@ -129,7 +151,7 @@ internal class MessageManager : IAsyncDisposable
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error processing pending message");
_logger.LogError(ex, "Error processing pending message");
}
}
else
@@ -141,7 +163,15 @@ internal class MessageManager : IAsyncDisposable
internal void ClearAllTabs()
{
foreach (var tab in Plugin.Config.Tabs)
// Snapshot the tab LIST under the shared lock so the worker-thread
// add/remove can't tear the enumeration; tab.Clear() then runs lock-free
// (each tab's Messages has its own SemaphoreSlim — lock order: list outer).
List<Tab> tabsSnapshot;
lock (Plugin.TabsListLock)
tabsSnapshot = Plugin.Config.Tabs.ToList();
// TempTabs are session-only (not persisted); exclude them to preserve Tell history
foreach (var tab in tabsSnapshot.Where(t => !t.IsTempTab))
tab.Clear();
}
@@ -153,32 +183,57 @@ internal class MessageManager : IAsyncDisposable
using var messages = Store.GetMostRecentMessages(CurrentContentId, since);
// We store the pending messages to be added to the chat log in a
// temporary list, and apply them all at once after filtering.
var pendingTabs = Plugin.Config.Tabs.Select(tab => (tab, new List<Message>())).ToList();
foreach (var message in messages)
foreach (var (_, pendingMessages) in pendingTabs.Where(ptab => ptab.Item1.Matches(message)))
pendingMessages.Add(message);
// TempTabs excluded (live state from AutoTellTabsService). Bucket via the
// pure MapMessagesToTabs so the assignment stays testable outside Dalamud.
// Snapshot under the shared lock (list copy only — short critical
// section). The Store query above and the AddSortPrune writes below stay
// OUTSIDE the lock (lock order: list outer, MessageList inner).
List<Tab> nonTempTabs;
lock (Plugin.TabsListLock)
nonTempTabs = Plugin.Config.Tabs.Where(t => !t.IsTempTab).ToList();
var buckets = MapMessagesToTabs(nonTempTabs, messages);
// Apply the messages to the chat log in one go.
foreach (var (tab, pendingMessages) in pendingTabs)
tab.Messages.AddSortPrune(pendingMessages, MessageDisplayLimit);
// Apply messages to chat log all at once.
foreach (var tab in nonTempTabs)
tab.Messages.AddSortPrune(buckets[tab], MessageDisplayLimit);
if (!messages.DidError) return;
if (!messages.DidError)
return;
WrapperUtil.AddNotification(Language.LoadMessages_Error, NotificationType.Error);
// Mark the failed messages as deleted so we don't try to load them
// again.
// Mark failed messages as deleted to prevent retry attempts
var failedIds = messages.FailedMessageIds();
Plugin.Log.Info($"Marking {failedIds.Count} messages as deleted due to parse failures");
_logger.LogInformation(
$"Marking {failedIds.Count} messages as deleted due to parse failures"
);
foreach (var msgId in messages.FailedMessageIds())
{
Plugin.Log.Debug($"Marking message '{msgId}' as deleted due to parse failure");
_logger.LogDebug($"Marking message '{msgId}' as deleted due to parse failure");
Store.DeleteMessage(msgId);
}
}
// Pure message->tab bucketing for the refilter. Dalamud-free + static so the
// assignment can be unit-pinned in the build suite; the live caller owns the
// Store query, the snapshot and the SemaphoreSlim writes.
internal static Dictionary<Tab, List<Message>> MapMessagesToTabs(
IReadOnlyList<Tab> tabs,
IEnumerable<Message> messages
)
{
var buckets = new Dictionary<Tab, List<Message>>(tabs.Count);
foreach (var tab in tabs)
buckets[tab] = new List<Message>();
foreach (var message in messages)
foreach (var tab in tabs)
if (tab.Matches(message))
buckets[tab].Add(message);
return buckets;
}
internal void FilterAllTabsAsync()
{
Task.Run(() =>
@@ -190,14 +245,17 @@ internal class MessageManager : IAsyncDisposable
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error in FilterAllTabs");
_logger.LogError(ex, "Error in FilterAllTabs");
}
Plugin.Log.Debug($"FilterAllTabs took {stopwatch.ElapsedMilliseconds}ms");
// Information, not Debug, so the xllog tail surfaces this without a
// filter. Kept as a guard against future plugin-load regressions.
_logger.LogInformation($"FilterAllTabs took {stopwatch.ElapsedMilliseconds}ms");
});
}
public (SeString? Sender, SeString? Message) LastMessage = (null, null);
private void ChatMessage(IChatMessage message)
{
LastMessage = (message.Sender, message.Message);
@@ -216,36 +274,48 @@ internal class MessageManager : IAsyncDisposable
// Update colour codes.
GlobalParametersCache.Refresh();
// We delay messages to be handed off to the async processing thread
// in the next tick, otherwise we can't get the content ID from the hook
// below.
PendingSync.Enqueue(pendingMessage);
// Delay to next tick to get content ID from ContentIdResolver hook
PendingSync.AddLast(pendingMessage);
}
// This hook is called immediately after receiving a message with the
// message's content ID. If multiple messages are received in the same tick,
// this will be called for each message immediately after ChatMessage is
// called for each message.
private unsafe void ContentIdResolver(RaptureLogModule* agent, ulong contentId, ulong accountId, int messageIndex, ushort worldId, ushort chatType)
private unsafe void ContentIdResolver(
RaptureLogModule* agent,
ulong contentId,
ulong accountId,
int messageIndex,
ushort worldId,
ushort chatType
)
{
try
{
ContentIdResolverHook?.Original(agent, contentId, accountId, messageIndex, worldId, chatType);
if (PendingSync.Count == 0)
ContentIdResolverHook?.Original(
agent,
contentId,
accountId,
messageIndex,
worldId,
chatType
);
if (PendingSync.Last is not { } last)
return;
PendingSync.Last().ContentId = contentId;
PendingSync.Last().AccountId = accountId;
last.Value.ContentId = contentId;
last.Value.AccountId = accountId;
}
catch (Exception ex)
{
Plugin.Log.Error(ex, "Error in ContentIdResolver");
_logger.LogError(ex, "Error in ContentIdResolver");
}
}
private void ProcessMessage(PendingMessage pendingMessage)
{
var chatCode = new ChatCode(pendingMessage.LogKind, pendingMessage.SourceKind, pendingMessage.TargetKind);
var chatCode = new ChatCode(
pendingMessage.LogKind,
pendingMessage.SourceKind,
pendingMessage.TargetKind
);
NameFormatting? formatting = null;
if (pendingMessage.Sender.Payloads.Count > 0)
@@ -254,29 +324,169 @@ internal class MessageManager : IAsyncDisposable
var senderChunks = new List<Chunk>();
if (formatting is { IsPresent: true })
{
senderChunks.Add(new TextChunk(ChunkSource.None, null, formatting.Before) { FallbackColour = chatCode.Type });
senderChunks.AddRange(ChunkUtil.ToChunks(pendingMessage.Sender, ChunkSource.Sender, chatCode.Type));
senderChunks.Add(new TextChunk(ChunkSource.None, null, formatting.After) { FallbackColour = chatCode.Type });
senderChunks.Add(
new TextChunk(ChunkSource.None, null, formatting.Before)
{
FallbackColour = chatCode.Type,
}
);
senderChunks.AddRange(
ChunkUtil.ToChunks(pendingMessage.Sender, ChunkSource.Sender, chatCode.Type)
);
senderChunks.Add(
new TextChunk(ChunkSource.None, null, formatting.After)
{
FallbackColour = chatCode.Type,
}
);
}
var contentChunks = ChunkUtil.ToChunks(pendingMessage.Content, ChunkSource.Content, chatCode.Type).ToList();
var message = new Message(CurrentContentId, pendingMessage.ContentId, pendingMessage.AccountId, chatCode, senderChunks, contentChunks, pendingMessage.Sender, pendingMessage.Content);
var contentChunks = ChunkUtil
.ToChunks(pendingMessage.Content, ChunkSource.Content, chatCode.Type)
.ToList();
var message = new Message(
CurrentContentId,
pendingMessage.ContentId,
pendingMessage.AccountId,
chatCode,
senderChunks,
contentChunks,
pendingMessage.Sender,
pendingMessage.Content
);
if (Plugin.Config.DatabaseBattleMessages || !message.Code.IsBattle())
Store.UpsertMessage(message);
var currentMatches = Plugin.CurrentTab.Matches(message);
foreach (var tab in Plugin.Config.Tabs)
{
var unread = !(tab.UnreadMode == UnreadMode.Unseen && Plugin.CurrentTab != tab && currentMatches);
// Snapshot the list, not just the active tab. This loop runs on the worker
// thread while SaveConfig's strip and the auto-tell spawn mutate Config.Tabs
// under TabsListLock — enumerating it live throws "collection was modified",
// and the catch in ProcessPendingMessages swallows that, silently dropping
// the whole message: no tab entry, no sound, no MessageProcessed.
List<Tab> tabsSnapshot;
lock (Plugin.TabsListLock)
tabsSnapshot = Plugin.Config.Tabs.ToList();
// Snapshot the active tab and whether it shows this message ONCE, so the
// whole loop sees a consistent value (the getter is a cross-thread read of
// MainWindow.ActiveTab).
var currentTab = Plugin.CurrentTab;
var currentTabMatches = currentTab.Matches(message);
foreach (var tab in tabsSnapshot)
{
if (tab.Matches(message))
tab.AddMessage(message, unread);
tab.AddMessage(message, ShouldCountUnread(tab, currentTab, currentTabMatches));
}
// Deliberate O(2n): the sound pick re-walks the tab list so the selection
// stays pure and SelfTest-able; AddMessage above and playback below keep
// the side effects.
var notificationSound = SelectNotificationSound(
tabsSnapshot,
currentTab,
message,
Plugin.Config.PlaySounds,
out var soundSource
);
// The snapshot can outlive a tab (eviction, logout). Playing its sound would
// be an audible artefact for a tab that is already gone, so re-check first.
if (notificationSound is not null && soundSource is not null)
{
bool sourceStillPresent;
lock (Plugin.TabsListLock)
sourceStillPresent = Plugin.Config.Tabs.Contains(soundSource);
if (!sourceStillPresent)
notificationSound = null;
}
if (notificationSound is { } soundId)
{
if (soundId is >= 1 and <= 16)
{
// ProcessMessage runs on the PendingMessageThread worker; the native
// UIGlobals.PlaySoundEffect must be marshalled onto the framework
// thread (reference_dalamud_framework_thread).
Plugin.Framework.RunOnFrameworkThread(() =>
{
unsafe
{
UIGlobals.PlaySoundEffect(soundId);
}
});
}
else if (soundId >= 17)
{
// Custom bundled sounds (ids 17-19) go through NAudio WaveOutEvent.
// NAudio manages its own playback thread, so no framework marshalling needed.
Plugin.CustomAudioPlayer.Play((int)soundId - 16, Plugin.Config.CustomSoundVolume);
}
// soundId == 0 (hand-edited config) falls through: plays nothing.
}
MessageProcessed?.Invoke(message);
}
// Pure: picks the sound id for the first inactive tab that wants one, or null.
// No AddMessage, no store write — those stay in the ProcessMessage loop so this
// is exercisable from the SelfTest without polluting tab state. The "first
// match wins" semantics live here via the running 'picked is null' guard,
// keeping a message matching several background tabs from stacking sounds.
// TEST-MIRROR: ../_Helpers/TabSoundDecision.cs
// Unseen ("count only what you haven't seen") suppresses unread on an inactive
// tab when the active tab ALSO shows this message — you already saw it in the
// tab you're looking at (1.5.6 / upstream ChatTwo behavior). The "active tab"
// used to be pinned to Tabs[0], so this fired against the wrong one until
// CurrentTab was recoupled to the real active tab, and currentTabMatches is
// now measured against the tab you see. All -> always counts; None ->
// counts here and is gated out at the display layer. Pure + SelfTest-able.
internal static bool ShouldCountUnread(Tab tab, Tab currentTab, bool currentTabMatches) =>
!(
tab.UnreadMode == UnreadMode.Unseen
&& !ReferenceEquals(currentTab, tab)
&& currentTabMatches
);
// Reports the tab the sound came from, so the caller can drop it if that tab
// disappeared between snapshot and playback.
internal static uint? SelectNotificationSound(
IEnumerable<Tab> tabs,
Tab currentTab,
Message probe,
bool playSounds,
out Tab? source
)
{
uint? picked = null;
source = null;
foreach (var tab in tabs)
{
if (!tab.Matches(probe))
continue;
if (
picked is null
&& TabSoundDecision.ShouldPlay(
currentTab == tab,
tab.EnableNotificationSound,
playSounds
)
)
{
picked = tab.NotificationSoundId;
source = tab;
}
}
return picked;
}
// SelfTest hook — same name discipline as InputBar.TestBuildOutgoingForSelfTest.
internal static uint? TestSelectNotificationSoundForSelfTest(
IEnumerable<Tab> tabs,
Tab currentTab,
Message probe,
bool playSounds
) => SelectNotificationSound(tabs, currentTab, probe, playSounds, out _);
internal class NameFormatting
{
internal string Before { get; private set; } = string.Empty;
@@ -285,16 +495,12 @@ internal class MessageManager : IAsyncDisposable
internal static NameFormatting Empty()
{
return new NameFormatting { IsPresent = false, };
return new NameFormatting { IsPresent = false };
}
internal static NameFormatting Of(string before, string after)
{
return new NameFormatting
{
Before = before,
After = after,
};
return new NameFormatting { Before = before, After = after };
}
}
@@ -329,7 +535,7 @@ internal class MessageManager : IAsyncDisposable
var after = formats
.GetRange(firstStringParam + 1, secondStringParam - firstStringParam)
.Where(payload => payload.Type == ReadOnlySePayloadType.Text)
.Select(text => Encoding.UTF8.GetString(text.Body.Span)); // Can't use `ToString()` as it defaults to macro
.Select(text => Encoding.UTF8.GetString(text.Body.Span));
var nameFormatting = NameFormatting.Of(string.Join("", before), string.Join("", after));
Formats[type] = nameFormatting;
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
using HellionChat.Resources;
namespace HellionChat;
// How a sender's name is rendered in the chat log. Kept in its own file
// (no Dalamud usings) so the SenderNameFormatter pure-helper test stays
// AppDomain-isolated (feedback_dalamud_test_isolation).
public enum WorldSuffixMode
{
Never,
OtherWorldOnly,
Always,
}
public enum NameFormMode
{
Full,
FirstNameOnly,
Initials,
}
public static class NameDisplayModeExt
{
public static string Name(this WorldSuffixMode mode) =>
mode switch
{
WorldSuffixMode.Never => HellionStrings.NameDisplay_WorldSuffix_Never,
WorldSuffixMode.OtherWorldOnly => HellionStrings.NameDisplay_WorldSuffix_OtherWorldOnly,
WorldSuffixMode.Always => HellionStrings.NameDisplay_WorldSuffix_Always,
_ => mode.ToString(),
};
public static string Name(this NameFormMode mode) =>
mode switch
{
NameFormMode.Full => HellionStrings.NameDisplay_NameForm_Full,
NameFormMode.FirstNameOnly => HellionStrings.NameDisplay_NameForm_FirstNameOnly,
NameFormMode.Initials => HellionStrings.NameDisplay_NameForm_Initials,
_ => mode.ToString(),
};
}

Some files were not shown because too many files have changed in this diff Show More