Compare commits

..
1 Commits
Author SHA1 Message Date
renovate-bot d07e9a5141 chore(deps): update dependency sixlabors.imagesharp to v4
Build / Build (Release) (pull_request) Successful in 54s
Security / scan (pull_request) Successful in 38s
2026-05-18 00:31:21 +00:00
299 changed files with 10948 additions and 76169 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup .NET 10 - name: Setup .NET 10
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5 uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with: with:
dotnet-version: 10.0.x dotnet-version: 10.0.x
+5 -10
View File
@@ -147,14 +147,10 @@ jobs:
} }
Write-Host "Embed-Caps OK: de=$($deDesc.Length)/4096, en=$($enDesc.Length)/4096, total=$totalChars/6000" Write-Host "Embed-Caps OK: de=$($deDesc.Length)/4096, en=$($enDesc.Length)/4096, total=$totalChars/6000"
# ---------- Embed-Payload bauen (zwei gestapelte Embeds) ---------- # ---------- Embed-Payload bauen (zwei Embeds, gleiche url) ----------
# Discord MERGES embeds in one message that share the same `url` # Sharing the same `url` tells Discord to render both embeds as a
# (the image-gallery merge) and then renders only the FIRST embed's # single contiguous card block. The title sits on the first embed,
# description — every following embed contributes images only. So # the footer + timestamp on the last so it reads as one post.
# 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]@{ $payload = [ordered]@{
username = "Forge Herald" username = "Forge Herald"
avatar_url = "https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/icon.png" avatar_url = "https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/icon.png"
@@ -171,8 +167,7 @@ jobs:
description = $deDesc description = $deDesc
}, },
[ordered]@{ [ordered]@{
# Deliberately no `url` — a shared url would make Discord url = $releaseUrl
# merge this embed into the first and drop the EN body.
color = 12730636 color = 12730636
description = $enDesc description = $enDesc
footer = [ordered]@{ text = $footerText } footer = [ordered]@{ text = $footerText }
+31 -55
View File
@@ -22,9 +22,9 @@ on:
- 'v*' - 'v*'
# Manual recovery trigger. Use Gitea's "Run workflow" UI and select the # 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 # 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 # ref step below hard-fails if a non-tag ref is selected, because the
# name and body are both derived from the tag, so a branch ref would # release-action reads GITHUB_REF directly and rejects anything that
# publish a release named after a branch. # does not start with refs/tags/.
workflow_dispatch: workflow_dispatch:
permissions: permissions:
@@ -37,8 +37,11 @@ jobs:
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
# Validate up-front so a manual dispatch from a branch ref fails loud # release-action@main reads GITHUB_REF directly (its action.yml
# here instead of burning a full build before the publish step notices. # does not declare a tag_name input). Validate up-front so manual
# dispatches from a branch ref fail loud here instead of burning
# a full build before the final step errors out with "ref X is
# not a tag".
- name: Validate tag ref - name: Validate tag ref
run: | run: |
if [[ "${GITHUB_REF}" != refs/tags/v* ]]; then if [[ "${GITHUB_REF}" != refs/tags/v* ]]; then
@@ -51,7 +54,7 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup .NET 10 - name: Setup .NET 10
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5 uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with: with:
dotnet-version: 10.0.x dotnet-version: 10.0.x
@@ -153,55 +156,28 @@ jobs:
Write-Host $body Write-Host $body
Write-Host "----------------------------------------" Write-Host "----------------------------------------"
# The tag comes from GITHUB_REF, the body from the step above. Posted with # release-action@main only declares files/title/body/pre_release/
# curl rather than gitea.com/actions/release-action, which declares # draft/api_key/insecure as inputs (see its action.yml). It silently
# `using: go` and has to be compiled by the runner -- act cannot do that # ignores anything else, including body_path and tag_name. The tag
# here and the step dies with exec: "go": executable file not found, exit # itself comes from GITHUB_REF, the body must be passed inline via
# 127, after a build that otherwise succeeded. This runs as a plain shell # body:, so we re-emit release-body.md as a step output first.
# step in the job image, which has curl and python3. - name: Expose release body for release-action
# id: body
# 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 shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZIP_PATH: ${{ steps.locate.outputs.path }}
TAG_NAME: ${{ github.ref_name }}
run: | run: |
set -euo pipefail {
echo 'content<<RELEASE_BODY_EOF'
cat release-body.md
echo 'RELEASE_BODY_EOF'
} >> "$GITHUB_OUTPUT"
api="${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}" # Gitea-native release action. Creates the release if the tag has no
auth="Authorization: token ${GITEA_TOKEN}" # release yet, or updates the existing one with latest.zip attached
# and the generated body. The auto-injected GITHUB_TOKEN on Gitea
# Existing release for this tag, or create one. # Actions has Gitea-API scope and is sufficient for release write.
rel_id="$(curl -sf -H "$auth" "$api/releases/tags/${TAG_NAME}" \ - name: Attach to Gitea release
| python3 -c 'import sys,json; print(json.load(sys.stdin).get("id",""))' 2>/dev/null || true)" uses: https://gitea.com/actions/release-action@main
with:
if [ -z "$rel_id" ]; then files: ${{ steps.locate.outputs.path }}
payload="$(python3 -c ' body: ${{ steps.body.outputs.content }}
import json, os, sys api_key: ${{ secrets.GITHUB_TOKEN }}
body = open("release-body.md", encoding="utf-8").read()
json.dump({"tag_name": os.environ["TAG_NAME"], "name": os.environ["TAG_NAME"],
"body": body, "draft": False, "prerelease": False}, sys.stdout)
')"
rel_id="$(printf '%s' "$payload" \
| curl -sf -X POST -H "$auth" -H "Content-Type: application/json" -d @- "$api/releases" \
| python3 -c 'import sys,json; print(json.load(sys.stdin)["id"])')"
echo "Created release $rel_id for ${TAG_NAME}"
else
echo "Reusing release $rel_id for ${TAG_NAME}"
fi
# Drop a same-named asset from an earlier attempt, or the upload 409s.
old_id="$(curl -sf -H "$auth" "$api/releases/${rel_id}/assets" \
| python3 -c 'import sys,json; print(next((a["id"] for a in json.load(sys.stdin) if a["name"]=="latest.zip"), ""))' 2>/dev/null || true)"
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" \
| python3 -c 'import sys,json; a=json.load(sys.stdin); print("Attached", a["name"], a["size"], "bytes")'
+6 -6
View File
@@ -1,8 +1,4 @@
name: Security name: Security
# Ruft den zentralen Scan-Workflow in security-workflows auf
# (Semgrep SAST + Trivy filesystem scan).
on: on:
push: push:
branches: [main, master] branches: [main, master]
@@ -15,6 +11,10 @@ jobs:
scan: scan:
uses: JonKazama-Hellion/security-workflows/.gitea/workflows/security-scan.yml@main uses: JonKazama-Hellion/security-workflows/.gitea/workflows/security-scan.yml@main
with: with:
# MessageStore.cs interpoliert SQL-Strings, die plugin-lokal sicher sind; # MessageStore.cs uses string-interpolation in CommandText for table
# Semgrep matcht das Pattern, CodeQL mit Datenflussanalyse nicht. # names and clause-joins that come from internal code constants, not
# user input. Values are bound via SqlParameter, the SQL surface is
# local-only inside a Dalamud plugin. Semgrep matches the pattern
# without dataflow, so it flags those eight call sites; CodeQL
# would not. Suppressed for this repo only.
semgrep-exclude-rules: 'csharp.lang.security.sqli.csharp-sqli.csharp-sqli' semgrep-exclude-rules: 'csharp.lang.security.sqli.csharp-sqli.csharp-sqli'
-10
View File
@@ -1,10 +0,0 @@
---
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
@@ -1,9 +0,0 @@
---
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
@@ -1,9 +0,0 @@
---
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
@@ -1,11 +0,0 @@
---
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
@@ -1,11 +0,0 @@
---
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
@@ -1,11 +0,0 @@
---
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
@@ -1,7 +0,0 @@
---
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.
-36
View File
@@ -1,36 +0,0 @@
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);
}
+61 -186
View File
@@ -21,15 +21,7 @@ internal sealed class AutoTellTabsService : IDisposable
private readonly MessageManager _messageManager; private readonly MessageManager _messageManager;
private readonly MessageStore _store; private readonly MessageStore _store;
private readonly ILogger<AutoTellTabsService> _logger; private readonly ILogger<AutoTellTabsService> _logger;
private readonly object _tempTabsLock = new();
// 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 // Hard cap on pinned TempTabs so the sidebar doesn't inflate over years
// of usage. Separate pool from AutoTellTabsLimit (15) — pinned tabs live // of usage. Separate pool from AutoTellTabsLimit (15) — pinned tabs live
@@ -39,10 +31,6 @@ internal sealed class AutoTellTabsService : IDisposable
private bool _initialized; private bool _initialized;
// Set when Initialize ran before a character was available; cleared once the
// history has actually been loaded.
private bool _rehydratePending;
internal AutoTellTabsService( internal AutoTellTabsService(
Plugin plugin, Plugin plugin,
MessageManager messageManager, MessageManager messageManager,
@@ -58,8 +46,8 @@ internal sealed class AutoTellTabsService : IDisposable
// Derived from the tab list on read. Pin/Unpin/Promote/Logout simply // Derived from the tab list on read. Pin/Unpin/Promote/Logout simply
// mutate IsPinned or remove tabs — the count adapts automatically. // mutate IsPinned or remove tabs — the count adapts automatically.
// Replaces an Interlocked counter: the pin-state transitions are cold-path // Replaces the F2.1 Interlocked counter because the new pin-state
// and don't need lock-free reads. // transitions are cold-path and don't need lock-free reads.
internal int ActiveTempTabCount => internal int ActiveTempTabCount =>
Plugin.Config.Tabs.Count(TabLifecycleHelpers.IsInUnpinnedPool); Plugin.Config.Tabs.Count(TabLifecycleHelpers.IsInUnpinnedPool);
@@ -80,30 +68,12 @@ internal sealed class AutoTellTabsService : IDisposable
RehydratePinnedTabs(); RehydratePinnedTabs();
_messageManager.MessageProcessed += HandleTell; _messageManager.MessageProcessed += HandleTell;
Plugin.ClientState.Login += OnLogin;
Plugin.ClientState.Logout += OnLogout; Plugin.ClientState.Logout += OnLogout;
_initialized = true; _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() 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); var pinned = Plugin.Config.Tabs.Count(TabLifecycleHelpers.IsInPinnedPool);
_logger.LogDebug($"[Pin] Rehydrate scan: {pinned} pinned tab(s) found"); _logger.LogDebug($"[Pin] Rehydrate scan: {pinned} pinned tab(s) found");
@@ -144,7 +114,6 @@ internal sealed class AutoTellTabsService : IDisposable
return; return;
} }
Plugin.ClientState.Login -= OnLogin;
Plugin.ClientState.Logout -= OnLogout; Plugin.ClientState.Logout -= OnLogout;
_messageManager.MessageProcessed -= HandleTell; _messageManager.MessageProcessed -= HandleTell;
_initialized = false; _initialized = false;
@@ -178,19 +147,15 @@ internal sealed class AutoTellTabsService : IDisposable
return; return;
} }
// Three steps, because building the tab pulls history out of the store and lock (_tempTabsLock)
// 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); var existing = FindTempTab(partner.Value.Name, partner.Value.World);
if (existing != null) if (existing != null)
{ {
// Already routed via MessageManager pipeline — no AddMessage here, // Already routed via MessageManager pipeline. Repair the
// HandleTell runs after the delivery loop. Repair the tell-target if // tell-target if the fallback hit a pinned tab whose
// the fallback hit a pinned tab whose TellTarget didn't survive a // TellTarget didn't survive a previous round-trip — keeps
// previous round-trip — keeps FindTempTab fast on the next message. // FindTempTab fast on the next message.
if ( if (
existing.IsPinned existing.IsPinned
&& (existing.TellTarget is null || !existing.TellTarget.IsSet()) && (existing.TellTarget is null || !existing.TellTarget.IsSet())
@@ -207,29 +172,12 @@ internal sealed class AutoTellTabsService : IDisposable
return; return;
} }
generation = _tabGeneration; if (ActiveTempTabCount >= Plugin.Config.AutoTellTabsLimit)
{
DropOldestTempTab();
} }
var tab = BuildTempTabWithHistory(partner.Value, message); SpawnTempTab(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)
{
raced.AddMessage(message, unread: true);
return;
}
CommitTempTab(tab);
} }
} }
@@ -270,7 +218,7 @@ internal sealed class AutoTellTabsService : IDisposable
return null; return null;
} }
internal static Tab? FindTempTab(string name, uint world) private static Tab? FindTempTab(string name, uint world)
{ {
var byTarget = Plugin.Config.Tabs.FirstOrDefault(t => var byTarget = Plugin.Config.Tabs.FirstOrDefault(t =>
t.IsTempTab t.IsTempTab
@@ -291,21 +239,7 @@ internal sealed class AutoTellTabsService : IDisposable
); );
} }
// 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)
{
lock (TabsListLock)
return FindTempTab(name, world);
}
internal void DropOldestTempTab() 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)
{ {
// Pinned tabs live in their own bucket (MaxPinnedTempTabs) and are // Pinned tabs live in their own bucket (MaxPinnedTempTabs) and are
// never drop candidates. They leave the bucket only via Unpin or // never drop candidates. They leave the bucket only via Unpin or
@@ -322,29 +256,28 @@ internal sealed class AutoTellTabsService : IDisposable
return; return;
} }
var dropped = victim.Tab; // Clean up pop-out window if tab is popped out
// By reference, not by index: the index came from a Select() earlier in if (victim.Tab.PopOut)
// this block and would point at the wrong tab if anything shifted the list.
Plugin.Config.Tabs.Remove(dropped);
// 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); var popout = _plugin.ChatLogWindow.ActivePopouts.FirstOrDefault(p =>
_plugin.MainWindow?.ResetActiveTabIfRemoved(dropped); p.TabIdentifier == victim.Tab.Identifier
}); );
if (popout != null)
{
popout.IsOpen = false;
} }
} }
// Runs WITHOUT TabsListLock: PreloadHistory hits the store, which used to hold Plugin.Config.Tabs.RemoveAt(victim.Index);
// 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. // Re-anchor active tab to avoid silent switch when tab is dropped
private Tab BuildTempTabWithHistory((string Name, uint World) partner, Message currentMessage) if (victim.Index <= _plugin.LastTab)
{
_plugin.WantedTab = 0;
}
}
private void SpawnTempTab((string Name, uint World) partner, Message currentMessage)
{ {
var tab = BuildTempTab(partner.Name, partner.World); var tab = BuildTempTab(partner.Name, partner.World);
@@ -353,40 +286,13 @@ internal sealed class AutoTellTabsService : IDisposable
tab.AddMessage(currentMessage, unread: true); tab.AddMessage(currentMessage, unread: true);
// Flag the tab as a pop-out if configured; the marshalled TryOpen below reads // Open as pop-out if configured (set before Tabs.Add for next render-tick)
// that flag to open the real window.
if (Plugin.Config.AutoTellTabsOpenAsPopout) if (Plugin.Config.AutoTellTabsOpenAsPopout)
{ {
tab.PopOut = true; 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); 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) private static Tab BuildTempTab(string playerName, uint worldRowId)
@@ -394,7 +300,6 @@ internal sealed class AutoTellTabsService : IDisposable
return new Tab return new Tab
{ {
Name = FormatTabName(playerName, worldRowId), Name = FormatTabName(playerName, worldRowId),
NameCameFromPartner = true,
IsTempTab = true, IsTempTab = true,
AllSenderMessages = true, AllSenderMessages = true,
TellTarget = new TellTarget(playerName, worldRowId, 0, TellReason.Direct), TellTarget = new TellTarget(playerName, worldRowId, 0, TellReason.Direct),
@@ -502,7 +407,7 @@ internal sealed class AutoTellTabsService : IDisposable
return; return;
} }
lock (TabsListLock) lock (_tempTabsLock)
{ {
// Guard against frame-race: sidebar might render a tab already removed by LRU or logout // Guard against frame-race: sidebar might render a tab already removed by LRU or logout
if (!Plugin.Config.Tabs.Contains(tab)) if (!Plugin.Config.Tabs.Contains(tab))
@@ -514,53 +419,43 @@ 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) private void OnLogout(int type, int code)
{ {
lock (TabsListLock) lock (_tempTabsLock)
{ {
// Pinned TempTabs must survive char-switch — that's the whole point // Pinned TempTabs must survive char-switch — that's the whole point
// of pinning. Only unpinned ones get stripped. // of pinning. Only unpinned ones get stripped.
var active = _plugin.MainWindow?.ActiveTab; var lastIndex = _plugin.LastTab;
var lastIndexValid = lastIndex >= 0 && lastIndex < Plugin.Config.Tabs.Count;
var currentWasUnpinnedTempTab =
lastIndexValid
&& TabLifecycleHelpers.IsInUnpinnedPool(Plugin.Config.Tabs[lastIndex]);
var poppedTempTabIds = Plugin var poppedTempTabIds = Plugin
.Config.Tabs.Where(t => .Config.Tabs.Where(t => TabLifecycleHelpers.IsInUnpinnedPool(t) && t.PopOut)
TabLifecycleHelpers.IsInUnpinnedPool(t)
&& _plugin.ChannelPopoutPool.IsOpen(t.Identifier)
)
.Select(t => t.Identifier) .Select(t => t.Identifier)
.ToList(); .ToList();
if (poppedTempTabIds.Count > 0)
// 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 var poppedSet = poppedTempTabIds.ToHashSet();
// manually right-clicked pop-outs, which never set the flag. foreach (
foreach (var id in poppedTempTabIds) var popout in _plugin
_plugin.ChannelPopoutPool.TryClose(id); .ChatLogWindow.ActivePopouts.Where(p => poppedSet.Contains(p.TabIdentifier))
.ToList()
)
{
popout.IsOpen = false;
}
}
Plugin.Config.Tabs.RemoveAll(TabLifecycleHelpers.IsInUnpinnedPool); Plugin.Config.Tabs.RemoveAll(TabLifecycleHelpers.IsInUnpinnedPool);
// HandleTell builds a tab outside the lock; bumping here lets it detect // Force switch to tab 0 if active tab was an unpinned temp tab or
// that the world moved on and drop what it built. Read and compared under // index is now out of range. Pinned tabs survive — no switch needed.
// the same lock, so no volatile needed. var stillValid = lastIndex >= 0 && lastIndex < Plugin.Config.Tabs.Count;
_tabGeneration++; if (currentWasUnpinnedTempTab || !stillValid)
// 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.MainWindow?.ResetActiveTabIfRemoved(a); _plugin.WantedTab = 0;
} }
} }
} }
@@ -575,11 +470,6 @@ internal sealed class AutoTellTabsService : IDisposable
return false; 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) if (PinnedTempTabCount >= MaxPinnedTempTabs)
{ {
WrapperUtil.AddNotification( WrapperUtil.AddNotification(
@@ -590,8 +480,6 @@ internal sealed class AutoTellTabsService : IDisposable
} }
tab.IsPinned = true; tab.IsPinned = true;
}
_logger.LogDebug( _logger.LogDebug(
$"[Pin] Pinned tab '{tab.Name}' target={tab.TellTarget?.Name}@{tab.TellTarget?.World}" $"[Pin] Pinned tab '{tab.Name}' target={tab.TellTarget?.Name}@{tab.TellTarget?.World}"
); );
@@ -608,18 +496,13 @@ internal sealed class AutoTellTabsService : IDisposable
// If the unpinned pool is already full, dropping the oldest before // If the unpinned pool is already full, dropping the oldest before
// flipping the flag avoids counting the just-unpinned tab as a drop // flipping the flag avoids counting the just-unpinned tab as a drop
// candidate. Under lock, since DropOldestTempTab mutates the list. // candidate.
// SaveConfig stays outside, see TryPin.
lock (TabsListLock)
{
if (ActiveTempTabCount >= Plugin.Config.AutoTellTabsLimit) if (ActiveTempTabCount >= Plugin.Config.AutoTellTabsLimit)
{ {
DropOldestTempTab(); DropOldestTempTab();
} }
tab.IsPinned = false; tab.IsPinned = false;
}
_logger.LogDebug("[Pin] Unpinned tab '{TabName}'", tab.Name); _logger.LogDebug("[Pin] Unpinned tab '{TabName}'", tab.Name);
_plugin.SaveConfig(); _plugin.SaveConfig();
} }
@@ -631,17 +514,9 @@ internal sealed class AutoTellTabsService : IDisposable
return; return;
} }
// Drops the temp/pin flags, the persisted tell target AND the runtime tab.IsTempTab = false;
// channel's tell state. The runtime-channel clear is the CORR-1 guard — tab.IsPinned = false;
// see StripTellBindingOnPromote; clearing Tab.TellTarget alone would leave tab.TellTarget = TellTarget.Empty();
// 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)"); _logger.LogDebug($"[Pin] Promoted tab '{tab.Name}' to permanent (tell-binding dropped)");
_plugin.SaveConfig(); _plugin.SaveConfig();
} }
-3
View File
@@ -10,8 +10,6 @@ internal static class BrandingLinks
public const string HellionForgeGitea = "https://gitea.hellion-forge.cloud/Hellion-Forge"; public const string HellionForgeGitea = "https://gitea.hellion-forge.cloud/Hellion-Forge";
public const string HellionChatRepo = public const string HellionChatRepo =
"https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat"; "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 HellionForgeWebsite = "https://hellion-forge.cloud";
public const string HellionMediaWebsite = "https://hellion-media.de/de"; public const string HellionMediaWebsite = "https://hellion-media.de/de";
@@ -28,7 +26,6 @@ internal static class BrandingLinks
HellionForgeDiscordInvite, HellionForgeDiscordInvite,
HellionForgeGitea, HellionForgeGitea,
HellionChatRepo, HellionChatRepo,
HellionChatCustomRepoManifest,
HellionForgeWebsite, HellionForgeWebsite,
HellionMediaWebsite HellionMediaWebsite
); );
-22
View File
@@ -1,22 +0,0 @@
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
);
}
+10 -3
View File
@@ -1,18 +1,25 @@
namespace HellionChat.Branding; namespace HellionChat.Branding;
// Lazy-loaded ASCII art that ships embedded with the DLL. // Lazy-loaded provenance art that ships embedded with the DLL. Two
// variants:
// //
// - FoxBanner: the full-size silhouette with "Hellion Forge" inside
// the body — rendered in the first-run wizard and the Information
// tab as a small "about the makers" anchor.
// - FoxMini: the four-line fox-head + curly-tail that gets stitched // - FoxMini: the four-line fox-head + curly-tail that gets stitched
// into the DI-logger bootstrap line so an xllog reader sees the // into the DI-logger bootstrap line so an xllog reader sees the
// same signature on every plugin load. // same signature on every plugin load.
// //
// The file lives as an embedded resource under HellionChat.Branding.* so // Both files live as embedded resources under HellionChat.Branding.* so
// the plugin DLL is self-contained; no on-disk asset lookup that could // the plugin DLL is self-contained — no on-disk asset lookup that could
// silently miss after a partial deploy. // silently miss after a partial deploy.
internal static class HellionForgeAscii internal static class HellionForgeAscii
{ {
private static string? _foxBanner;
private static string? _foxMini; private static string? _foxMini;
public static string FoxBanner => _foxBanner ??= Load("HellionChat.Branding.fox-banner.txt");
public static string FoxMini => _foxMini ??= Load("HellionChat.Branding.fox-mini.txt"); public static string FoxMini => _foxMini ??= Load("HellionChat.Branding.fox-mini.txt");
private static string Load(string resourceName) private static string Load(string resourceName)
-26
View File
@@ -1,26 +0,0 @@
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
];
}
+197 -333
View File
@@ -1,5 +1,4 @@
using System.Collections; using System.Collections;
using System.Linq;
using Dalamud; using Dalamud;
using Dalamud.Bindings.ImGui; using Dalamud.Bindings.ImGui;
using Dalamud.Configuration; using Dalamud.Configuration;
@@ -35,7 +34,7 @@ public class ConfigKeyBind
[Serializable] [Serializable]
public class Configuration : IPluginConfiguration public class Configuration : IPluginConfiguration
{ {
internal const int LatestVersion = 27; private const int LatestVersion = 17;
public int Version { get; set; } = LatestVersion; public int Version { get; set; } = LatestVersion;
@@ -45,29 +44,17 @@ public class Configuration : IPluginConfiguration
// Global window opacity, applied across all themes. // Global window opacity, applied across all themes.
public float WindowOpacity = 0.85f; public float WindowOpacity = 0.85f;
// Background opacity of the main chat window while unfocused.
// WindowOpacity above stays the focused value.
public float WindowOpacityInactive = 0.75f;
// Reserved for future UI toggles; pre-declared to avoid a migration later. // Reserved for future UI toggles; pre-declared to avoid a migration later.
public bool ReduceMotion; public bool ReduceMotion;
// v1.2.1: default flipped false → true. Compact single-line layout is // v1.2.1: default flipped false → true. Compact single-line layout is
// more readable than the card-rows layout introduced in v1.2.0. // more readable than the card-rows layout introduced in v1.2.0.
public bool UseCompactDensity; public bool UseCompactDensity = true;
// Privacy by Default master switch. Set false to restore upstream behaviour. // Privacy by Default master switch. Set false to restore upstream behaviour.
public bool PrivacyFilterEnabled = true; public bool PrivacyFilterEnabled = true;
// Stays empty here. Dalamud deserialises with Json.NET's default settings, // Empty set means the migration has not run yet — see Plugin.cs v6→v7.
// which means ObjectCreationHandling.Auto: a collection field that already
// holds items is *populated*, not replaced. A non-empty initializer would
// therefore union itself into every config on load and switch channels the
// user had unticked back on. Verified against Newtonsoft 13.0.3:
// saved [] loads as the initializer, saved [Say] loads as initializer + Say.
//
// Privacy by Default (DSGVO Art. 25) is seeded in CreateFresh instead, which
// only runs when there is no config file at all.
public HashSet<ChatType> PrivacyPersistChannels = []; public HashSet<ChatType> PrivacyPersistChannels = [];
// Failsafe for ChatTypes added by future FFXIV patches. New configs default // Failsafe for ChatTypes added by future FFXIV patches. New configs default
@@ -77,39 +64,24 @@ public class Configuration : IPluginConfiguration
.PrivacyDefaults .PrivacyDefaults
.DefaultPersistUnknownChannels; .DefaultPersistUnknownChannels;
// Dedup unknown-ChatType warnings so a chatty filter doesn't spam // F3.2: dedup unknown-ChatType warnings so a chatty filter doesn't spam
// the log every frame. NonSerialized so the warning fires once per // the log every frame. NonSerialized so the warning fires once per
// runtime, not once-ever-per-install. // runtime, not once-ever-per-install.
[NonSerialized] [NonSerialized]
private readonly HashSet<ChatType> _warnedUnknownChannels = new(); private readonly HashSet<ChatType> _warnedUnknownChannels = new();
// A first-ever start records the player's own conversations and nothing
// else. Deliberately not a field initializer -- see PrivacyPersistChannels.
internal static Configuration CreateFresh()
{
var config = new Configuration();
config.PrivacyPersistChannels = [.. Privacy.PrivacyDefaults.PrivacyFirstWhitelist];
return config;
}
public bool IsAllowedForStorage(ChatType type) public bool IsAllowedForStorage(ChatType type)
{ {
if (!PrivacyFilterEnabled) if (!PrivacyFilterEnabled)
return true; return true;
if (PrivacyPersistChannels.Contains(type))
return true;
// Runs per message on the worker thread while the settings UI can Add to the // F3.2: log first occurrence of a ChatType the running build doesn't
// same set from the draw thread. A HashSet.Contains racing an Add that // recognise — i.e. one a future FFXIV patch may have added. Known
// resizes buckets can return the wrong answer -- and this answer decides // types the user opted out of are routed through the failsafe
// whether a message is persisted. Lock kept tight, this is a hot path. // silently, like before.
bool listed; if (!Enum.IsDefined(typeof(ChatType), type) && _warnedUnknownChannels.Add(type))
lock (Plugin.Instance.ConfigMapsLock)
listed = PrivacyPersistChannels.Contains(type);
var known = Enum.IsDefined(typeof(ChatType), type);
// Log the first occurrence of a ChatType the running build doesn't
// recognise — i.e. one a future FFXIV patch may have added.
if (!known && !listed && _warnedUnknownChannels.Add(type))
{ {
Plugin.LogProxy.Warning( Plugin.LogProxy.Warning(
"PrivacyFilter: unrecognised ChatType {Type} — falling back to PrivacyPersistUnknownChannels={Persist}.", "PrivacyFilter: unrecognised ChatType {Type} — falling back to PrivacyPersistUnknownChannels={Persist}.",
@@ -118,7 +90,7 @@ public class Configuration : IPluginConfiguration
); );
} }
return Privacy.StorageRule.Allows(listed, known, PrivacyPersistUnknownChannels); return PrivacyPersistUnknownChannels;
} }
// Retention master switch defaults to false — plugin will not delete // Retention master switch defaults to false — plugin will not delete
@@ -128,15 +100,6 @@ public class Configuration : IPluginConfiguration
public Dictionary<ChatType, int> RetentionPerChannelDays = []; public Dictionary<ChatType, int> RetentionPerChannelDays = [];
public DateTimeOffset RetentionLastRunAt = DateTimeOffset.MinValue; public DateTimeOffset RetentionLastRunAt = DateTimeOffset.MinValue;
public bool FirstRunCompleted; public bool FirstRunCompleted;
// Tracks which plugin version last surfaced the first-run wizard.
// When the running version is newer than this, Plugin.LoadAsync
// re-opens the wizard once so existing users see major UX reworks
// (e.g. the v1.5.2 multi-step rewrite). Skip path and Finish both
// set FirstRunCompleted = true on close, so the wizard only fires
// once per version bump even if the user dismisses it.
public string WizardLastShownVersion = string.Empty;
public bool UseHellionFont = true; public bool UseHellionFont = true;
public bool ShowHonorificTitleInHeader = true; public bool ShowHonorificTitleInHeader = true;
@@ -145,33 +108,21 @@ public class Configuration : IPluginConfiguration
// who don't care, and dodges the per-frame DrawList overhead on low-end // who don't care, and dodges the per-frame DrawList overhead on low-end
// hardware. Gradient (Color3 / GradientColourSet) is parsed but rendered // hardware. Gradient (Color3 / GradientColourSet) is parsed but rendered
// as the primary Color until a later cycle ports the animation. // as the primary Color until a later cycle ports the animation.
public bool ShowHonorificGlow = true; public bool ShowHonorificGlow;
public bool EnableAutoTellTabs = true; public bool EnableAutoTellTabs = true;
public int AutoTellTabsLimit = 15; public int AutoTellTabsLimit = 15;
public bool AutoTellTabsCompactDisplay = true; public bool AutoTellTabsCompactDisplay;
public int AutoTellTabsHistoryPreload = 100; public int AutoTellTabsHistoryPreload = 20;
// Expanded sidebar width in pixels. 44 was carried over from the v1.2.0 // Sidebar width in pixels. Default 44 mirrors the icon-only layout from
// icon-only layout and stayed the default long after the sidebar started // v1.2.0; users can widen up to 160 to fit a section-header line like
// drawing labels beside those icons, so every tab name came out clipped -- // "Active Tells (3)" without truncation.
// it only went unnoticed because everyone had widened it by hand. 160 fits public int SidebarWidth = 44;
// the German tab names, which are the longest of the 25 languages, and the
// floor below is set where they stop being readable rather than where the
// icons stop fitting.
public int SidebarWidth = 160;
public bool AutoTellTabsShowGreetedToggle; public bool AutoTellTabsShowGreetedToggle;
public bool SeenPopOutInputHint; public bool SeenPopOutInputHint;
public bool PopOutInputEnabled = true; public bool PopOutInputEnabled = true;
public bool SeenPopOutHeaderHint; public bool SeenPopOutHeaderHint;
public bool AutoTellTabsOpenAsPopout;
// On by default: the wizard's closing step tells the user to try /tell and
// watch a conversation open on its own, so the behaviour it describes has to
// be the behaviour they get.
public bool AutoTellTabsOpenAsPopout = true;
// How sender names are rendered in the chat log.
public WorldSuffixMode WorldSuffixMode = WorldSuffixMode.OtherWorldOnly;
public NameFormMode NameFormMode = NameFormMode.Full;
public int GetRetentionDays(ChatType type) public int GetRetentionDays(ChatType type)
{ {
@@ -192,57 +143,43 @@ public class Configuration : IPluginConfiguration
// v1.2.1: default flipped false → true for consistency with other hide defaults. // v1.2.1: default flipped false → true for consistency with other hide defaults.
public bool HideInNewGamePlusMenu = true; public bool HideInNewGamePlusMenu = true;
public bool HideWhenInactive; public bool HideWhenInactive;
public int InactivityHideTimeout = 10;
public bool InactivityHideActiveDuringBattle = true;
[Obsolete("Use InactivityHideChannelsV2 instead")]
public Dictionary<ChatType, ChatSource> InactivityHideChannels = [];
public Dictionary<ChatType, (ChatSource, ChatSource)> InactivityHideChannelsV2 = [];
public bool InactivityHideExtraChatAll = true;
public HashSet<Guid> InactivityHideExtraChatChannels = [];
public bool ShowHideButton = true; public bool ShowHideButton = true;
public bool NativeItemTooltips = true; public bool NativeItemTooltips = true;
public bool ScreenshotMode;
// No control and no reader. Kept so a stored value survives until the
// rendering they describe exists; see the reconnect backlog. Note the two
// resource sets disagree on what PrettierTimestamps even means -- the wizard
// called it "relative time", the settings tab "modern layout".
public bool PrettierTimestamps = true; public bool PrettierTimestamps = true;
public bool MoreCompactPretty = true; public bool MoreCompactPretty;
public bool HideSameTimestamps = true; public bool HideSameTimestamps = true;
// No reader; see the reconnect backlog.
public bool ShowNoviceNetwork; public bool ShowNoviceNetwork;
// Migration-only since v23: the 1.5.6 sidebar↔top-tabs switch, superseded by
// MainWindowLayoutMode in the v1.6.0 rewrite. No UI control anymore; read by
// the v23 migration in Plugin.cs and kept deserializable so a 1.5.6 user's
// false value survives one load. Remove in a later schema bump.
public bool SidebarTabView = true; public bool SidebarTabView = true;
// No reader; see the reconnect backlog.
public bool PrintChangelog = true; public bool PrintChangelog = true;
public bool OnlyPreviewIf; public bool OnlyPreviewIf;
public int PreviewMinimum = 1; public int PreviewMinimum = 1;
public PreviewPosition PreviewPosition = PreviewPosition.Inside; public PreviewPosition PreviewPosition = PreviewPosition.Inside;
public CommandHelpSide CommandHelpSide = CommandHelpSide.Right; public CommandHelpSide CommandHelpSide = CommandHelpSide.None;
public KeybindMode KeybindMode = KeybindMode.Strict; public KeybindMode KeybindMode = KeybindMode.Strict;
public LanguageOverride LanguageOverride = LanguageOverride.None; public LanguageOverride LanguageOverride = LanguageOverride.None;
public bool CanMove = true; public bool CanMove = true;
public bool CanResize = true; public bool CanResize = true;
public bool ShowTitleBar; public bool ShowTitleBar = true;
public bool ShowPopOutTitleBar = true; public bool ShowPopOutTitleBar = true;
public bool DatabaseBattleMessages; public bool DatabaseBattleMessages;
public bool LoadPreviousSession;
public bool FilterIncludePreviousSessions; public bool FilterIncludePreviousSessions;
public bool SortAutoTranslate; public bool SortAutoTranslate;
public bool CollapseDuplicateMessages; public bool CollapseDuplicateMessages;
public bool CollapseKeepUniqueLinks; public bool CollapseKeepUniqueLinks;
public bool SymbolPickerEnabled = true; public bool SymbolPickerEnabled = true;
public bool PlaySounds = true; public bool PlaySounds = true;
// AUDIO-1: playback volume (0-1) for the three bundled custom sounds.
public float CustomSoundVolume = 0.5f;
// Toast when a tell the user sent could not be delivered.
public bool NotifyFailedTell = true;
// Warn before sending a message that carries plugin-only glyphs.
public bool NotifyPluginDisclosure = true;
public bool KeepInputFocus = true; public bool KeepInputFocus = true;
public int MaxLinesToRender = 2_500; // 1-10000
public bool Use24HourClock = true; public bool Use24HourClock = true;
public bool ShowEmotes = true; public bool ShowEmotes = true;
public HashSet<string> BlockedEmotes = []; public HashSet<string> BlockedEmotes = [];
@@ -282,66 +219,145 @@ public class Configuration : IPluginConfiguration
return defaults; return defaults;
} }
// No reader; see the reconnect backlog.
public bool ColorSelectedInputChannelButton = true; public bool ColorSelectedInputChannelButton = true;
public List<Tab> Tabs = []; public List<Tab> Tabs = [];
public ConfigKeyBind? ChatTabForward; public ConfigKeyBind? ChatTabForward;
public ConfigKeyBind? ChatTabBackward; public ConfigKeyBind? ChatTabBackward;
// v20 fields: window visibility state, channel popout pool size and public void UpdateFrom(Configuration other, bool backToOriginal)
// sidebar auto-switch threshold. All initializers double as the {
// migration defaults for configs loaded at v19 or earlier. if (backToOriginal)
// Still written on open/close, but no longer read for the start state: the foreach (var tab in Tabs.Where(t => t.PopOut))
// window always shows on login (1.5.6 parity, MainWindow ctor). Kept for the tab.PopOut = false;
// migration round-trip and a possible future "remember session state" opt-in.
public bool MainWindowOpen = true;
public bool SettingsWindowOpen;
public int MaxParallelPopouts = 8;
public TellAutoOpenMode TellAutoOpenMode = TellAutoOpenMode.Sidebar;
// When true (default) the tell-auto-open router switches the active tab to the HideChat = other.HideChat;
// incoming tell on every message; when false the tab is still created/revealed HideDuringCutscenes = other.HideDuringCutscenes;
// with its unread badge but the active tab is left where the user is reading. HideWhenNotLoggedIn = other.HideWhenNotLoggedIn;
public bool TellAutoOpenSwitchAlways = true; HideWhenUiHidden = other.HideWhenUiHidden;
public int SidebarAutoSwitchThresholdPx = 800; HideInLoadingScreens = other.HideInLoadingScreens;
HideInBattle = other.HideInBattle;
HideInNewGamePlusMenu = other.HideInNewGamePlusMenu;
HideWhenInactive = other.HideWhenInactive;
InactivityHideTimeout = other.InactivityHideTimeout;
InactivityHideActiveDuringBattle = other.InactivityHideActiveDuringBattle;
InactivityHideChannelsV2 = other.InactivityHideChannelsV2.ToDictionary(
pair => pair.Key,
pair => pair.Value
);
InactivityHideExtraChatAll = other.InactivityHideExtraChatAll;
InactivityHideExtraChatChannels = other.InactivityHideExtraChatChannels.ToHashSet();
ShowHideButton = other.ShowHideButton;
NativeItemTooltips = other.NativeItemTooltips;
PrettierTimestamps = other.PrettierTimestamps;
MoreCompactPretty = other.MoreCompactPretty;
HideSameTimestamps = other.HideSameTimestamps;
ShowNoviceNetwork = other.ShowNoviceNetwork;
SidebarTabView = other.SidebarTabView;
PrintChangelog = other.PrintChangelog;
OnlyPreviewIf = other.OnlyPreviewIf;
PreviewMinimum = other.PreviewMinimum;
PreviewPosition = other.PreviewPosition;
CommandHelpSide = other.CommandHelpSide;
KeybindMode = other.KeybindMode;
LanguageOverride = other.LanguageOverride;
CanMove = other.CanMove;
CanResize = other.CanResize;
ShowTitleBar = other.ShowTitleBar;
ShowPopOutTitleBar = other.ShowPopOutTitleBar;
DatabaseBattleMessages = other.DatabaseBattleMessages;
LoadPreviousSession = other.LoadPreviousSession;
FilterIncludePreviousSessions = other.FilterIncludePreviousSessions;
SortAutoTranslate = other.SortAutoTranslate;
CollapseDuplicateMessages = other.CollapseDuplicateMessages;
CollapseKeepUniqueLinks = other.CollapseKeepUniqueLinks;
SymbolPickerEnabled = other.SymbolPickerEnabled;
PlaySounds = other.PlaySounds;
KeepInputFocus = other.KeepInputFocus;
MaxLinesToRender = other.MaxLinesToRender;
Use24HourClock = other.Use24HourClock;
ShowEmotes = other.ShowEmotes;
// Deep-copy so settings window edits don't leak into live config before Save.
BlockedEmotes = new HashSet<string>(other.BlockedEmotes);
FontsEnabled = other.FontsEnabled;
ItalicEnabled = other.ItalicEnabled;
ExtraGlyphRanges = other.ExtraGlyphRanges;
FontSizeV2 = other.FontSizeV2;
GlobalFontV2 = other.GlobalFontV2;
JapaneseFontV2 = other.JapaneseFontV2;
ItalicFontV2 = other.ItalicFontV2;
SymbolsFontSizeV2 = other.SymbolsFontSizeV2;
TooltipOffset = other.TooltipOffset;
ChatColours = other.ChatColours.ToDictionary(entry => entry.Key, entry => entry.Value);
ColorSelectedInputChannelButton = other.ColorSelectedInputChannelButton;
// v22 field: MainWindow layout mode (sidebar vs. horizontal top tabs). // Keep live temp tabs alive across UpdateFrom — a settings save must
// Initializer doubles as the migration default for configs loaded at v21. // not destroy open tell conversations. Pinned TempTabs are persistent
public MainWindowLayoutMode MainWindowLayoutMode = MainWindowLayoutMode.Sidebar; // and come through `other` like regular tabs; unpinned TempTabs are
// session-only and held from the local state. For persistent tabs
// (incl. pinned), capture live runtime state by Identifier and restore
// it onto the freshly cloned tabs — CurrentChannel is critical because
// the user may have switched channel in-game between settings-open
// and settings-save, and we'd otherwise overwrite that with the
// settings-time snapshot.
var liveUnpinnedTempTabs = Tabs.Where(TabLifecycleHelpers.IsInUnpinnedPool).ToList();
var livePersistentSession = Tabs.Where(t => !TabLifecycleHelpers.IsInUnpinnedPool(t))
.ToDictionary(t => t.Identifier, t => (t.Messages, t.LastSendUnread, t.CurrentChannel));
Tabs = other
.Tabs.Where(t => !t.IsTempTab || t.IsPinned)
.Select(t =>
{
var clone = t.Clone();
if (livePersistentSession.TryGetValue(clone.Identifier, out var live))
{
clone.Messages = live.Messages;
clone.LastSendUnread = live.LastSendUnread;
clone.CurrentChannel = live.CurrentChannel;
} }
return clone;
})
.ToList();
Tabs.AddRange(liveUnpinnedTempTabs);
[Serializable] ChatTabForward = other.ChatTabForward;
public enum TellAutoOpenMode ChatTabBackward = other.ChatTabBackward;
{
Off, PrivacyFilterEnabled = other.PrivacyFilterEnabled;
Sidebar, PrivacyPersistChannels = [.. other.PrivacyPersistChannels];
TopTab, PrivacyPersistUnknownChannels = other.PrivacyPersistUnknownChannels;
Popout,
RetentionEnabled = other.RetentionEnabled;
RetentionDefaultDays = other.RetentionDefaultDays;
RetentionPerChannelDays = other.RetentionPerChannelDays.ToDictionary(
p => p.Key,
p => p.Value
);
RetentionLastRunAt = other.RetentionLastRunAt;
FirstRunCompleted = other.FirstRunCompleted;
UseHellionFont = other.UseHellionFont;
ShowHonorificTitleInHeader = other.ShowHonorificTitleInHeader;
ShowHonorificGlow = other.ShowHonorificGlow;
// v1.1.0 theme engine fields
Theme = other.Theme;
WindowOpacity = other.WindowOpacity;
ReduceMotion = other.ReduceMotion;
UseCompactDensity = other.UseCompactDensity;
EnableAutoTellTabs = other.EnableAutoTellTabs;
AutoTellTabsLimit = other.AutoTellTabsLimit;
AutoTellTabsCompactDisplay = other.AutoTellTabsCompactDisplay;
AutoTellTabsHistoryPreload = other.AutoTellTabsHistoryPreload;
SidebarWidth = other.SidebarWidth;
AutoTellTabsShowGreetedToggle = other.AutoTellTabsShowGreetedToggle;
SeenPopOutInputHint = other.SeenPopOutInputHint;
PopOutInputEnabled = other.PopOutInputEnabled;
SeenPopOutHeaderHint = other.SeenPopOutHeaderHint;
AutoTellTabsOpenAsPopout = other.AutoTellTabsOpenAsPopout;
} }
public static class TellAutoOpenModeExt
{
// The only display name set still in English. It sat inline in ChannelsTab
// as a literal array, which is why it was missed when the rest moved into
// resources; here it is at least in the same place as its peers for the
// localisation pass to pick up.
public static string Name(this TellAutoOpenMode mode) =>
mode switch
{
TellAutoOpenMode.Off => "Off",
TellAutoOpenMode.Sidebar => "Sidebar",
TellAutoOpenMode.TopTab => "Top tab",
TellAutoOpenMode.Popout => "Popout",
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
};
}
[Serializable]
public enum MainWindowLayoutMode
{
Sidebar,
TopTabs,
} }
[Serializable] [Serializable]
@@ -381,6 +397,9 @@ public class Tab
// Optional FontAwesome glyph name; null falls back to TabIconMapping default. // Optional FontAwesome glyph name; null falls back to TabIconMapping default.
public string? Icon = null; public string? Icon = null;
[Obsolete("Removed in favor of SelectedChannels")]
public Dictionary<ChatType, ChatSource> ChatCodes = new();
public Dictionary<ChatType, (ChatSource, ChatSource)> SelectedChannels = new(); public Dictionary<ChatType, (ChatSource, ChatSource)> SelectedChannels = new();
public bool ExtraChatAll; public bool ExtraChatAll;
public HashSet<Guid> ExtraChatChannels = []; public HashSet<Guid> ExtraChatChannels = [];
@@ -397,37 +416,23 @@ public class Tab
public bool CanMove = true; public bool CanMove = true;
public bool CanResize = true; public bool CanResize = true;
// Six per-tab hide conditions used to live here. Their reader was the public bool IndependentHide;
// pop-out window, which stopped consulting them in cf4705e; the equivalents public bool HideDuringCutscenes = true;
// that survive are the window-level fields of the same name further up this public bool HideWhenNotLoggedIn = true;
// file, and v1.12.0 gave every one of those a control. public bool HideWhenUiHidden = true;
// public bool HideInLoadingScreens;
// Per-tab was the wrong unit anyway: "hide during cutscenes" is a statement public bool HideInBattle;
// about the screen, not about one conversation.
//
// HideWhenInactive stays -- the auto-tell service writes it.
public bool HideWhenInactive; public bool HideWhenInactive;
public bool IsTempTab; public bool IsTempTab;
// Pinned TempTabs survive plugin reload and logout -- tester feedback in // Pinned TempTabs survive plugin reload and logout — tester feedback from
// v1.4.7. Pinned tabs live in their own pool (MaxPinnedTempTabs) separate // Jin (v1.4.7). Pinned tabs live in their own pool (MaxPinnedTempTabs)
// from the AutoTellTabsLimit bucket. // separate from the AutoTellTabsLimit bucket.
public bool IsPinned; public bool IsPinned;
public bool AllSenderMessages; public bool AllSenderMessages;
public TellTarget TellTarget = TellTarget.Empty(); public TellTarget TellTarget = TellTarget.Empty();
// Set once, where the name is built from a conversation partner. Never
// cleared by promotion, unlike IsTempTab and TellTarget -- both of those are
// routing state and are deliberately wiped when a tab is promoted, while the
// name they produced stays. Screenshot mode reads this, so it has to outlive
// every path that keeps the name but drops the binding.
public bool NameCameFromPartner;
// Per-tab notification sound for messages arriving in an inactive tab.
public bool EnableNotificationSound;
public uint NotificationSoundId = 1;
[NonSerialized] [NonSerialized]
public uint Unread; public uint Unread;
@@ -470,45 +475,6 @@ public class Tab
[NonSerialized] [NonSerialized]
internal string? _cachedTellIcon; internal string? _cachedTellIcon;
// hover-lerp state. Default 0f means "not hovered". Sidebar
// path animates per tab; card-mode-border path is tab-aggregate
// (any card-row hover ramps the alpha for all cards in this tab).
// Lerp speed lives in the render loop, not here, so the same field
// serves both sites at the same animation curve.
[NonSerialized]
internal float _hoverAlpha;
[NonSerialized]
internal float _cardHoverAlpha;
// Copy-on-write for the three channel-filter fields. They are read without
// any lock from the pending-message thread, the filter worker and the draw
// thread, and until v1.12.0 nothing ever wrote them after load -- so the
// tab editor is their first writer, and mutating a live Dictionary while
// Matches enumerates it is the classic way to get a wrong answer or an
// exception on somebody else's thread.
//
// Building the replacements and swapping the references means a reader sees
// either the old set or the new one, never half of either.
//
// What this deliberately does not do is make the three writes one atomic
// step. A reader can catch the new dictionary with the old ExtraChat flag
// for a single message. That is harmless: the editor finishes by clearing
// and refiltering every tab, so any message placed by a mixed view is
// reconsidered a moment later. Making it truly atomic would mean one
// reference for all three, and these three are serialized fields with a
// shape the config file already has.
internal void ReplaceChannelFilter(
Dictionary<ChatType, (ChatSource, ChatSource)> selected,
bool extraChatAll,
HashSet<Guid> extraChatChannels
)
{
Volatile.Write(ref SelectedChannels, selected);
Volatile.Write(ref ExtraChatChannels, extraChatChannels);
Volatile.Write(ref ExtraChatAll, extraChatAll);
}
public bool Matches(Message message) public bool Matches(Message message)
{ {
if (!message.Matches(SelectedChannels, ExtraChatAll, ExtraChatChannels)) if (!message.Matches(SelectedChannels, ExtraChatAll, ExtraChatChannels))
@@ -529,13 +495,13 @@ public class Tab
return; return;
Unread += 1; Unread += 1;
if (
// Stamped for every message now. The condition that used to sit here message.Matches(
// filtered on InactivityHideChannels, a setting for the hide-when- Plugin.Config.InactivityHideChannelsV2,
// inactive feature -- and that feature lost its reader in cf4705e. So Plugin.Config.InactivityHideExtraChatAll,
// which tell tab the auto-tell pool drops first, which is the only Plugin.Config.InactivityHideExtraChatChannels
// thing that reads this stamp, hung on a setting for something that )
// does not happen. )
LastActivity = Environment.TickCount64; LastActivity = Environment.TickCount64;
} }
@@ -546,11 +512,6 @@ public class Tab
return new Tab return new Tab
{ {
Name = Name, Name = Name,
// Icon feeds the sidebar glyph and a clone round-trip used to drop
// it silently. ChatCodes sat beside it until v1.12.0, carrying data
// for a migration that the v16 schema gate had already made
// unreachable.
Icon = Icon,
SelectedChannels = SelectedChannels.ToDictionary(pair => pair.Key, pair => pair.Value), SelectedChannels = SelectedChannels.ToDictionary(pair => pair.Key, pair => pair.Value),
ExtraChatAll = ExtraChatAll, ExtraChatAll = ExtraChatAll,
ExtraChatChannels = ExtraChatChannels.ToHashSet(), ExtraChatChannels = ExtraChatChannels.ToHashSet(),
@@ -568,13 +529,17 @@ public class Tab
CurrentChannel = CurrentChannel.Clone(), CurrentChannel = CurrentChannel.Clone(),
CanMove = CanMove, CanMove = CanMove,
CanResize = CanResize, CanResize = CanResize,
IndependentHide = IndependentHide,
HideDuringCutscenes = HideDuringCutscenes,
HideWhenNotLoggedIn = HideWhenNotLoggedIn,
HideWhenUiHidden = HideWhenUiHidden,
HideInLoadingScreens = HideInLoadingScreens,
HideInBattle = HideInBattle,
HideWhenInactive = HideWhenInactive, HideWhenInactive = HideWhenInactive,
IsTempTab = IsTempTab, IsTempTab = IsTempTab,
IsPinned = IsPinned, IsPinned = IsPinned,
AllSenderMessages = AllSenderMessages, AllSenderMessages = AllSenderMessages,
TellTarget = TellTarget.Clone(), TellTarget = TellTarget.Clone(),
EnableNotificationSound = EnableNotificationSound,
NotificationSoundId = NotificationSoundId,
IsGreeted = IsGreeted, IsGreeted = IsGreeted,
}; };
} }
@@ -858,27 +823,17 @@ public enum LanguageOverride
French, French,
German, German,
Greek, Greek,
// Italian,
Japanese, Japanese,
// Korean,
// Norwegian,
PortugueseBrazil, PortugueseBrazil,
Romanian, Romanian,
Russian, Russian,
Spanish, Spanish,
Swedish, Swedish,
// v1.5.3: Crowdin-heritage activated and Forge-maintained additions.
// Append-only to preserve serialized integer values of existing user configs.
Italian,
Korean,
Norwegian,
Catalan,
Czech,
Danish,
Finnish,
Hungarian,
Polish,
PortuguesePortugal,
Turkish,
Ukrainian,
} }
public static class LanguageOverrideExt public static class LanguageOverrideExt
@@ -894,24 +849,15 @@ public static class LanguageOverrideExt
LanguageOverride.French => "Français", LanguageOverride.French => "Français",
LanguageOverride.German => "Deutsch", LanguageOverride.German => "Deutsch",
LanguageOverride.Greek => "Ελληνικά", LanguageOverride.Greek => "Ελληνικά",
LanguageOverride.Italian => "Italiano", // LanguageOverride.Italian => "Italiano",
LanguageOverride.Japanese => "日本語", LanguageOverride.Japanese => "日本語",
LanguageOverride.Korean => "한국어", // LanguageOverride.Korean => "한국어 (Korean)",
LanguageOverride.Norwegian => "Norsk bokmål", // LanguageOverride.Norwegian => "Norsk",
LanguageOverride.PortugueseBrazil => "Português do Brasil", LanguageOverride.PortugueseBrazil => "Português do Brasil",
LanguageOverride.Romanian => "Română", LanguageOverride.Romanian => "Română",
LanguageOverride.Russian => "Русский", LanguageOverride.Russian => "Русский",
LanguageOverride.Spanish => "Español", LanguageOverride.Spanish => "Español",
LanguageOverride.Swedish => "Svenska", LanguageOverride.Swedish => "Svenska",
LanguageOverride.Catalan => "Català",
LanguageOverride.Czech => "Čeština",
LanguageOverride.Danish => "Dansk",
LanguageOverride.Finnish => "Suomi",
LanguageOverride.Hungarian => "Magyar",
LanguageOverride.Polish => "Polski",
LanguageOverride.PortuguesePortugal => "Português (Portugal)",
LanguageOverride.Turkish => "Türkçe",
LanguageOverride.Ukrainian => "Українська",
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
}; };
@@ -926,80 +872,17 @@ public static class LanguageOverrideExt
LanguageOverride.French => "fr", LanguageOverride.French => "fr",
LanguageOverride.German => "de", LanguageOverride.German => "de",
LanguageOverride.Greek => "el", LanguageOverride.Greek => "el",
LanguageOverride.Italian => "it", // LanguageOverride.Italian => "it",
LanguageOverride.Japanese => "ja", LanguageOverride.Japanese => "ja",
LanguageOverride.Korean => "ko", // LanguageOverride.Korean => "ko",
LanguageOverride.Norwegian => "nb", // LanguageOverride.Norwegian => "no",
LanguageOverride.PortugueseBrazil => "pt-br", LanguageOverride.PortugueseBrazil => "pt-br",
LanguageOverride.Romanian => "ro", LanguageOverride.Romanian => "ro",
LanguageOverride.Russian => "ru", LanguageOverride.Russian => "ru",
LanguageOverride.Spanish => "es", LanguageOverride.Spanish => "es",
LanguageOverride.Swedish => "sv", LanguageOverride.Swedish => "sv",
LanguageOverride.Catalan => "ca",
LanguageOverride.Czech => "cs",
LanguageOverride.Danish => "da",
LanguageOverride.Finnish => "fi",
LanguageOverride.Hungarian => "hu",
LanguageOverride.Polish => "pl",
LanguageOverride.PortuguesePortugal => "pt-pt",
LanguageOverride.Turkish => "tr",
LanguageOverride.Ukrainian => "uk",
_ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null), _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
}; };
// Maps a language to the ExtraGlyphRanges flag required for full UI
// rendering in that locale. The settings save path ORs this into
// Mutable.ExtraGlyphRanges so users do not need to know which range
// to tick manually. Returns 0 for locales fully covered by the default
// ImGui glyph range (Latin-1) or by the separate Japanese font handle.
// The same mapping keyed by culture code, for when the language override is
// None and the UI follows Dalamud. Without this the ranges only ever get
// filled by an explicit language pick -- installs that never touched the
// setting rendered their own locale in whatever the default range covers,
// which for Korean, Chinese, Cyrillic and Greek is boxes. It went unnoticed
// while configs accumulated ranges over time; a fresh config has none.
public static ExtraGlyphRanges RequiredGlyphRangesForCulture(string? cultureCode)
{
var code = (cultureCode ?? string.Empty).ToLowerInvariant();
// Longest first: zh-hant has to win over the zh prefix.
if (code.StartsWith("zh-hant") || code.StartsWith("zh-tw") || code.StartsWith("zh-hk"))
return ExtraGlyphRanges.ChineseFull;
if (code.StartsWith("zh"))
return ExtraGlyphRanges.ChineseSimplifiedCommon;
if (code.StartsWith("ko"))
return ExtraGlyphRanges.Korean;
if (code.StartsWith("uk") || code.StartsWith("ru") || code.StartsWith("be"))
return ExtraGlyphRanges.Cyrillic;
if (code.StartsWith("el"))
return ExtraGlyphRanges.Greek;
if (
code.StartsWith("cs")
|| code.StartsWith("pl")
|| code.StartsWith("ro")
|| code.StartsWith("hu")
|| code.StartsWith("tr")
)
return ExtraGlyphRanges.LatinExtended;
return 0;
}
public static ExtraGlyphRanges RequiredGlyphRanges(this LanguageOverride mode) =>
mode switch
{
LanguageOverride.Korean => ExtraGlyphRanges.Korean,
LanguageOverride.ChineseSimplified => ExtraGlyphRanges.ChineseSimplifiedCommon,
LanguageOverride.ChineseTraditional => ExtraGlyphRanges.ChineseFull,
LanguageOverride.Ukrainian => ExtraGlyphRanges.Cyrillic,
LanguageOverride.Greek => ExtraGlyphRanges.Greek,
LanguageOverride.Czech
or LanguageOverride.Polish
or LanguageOverride.Romanian
or LanguageOverride.Hungarian
or LanguageOverride.Turkish => ExtraGlyphRanges.LatinExtended,
_ => 0,
};
} }
[Serializable] [Serializable]
@@ -1013,23 +896,10 @@ public enum ExtraGlyphRanges
Korean = 1 << 4, Korean = 1 << 4,
Thai = 1 << 5, Thai = 1 << 5,
Vietnamese = 1 << 6, Vietnamese = 1 << 6,
// v1.5.3: Custom ranges for languages with Latin Extended-A glyphs (Czech,
// Polish, Romanian, Turkish, Hungarian) and Greek polytonic accents.
LatinExtended = 1 << 7,
Greek = 1 << 8,
} }
public static class ExtraGlyphRangesExt public static class ExtraGlyphRangesExt
{ {
// Custom (start, end) inclusive pair lists for ranges that ImGui does
// not ship a built-in helper for. SetUpRanges() feeds these into
// ImFontGlyphRangesBuilder.AddChar via the `chars` parameter of
// BuildRange so we avoid the lifetime/pinning question that the native
// GetGlyphRanges*-pointer pathway papers over.
internal static readonly ushort[] LatinExtendedPairs = { 0x0100, 0x024F };
internal static readonly ushort[] GreekPairs = { 0x0370, 0x03FF, 0x1F00, 0x1FFF };
public static string Name(this ExtraGlyphRanges ranges) => public static string Name(this ExtraGlyphRanges ranges) =>
ranges switch ranges switch
{ {
@@ -1041,8 +911,6 @@ public static class ExtraGlyphRangesExt
ExtraGlyphRanges.Korean => Language.ExtraGlyphRanges_Korean_Name, ExtraGlyphRanges.Korean => Language.ExtraGlyphRanges_Korean_Name,
ExtraGlyphRanges.Thai => Language.ExtraGlyphRanges_Thai_Name, ExtraGlyphRanges.Thai => Language.ExtraGlyphRanges_Thai_Name,
ExtraGlyphRanges.Vietnamese => Language.ExtraGlyphRanges_Vietnamese_Name, ExtraGlyphRanges.Vietnamese => Language.ExtraGlyphRanges_Vietnamese_Name,
ExtraGlyphRanges.LatinExtended => Language.ExtraGlyphRanges_LatinExtended_Name,
ExtraGlyphRanges.Greek => Language.ExtraGlyphRanges_Greek_Name,
_ => throw new ArgumentOutOfRangeException(nameof(ranges), ranges, null), _ => throw new ArgumentOutOfRangeException(nameof(ranges), ranges, null),
}; };
@@ -1057,10 +925,6 @@ public static class ExtraGlyphRangesExt
ExtraGlyphRanges.Korean => (nint)ImGui.GetIO().Fonts.GetGlyphRangesKorean(), ExtraGlyphRanges.Korean => (nint)ImGui.GetIO().Fonts.GetGlyphRangesKorean(),
ExtraGlyphRanges.Thai => (nint)ImGui.GetIO().Fonts.GetGlyphRangesThai(), ExtraGlyphRanges.Thai => (nint)ImGui.GetIO().Fonts.GetGlyphRangesThai(),
ExtraGlyphRanges.Vietnamese => (nint)ImGui.GetIO().Fonts.GetGlyphRangesVietnamese(), ExtraGlyphRanges.Vietnamese => (nint)ImGui.GetIO().Fonts.GetGlyphRangesVietnamese(),
// LatinExtended and Greek are applied via builder.AddChar in
// FontManager.SetUpRanges, not through a native pointer range.
ExtraGlyphRanges.LatinExtended => 0,
ExtraGlyphRanges.Greek => 0,
_ => throw new ArgumentOutOfRangeException(nameof(ranges), ranges, null), _ => throw new ArgumentOutOfRangeException(nameof(ranges), ranges, null),
}; };
} }
+2 -29
View File
@@ -125,15 +125,6 @@ public static class EmoteCache
try try
{ {
var global = await Client.GetAsync(GlobalEmotes, ct); var global = await Client.GetAsync(GlobalEmotes, ct);
if (!global.IsSuccessStatusCode)
{
// Nothing usable at all -- let the catch below reset to Unloaded
// so a later trigger can retry.
throw new HttpRequestException(
$"BetterTTV global emotes returned {(int)global.StatusCode}."
);
}
var globalList = await global.Content.ReadAsStringAsync(ct); var globalList = await global.Content.ReadAsStringAsync(ct);
foreach (var emote in JsonSerializer.Deserialize<Emote[]>(globalList)!) foreach (var emote in JsonSerializer.Deserialize<Emote[]>(globalList)!)
@@ -144,27 +135,9 @@ public static class EmoteCache
for (var i = 0; i < 15; i++) for (var i = 0; i < 15; i++)
{ {
var top = await Client.GetAsync(Top100Emotes.Format(BetterTTV, lastId), ct); var top = await Client.GetAsync(Top100Emotes.Format(BetterTTV, lastId), ct);
// The shared-emote endpoint went behind authentication and now
// answers 403 with a JSON object. Deserializing that as a list
// threw on every single start, and took the global emotes -- which
// still work -- down with it. The global set is the useful half
// anyway, so a failure here stops paging instead of the load.
if (!top.IsSuccessStatusCode)
{
Plugin.LogProxy.Warning(
$"BetterTTV shared emotes unavailable ({(int)top.StatusCode}); "
+ "continuing with global emotes only."
);
break;
}
var topList = await top.Content.ReadAsStringAsync(ct); var topList = await top.Content.ReadAsStringAsync(ct);
var jsonList = JsonSerializer.Deserialize<List<Top100>>(topList); var jsonList = JsonSerializer.Deserialize<List<Top100>>(topList)!;
if (jsonList is not { Count: > 0 })
break;
// BetterTTV occasionally returns entries with a null Code; // BetterTTV occasionally returns entries with a null Code;
// skip them so a single bad row doesn't break the whole cache. // skip them so a single bad row doesn't break the whole cache.
foreach (var emote in jsonList) foreach (var emote in jsonList)
@@ -174,7 +147,7 @@ public static class EmoteCache
) )
Cache.TryAdd(emote.Emote.Code, emote.Emote); Cache.TryAdd(emote.Emote.Code, emote.Emote);
lastId = jsonList[^1].Id; lastId = jsonList.Last().Id;
} }
SortedCodeArray = Cache.Keys.Order().ToArray(); SortedCodeArray = Cache.Keys.Order().ToArray();
+14 -104
View File
@@ -1,7 +1,6 @@
using System.Globalization; using System.Globalization;
using System.Text; using System.Text;
using HellionChat.Code; using HellionChat.Code;
using HellionChat.Util;
namespace HellionChat.Export; namespace HellionChat.Export;
@@ -34,23 +33,9 @@ internal static class ExportFormatExt
} }
// Serializes message snapshots to Markdown, JSON, or CSV. // Serializes message snapshots to Markdown, JSON, or CSV.
// // Caller handles pre-filtering except sender substring, which requires deserialized SeString.TextValue.
// 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 internal static class MessageExporter
{ {
private static readonly UTF8Encoding Utf8NoBom = new(encoderShouldEmitUTF8Identifier: false);
internal record FilterDescription( internal record FilterDescription(
IReadOnlyCollection<int>? ChatTypes, IReadOnlyCollection<int>? ChatTypes,
DateTimeOffset? From, DateTimeOffset? From,
@@ -65,83 +50,22 @@ internal static class MessageExporter
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 var matching = filter.SenderSubstring is { Length: > 0 } needle
? messages.Where(m => MatchesSender(m, needle)) ? messages.Where(m => MatchesSender(m, needle))
: messages; : messages;
// Written beside the target and moved into place at the end. A crash or using var writer = new StreamWriter(path, append: false, encoding: Encoding.UTF8);
// an unplugged drive halfway through would otherwise leave a file that return format switch
// 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
{
// 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.Markdown => WriteMarkdown(writer, matching, filter),
ExportFormat.Json => WriteJson(writer, matching, filter), ExportFormat.Json => WriteJson(writer, matching, filter),
_ => WriteCsv(writer, matching, filter), ExportFormat.Csv => WriteCsv(writer, matching, filter),
_ => throw new ArgumentOutOfRangeException(nameof(format), format, null),
}; };
} }
// 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;
}
}
// 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 bool MatchesSender(Message m, string needle) => private static bool MatchesSender(Message m, string needle) =>
SenderText(m).Contains(needle, StringComparison.OrdinalIgnoreCase); m.SenderSource.TextValue.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( private static int WriteMarkdown(
StreamWriter w, StreamWriter w,
@@ -170,8 +94,8 @@ internal static class MessageExporter
} }
var chatType = (ChatType)(ushort)m.Code.Type; var chatType = (ChatType)(ushort)m.Code.Type;
var sender = SenderText(m).Trim().Trim('<', '>', '[', ']', ':').Trim(); var sender = m.SenderSource.TextValue.Trim().Trim('<', '>', '[', ']', ':').Trim();
var content = ContentText(m); var content = m.ContentSource.TextValue;
if (string.IsNullOrEmpty(sender)) if (string.IsNullOrEmpty(sender))
w.WriteLine($"**[{localDate:HH:mm}] {chatType}:** {content}"); w.WriteLine($"**[{localDate:HH:mm}] {chatType}:** {content}");
@@ -246,17 +170,12 @@ internal static class MessageExporter
w.Write($",\"date\":\"{m.Date.ToString("O", CultureInfo.InvariantCulture)}\""); w.Write($",\"date\":\"{m.Date.ToString("O", CultureInfo.InvariantCulture)}\"");
w.Write($",\"chat_type\":{(int)m.Code.Type}"); w.Write($",\"chat_type\":{(int)m.Code.Type}");
w.Write($",\"chat_type_name\":\"{chatType}\""); w.Write($",\"chat_type_name\":\"{chatType}\"");
// Cast, not interpolate. These are XivChatRelationKind, and string w.Write($",\"source_kind\":{m.Code.Source}");
// interpolation of an enum writes the member name -- so every w.Write($",\"target_kind\":{m.Code.Target}");
// 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($",\"receiver\":{m.Receiver}");
w.Write($",\"content_id\":{m.ContentId}"); w.Write($",\"content_id\":{m.ContentId}");
w.Write($",\"sender\":{JsonString(SenderText(m))}"); w.Write($",\"sender\":{JsonString(m.SenderSource.TextValue)}");
w.Write($",\"content\":{JsonString(ContentText(m))}"); w.Write($",\"content\":{JsonString(m.ContentSource.TextValue)}");
w.Write("}"); w.Write("}");
} }
@@ -284,9 +203,9 @@ internal static class MessageExporter
w.Write(','); w.Write(',');
w.Write(CsvString(chatType.ToString())); w.Write(CsvString(chatType.ToString()));
w.Write(','); w.Write(',');
w.Write(CsvString(SenderText(m))); w.Write(CsvString(m.SenderSource.TextValue));
w.Write(','); w.Write(',');
w.Write(CsvString(ContentText(m))); w.Write(CsvString(m.ContentSource.TextValue));
w.Write(','); w.Write(',');
w.Write(m.Receiver); w.Write(m.Receiver);
w.Write(','); w.Write(',');
@@ -339,17 +258,8 @@ internal static class MessageExporter
private static string CsvString(string s) 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) if (s.IndexOfAny(['"', ',', '\n', '\r']) < 0)
return s; return s;
return "\"" + s.Replace("\"", "\"\"") + "\""; return "\"" + s.Replace("\"", "\"\"") + "\"";
} }
} }
+36 -284
View File
@@ -6,12 +6,10 @@ using Dalamud.Interface.GameFonts;
using Dalamud.Interface.ManagedFontAtlas; using Dalamud.Interface.ManagedFontAtlas;
using Dalamud.Interface.Utility; using Dalamud.Interface.Utility;
using Dalamud.Plugin; using Dalamud.Plugin;
using HellionChat.Themes;
using HellionChat.Ui.StyleEngine;
namespace HellionChat; namespace HellionChat;
// Two LogProxy sites live in static methods (TryGetBundledFontBytes, // Two LogProxy sites live in static methods (TryGetHellionFontBytes,
// AddFontWithFallback); a ctor-injected ILogger would not be reachable // AddFontWithFallback); a ctor-injected ILogger would not be reachable
// from those scopes, so the class stays on Plugin.LogProxy. // from those scopes, so the class stays on Plugin.LogProxy.
// //
@@ -41,70 +39,9 @@ public sealed class FontManager : IDisposable
internal IFontHandle? RegularFont; internal IFontHandle? RegularFont;
internal IFontHandle? ItalicFont; internal IFontHandle? ItalicFont;
// 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;
// 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 (B4b-3); 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[] Ranges = [];
private ushort[] JpRange = []; 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 = public static readonly HashSet<float> AxisFontSizeList =
[ [
9.6f, 9.6f,
@@ -125,8 +62,8 @@ public sealed class FontManager : IDisposable
90f, 90f,
]; ];
// Bundled UI font bytes (Inter Light, OFL-1.1); lazily loaded from manifest resources // Hellion font bytes (Exo 2, OFL-1.1); lazily loaded from manifest resources
private static byte[]? BundledFontBytes; private static byte[]? HellionFontBytes;
public FontManager(IDalamudPluginInterface pluginInterface) public FontManager(IDalamudPluginInterface pluginInterface)
{ {
@@ -154,13 +91,7 @@ public sealed class FontManager : IDisposable
if (Plugin.Config.ItalicEnabled) if (Plugin.Config.ItalicEnabled)
ItalicFont = BuildItalicFontHandle(atlas); 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 // Called from the settings save path when one of the font-related
@@ -177,165 +108,39 @@ public sealed class FontManager : IDisposable
var atlas = _pluginInterface.UiBuilder.FontAtlas; 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?.Dispose();
RegularFont = BuildRegularFontHandle(atlas); RegularFont = BuildRegularFontHandle(atlas);
ItalicFont?.Dispose(); ItalicFont?.Dispose();
ItalicFont = Plugin.Config.ItalicEnabled ? BuildItalicFontHandle(atlas) : null; 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();
}
} }
// Instance method so Ranges / JpRange are reachable without parameter // Instance method so Ranges / JpRange are reachable without parameter
// plumbing; PascalCase field names follow the existing class style. // 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
)
{
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) => private IFontHandle BuildRegularFontHandle(IFontAtlas atlas) =>
atlas.NewDelegateFontHandle(e => atlas.NewDelegateFontHandle(e =>
e.OnPreBuild(tk => e.OnPreBuild(tk =>
{ {
var basePt = ResolveGlobalFontPt(); // UseHellionFont swaps the source font but keeps the size
// selector tied to FontSizeV2 (the Hellion font ships as
// a single weight).
var basePt = Plugin.Config.UseHellionFont
? Plugin.Config.FontSizeV2
: Plugin.Config.GlobalFontV2.SizePt;
var config = new SafeFontConfig { SizePt = basePt, GlyphRanges = Ranges }; var config = new SafeFontConfig { SizePt = basePt, GlyphRanges = Ranges };
// Missing embedded resource falls back to the configured // Missing embedded resource falls back to the configured
// system font instead of taking the whole UiBuilder down. // system font instead of taking the whole UiBuilder down.
var bundledBytes = Plugin.Config.UseHellionFont ? TryGetBundledFontBytes() : null; var hellionBytes = Plugin.Config.UseHellionFont ? TryGetHellionFontBytes() : null;
config.MergeFont = bundledBytes is not null config.MergeFont = hellionBytes is not null
? tk.AddFontFromMemory(bundledBytes, config, "Inter-Light") ? tk.AddFontFromMemory(hellionBytes, config, "Hellion-Exo2")
: AddFontWithFallback(tk, Plugin.Config.GlobalFontV2.FontId, config, "global"); : AddFontWithFallback(tk, Plugin.Config.GlobalFontV2.FontId, config, "global");
AddCjkAndSymbols(tk, config, basePt); config.SizePt = Plugin.Config.JapaneseFontV2.SizePt;
config.GlyphRanges = JpRange;
AddFontWithFallback(tk, Plugin.Config.JapaneseFontV2.FontId, config, "japanese");
tk.Font = config.MergeFont; config.SizePt = Plugin.Config.SymbolsFontSizeV2;
}) tk.AddGameSymbol(config);
);
// 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; tk.Font = config.MergeFont;
}) })
@@ -357,7 +162,12 @@ public sealed class FontManager : IDisposable
"italic" "italic"
); );
AddCjkAndSymbols(tk, config, Plugin.Config.ItalicFontV2.SizePt); 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; tk.Font = config.MergeFont;
}) })
@@ -371,43 +181,37 @@ public sealed class FontManager : IDisposable
// lifetime, so the plugin must not dispose it. // lifetime, so the plugin must not dispose it.
RegularFont?.Dispose(); RegularFont?.Dispose();
ItalicFont?.Dispose(); ItalicFont?.Dispose();
SenderFont?.Dispose();
MetaFont?.Dispose();
} }
// Returns null when the embedded font resource is missing. Should not // Returns null when the embedded font resource is missing. Should not
// happen on a signed release build, but a broken csproj or hand-rolled // 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 // dev build can land here. Caller falls back to the system font path
// so the plugin still loads instead of crashing the whole UiBuilder. // so the plugin still loads instead of crashing the whole UiBuilder.
private static byte[]? TryGetBundledFontBytes() private static byte[]? TryGetHellionFontBytes()
{ {
if (BundledFontBytes is not null) if (HellionFontBytes is not null)
return BundledFontBytes; return HellionFontBytes;
using var stream = typeof(FontManager).Assembly.GetManifestResourceStream( using var stream = typeof(FontManager).Assembly.GetManifestResourceStream(
"Inter-Light.ttf" "HellionFont.ttf"
); );
if (stream is null) if (stream is null)
{ {
Plugin.LogProxy.Warning( Plugin.LogProxy.Warning(
"Bundled Inter Light font resource missing, falling back to system default font." "Hellion font resource missing — falling back to system default font."
); );
return null; return null;
} }
using var ms = new MemoryStream(); using var ms = new MemoryStream();
stream.CopyTo(ms); stream.CopyTo(ms);
BundledFontBytes = ms.ToArray(); HellionFontBytes = ms.ToArray();
return BundledFontBytes; return HellionFontBytes;
} }
private unsafe void SetUpRanges() private unsafe void SetUpRanges()
{ {
ushort[] BuildRange( ushort[] BuildRange(IReadOnlyList<ushort>? chars, params nint[] ranges)
IReadOnlyList<ushort>? chars,
bool includeCommonExtras,
params nint[] ranges
)
{ {
var builder = new ImFontGlyphRangesBuilderPtr(ImGuiNative.ImFontGlyphRangesBuilder()); var builder = new ImFontGlyphRangesBuilderPtr(ImGuiNative.ImFontGlyphRangesBuilder());
foreach (var range in ranges) foreach (var range in ranges)
@@ -425,16 +229,8 @@ public sealed class FontManager : IDisposable
} }
} }
// 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 // Ingame supported ranges
var reader = new FdtReader( var reader = new FdtReader(Plugin.DataManager.GetFile("common/font/axis_12.fdt")!.Data);
Plugin.DataManager.GetFile("common/font/axis_12.fdt")!.Data
);
foreach (var c in reader.Glyphs) foreach (var c in reader.Glyphs)
builder.AddChar(c.Char); builder.AddChar(c.Char);
@@ -443,65 +239,21 @@ public sealed class FontManager : IDisposable
builder.AddText("Œœ"); builder.AddText("Œœ");
builder.AddText("ĂăÂâÎîȘșȚț"); builder.AddText("ĂăÂâÎîȘșȚț");
// 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 // "Enclosed Alphanumerics" (partial) https://www.compart.com/en/unicode/block/U+2460
for (var i = 0x2460; i <= 0x24B5; i++) for (var i = 0x2460; i <= 0x24B5; i++)
builder.AddChar((char)i); builder.AddChar((char)i);
builder.AddChar('⓪'); builder.AddChar('⓪');
}
return builder.BuildRangesToArray(); return builder.BuildRangesToArray();
} }
var ranges = new List<nint> { (nint)ImGui.GetIO().Fonts.GetGlyphRangesDefault() }; var ranges = new List<nint> { (nint)ImGui.GetIO().Fonts.GetGlyphRangesDefault() };
var customChars = new List<ushort>();
foreach (var extraRange in Enum.GetValues<ExtraGlyphRanges>()) foreach (var extraRange in Enum.GetValues<ExtraGlyphRanges>())
{ if (Plugin.Config.ExtraGlyphRanges.HasFlag(extraRange))
if (!Plugin.Config.ExtraGlyphRanges.HasFlag(extraRange)) ranges.Add(extraRange.Range());
continue;
// LatinExtended and Greek use AddChar pairs because they have no Ranges = BuildRange(null, ranges.ToArray());
// built-in ImGui range helper; everything else points to a native JpRange = BuildRange(GlyphRangesJapanese.GlyphRanges);
// 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);
} }
// Add font with fallback to NotoSansCjkRegular if unavailable // Add font with fallback to NotoSansCjkRegular if unavailable
-18
View File
@@ -1,18 +0,0 @@
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;
}
+65 -59
View File
@@ -232,13 +232,15 @@ internal sealed unsafe class Chat : IDisposable
if (c != '\0' && !char.IsControl(c)) if (c != '\0' && !char.IsControl(c))
input = c.ToString(); input = c.ToString();
// Seed the just-typed character into our input field and focus it, the try
// same InputBar.AppendPending + Activate prefill path inventory item-links
// use. Prefill only, deliberately: no tab switch.
if (input != null)
{ {
Plugin.InputBar.AppendPending(input); Plugin.ChatLogWindow.Activated(
Plugin.InputBar.Activate = true; new ChatActivatedArgs(new ChannelSwitchInfo(null)) { Input = input }
);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error in chat Activated event");
} }
}); });
} }
@@ -253,12 +255,22 @@ internal sealed unsafe class Chat : IDisposable
addIfNotPresent = add; addIfNotPresent = add;
} }
// Route the addIfNotPresent token into the InputBar so inventory try
// right-click "Link item" reaches our input field instead of being lost.
if (addIfNotPresent != null && !Plugin.InputBar.PendingMessage.Contains(addIfNotPresent))
{ {
Plugin.InputBar.AppendPending(addIfNotPresent); // Prevent duplicate calls
Plugin.InputBar.Activate = true; if (Plugin.ChatLogWindow.TellSpecial)
return ChatLogRefreshHook!.Original(log, eventId, value);
Plugin.ChatLogWindow.Activated(
new ChatActivatedArgs(new ChannelSwitchInfo(null))
{
AddIfNotPresent = addIfNotPresent,
}
);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error in chat Activated event");
} }
return 1; // Prevent vanilla chat log from gaining focus return 1; // Prevent vanilla chat log from gaining focus
@@ -317,30 +329,6 @@ internal sealed unsafe class Chat : IDisposable
ReplyInSelectedChatModeHook!.Original(agent); ReplyInSelectedChatModeHook!.Original(agent);
} }
// 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( private bool SetContextTellTarget(
RaptureShellModule* a1, RaptureShellModule* a1,
Utf8String* playerName, Utf8String* playerName,
@@ -354,14 +342,28 @@ internal sealed unsafe class Chat : IDisposable
{ {
if (playerName != null) if (playerName != null)
{ {
// Right-click -> Send Tell: prefill our input the same way our own try
// "Send Tell" payload menu does (PayloadHandler), then focus. Prefill {
// only, deliberately: no tab switch, no ChatActivatedArgs revival. var target = new TellTarget(
// The game supplies worldName here, so no sheet lookup.
PrefillTellInput(
playerName->ToString(), playerName->ToString(),
worldName != null ? worldName->ToString() : null worldId,
contentId,
(TellReason)reason
); );
Plugin.ChatLogWindow.Activated(
new ChatActivatedArgs(
new ChannelSwitchInfo(InputChannel.Tell, permanent: setChatType)
)
{
TellReason = (TellReason)reason,
TellTarget = target,
}
);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error in chat Activated event");
}
} }
return SetChatLogTellTargetHook!.Original( return SetChatLogTellTargetHook!.Original(
@@ -391,13 +393,27 @@ internal sealed unsafe class Chat : IDisposable
if (playerName != null) if (playerName != null)
{ {
// In-foray right-click -> Send Tell: same prefill path as the non-foray try
// tell. The foray-specific TellSpecial channel routing stays deferred {
// (v1.8.1, SetEurekaTellChannel) -- prefill only here as well. var target = new TellTarget(
PrefillTellInput(
playerName->ToString(), playerName->ToString(),
worldName != null ? worldName->ToString() : null 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)
{
_logger.LogError(ex, "Error in chat Activated event");
}
} }
ContextMenuTellInForayHook!.Original( ContextMenuTellInForayHook!.Original(
@@ -451,17 +467,6 @@ internal sealed unsafe class Chat : IDisposable
uint currentIndex, uint currentIndex,
RotateMode rotate, RotateMode rotate,
Func<uint, bool> validFn 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) if (rotate == RotateMode.None)
@@ -565,8 +570,9 @@ internal sealed unsafe class Chat : IDisposable
if (!Plugin.CurrentTab.CurrentChannel.UseTempChannel) if (!Plugin.CurrentTab.CurrentChannel.UseTempChannel)
Plugin.CurrentTab.CurrentChannel.UseTempChannel = true; Plugin.CurrentTab.CurrentChannel.UseTempChannel = true;
// Send tell via CommandInner later and let the game handle it. // Send tell via CommandInner later and let the game handle it
// TellSpecial gate is offline until the new chat layer reads it. // Only works because we use the SetTellTargetInForay function to set all required information
Plugin.ChatLogWindow.TellSpecial = true;
var utfName = Utf8String.FromString(name); var utfName = Utf8String.FromString(name);
var utfWorld = Utf8String.FromString(worldName); var utfWorld = Utf8String.FromString(worldName);
+17 -173
View File
@@ -7,7 +7,6 @@ using FFXIVClientStructs.FFXIV.Client.System.String;
using FFXIVClientStructs.FFXIV.Client.UI; using FFXIVClientStructs.FFXIV.Client.UI;
using HellionChat.Code; using HellionChat.Code;
using HellionChat.GameFunctions.Types; using HellionChat.GameFunctions.Types;
using HellionChat.Ui.Windows;
using HellionChat.Util; using HellionChat.Util;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using ModifierFlag = HellionChat.GameFunctions.Types.ModifierFlag; using ModifierFlag = HellionChat.GameFunctions.Types.ModifierFlag;
@@ -505,188 +504,33 @@ internal unsafe class KeybindManager : IDisposable
if (!KeybindsToIntercept.TryGetValue(currentBest.Item2, out var info)) if (!KeybindsToIntercept.TryGetValue(currentBest.Item2, out var info))
return; 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 try
{ {
if (info.Channel is { } channel && info.Rotate == RotateMode.None) TellReason? reason = info.Channel == InputChannel.Tell ? TellReason.Reply : null;
{ Plugin.ChatLogWindow.Activated(new ChatActivatedArgs(info) { TellReason = reason });
// 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) catch (Exception ex)
{ {
_logger.LogError(ex, "Keybind routing failed for channel {Channel}", info.Channel); _logger.LogError(ex, "Error in chat Activated event");
} }
} }
// Resolve which chat surface a keybind action targets: the open pop-out whose // v0.6.0 — central dispatch for ChatTabForward/Backward. If a pop-out
// input currently has focus, otherwise the main window. Both paths share it so a // window currently has its compact input focused, the keybind is
// channel-switch/REPLY/prefill follows the surface the user is typing in. The // forwarded into that pop-out's ChatInputBar so the user navigates
// returned tab is that surface's bound tab (pop-out: Bound; main: ActiveTab). // tabs in the window they are typing in. Otherwise the main window
// Null tab => skip the tab-write (early-load window where no tab exists yet). // handles it (= v0.5.x behavior).
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) private void DispatchTabDelta(int delta)
{ {
Plugin.Instance.MainWindow?.ChangeTabDelta(delta); foreach (var popout in Plugin.ChatLogWindow.ActivePopouts)
{
if (popout.HasFocusedInputBar && popout.InputBar != null)
{
popout.InputBar.HandleKeybindForward(delta);
return;
}
}
Plugin.ChatLogWindow.ChangeTabDelta(delta);
} }
private static Keybind GetKeybind(string id) private static Keybind GetKeybind(string id)
+11 -26
View File
@@ -1,7 +1,7 @@
<Project Sdk="Dalamud.NET.Sdk/15.0.0"> <Project Sdk="Dalamud.NET.Sdk/15.0.0">
<PropertyGroup> <PropertyGroup>
<!-- Independent versioning; see yaml changelog for upstream Chat 2 base --> <!-- Independent versioning; see yaml changelog for upstream Chat 2 base -->
<Version>2.0.1</Version> <Version>1.5.1</Version>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<!-- Use lock file to pin exact versions --> <!-- Use lock file to pin exact versions -->
@@ -13,8 +13,8 @@
<ItemGroup> <ItemGroup>
<!-- Closed ranges prevent surprise major bumps during lock file regeneration --> <!-- Closed ranges prevent surprise major bumps during lock file regeneration -->
<PackageReference Include="MessagePack" Version="[3.1.7, 4.0.0)" /> <PackageReference Include="MessagePack" Version="[3.1.4, 4.0.0)" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.8" /> <PackageReference Include="Microsoft.Data.Sqlite" Version="10.0.7" />
<!-- v1.5.0 DI-container foundation; matches Lightless pin (Hosting 10.0.7) --> <!-- v1.5.0 DI-container foundation; matches Lightless pin (Hosting 10.0.7) -->
<PackageReference <PackageReference
Include="Microsoft.Extensions.DependencyInjection" Include="Microsoft.Extensions.DependencyInjection"
@@ -26,13 +26,8 @@
<!-- SQLitePCLRaw override for CVE-2025-6965, CVE-2025-7709 (SQLite >= 3.50.3) --> <!-- 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="SQLitePCLRaw.lib.e_sqlite3" Version="3.50.3" />
<PackageReference Include="morelinq" Version="4.4.0" /> <PackageReference Include="morelinq" Version="4.4.0" />
<!-- 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="Pidgin" Version="[3.5.1, 4.0.0)" />
<PackageReference Include="SixLabors.ImageSharp" Version="[3.1.12, 4.0.0)" /> <PackageReference Include="SixLabors.ImageSharp" Version="[3.1.12,4.0.0]" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -55,26 +50,16 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<!-- Embedded resources: bundled UI font (Inter Light, OFL-1.1) + manifest resource --> <!-- Embedded resources: Hellion font (Exo 2, OFL-1.1) + manifest resource -->
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Resources\Inter-Light.ttf"> <EmbeddedResource Include="Resources\HellionFont.ttf">
<LogicalName>Inter-Light.ttf</LogicalName> <LogicalName>HellionFont.ttf</LogicalName>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Resources\Inter-OFL.txt"> <EmbeddedResource Include="Resources\HellionFont-OFL.txt">
<LogicalName>Inter-OFL.txt</LogicalName> <LogicalName>HellionFont-OFL.txt</LogicalName>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Resources\Branding\fox-banner.png"> <EmbeddedResource Include="Resources\Branding\fox-banner.txt">
<LogicalName>HellionChat.Branding.fox-banner.png</LogicalName> <LogicalName>HellionChat.Branding.fox-banner.txt</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>
<EmbeddedResource Include="Resources\Branding\fox-mini.txt"> <EmbeddedResource Include="Resources\Branding\fox-mini.txt">
<LogicalName>HellionChat.Branding.fox-mini.txt</LogicalName> <LogicalName>HellionChat.Branding.fox-mini.txt</LogicalName>
+172 -77
View File
@@ -15,8 +15,8 @@ description: |-
- Per-channel retention with a daily background sweep - Per-channel retention with a daily background sweep
- Retroactive cleanup (Ctrl+Shift confirm) - Retroactive cleanup (Ctrl+Shift confirm)
- Export to Markdown, JSON or CSV - Export to Markdown, JSON or CSV
- First-run wizard with four preset profiles - First-run wizard with three preset profiles
- Multi-language UI (24 locales) with live language switching - Bilingual UI (EN/DE) with live language switching
- Own config and database — no shared state with other plugins - Own config and database — no shared state with other plugins
Based on Chat 2 by Infi and Anna (EUPL-1.2). Based on Chat 2 by Infi and Anna (EUPL-1.2).
@@ -35,89 +35,184 @@ tags:
- Replacement - Replacement
- Privacy - Privacy
changelog: |- changelog: |-
**v2.0.1 — Hotfix (2026-08-19)** **v1.5.1 — FontAtlas Refactor and Hellion Forge Signature (2026-05-17)**
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. Hybrid FontManager refactor plus an embedded provenance mark.
- 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. What changes under the hood:
- 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.
--- - FontManager handle creation moves into the ctor inside a single
atlas.SuppressAutoRebuild() block. The font atlas now builds once
per plugin load instead of four to five times — less CPU and GPU
pressure in the first seconds after a reload, less atlas texture
memory churn.
- Hybrid property model: Axis, AxisItalic and FontAwesome become
init-only handles. RegularFont and ItalicFont stay mutable because
the eight font settings still need to replace them at runtime —
that path is funnelled through RebuildDelegateFonts() now and
runs without a plugin reload.
- FontAwesome reuses Dalamud's UiBuilder.IconFontFixedWidthHandle
instead of building its own atlas slot. One delegate-build step
less in the ctor.
- BuildFontsAsync and BuildFonts are removed; the live mutation
path is RebuildDelegateFonts() now.
- Two FontManager self-test steps registered with /xlperf: ctor
smoke (every handle non-null after Phase-1 resolve, no atlas
load-exception) and push smoke (Push() returns without throwing).
**v2.0.0 — Rebuilt, Repaired, Reset (2026-08-19)** Honorific full-gradient port (originally the v1.5.1 main item) was
dropped: Honorific 3.2 exposes no IPC for the rendered gradient
Nine development cycles in one release. Everything built as v1.6.0 through v1.15.0 ships here; those versions were never published on their own. frame, and an in-plugin port of the colour palette was declined.
The integration stays at the v1.4.7 glow-only shape.
**This update resets your settings.** Nine cycles of rebuilding left saved values pointing at surfaces that no longer exist, and starting over is the only way to be sure every install is on the same defaults. **Your message history is untouched** — it lives in a separate database. Your old settings are kept next to the config file as `HellionChat.json.pre-2.0.0.bak`.
Fixed, and several of these lost data or hid it:
- Retroactive cleanup could never be applied at all. The preview took the database lock itself and that counted as a change, so every preview went stale the instant it finished and the apply button never appeared.
- Compacting the database ran against an open reader and failed, after which the plugin reported that nothing had been deleted — while everything had.
- Deleting messages left them in the search index, so search kept returning rows that were already gone.
- Pinned tell tabs came up empty for a whole session: the history query ran at plugin start, before any character is logged in, and never tried again.
- Export wrote invalid JSON where a setting value was involved, and a byte-order mark that strict parsers reject.
- A pop-out with its title bar switched on could not be closed, and a tell from a popped-out partner hijacked the main window's active tab.
- One third-party emote service started returning 403, and that response took all 65 working global emotes down with it on every start.
- The GDPR notice for the full-history profile had been translated into 25 languages and shown nowhere since May.
Changed, and one of these changes what gets stored:
- **The channel grid is now authoritative.** Until now the unknown-channel failsafe was applied to known channels too, so a channel you had unticked was still being written while that failsafe was on. If that was you, this release stores less than before. Nothing already in the database is touched.
- Every window is drawn by the plugin rather than by ImGui defaults, and they share one visual language: structure carried by typography, a surface on anything you can press, and colours measured against what sits behind them.
- Typography has named roles — sender, body and timestamp mean the same thing everywhere, timestamps sit in their own column, system messages are italic.
- Export, the tab editor, database maintenance and pinning had lost their entry points during the rebuild and are reachable again.
- Screenshot mode reached one of four surfaces that draw a tab name. It reaches all four now.
Removed: six settings that had a control and a saved value but no reader anywhere in the plugin; a per-tab regex filter the game's own blackword filter covers; and a wizard checkbox that was collected, reported as applied and never read.
New: an Emote tab in the default layout, local and server clocks in the status bar, a screenshot mode reachable from the input row, `/hellion wizard` to reopen the setup wizard, a style lab under `/hellion lab`, and 25 UI languages with the settings window and wizard fully covered.
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2). The two codebases have diverged far enough that they no longer line up.
---
**v1.5.6 — Settings Overhaul + Filter & Notification Polish (2026-05-23)**
- Settings window reorganised: ten tabs down to seven (General, Appearance, Chat, Window, Channels, Data & Privacy, About). Each tab now uses collapsible sections grouped by control type. Sections start collapsed every time you open a tab — less noise, easier to find what you need.
- New sender-name display options under Chat → Messages: separate world-suffix and name-format modes (Full name / First name only / Initials × Never / Other worlds only / Always).
- Plugin-only symbols now show a pre-send warning so other players do not get empty boxes (Chat → Messages → "Warn before sending plugin-only symbols").
- Separate window opacity for focused vs. inactive chat window (Appearance → Window style → "Inactive window opacity"). The slider above sets the focused value.
- Custom notification sound volume slider (General → Sound, and mirrored in Channels → per-tab → Notification). Affects only the three bundled custom sounds; the 16 game sounds are unaffected.
- The per-tab regex filter that briefly shipped earlier in this cycle has been removed — FFXIV's built-in blackword filter covers the same need.
- All 24 locale files updated for the new section labels and the v1.5.6 control labels (machine translation; native review continues via the Hellion Forge Discord).
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
---
**v1.5.5 — Upstream-Sync Tab-Features (2026-05-21)**
A backlog-sync cycle: inherited tab-feature items plus a new fox
banner image and custom notification sounds.
User-visible: User-visible:
- Failed tells now raise a warning toast when a message you sent - Hellion Forge signature: a small fox-head ASCII silhouette is
could not be delivered (recipient offline, in an instance, or emitted to /xllog on every plugin load, and a full fox banner
blocking you). Toggle in Settings, Chat tab. with "Hellion Forge" set inside the body is available as a
- Per-tab notification sound: each tab can play a sound when a folded TreeNode in the First-Run Wizard and Settings ->
message arrives while you are looking at a different tab. Pick Information tab. Drawn by Julia Moon, embedded in the plugin DLL.
one of the 16 game chat sounds or one of three bundled Hellion - No settings changes, no migration. v17 stays.
sounds, with a preview button to hear it. Off by default,
respects the global sound toggle.
- The tab rename field in the right-click menu now focuses
itself when the menu opens and accepts up to 512 characters,
matching the settings-tab rename.
- A jump-to-latest button appears in the chat log header while
you are scrolled up from the live end.
- Map flags and item links can be inserted into the chat input
from its right-click menu.
- The Hellion Forge fox banner in the first-run wizard and the
Information tab is now a real image instead of ASCII art.
Schema bumped to v18 (additive fields only, no data migration). Note on performance: the cross-plugin baseline target from v1.5.0
(matching Lightless and XIVInstantMessenger at ~7 ms HITCH) did
not land this cycle. HITCH stays around 80 ms because the cost is
in the UiBuilder first-frame render path, not in the atlas build
(which this cycle did reduce from 4-5 builds per load to 1). A
first-frame render investigation is reserved for a later cycle.
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2). Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
Earlier history: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases ---
**v1.5.0 — DI Foundation and Service Refactor (2026-05-17)**
Major architecture cycle. The plugin bootstrap moves to a
generic-host DI container (Microsoft.Extensions.Hosting +
IServiceCollection) modelled on Lightless Sync. Service logging
moves from a static Plugin.LogProxy locator to typed
Microsoft.Extensions.Logging.ILogger<T> via constructor injection,
bridged over Dalamud's IPluginLog by a custom DalamudLogger trio.
What changes under the hood:
- 18 instance-class services migrate to ILogger<T> via constructor
injection across four slices: data layer (MessageStore,
MessageManager, AutoTellTabsService), IPC and integrations
(HonorificService, IpcManager, TypingIpc, ExtraChat, the three
GameFunctions classes), UI window layer (ChatLogWindow,
DbViewer, Popout, three settings tabs), and root (Commands,
ThemeRegistry, PayloadHandler).
- Plugin.LogProxy stays in place for the eight buckets ctor
injection cannot reach: static helpers (EmoteCache,
AutoTranslate, MemoryUtil, WrapperUtil), Dalamud-reflected
types (Configuration), the Message data class, and instance
classes that only log from static methods (FontManager, one
GameFunctions site).
- Plugin.cs finishes at 1012 lines — virtually identical to the
pre-cycle 1013. The new Phase-1 host build and Plugin.X bridge
wiring trade out exactly the service and window allocations
that previously lived in LoadAsync.
- Cross-plugin baseline confirms no performance penalty against
Chat 2: HellionChat first-frame HITCH 77 ms median, Chat 2
74 ms median. Lightless and XIVInstantMessenger sit around
7 ms by deferring their font-atlas build past Finished
loading — that pattern is the v1.5.1 follow-up.
User-visible:
- Slash-command insert fix: pasting a slash command into the
chat input (Friend List "/tell" action, plugin-driven inserts
from Artisan, AllaganTools etc.) now replaces the existing
input instead of concatenating. Cherry-picked from ChatTwo
upstream ee7768ac with namespace adaptation.
Migration v17 stays (no schema bump).
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
---
**v1.4.10 — Symbol-Picker and Tell-History Fix (2026-05-16)**
Eleventh and final sub-patch of the v1.4.x polish-sweep series.
Symbol picker for the chat input, a tell-history reload fix for
users with many active partners, and a closing cleanup sweep
before v1.5.0 picks up the DI-container adoption.
- Symbol picker: a small smile-icon button left of the channel
indicator opens a popup with two tabs. The first lists all 161
FFXIV PUA glyphs (Dalamud's SeIconChar enum); the second
carries 97 server-verified BMP symbols (latin marks, currency,
the full Greek alphabet, geometric shapes, suits, notes) —
every one of them round-tripped through /echo and /say in a
four-round probe so the in-channel render matches what the
picker shows. Click drops the glyph at the caret, multi-insert
keeps the popup open, and a recent-used strip floats the last
sixteen picks across both tabs. Toggle in Settings → Chat →
Message behaviour, default on.
- Pinned auto-tell tabs reload their full history again: a
hidden 500-row scan cap in PreloadHistory used to override the
user-configurable AutoTellTabsHistoryPreload setting, so
less-frequent pinned partners (rare /tell sessions in an
otherwise busy week) lost their backlog. The cap is removed;
the (Receiver, Date) index keeps SQL fast, the client-side
loop still respects your setting as the upper bound.
- Slash-command teardown: /hellion, /hellionView,
/hellionDebugger (and #if DEBUG /hellionSeString) wrappers are
now cached as private fields. Plugin teardown detaches the
live registration instead of re-Register'ing with identical
args — closes a latent maintenance hazard from v1.4.9.
- v1.4.x polish-sweep wraps up here. The ImGuiListClipper render
refactor that was on the v1.4.10 reserve list got dropped
after cross-platform smoke showed the scroll rubber-band is a
Wine / Linux render-pipeline quirk, not universal — Windows
users never saw it. It will get its own platform-targeted
spike in a later patch. Next major cycle is v1.5.0 with the
DI-container adoption (Microsoft.Extensions.Hosting +
ILogger<T>) modelled on Lightless.
- Migration v17 stays (no schema bump).
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
---
**v1.4.9 — Plugin-Load Render Polish (2026-05-15)**
Tenth sub-patch of the v1.4.x polish-sweep series. First-frame
render cost drops from ~127 ms median to ~76 ms median,
comfortably under Dalamud's 100 ms HITCH warning threshold.
- First-frame defer: six non-essential rendering sections inside
ChatLogWindow skip their first Draw and run one frame later
(bottom status bar, channel-name SeString chunks, window bounds
check, v0.6.1 hint banner, autocomplete, input-preview
calculation). User-visible delay is ~17 ms at 60 fps, hidden
inside the post-reload font-atlas build window.
- Slash-command centralisation: /hellion, /hellionView,
/hellionSeString and /hellionDebugger are registered in
LoadAsync instead of inside the corresponding window
constructors. The plugin-manager Open and configuration buttons
hang on the same path.
- Plugin-load profiling logs stay on at Information level
(MessageStore connect/migrate, FilterAllTabs, auto-translate
warmup) as a regression tripwire — a future load past 100 ms
will show up in /xllog without a Debug filter.
- ChatTwo IPC compatibility layer: HellionChat now mirrors
ChatTwo's full IPC surface (GetChatInputState,
ChatInputStateChanged, Register, Unregister, Available,
Invoke) under the ChatTwo.* namespace in addition to our
existing HellionChat.* provider gates. Third-party
integrations that historically only subscribe to ChatTwo's
IPC — for example Artisan's and AllaganTools' context-menu
hooks — keep working without requiring a code change on their
side. Conflict detection prevents ChatTwo from loading in
parallel with HellionChat, so there is no slot-collision risk
at runtime.
- Migration v17 stays (no schema bump).
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
---
Full history: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases
@@ -1,11 +1,6 @@
using Dalamud.Game.Addon.Lifecycle;
using Dalamud.Plugin; using Dalamud.Plugin;
using HellionChat.Integrations;
using HellionChat.Ipc; using HellionChat.Ipc;
using HellionChat.Themes; using HellionChat.Themes;
using HellionChat.Ui;
using HellionChat.Ui.Components;
using HellionChat.Ui.Windows;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
namespace HellionChat.Infrastructure.Hosting; namespace HellionChat.Infrastructure.Hosting;
@@ -16,26 +11,16 @@ namespace HellionChat.Infrastructure.Hosting;
// at Build, which runs the service ctor (IPC subscribe etc.) right then // at Build, which runs the service ctor (IPC subscribe etc.) right then
// instead of lazily on first GetRequiredService. // instead of lazily on first GetRequiredService.
internal sealed class ThemeRegistryInitHostedService( internal sealed class ThemeRegistryInitHostedService(ThemeRegistry registry) : IHostedService
ThemeRegistry registry,
FontManager fontManager
) : IHostedService
{ {
public async Task StartAsync(CancellationToken cancellationToken) public Task StartAsync(CancellationToken cancellationToken)
{ {
// Materialise the lazy AllCustom enumerable so the slug lookup hits a // Materialise the lazy AllCustom enumerable so the slug lookup hits a
// warm cache; otherwise the first Switch falls through to the built-in // warm cache; otherwise the first Switch falls through to the built-in
// default when Config.Theme points at a custom slug. // default when Config.Theme points at a custom slug.
foreach (var _ in registry.AllCustom()) { } foreach (var _ in registry.AllCustom()) { }
registry.SwitchSilent(Plugin.Config.Theme); registry.Switch(Plugin.Config.Theme);
return Task.CompletedTask;
// B4b-3: 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; public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
@@ -100,109 +85,3 @@ internal sealed class AutoTellTabsServiceInitHostedService(AutoTellTabsService s
public Task StopAsync(CancellationToken cancellationToken) => 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;
}
@@ -1,150 +0,0 @@
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();
}
}
@@ -1,74 +0,0 @@
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();
}
}
@@ -195,23 +195,4 @@ internal sealed class HonorificService : IDisposable
return false; return false;
return true; 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;
}
} }
@@ -1,29 +0,0 @@
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;
}
}
@@ -5,10 +5,11 @@ namespace HellionChat.Integrations;
// Local DTO mirroring Honorific's TitleData — no hard reference to Honorific.dll // Local DTO mirroring Honorific's TitleData — no hard reference to Honorific.dll
// so HellionChat loads cleanly when Honorific is absent. // so HellionChat loads cleanly when Honorific is absent.
// //
// Color is rendered in the header title slot (HonorificHeader). Glow, Color3, // Only Glow is rendered. Color3, GradientColourSet and GradientAnimationStyle
// GradientColourSet and GradientAnimationStyle are parsed but not rendered — // are parsed but unused — the animated gradient lives entirely inside Honorific
// the animated gradient lives inside Honorific and is not exposed over IPC. // and is not exposed over IPC, so reproducing it here would mean shipping our
// The fields stay in the DTO so the JSON roundtrip remains lossless. // own copy of Honorific's colour palette. The fields stay in the DTO so the
// JSON roundtrip remains lossless.
internal sealed record HonorificTitleData( internal sealed record HonorificTitleData(
string? Title, string? Title,
bool IsPrefix, bool IsPrefix,
+1 -1
View File
@@ -31,7 +31,7 @@ public sealed class ExtraChat : IDisposable
// volatile: IPC callbacks fire on a Dalamud thread while ImGui reads these. // volatile: IPC callbacks fire on a Dalamud thread while ImGui reads these.
// Reference assignment is atomic on x64, but the barrier ensures visibility // Reference assignment is atomic on x64, but the barrier ensures visibility
// across threads (especially Mono/Wine). Raised in the 2026-05-05 audit. // across threads (especially Mono/Wine). See AUDIT-2026-05-05 [SEC-01].
private volatile Dictionary<string, uint> ChannelCommandColoursInternal = new(); private volatile Dictionary<string, uint> ChannelCommandColoursInternal = new();
internal IReadOnlyDictionary<string, uint> ChannelCommandColours => internal IReadOnlyDictionary<string, uint> ChannelCommandColours =>
ChannelCommandColoursInternal; ChannelCommandColoursInternal;
+12 -23
View File
@@ -20,7 +20,7 @@ internal sealed class TypingIpc : IDisposable
private ICallGateProvider<ChatInputState> StateQueryGate { get; } private ICallGateProvider<ChatInputState> StateQueryGate { get; }
private ICallGateProvider<ChatInputState, object?> StateChangedGate { get; } private ICallGateProvider<ChatInputState, object?> StateChangedGate { get; }
// v1.4.9: ChatTwo IPC compatibility mirror. Some third-party plugins // v1.4.9 R4: ChatTwo IPC compatibility mirror. Some third-party plugins
// have a no-fork policy and subscribe only to ChatTwo.*-prefixed IPC // have a no-fork policy and subscribe only to ChatTwo.*-prefixed IPC
// gates. HellionChat replaces ChatTwo (conflict detection prevents // gates. HellionChat replaces ChatTwo (conflict detection prevents
// parallel loading), so mirroring the ChatTwo provider slots lets those // parallel loading), so mirroring the ChatTwo provider slots lets those
@@ -34,13 +34,11 @@ internal sealed class TypingIpc : IDisposable
private ChatInputState LastState; private ChatInputState LastState;
private bool HasState; private bool HasState;
private readonly Ui.Components.InputBar _inputBar;
private readonly ILogger<TypingIpc> _logger; private readonly ILogger<TypingIpc> _logger;
internal TypingIpc(Plugin plugin, Ui.Components.InputBar inputBar, ILogger<TypingIpc> logger) internal TypingIpc(Plugin plugin, ILogger<TypingIpc> logger)
{ {
Plugin = plugin; Plugin = plugin;
_inputBar = inputBar;
_logger = logger; _logger = logger;
StateQueryGate = Plugin.Interface.GetIpcProvider<ChatInputState>( StateQueryGate = Plugin.Interface.GetIpcProvider<ChatInputState>(
@@ -50,7 +48,7 @@ internal sealed class TypingIpc : IDisposable
"HellionChat.ChatInputStateChanged" "HellionChat.ChatInputStateChanged"
); );
// v1.4.9: ChatTwo-prefixed compatibility slots (see class-level comment). // v1.4.9 R4: ChatTwo-prefixed compatibility slots (see class-level comment).
ChatTwoStateQueryGate = Plugin.Interface.GetIpcProvider<ChatInputState>( ChatTwoStateQueryGate = Plugin.Interface.GetIpcProvider<ChatInputState>(
"ChatTwo.GetChatInputState" "ChatTwo.GetChatInputState"
); );
@@ -64,34 +62,25 @@ internal sealed class TypingIpc : IDisposable
private ChatInputState BuildState() private ChatInputState BuildState()
{ {
var log = Plugin.ChatLogWindow;
var usedChannel = Plugin.CurrentTab.CurrentChannel; var usedChannel = Plugin.CurrentTab.CurrentChannel;
var inputChannel = usedChannel.UseTempChannel var inputChannel = usedChannel.UseTempChannel
? usedChannel.TempChannel ? usedChannel.TempChannel
: usedChannel.Channel; : usedChannel.Channel;
var channelType = inputChannel.ToChatType(); var channelType = inputChannel.ToChatType();
// 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 ( return (
InputVisible: mainWindowOpen, InputVisible: !log.IsHidden,
InputFocused: inputFocused, log.InputFocused,
HasText: hasText, HasText: log.Chat.Length > 0,
IsTyping: hasText, IsTyping: log is { InputFocused: true, Chat.Length: > 0 },
TextLength: textLength, TextLength: log.Chat.Length,
ChannelType: channelType ChannelType: channelType
); );
} }
internal ChatInputState GetState() => BuildState(); private ChatInputState GetState() => BuildState();
internal void Update() internal void Update()
{ {
@@ -102,7 +91,7 @@ internal sealed class TypingIpc : IDisposable
HasState = true; HasState = true;
LastState = state; LastState = state;
StateChangedGate.SendMessage(state); StateChangedGate.SendMessage(state);
// v1.4.9: mirror on ChatTwo-prefixed slot for no-fork-policy plugins. // v1.4.9 R4: mirror on ChatTwo-prefixed slot for no-fork-policy plugins.
ChatTwoStateChangedGate.SendMessage(state); ChatTwoStateChangedGate.SendMessage(state);
} }
+3 -3
View File
@@ -22,7 +22,7 @@ internal sealed class IpcManager : IDisposable
object? object?
> InvokeGate { get; } > InvokeGate { get; }
// v1.4.9: ChatTwo IPC compatibility mirror. Third-party plugins with // v1.4.9 R4: ChatTwo IPC compatibility mirror. Third-party plugins with
// a no-fork policy (e.g. Artisan, AllaganTools) only subscribe to the // a no-fork policy (e.g. Artisan, AllaganTools) only subscribe to the
// ChatTwo.*-prefixed context-menu integration gates. Mirroring all four // ChatTwo.*-prefixed context-menu integration gates. Mirroring all four
// provider slots under the ChatTwo namespace lets those plugins keep // provider slots under the ChatTwo namespace lets those plugins keep
@@ -65,7 +65,7 @@ internal sealed class IpcManager : IDisposable
object? object?
>("HellionChat.Invoke"); >("HellionChat.Invoke");
// v1.4.9: ChatTwo-prefixed mirrors of the four context-menu slots // v1.4.9 R4: ChatTwo-prefixed mirrors of the four context-menu slots
// above. Share the same Register/Unregister backing methods so a // above. Share the same Register/Unregister backing methods so a
// plugin that subscribes via either namespace lands in the same // plugin that subscribes via either namespace lands in the same
// Registered list. SendMessage on Invoke fans out to both gates. // Registered list. SendMessage on Invoke fans out to both gates.
@@ -103,7 +103,7 @@ internal sealed class IpcManager : IDisposable
) )
{ {
InvokeGate.SendMessage(id, sender, contentId, payload, senderString, content); InvokeGate.SendMessage(id, sender, contentId, payload, senderString, content);
// v1.4.9: fan out the same event to plugins listening on ChatTwo.Invoke. // v1.4.9 R4: fan out the same event to plugins listening on ChatTwo.Invoke.
ChatTwoInvokeGate.SendMessage(id, sender, contentId, payload, senderString, content); ChatTwoInvokeGate.SendMessage(id, sender, contentId, payload, senderString, content);
} }
+20 -164
View File
@@ -7,9 +7,7 @@ using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Hooking; using Dalamud.Hooking;
using Dalamud.Interface.ImGuiNotification; using Dalamud.Interface.ImGuiNotification;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Misc; using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using HellionChat._Helpers;
using HellionChat.Code; using HellionChat.Code;
using HellionChat.Resources; using HellionChat.Resources;
using HellionChat.Util; using HellionChat.Util;
@@ -163,15 +161,8 @@ internal class MessageManager : IAsyncDisposable
internal void ClearAllTabs() internal void ClearAllTabs()
{ {
// 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 // TempTabs are session-only (not persisted); exclude them to preserve Tell history
foreach (var tab in tabsSnapshot.Where(t => !t.IsTempTab)) foreach (var tab in Plugin.Config.Tabs.Where(t => !t.IsTempTab))
tab.Clear(); tab.Clear();
} }
@@ -183,19 +174,18 @@ internal class MessageManager : IAsyncDisposable
using var messages = Store.GetMostRecentMessages(CurrentContentId, since); using var messages = Store.GetMostRecentMessages(CurrentContentId, since);
// TempTabs excluded (live state from AutoTellTabsService). Bucket via the // TempTabs are excluded; they maintain live state from AutoTellTabsService
// pure MapMessagesToTabs so the assignment stays testable outside Dalamud. var pendingTabs = Plugin
// Snapshot under the shared lock (list copy only — short critical .Config.Tabs.Where(t => !t.IsTempTab)
// section). The Store query above and the AddSortPrune writes below stay .Select(tab => (tab, new List<Message>()))
// OUTSIDE the lock (lock order: list outer, MessageList inner). .ToList();
List<Tab> nonTempTabs; foreach (var message in messages)
lock (Plugin.TabsListLock) foreach (var (_, pendingMessages) in pendingTabs.Where(ptab => ptab.Item1.Matches(message)))
nonTempTabs = Plugin.Config.Tabs.Where(t => !t.IsTempTab).ToList(); pendingMessages.Add(message);
var buckets = MapMessagesToTabs(nonTempTabs, messages);
// Apply messages to chat log all at once. // Apply messages to chat log all at once.
foreach (var tab in nonTempTabs) foreach (var (tab, pendingMessages) in pendingTabs)
tab.Messages.AddSortPrune(buckets[tab], MessageDisplayLimit); tab.Messages.AddSortPrune(pendingMessages, MessageDisplayLimit);
if (!messages.DidError) if (!messages.DidError)
return; return;
@@ -214,26 +204,6 @@ internal class MessageManager : IAsyncDisposable
} }
} }
// 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() internal void FilterAllTabsAsync()
{ {
Task.Run(() => Task.Run(() =>
@@ -248,8 +218,9 @@ internal class MessageManager : IAsyncDisposable
_logger.LogError(ex, "Error in FilterAllTabs"); _logger.LogError(ex, "Error in FilterAllTabs");
} }
// Information, not Debug, so the xllog tail surfaces this without a // v1.4.9 R3 profiling: Information so the xllog tail surfaces this
// filter. Kept as a guard against future plugin-load regressions. // without a Debug filter. Belt-and-suspenders for future plugin-load
// regressions; remains in place after Sub-Task 3.4 Befund.
_logger.LogInformation($"FilterAllTabs took {stopwatch.ElapsedMilliseconds}ms"); _logger.LogInformation($"FilterAllTabs took {stopwatch.ElapsedMilliseconds}ms");
}); });
} }
@@ -358,135 +329,20 @@ internal class MessageManager : IAsyncDisposable
if (Plugin.Config.DatabaseBattleMessages || !message.Code.IsBattle()) if (Plugin.Config.DatabaseBattleMessages || !message.Code.IsBattle())
Store.UpsertMessage(message); Store.UpsertMessage(message);
// Snapshot the list, not just the active tab. This loop runs on the worker var currentMatches = Plugin.CurrentTab.Matches(message);
// thread while SaveConfig's strip and the auto-tell spawn mutate Config.Tabs foreach (var tab in Plugin.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)) var unread = !(
tab.AddMessage(message, ShouldCountUnread(tab, currentTab, currentTabMatches)); tab.UnreadMode == UnreadMode.Unseen && Plugin.CurrentTab != tab && currentMatches
}
// 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 if (tab.Matches(message))
// be an audible artefact for a tab that is already gone, so re-check first. tab.AddMessage(message, unread);
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); 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 class NameFormatting
{ {
internal string Before { get; private set; } = string.Empty; internal string Before { get; private set; } = string.Empty;
+28 -174
View File
@@ -245,7 +245,7 @@ internal class MessageStore : IDisposable
private SqliteConnection Connect() private SqliteConnection Connect()
{ {
// v1.4.9 profiling: trace cost of SQLite open + pragma-apply. Paired // v1.4.9 R3 profiling: trace cost of SQLite open + pragma-apply. Paired
// with the Migrate-Stopwatch below — Connect alone is the cheap half // with the Migrate-Stopwatch below — Connect alone is the cheap half
// (Open + a handful of PRAGMAs); the expensive half typically lives in // (Open + a handful of PRAGMAs); the expensive half typically lives in
// Migrate, especially on a large DB after a schema bump. // Migrate, especially on a large DB after a schema bump.
@@ -260,7 +260,7 @@ internal class MessageStore : IDisposable
private void Migrate() private void Migrate()
{ {
// v1.4.9 profiling: trace cost of the schema-migration chain. On a // v1.4.9 R3 profiling: trace cost of the schema-migration chain. On a
// large DB after a fresh schema bump this is the dominant SQLite cost // large DB after a fresh schema bump this is the dominant SQLite cost
// at plugin-load, not Connect. // at plugin-load, not Connect.
var migrateSw = System.Diagnostics.Stopwatch.StartNew(); var migrateSw = System.Diagnostics.Stopwatch.StartNew();
@@ -279,25 +279,18 @@ internal class MessageStore : IDisposable
migrationsToDo.Add(Migrate2); migrationsToDo.Add(Migrate2);
migrationsToDo.Add(Migrate3); migrationsToDo.Add(Migrate3);
migrationsToDo.Add(Migrate4); migrationsToDo.Add(Migrate4);
migrationsToDo.Add(Migrate5);
break; break;
case 1: case 1:
migrationsToDo.Add(Migrate2); migrationsToDo.Add(Migrate2);
migrationsToDo.Add(Migrate3); migrationsToDo.Add(Migrate3);
migrationsToDo.Add(Migrate4); migrationsToDo.Add(Migrate4);
migrationsToDo.Add(Migrate5);
break; break;
case 2: case 2:
migrationsToDo.Add(Migrate3); migrationsToDo.Add(Migrate3);
migrationsToDo.Add(Migrate4); migrationsToDo.Add(Migrate4);
migrationsToDo.Add(Migrate5);
break; break;
case 3: case 3:
migrationsToDo.Add(Migrate4); migrationsToDo.Add(Migrate4);
migrationsToDo.Add(Migrate5);
break;
case 4:
migrationsToDo.Add(Migrate5);
break; break;
} }
@@ -437,23 +430,6 @@ internal class MessageStore : IDisposable
SetMigrationVersion(4); SetMigrationVersion(4);
} }
private void Migrate5()
{
_logger.LogInformation("Running migration 5: Add (Receiver, Date) index for tell history");
// GetTellHistoryWithSender filters on Receiver and orders by Date DESC.
// Without a matching index SQLite sorts the whole receiver history into a
// temp b-tree before returning row one, 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.
using var cmd = Connection.CreateCommand();
cmd.CommandText =
"CREATE INDEX IF NOT EXISTS idx_messages_receiver_date ON messages (Receiver, Date);";
cmd.ExecuteNonQuery();
SetMigrationVersion(5);
}
private void SetMigrationVersion(int version) private void SetMigrationVersion(int version)
{ {
_logger.LogInformation($"Setting version {version}"); _logger.LogInformation($"Setting version {version}");
@@ -464,49 +440,23 @@ internal class MessageStore : IDisposable
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
} }
// Drops the full-text index and marks it for a rebuild.
//
// messages_fts stores sender_text and content_text in the clear, and no
// delete path touched it: ClearMessages, CleanupRetainOnly and the retention
// sweep all removed rows from `messages` only. The plain text of every
// "deleted" message stayed on disk.
//
// Worse, it was self-sealing. InitFtsReadyCache treats a non-empty index as
// ready, so after a wipe the index stayed full, the readiness flag stayed
// true, and the rebuild that would have cleared it never ran again.
//
// Wiping rather than deleting matched rows: message_guid is stored as a GUID
// string while messages.Id is a BLOB, so the two cannot be joined in SQL.
// The index is derived data and rebuilds from the surviving rows on the next
// start, which is the cheap and provably complete option.
//
// Caller must already hold _readLock.
private void InvalidateFtsIndex()
{
Connection.Execute("DELETE FROM messages_fts;");
_ftsReady = false;
}
internal void ClearMessages() internal void ClearMessages()
{ {
lock (_readLock) lock (_readLock)
{ {
Connection.Execute("DELETE FROM messages;"); Connection.Execute("DELETE FROM messages;");
InvalidateFtsIndex(); PerformMaintenance();
TryPerformMaintenance();
} }
} }
// Returns a (ChatType, count) snapshot over non-deleted messages. // Returns a (ChatType, count) snapshot over non-deleted messages.
// Used by the Privacy tab to preview retroactive cleanup impact. // Used by the Privacy tab to preview retroactive cleanup impact.
// internal Dictionary<int, long> GetMessageCountsByChatType()
// Caller-owned connection, same reasoning as StreamForExport: this is a {
// GROUP BY over every row, and holding _readLock for it would stall lock (_readLock)
// UpsertMessage on the framework thread for as long as the scan takes.
internal Dictionary<int, long> GetMessageCountsByChatType(SqliteConnection conn)
{ {
var result = new Dictionary<int, long>(); var result = new Dictionary<int, long>();
using var cmd = conn.CreateCommand(); using var cmd = Connection.CreateCommand();
cmd.CommandText = cmd.CommandText =
"SELECT ChatType, COUNT(*) FROM messages WHERE deleted = false GROUP BY ChatType;"; "SELECT ChatType, COUNT(*) FROM messages WHERE deleted = false GROUP BY ChatType;";
cmd.CommandTimeout = 120; cmd.CommandTimeout = 120;
@@ -519,6 +469,7 @@ internal class MessageStore : IDisposable
} }
return result; return result;
} }
}
// Deletes messages older than the per-channel retention window, with a global // Deletes messages older than the per-channel retention window, with a global
// default for unmapped channels. Runs VACUUM only if rows were removed. // default for unmapped channels. Runs VACUUM only if rows were removed.
@@ -554,12 +505,6 @@ internal class MessageStore : IDisposable
var index = 0; var index = 0;
foreach (var (type, days) in chatTypeDaysMap) foreach (var (type, days) in chatTypeDaysMap)
{ {
// Careful: 0 here is NOT the "keep forever" it means for
// defaultDays below. A per-channel 0 puts the cutoff at now
// and deletes the channel's entire history. No profile ships
// a 0 and no UI can set one, which is why this is a comment
// and not a guard -- but any editor added later has to
// reconcile the two meanings before it exposes the value.
var cutoff = nowMs - days * 86400000L; var cutoff = nowMs - days * 86400000L;
var typeParam = $"$type{index}"; var typeParam = $"$type{index}";
var cutoffParam = $"$cutoff{index}"; var cutoffParam = $"$cutoff{index}";
@@ -593,11 +538,7 @@ internal class MessageStore : IDisposable
} }
if (deleted > 0) if (deleted > 0)
{ PerformMaintenance();
InvalidateFtsIndex();
TryPerformMaintenance();
}
return deleted; return deleted;
} }
} }
@@ -621,51 +562,7 @@ internal class MessageStore : IDisposable
cmd.CommandTimeout = 600; cmd.CommandTimeout = 600;
deleted = cmd.ExecuteNonQuery(); deleted = cmd.ExecuteNonQuery();
} }
PerformMaintenance();
// Skipped when nothing matched: VACUUM rewrites the whole file, and
// running it for zero deleted rows costs seconds on a large database
// for no benefit. DeleteByRetentionPolicy already guards this way.
if (deleted > 0)
{
InvalidateFtsIndex();
TryPerformMaintenance();
}
return deleted;
}
}
// Hard-deletes every message whose ChatType IS in the list, then VACUUMs.
// Returns the number of rows deleted.
//
// The mirror image of CleanupRetainOnly, and the privacy filter needs both.
// With the unknown-channel failsafe on, the rule keeps every channel this
// build does not recognise -- and a retain-list can only name the ones that
// were already in the database when the list was built, so a channel whose
// first message arrives after that would be deleted. Naming what goes
// instead of what stays removes the window entirely.
internal long CleanupDeleteTypes(IReadOnlyCollection<int> deleteTypes)
{
if (deleteTypes.Count == 0)
return 0;
lock (_readLock)
{
long deleted;
using (var cmd = Connection.CreateCommand())
{
var placeholders = BindIntList(cmd, "dt", deleteTypes);
cmd.CommandText = $"DELETE FROM messages WHERE ChatType IN ({placeholders});";
cmd.CommandTimeout = 600;
deleted = cmd.ExecuteNonQuery();
}
if (deleted > 0)
{
InvalidateFtsIndex();
TryPerformMaintenance();
}
return deleted; return deleted;
} }
} }
@@ -684,33 +581,6 @@ internal class MessageStore : IDisposable
} }
} }
// Runs maintenance and swallows a failure, for the delete paths only.
//
// VACUUM needs the database to itself, and a lazily consumed reader on the
// primary connection -- which GetMostRecentMessages hands out and the
// refilter walks outside the lock -- makes it fail immediately with "cannot
// VACUUM - SQL statements in progress". That happens after the DELETE has
// committed, so letting it escape means the caller reports "nothing was
// removed" about a wipe that emptied the database.
//
// The rows are gone either way. An uncompacted file is a housekeeping
// problem; telling somebody their history is still there when it is not is
// a different kind of problem.
private void TryPerformMaintenance()
{
try
{
PerformMaintenance();
}
catch (Exception e)
{
_logger.LogWarning(
e,
"Maintenance after a delete failed; the rows are gone but the file was not compacted."
);
}
}
private string LogPath => DbPath + "-wal"; private string LogPath => DbPath + "-wal";
internal long DatabaseSize() => !File.Exists(DbPath) ? 0 : new FileInfo(DbPath).Length; internal long DatabaseSize() => !File.Exists(DbPath) ? 0 : new FileInfo(DbPath).Length;
@@ -773,22 +643,10 @@ internal class MessageStore : IDisposable
internal SqliteConnection OpenSecondaryConnection() internal SqliteConnection OpenSecondaryConnection()
{ {
var conn = new SqliteConnection(BuildConnectionString(DbPath)); var conn = new SqliteConnection(BuildConnectionString(DbPath));
try
{
conn.Open(); conn.Open();
ApplyPragmas(conn); ApplyPragmas(conn);
return conn; return conn;
} }
catch
{
// Open can succeed and ApplyPragmas still throw: journal_mode=WAL
// needs a lock and gives up after DefaultTimeout. Without this the
// connection is neither returned nor closed, and with Pooling=false
// it survives until a finalizer gets to it.
conn.Dispose();
throw;
}
}
// Worker-only mutator. The bulk-insert worker is the single legitimate // Worker-only mutator. The bulk-insert worker is the single legitimate
// caller; the flag flips after the worker has closed its own connection. // caller; the flag flips after the worker has closed its own connection.
@@ -939,7 +797,8 @@ internal class MessageStore : IDisposable
// storage form on both sides so the IN(...) compare matches. SQLite has a // storage form on both sides so the IN(...) compare matches. SQLite has a
// hard parameter limit of 999 in default builds, so we chunk the input -- // hard parameter limit of 999 in default builds, so we chunk the input --
// a 1000-hit FTS query never explodes the SELECT. Result ordering is not // a 1000-hit FTS query never explodes the SELECT. Result ordering is not
// guaranteed; callers re-sort (DbViewer sorts by Date descending). // guaranteed; callers re-sort (e.g. DbViewer sorts by Date descending in
// Sub-Task 4.4).
public IReadOnlyList<Message> LoadByGuids(IReadOnlyList<string> guidStrings) public IReadOnlyList<Message> LoadByGuids(IReadOnlyList<string> guidStrings)
{ {
if (guidStrings.Count == 0) if (guidStrings.Count == 0)
@@ -1050,26 +909,22 @@ internal class MessageStore : IDisposable
// Streams messages for export, sorted ascending by Date, excluding soft-deleted rows. // Streams messages for export, sorted ascending by Date, excluding soft-deleted rows.
// Optional filters: chatTypes, from/to inclusive date range. // Optional filters: chatTypes, from/to inclusive date range.
// Caller is responsible for disposing the enumerator and the connection. // Caller is responsible for disposing the enumerator.
// // Lock caveat: lock guards command setup and ExecuteReader; the returned
// Takes a caller-owned connection from OpenSecondaryConnection rather than // MessageEnumerator is iterated lazily by the caller outside the lock.
// using the primary one, and therefore takes no lock. The reader stays open // Acceptable for v1.4.8 -- DbViewer iterates on its filter-worker Task and
// for as long as the export writes, which is seconds to minutes on a large // any clash with UpsertMessage on the primary Connection is rare and
// history, and chat keeps arriving throughout -- so the primary connection // serialised by SQLite's own connection-level lock. v1.5.x DI cycle should
// would be read here and written by UpsertMessage at the same time, and // address this with a snapshot-to-list or connection pool.
// SqliteConnection is not thread-safe. Holding _readLock for the whole
// export would trade that for freezing the game instead.
//
// WAL gives readers their own snapshot, so a live write cannot tear the
// export mid-file either.
internal MessageEnumerator StreamForExport( internal MessageEnumerator StreamForExport(
SqliteConnection conn,
IReadOnlyCollection<int>? chatTypes, IReadOnlyCollection<int>? chatTypes,
DateTimeOffset? from, DateTimeOffset? from,
DateTimeOffset? to DateTimeOffset? to
) )
{ {
var cmd = conn.CreateCommand(); lock (_readLock)
{
var cmd = Connection.CreateCommand();
var clauses = new List<string> { "deleted = false" }; var clauses = new List<string> { "deleted = false" };
if (chatTypes is { Count: > 0 }) if (chatTypes is { Count: > 0 })
@@ -1096,11 +951,11 @@ internal class MessageStore : IDisposable
if (to is not null) if (to is not null)
cmd.Parameters.AddWithValue("$To", to.Value.ToUnixTimeMilliseconds()); cmd.Parameters.AddWithValue("$To", to.Value.ToUnixTimeMilliseconds());
// Logger first: an argument list evaluates left to right, so a throwing return new MessageEnumerator(
// CreateLogger -- which is what a disposed host gives you -- would leave cmd.ExecuteReader(),
// an open reader that no MessageEnumerator owns. _loggerFactory.CreateLogger<MessageEnumerator>()
var logger = _loggerFactory.CreateLogger<MessageEnumerator>(); );
return new MessageEnumerator(cmd.ExecuteReader(), logger); }
} }
// Returns the most recent messages, oldest-first. // Returns the most recent messages, oldest-first.
@@ -1159,8 +1014,7 @@ internal class MessageStore : IDisposable
} }
// Returns up to `limit` tells exchanged with the named player, oldest-first. // Returns up to `limit` tells exchanged with the named player, oldest-first.
// SQL narrows by Receiver + ChatType via the (Receiver, Date) index (migration // SQL narrows by Receiver + ChatType via the (Receiver, Date) index, then
// 5; before that the ordering fell back to a temp b-tree over all rows), then
// the client-side loop runs PlayerPayload comparison and breaks once // the client-side loop runs PlayerPayload comparison and breaks once
// `limit` partner matches accumulate. Earlier versions had a hardcoded // `limit` partner matches accumulate. Earlier versions had a hardcoded
// 500-row scan cap that cut less-frequent pinned partners off the back of // 500-row scan cap that cut less-frequent pinned partners off the back of
-42
View File
@@ -1,42 +0,0 @@
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(),
};
}
Regular → Executable
+419 -458
View File
File diff suppressed because it is too large Load Diff
+79 -586
View File
@@ -91,56 +91,30 @@ public sealed class Plugin : IAsyncDalamudPlugin
public static Configuration Config = null!; public static Configuration Config = null!;
public static FileDialogManager FileDialogManager { get; private set; } = null!; public static FileDialogManager FileDialogManager { get; private set; } = null!;
// Single static handle to the live Plugin instance. Lets statically-accessed
// UI helpers (TabContextMenu) reach instance-only members — SaveConfig(),
// AutoTellTabsService, CustomAudioPlayer — without ctor-injection. A per-member
// static accessor is impossible: it would collide by name with the instance
// property (CS0102). Filled in the post-resolve bridge block below.
internal static Plugin Instance = null!;
public readonly WindowSystem WindowSystem = new(PluginName); public readonly WindowSystem WindowSystem = new(PluginName);
// Phase-2 services are constructed in LoadAsync; null! shape is kept // Phase-2 services are constructed in LoadAsync; null! shape is kept
// consistent across all properties for clarity. // consistent across all properties for clarity.
internal Ui.Windows.MainWindow MainWindow { get; private set; } = null!; public SettingsWindow SettingsWindow { get; private set; } = null!;
internal Ui.Windows.SettingsWindow SettingsWindow { get; private set; } = null!; public ChatLogWindow ChatLogWindow { get; private set; } = null!;
internal Ui.Windows.ChannelPopoutPool ChannelPopoutPool { get; private set; } = null!;
public DbViewer DbViewer { get; private set; } = null!; public DbViewer DbViewer { get; private set; } = null!;
internal static InputPreview InputPreview { get; private set; } = null!; public InputPreview InputPreview { get; private set; } = null!;
internal CommandHelpWindow CommandHelpWindow { get; private set; } = null!; public CommandHelpWindow CommandHelpWindow { get; private set; } = null!;
public SeStringDebugger SeStringDebugger { get; private set; } = null!; public SeStringDebugger SeStringDebugger { get; private set; } = null!;
#if DEBUG
internal Ui.Windows.WidgetGalleryWindow WidgetGallery { get; private set; } = null!;
#endif
internal Ui.Windows.InputBarLabWindow InputBarLab { get; private set; } = null!;
public FirstRunWizard FirstRunWizard { get; private set; } = null!; public FirstRunWizard FirstRunWizard { get; private set; } = null!;
internal DebuggerWindow DebuggerWindow { get; private set; } = null!; public DebuggerWindow DebuggerWindow { get; private set; } = null!;
internal Commands Commands { get; private set; } = null!; internal Commands Commands { get; private set; } = null!;
internal GameFunctions.GameFunctions Functions { get; private set; } = null!; internal GameFunctions.GameFunctions Functions { get; private set; } = null!;
internal MessageManager MessageManager { get; private set; } = null!; internal MessageManager MessageManager { get; private set; } = null!;
// Reached by the gate-wiring self-test, which has to ask the live tab
// whether it sees a held gate.
internal Ui.Components.Settings.Tabs.DataPrivacyTab DataPrivacyTab { get; private set; } =
null!;
internal AutoTellTabsService AutoTellTabsService { get; private set; } = null!; internal AutoTellTabsService AutoTellTabsService { get; private set; } = null!;
internal IpcManager Ipc { get; private set; } = null!; internal IpcManager Ipc { get; private set; } = null!;
internal ExtraChat ExtraChat { get; private set; } = null!; internal ExtraChat ExtraChat { get; private set; } = null!;
internal TypingIpc TypingIpc { get; private set; } = null!; internal TypingIpc TypingIpc { get; private set; } = null!;
internal Ui.Components.InputBar InputBar { get; private set; } = null!;
internal FontManager FontManager { get; private set; } = null!; internal FontManager FontManager { get; private set; } = null!;
internal Themes.ThemeRegistry ThemeRegistry { get; private set; } = null!; internal Themes.ThemeRegistry ThemeRegistry { get; private set; } = null!;
internal Ui.StatusBar StatusBar { get; private set; } = null!;
internal Integrations.HonorificService HonorificService { get; private set; } = null!; internal Integrations.HonorificService HonorificService { get; private set; } = null!;
internal Integrations.CustomAudioPlayer CustomAudioPlayer { get; private set; } = null!;
// Ctor-smoke anchors. Exposed so the Payload/Chunk ctor-smoke steps
// can drive the real per-frame Lender path (Borrow()) and the eager
// singletons through the container, never via new(). Mirror of the
// FontManager property pattern — every SelfTest reaches services this way.
internal PayloadHandler PayloadHandler { get; private set; } = null!;
internal Util.Lender<PayloadHandler> PayloadHandlerLender { get; private set; } = null!;
internal Ui.Components.ChunkRenderer ChunkRenderer { get; private set; } = null!;
// Platform indirection over Dalamud.Utility.Util. Wired in Phase-1 ctor so // Platform indirection over Dalamud.Utility.Util. Wired in Phase-1 ctor so
// any service allocated in LoadAsync can read Plugin.PlatformUtil. // any service allocated in LoadAsync can read Plugin.PlatformUtil.
@@ -159,7 +133,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
// Wrapper cached so TearDown can detach the live instance instead of // Wrapper cached so TearDown can detach the live instance instead of
// re-registering with identical args (v1.4.9 ISSUE-1 cleanup). // re-registering with identical args (v1.4.9 ISSUE-1 cleanup).
private CommandWrapper? _hellionSettingsCmd; private CommandWrapper? _hellionSettingsCmd;
private CommandWrapper? _clearHellionCmd;
private CommandWrapper? _hellionViewCmd; private CommandWrapper? _hellionViewCmd;
private CommandWrapper? _hellionDebuggerCmd; private CommandWrapper? _hellionDebuggerCmd;
#if DEBUG #if DEBUG
@@ -169,33 +142,13 @@ public sealed class Plugin : IAsyncDalamudPlugin
// Idempotency guard — Dalamud may fire DisposeAsync twice in a reload race. // Idempotency guard — Dalamud may fire DisposeAsync twice in a reload race.
private int _disposeStarted; private int _disposeStarted;
// The three hide conditions v1.5.6 evaluated and cf4705e left without a
// reader. Advanced once per draw, before any window is drawn.
private Util.ChatHideReason _hideReason = Util.ChatHideReason.None;
// Set by the chat-activation keybind, consumed by the next hide evaluation.
// A cutscene the user dismissed stays dismissed until it ends.
internal bool ChatActivationRequested;
// Set in the first DisposeAsync statement so async callbacks scheduled // Set in the first DisposeAsync statement so async callbacks scheduled
// via Framework.RunOnTick (v1.4.8 retention sweep) can early-bail // via Framework.RunOnTick (v1.4.8 B3 retention sweep) can early-bail
// before they touch state that has already been torn down. Volatile // before they touch state that has already been torn down. Volatile
// because the tick reads it from a different thread than the writer. // because the tick reads it from a different thread than the writer.
private volatile bool _isDisposing; private volatile bool _isDisposing;
// Read by background workers that outlive a teardown -- the export thread internal int DeferredSaveFrames = -1;
// finishes its file either way, but a notification for a plugin the user
// just unloaded belongs to nobody.
internal bool IsDisposing => _isDisposing;
// v1.9.0: last full Draw() wall-time in ms, written once per frame at
// the end of the UiBuilder.Draw handler. Covers the GlobalStyleScope push
// and the font push (the first-frame hitch measurement must include atlas/style
// prologue cost), not just WindowSystem.Draw — measuring the inner call
// alone would drop the prologue and make the figure non-comparable to the
// v1.5.6 baseline. Only accumulated here; the disk write happens in
// PerformanceBaselineStep so the hot path stays allocation-free.
internal double LastDrawMs;
// Cancels the v1.4.8 FTS5 bulk-insert worker on plugin teardown. The // Cancels the v1.4.8 FTS5 bulk-insert worker on plugin teardown. The
// worker runs off the framework thread on its own SqliteConnection, so a // worker runs off the framework thread on its own SqliteConnection, so a
@@ -203,51 +156,23 @@ public sealed class Plugin : IAsyncDalamudPlugin
// tears down (the worker logs "rebuild failed" via Log on error paths). // tears down (the worker logs "rebuild failed" via Log on error paths).
private CancellationTokenSource? _ftsRebuildCts; private CancellationTokenSource? _ftsRebuildCts;
// Serialises every long-running database operation against every other one, // Serialises retention sweeps so a manual trigger and the 24h auto-sweep
// not just retention sweeps against each other. An export leaves a reader // can't run in parallel. Volatile because the ImGui thread reads it outside
// open on the primary connection outside _readLock by design -- the // the lock to gate the manual button.
// enumerator is consumed lazily -- and a VACUUM meeting that reader hits a internal readonly object RetentionSweepLock = new();
// connection Microsoft documents as not thread-safe. internal volatile bool RetentionSweepRunning;
//
// Replaces the retention-only pair, which solved the same problem for one
// case. The draw thread reads Current every frame to disable buttons and
// must never block doing so.
internal readonly Util.DbOperationGate DbOperations = new();
// Neutral owner of the Config.Tabs LIST-structure lock so both the
// worker-thread mutator (AutoTellTabsService) and the framework-thread
// refilter (MessageManager) share ONE monitor. Lock order: this outer,
// MessageList's SemaphoreSlim inner — never the reverse.
internal readonly object TabsListLock = new();
// Guards the serialized config maps that the draw thread mutates while a
// background save may be serializing them: ChatColours, PrivacyPersistChannels
// and RetentionPerChannelDays. TabsListLock does not cover these.
// Ordering: ConfigMapsLock sits INSIDE TabsListLock (that edge is real, via
// AutoTellTabsService calling SaveConfig under the tabs lock). Never the other
// way round -- so SaveConfig must never be called while holding ConfigMapsLock.
internal readonly object ConfigMapsLock = new();
internal DateTime GameStarted { get; } internal DateTime GameStarted { get; }
// Couples "current tab" to the real UI selection. The chat hooks are // Tab management lives here rather than in ChatLogWindow for access reasons.
// installed before MainWindow is Phase-1 resolved, so the null-conditional internal int LastTab { get; set; }
// fallback to Tabs[0] is load-bearing — it keeps the pre-coupling behavior internal int? WantedTab { get; set; }
// in that early window rather than being merely defensive.
// Read once into a local: Count and [0] as two separate accesses can be split
// by a removal on another thread. Only reachable before MainWindow exists.
internal Tab CurrentTab internal Tab CurrentTab
{ {
get get
{ {
if (MainWindow?.ActiveTab is { } active) var i = LastTab;
return active; return i > -1 && i < Config.Tabs.Count ? Config.Tabs[i] : new Tab();
lock (TabsListLock)
{
var tabs = Config.Tabs;
return tabs.Count > 0 ? tabs[0] : new Tab();
}
} }
} }
@@ -265,7 +190,7 @@ public sealed class Plugin : IAsyncDalamudPlugin
// Migrate config + database from upstream ChatTwo on first start. // Migrate config + database from upstream ChatTwo on first start.
MigrateFromChatTwoLayout(); MigrateFromChatTwoLayout();
Config = Interface.GetPluginConfig() as Configuration ?? Configuration.CreateFresh(); Config = Interface.GetPluginConfig() as Configuration ?? new Configuration();
// PlatformUtil and LogProxy are filled from the DI container in // PlatformUtil and LogProxy are filled from the DI container in
// Phase-1 below (`_host.Services.GetRequiredService<IPlatformUtil>()` // Phase-1 below (`_host.Services.GetRequiredService<IPlatformUtil>()`
@@ -273,13 +198,10 @@ public sealed class Plugin : IAsyncDalamudPlugin
// point (MigrateFromChatTwoLayout, LanguageChanged, ImGuiUtil.Initialize) // point (MigrateFromChatTwoLayout, LanguageChanged, ImGuiUtil.Initialize)
// do not touch either static, so the brief null-window is safe. // do not touch either static, so the brief null-window is safe.
// Schema gate: v1.4.x+ requires config v16+. Users on older schemas // Schema gate: v1.4.x requires config v16+. Users on older schemas
// must install v1.4.2 first to run the migration chain. v19 added the // must install v1.4.2 first to run the migration chain. v17 adds
// top-level CustomSoundVolume, WindowOpacityInactive, WorldSuffixMode // Tab.IsPinned (additive, no data migration needed) so v16 configs
// and NameFormMode fields; v20 adds MainWindowOpen, SettingsWindowOpen, // load cleanly and get their Version stamp bumped after the gate.
// MaxParallelPopouts, TellAutoOpenMode and SidebarAutoSwitchThresholdPx
// — all additive with defaults, so v16-v19 configs load cleanly and
// get their Version stamp bumped after the gate.
if (Config.Version < 16) if (Config.Version < 16)
{ {
throw new InvalidOperationException( throw new InvalidOperationException(
@@ -287,141 +209,17 @@ public sealed class Plugin : IAsyncDalamudPlugin
+ "Please install v1.4.2 first to migrate the configuration, then upgrade to v1.4.10." + "Please install v1.4.2 first to migrate the configuration, then upgrade to v1.4.10."
); );
} }
// 2.0.0 does not migrate, it starts over. Five cycles rebuilt the whole Config.Version = 17;
// window layer, and a config carried through them keeps values chosen
// against surfaces that no longer exist -- an opacity picked for a
// window that has been redrawn twice since, tabs laid out for a sidebar
// that works differently now. Every user of this build is a tester who
// was told this happens, and it is the only way to be sure everyone
// sees the same defaults.
//
// The file is copied aside first. Rolling back to 1.5.6 is a supported
// move here and it stays cheap: the old settings are a file copy away,
// rather than an evening of clicking them back in.
if (Config.Version < 27)
{
BackUpConfigBeforeReset();
Config = Configuration.CreateFresh();
Config.Version = 27;
// Saved immediately: a crash between here and the first user-driven
// save would otherwise run the whole reset again on the next start,
// and the second run would back up the already-reset file over the
// real backup.
SaveConfig();
Log.Information(
"Config reset to defaults for 2.0.0. Previous settings kept as "
+ "HellionChat.json.pre-2.0.0.bak next to the config file."
);
}
else
{
// v23 migration: SidebarTabView was the 1.5.6 sidebar↔top-tabs switch,
// superseded by MainWindowLayoutMode in the v1.6.0 rewrite. A user who
// set it false (only effective in 1.5.6) wanted top tabs — carry that
// intent forward. Runs only for pre-v23 configs; fresh configs load at
// LatestVersion and skip it. Additive v20/v22 fields keep their
// initializer defaults as before.
if (Config.Version < 23 && !Config.SidebarTabView)
{
Config.MainWindowLayoutMode = MainWindowLayoutMode.TopTabs;
}
// v24 migration: the privacy filter used to route a known but unticked
// channel through the unknown-type failsafe, so the channel grid was
// inert whenever that failsafe was on. Corrected in v1.12.0. A config
// that never picked a channel was storing everything through that hole,
// and the corrected rule would store nothing at all -- so the intent is
// carried forward as a filter that is honestly switched off.
if (
Config.Version < 24
&& Privacy.StorageRule.ShouldDisableFilterOnV24(
Config.PrivacyFilterEnabled,
Config.PrivacyPersistUnknownChannels,
Config.PrivacyPersistChannels.Count
)
)
{
Config.PrivacyFilterEnabled = false;
// Log, not LogProxy: this runs in Phase-0 and the proxy is only
// resolved from the container further down.
Log.Information(
"Privacy filter switched off during the v24 migration: it was on with no channels "
+ "picked, which stored everything through the unknown-channel failsafe. Pick "
+ "channels in Settings to switch it back on."
);
}
// v25 carried no migration step; the bump was documentation.
//
// v26 does. NameCameFromPartner is what screenshot mode reads to decide
// whether a tab name is a person, and a config written before it existed
// has it false on every tab -- including pinned tell tabs, which survive
// reloads and are named "Player@World". Anything still carrying a tell
// binding or the temp flag got its name from a partner, so the flag is
// set from those two.
//
// Tabs promoted before this version are past saving: promotion clears
// both markers and keeps the name, so nothing in the stored data says
// where that name came from. Renaming one clears the flag anyway, which
// is the same outcome the user gets by editing it.
if (Config.Version < 26)
{
var carried = 0;
foreach (var tab in Config.Tabs)
{
if (
tab.NameCameFromPartner
|| (!tab.IsTempTab && tab.TellTarget?.IsSet() != true)
)
continue;
tab.NameCameFromPartner = true;
carried++;
}
if (carried > 0)
{
Log.Information(
$"Marked {carried} tab(s) as partner-named during the v26 migration, so "
+ "screenshot mode hides them in the channel header."
);
}
}
}
Config.Version = 27;
// Unpinned TempTabs are session-only and dropped on every load. Pinned // Unpinned TempTabs are session-only and dropped on every load. Pinned
// TempTabs survive reload -- tester feedback in v1.4.7. // TempTabs survive reload — Jin's tester feedback (v1.4.7).
Config.Tabs.RemoveAll(TabLifecycleHelpers.ShouldStripOnLoad); Config.Tabs.RemoveAll(TabLifecycleHelpers.ShouldStripOnLoad);
// Clear stale Tab.PopOut flags now — the pool binds further down
// (ChannelPopoutPool resolve below), so at this point no tab can own a
// slot. A persisted PopOut=true (notably on surviving pinned TempTabs)
// would otherwise be a flag with no window. Runs after the strip, before
// any pool TryOpen.
TabLifecycleHelpers.ResetPopOutOnLoad(Config.Tabs);
LanguageChanged(Interface.UiLanguage); LanguageChanged(Interface.UiLanguage);
// v1.5.3 migration: Settings.Apply auto-activates the matching
// ExtraGlyphRanges flag on a language CHANGE; a config that already
// has e.g. Czech selected from a previous version never goes through
// that path. ORing in the required flag here lets the first atlas
// build pick it up, so an upgrade from v1.5.2 renders correctly
// without forcing the user to toggle the language twice.
var requiredRanges =
Config.LanguageOverride is LanguageOverride.None
? LanguageOverrideExt.RequiredGlyphRangesForCulture(Interface.UiLanguage)
: Config.LanguageOverride.RequiredGlyphRanges();
if (requiredRanges != 0 && !Config.ExtraGlyphRanges.HasFlag(requiredRanges))
Config.ExtraGlyphRanges |= requiredRanges;
ImGuiUtil.Initialize(this); ImGuiUtil.Initialize(this);
DeferredSaveFrames = -1;
// Custom themes dir + seed run before the container builds so the // Custom themes dir + seed run before the container builds so the
// ThemeRegistry factory lambda finds the directory ready. // ThemeRegistry factory lambda finds the directory ready.
var customThemesDir = Path.Combine(Interface.ConfigDirectory.FullName, "themes"); var customThemesDir = Path.Combine(Interface.ConfigDirectory.FullName, "themes");
@@ -456,10 +254,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
); );
_host = PluginHostFactory.Build(this, dependencies); _host = PluginHostFactory.Build(this, dependencies);
// Bridge the static handle before the instance members below are read.
Instance = this;
_lifecycle = _host.Services.GetRequiredService<PluginLifecycle>(); _lifecycle = _host.Services.GetRequiredService<PluginLifecycle>();
_lifecycle.Host = _host; _lifecycle.Host = _host;
@@ -479,36 +273,18 @@ public sealed class Plugin : IAsyncDalamudPlugin
TypingIpc = _host.Services.GetRequiredService<TypingIpc>(); TypingIpc = _host.Services.GetRequiredService<TypingIpc>();
ExtraChat = _host.Services.GetRequiredService<ExtraChat>(); ExtraChat = _host.Services.GetRequiredService<ExtraChat>();
HonorificService = _host.Services.GetRequiredService<Integrations.HonorificService>(); HonorificService = _host.Services.GetRequiredService<Integrations.HonorificService>();
CustomAudioPlayer = _host.Services.GetRequiredService<Integrations.CustomAudioPlayer>(); StatusBar = _host.Services.GetRequiredService<Ui.StatusBar>();
MessageManager = _host.Services.GetRequiredService<MessageManager>(); MessageManager = _host.Services.GetRequiredService<MessageManager>();
AutoTellTabsService = _host.Services.GetRequiredService<AutoTellTabsService>(); AutoTellTabsService = _host.Services.GetRequiredService<AutoTellTabsService>();
InputBar = _host.Services.GetRequiredService<Ui.Components.InputBar>(); ChatLogWindow = _host.Services.GetRequiredService<ChatLogWindow>();
MainWindow = _host.Services.GetRequiredService<Ui.Windows.MainWindow>(); SettingsWindow = _host.Services.GetRequiredService<SettingsWindow>();
SettingsWindow = _host.Services.GetRequiredService<Ui.Windows.SettingsWindow>();
DataPrivacyTab =
_host.Services.GetRequiredService<Ui.Components.Settings.Tabs.DataPrivacyTab>();
DbViewer = _host.Services.GetRequiredService<DbViewer>(); DbViewer = _host.Services.GetRequiredService<DbViewer>();
InputPreview = _host.Services.GetRequiredService<InputPreview>(); InputPreview = _host.Services.GetRequiredService<InputPreview>();
CommandHelpWindow = _host.Services.GetRequiredService<CommandHelpWindow>(); CommandHelpWindow = _host.Services.GetRequiredService<CommandHelpWindow>();
SeStringDebugger = _host.Services.GetRequiredService<SeStringDebugger>(); SeStringDebugger = _host.Services.GetRequiredService<SeStringDebugger>();
#if DEBUG
WidgetGallery = _host.Services.GetRequiredService<Ui.Windows.WidgetGalleryWindow>();
#endif
InputBarLab = _host.Services.GetRequiredService<Ui.Windows.InputBarLabWindow>();
DebuggerWindow = _host.Services.GetRequiredService<DebuggerWindow>(); DebuggerWindow = _host.Services.GetRequiredService<DebuggerWindow>();
FirstRunWizard = _host.Services.GetRequiredService<FirstRunWizard>(); FirstRunWizard = _host.Services.GetRequiredService<FirstRunWizard>();
ChannelPopoutPool = _host.Services.GetRequiredService<Ui.Windows.ChannelPopoutPool>();
// Ctor-smoke anchors. Resolved last, against the fully built
// container: every MakePayloadHandler dep (MainWindow, InputBar,
// ChunkRenderer, ...) is resolvable here, and the ChunkRenderer resolve
// below just reuses the same cached singleton. These are plain
// post-build container resolves (no new factory-lambda edge) — they add
// no DI cycle. See feedback_di_factory_callsite_cycles.
PayloadHandler = _host.Services.GetRequiredService<PayloadHandler>();
PayloadHandlerLender = _host.Services.GetRequiredService<Util.Lender<PayloadHandler>>();
ChunkRenderer = _host.Services.GetRequiredService<Ui.Components.ChunkRenderer>();
} }
public async Task LoadAsync(CancellationToken cancellationToken) public async Task LoadAsync(CancellationToken cancellationToken)
@@ -523,7 +299,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
{ {
Config.Tabs.Add(TabsUtil.VanillaGeneral); Config.Tabs.Add(TabsUtil.VanillaGeneral);
Config.Tabs.Add(TabsUtil.HellionSystem); Config.Tabs.Add(TabsUtil.HellionSystem);
Config.Tabs.Add(TabsUtil.HellionEmote);
Config.Tabs.Add(TabsUtil.HellionFreeCompany); Config.Tabs.Add(TabsUtil.HellionFreeCompany);
Config.Tabs.Add(TabsUtil.HellionParty); Config.Tabs.Add(TabsUtil.HellionParty);
Config.Tabs.Add(TabsUtil.HellionLinkshell); Config.Tabs.Add(TabsUtil.HellionLinkshell);
@@ -543,66 +318,11 @@ public sealed class Plugin : IAsyncDalamudPlugin
await _lifecycle.LoadAsync(cancellationToken).ConfigureAwait(false); await _lifecycle.LoadAsync(cancellationToken).ConfigureAwait(false);
SelfTestRegistry.RegisterTestSteps([ SelfTestRegistry.RegisterTestSteps([
new SelfTests.ExportRoundTripStep(),
new SelfTests.ThemeSwitchSelfTestStep(this), new SelfTests.ThemeSwitchSelfTestStep(this),
new SelfTests.ThemeCrossfadeSelfTestStep(this),
new SelfTests.FontManagerCtorSmokeStep(this), new SelfTests.FontManagerCtorSmokeStep(this),
new SelfTests.PayloadHandlerCtorSmokeStep(this),
new SelfTests.ChunkRendererCtorSmokeStep(this),
new SelfTests.FontPushSmokeStep(this), new SelfTests.FontPushSmokeStep(this),
new SelfTests.WizardStateSmokeStep(this),
new SelfTests.FoxBannerTextureSmokeStep(this),
new SelfTests.SidebarModeAutoSwitchStep(this),
new SelfTests.ColorEditorBufferStep(this),
new SelfTests.ThemePickerCategoryStep(this),
new SelfTests.QuickPickerSelfTestStep(this),
new SelfTests.HideRestoreSelfTestStep(this),
new SelfTests.SettingsWindowOpenStep(this),
new SelfTests.OnOpenMainUiRoutesMainWindowStep(this),
new SelfTests.TypingIpcStateStep(this),
new SelfTests.ConfigMigrationV27Step(this),
new SelfTests.DbGateWiringStep(this),
new SelfTests.ChannelPopoutBindStep(this),
new SelfTests.HoverStateFootprintStep(),
new SelfTests.HonorificHeaderRenderStep(this),
new SelfTests.AboutIntegrationsStatusStep(this),
new SelfTests.TypeScaleStep(this),
new SelfTests.PerformanceBaselineStep(this),
new SelfTests.GlobalStyleScopeAllocStep(this),
new SelfTests.MainWindowFocusOpacityStep(this),
new SelfTests.MainWindowFlagsStep(this),
new SelfTests.SenderNameReformatStep(this),
new SelfTests.DisclosureArmStep(this),
new SelfTests.TellRoutingBuildStep(this),
new SelfTests.TellPillTransparencyStep(this),
new SelfTests.TabRenamePersistStep(this),
new SelfTests.NotificationSoundSelectStep(),
new SelfTests.SidebarGreetedGlyphStep(this),
new SelfTests.SidebarSectionHeaderStep(this),
new SelfTests.ScrollSnapDecisionStep(this),
new SelfTests.TellResetOnActivateStep(),
new SelfTests.CurrentTabCouplingStep(this),
new SelfTests.SidebarUnreadDotStep(this),
new SelfTests.SidebarActiveSurfaceStep(this),
new SelfTests.TopTabUnderlineStep(this),
new SelfTests.UnreadDecisionStep(),
new SelfTests.CurrentTabGuidedStep(this),
new SelfTests.CardClipPlanStep(this),
]); ]);
// Re-surface the wizard for existing users when a major UX
// rework ships. The constant tracks the most recent version
// whose wizard should be shown once; bump it in future cycles
// that reshape the onboarding flow. Saved immediately so a
// pre-Finish crash doesn't loop the prompt forever.
const string WizardReshowVersion = "1.5.2";
if (Config.WizardLastShownVersion != WizardReshowVersion)
{
Config.FirstRunCompleted = false;
Config.WizardLastShownVersion = WizardReshowVersion;
SaveConfig();
}
if (!Config.FirstRunCompleted) if (!Config.FirstRunCompleted)
FirstRunWizard.IsOpen = true; FirstRunWizard.IsOpen = true;
@@ -638,7 +358,7 @@ public sealed class Plugin : IAsyncDalamudPlugin
_ = Task.Run( _ = Task.Run(
async () => async () =>
{ {
// FQN: the Plugin.Notification property shadows the type name. // FQN: Plugin.Notification (Z.74) shadows the type name.
Dalamud.Interface.ImGuiNotification.IActiveNotification? notif = null; Dalamud.Interface.ImGuiNotification.IActiveNotification? notif = null;
try try
{ {
@@ -771,7 +491,7 @@ public sealed class Plugin : IAsyncDalamudPlugin
return; return;
// Set before any cleanup so deferred Framework.RunOnTick callbacks // Set before any cleanup so deferred Framework.RunOnTick callbacks
// (the retention sweep) see the flag and bail out before they touch // (B3 retention sweep) see the flag and bail out before they touch
// MessageManager / Log / static fields that the rest of this method // MessageManager / Log / static fields that the rest of this method
// is about to tear down. // is about to tear down.
_isDisposing = true; _isDisposing = true;
@@ -796,6 +516,19 @@ public sealed class Plugin : IAsyncDalamudPlugin
} }
); );
// Flush a pending DeferredSave — FrameworkUpdate won't fire it anymore.
failure = CaptureFailure(
failure,
() =>
{
if (DeferredSaveFrames >= 0)
{
SaveConfig();
DeferredSaveFrames = -1;
}
}
);
// Framework-thread cleanup the container does not reach. // Framework-thread cleanup the container does not reach.
try try
{ {
@@ -816,21 +549,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
failure ??= ex; failure ??= ex;
} }
// The four long-running workers are background threads with no
// cancellation path, and one of them may be holding an open reader or
// sitting inside a VACUUM. Disposing the store under that tears the
// connection out mid-statement. Five seconds is not a guarantee, but it
// covers everything short of a VACUUM over a very large file, and it
// costs nothing when nothing is running.
var grace = Stopwatch.StartNew();
while (DbOperations.IsBusy && grace.ElapsedMilliseconds < 5_000)
await Task.Delay(50).ConfigureAwait(false);
if (DbOperations.IsBusy)
Log.Warning(
$"Disposing while {DbOperations.Current} still owns the store; it outlasted the 5s grace period."
);
// Container disposes services + windows on the framework thread. // Container disposes services + windows on the framework thread.
// MessageManager.DisposeAsync is not idempotent, so we let the // MessageManager.DisposeAsync is not idempotent, so we let the
// container do it once instead of double-disposing. // container do it once instead of double-disposing.
@@ -879,38 +597,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
return failure; return failure;
} }
// Copies the config aside before the 2.0.0 reset overwrites it. Best effort
// by design: a backup that cannot be written must not stop the plugin from
// starting, and the reset itself is what the user was told would happen.
//
// Overwrite=false, so a second run cannot bury the real backup under a copy
// of the already-reset file. The reset saves immediately for the same
// reason, but a crash in between is exactly when this matters.
private static void BackUpConfigBeforeReset()
{
try
{
var dir = Interface.ConfigDirectory.Parent?.FullName;
if (dir is null)
return;
var configFile = Path.Combine(dir, "HellionChat.json");
if (!File.Exists(configFile))
return;
var backup = Path.Combine(dir, "HellionChat.json.pre-2.0.0.bak");
if (File.Exists(backup))
return;
File.Copy(configFile, backup);
Log.Information($"HellionChat: config backed up to {backup} before the 2.0.0 reset");
}
catch (Exception e)
{
Log.Warning(e, "HellionChat: could not back up the config before the 2.0.0 reset");
}
}
private static void MigrateFromChatTwoLayout() private static void MigrateFromChatTwoLayout()
{ {
var pluginConfigsDir = Interface.ConfigDirectory.Parent?.FullName; var pluginConfigsDir = Interface.ConfigDirectory.Parent?.FullName;
@@ -1025,15 +711,14 @@ public sealed class Plugin : IAsyncDalamudPlugin
// have working entry points before they're constructed. // have working entry points before they're constructed.
private void SetupCommands() private void SetupCommands()
{ {
// ChatLogWindow.cs:128 already registers /hellion (ToggleChat). The
// description-arg here keeps the Dalamud help list populated.
_hellionSettingsCmd = Commands.Register( _hellionSettingsCmd = Commands.Register(
"/hellion", "/hellion",
"Toggle Hellion Chat. /hellion settings opens settings, /hellion wizard reopens the setup wizard, /hellion reset restores the default theme." "Perform various actions with Hellion Chat."
); );
_hellionSettingsCmd.Execute += OnHellionSettingsCommand; _hellionSettingsCmd.Execute += OnHellionSettingsCommand;
_clearHellionCmd = Commands.Register("/clearhellion", "Clear the active Hellion Chat tab.");
_clearHellionCmd.Execute += OnClearHellionCommand;
_hellionViewCmd = Commands.Register( _hellionViewCmd = Commands.Register(
"/hellionView", "/hellionView",
"Get access to your message history, with simple filter options.", "Get access to your message history, with simple filter options.",
@@ -1070,12 +755,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
_hellionSettingsCmd = null; _hellionSettingsCmd = null;
} }
if (_clearHellionCmd is not null)
{
_clearHellionCmd.Execute -= OnClearHellionCommand;
_clearHellionCmd = null;
}
if (_hellionViewCmd is not null) if (_hellionViewCmd is not null)
{ {
_hellionViewCmd.Execute -= OnHellionViewCommand; _hellionViewCmd.Execute -= OnHellionViewCommand;
@@ -1098,60 +777,15 @@ public sealed class Plugin : IAsyncDalamudPlugin
private void OnHellionSettingsCommand(string command, string arguments) private void OnHellionSettingsCommand(string command, string arguments)
{ {
var arg = arguments.Trim(); // /hellion with args is intentionally a no-op (matches pre-v1.4.9
if (string.IsNullOrEmpty(arg)) // Settings.cs:76-80 behaviour).
{ if (string.IsNullOrWhiteSpace(arguments))
MainWindow.Toggle();
return;
}
if (arg.Equals("settings", StringComparison.OrdinalIgnoreCase))
{
SettingsWindow.Toggle(); SettingsWindow.Toggle();
return;
}
#if DEBUG
if (arg.Equals("widgets", StringComparison.OrdinalIgnoreCase))
{
WidgetGallery.Toggle();
return;
}
#endif
if (arg.Equals("lab", StringComparison.OrdinalIgnoreCase))
{
InputBarLab.Toggle();
return;
}
// The wizard had no way back into it: the reopen button the resource
// file still carries in 25 languages lost its call site in the
// four-step rewrite, and nothing replaced it. Without this the only
// route is closing the game and editing FirstRunCompleted by hand.
// Toggle, not IsOpen = true, so the same command closes it again.
if (arg.Equals("wizard", StringComparison.OrdinalIgnoreCase))
{
FirstRunWizard.Toggle();
return;
}
#if DEBUG
#endif
if (arg.Equals("reset", StringComparison.OrdinalIgnoreCase))
{
// Documented recovery path -- drops a
// broken custom theme out of the loader cache without touching
// the user's JSON on disk.
ThemeRegistry.SwitchSilent(Themes.ThemeRegistry.DefaultSlug);
}
}
private void OnClearHellionCommand(string command, string arguments)
{
MainWindow.ActiveTab?.Clear();
} }
private void OnOpenConfigUi() => SettingsWindow.Toggle(); private void OnOpenConfigUi() => SettingsWindow.Toggle();
private void OnOpenMainUi() => MainWindow.Toggle(); private void OnOpenMainUi() => SettingsWindow.Toggle();
private void OnHellionViewCommand(string _, string __) => DbViewer.Toggle(); private void OnHellionViewCommand(string _, string __) => DbViewer.Toggle();
@@ -1168,70 +802,23 @@ public sealed class Plugin : IAsyncDalamudPlugin
if (DateTimeOffset.UtcNow - Config.RetentionLastRunAt < TimeSpan.FromHours(24)) if (DateTimeOffset.UtcNow - Config.RetentionLastRunAt < TimeSpan.FromHours(24))
return; return;
StartRetentionSweep(notify: false);
}
// Shared by the daily check above and the manual button in settings.
//
// notify: the unattended sweep stays quiet, because a notification for
// something the user did not ask for at a moment they did not choose is
// noise. A run they pressed a button for reports back.
//
// Returns false when the store is already busy, so the caller can say so
// instead of leaving the user waiting for a run that never started.
internal bool StartRetentionSweep(bool notify)
{
if (DbOperations.IsBusy)
return false;
// Snapshot the policy so the user can edit settings while the sweep runs. // Snapshot the policy so the user can edit settings while the sweep runs.
//
// Seeded from the spec defaults only when the global limit is not "keep
// forever". The slider is labelled "0 = never", and pre-filling 31
// channels with 365- and 90-day windows made that label a lie: setting
// it to zero still lost free company, linkshell and party history after
// ninety days, and the short-circuit in DeleteByRetentionPolicy could
// never be reached because the map was never empty.
//
// Explicit per-channel overrides still apply. Somebody who typed a
// number for one channel meant that number.
var policy = new Dictionary<int, int>(); var policy = new Dictionary<int, int>();
if (Config.RetentionDefaultDays > 0)
{
foreach (var (type, days) in Privacy.PrivacyDefaults.DefaultRetentionDays) foreach (var (type, days) in Privacy.PrivacyDefaults.DefaultRetentionDays)
policy[(int)(ushort)type] = days; policy[(int)(ushort)type] = days;
}
// This is the enumerator the wizard's Clear() cuts short. Reading under the
// same lock the writers take keeps the policy snapshot whole.
lock (ConfigMapsLock)
{
foreach (var (type, days) in Config.RetentionPerChannelDays) foreach (var (type, days) in Config.RetentionPerChannelDays)
policy[(int)(ushort)type] = days; policy[(int)(ushort)type] = days;
}
var defaultDays = Config.RetentionDefaultDays; var defaultDays = Config.RetentionDefaultDays;
_retentionSweepRunning = true;
// IsBackground = true so a stuck sweep never blocks plugin unload. // IsBackground = true so a stuck sweep never blocks plugin unload.
var worker = new Thread(() => new Thread(() =>
{ {
// Bails when anything else already owns the store, not only another // Bail early if a manual sweep is already in flight.
// sweep: a user-triggered export or cleanup counts too. lock (RetentionSweepLock)
try
{ {
if (!DbOperations.TryBegin(Util.DbOperation.RetentionSweep)) if (RetentionSweepRunning)
{
// A run the user pressed a button for has to say something.
// The pre-check in StartRetentionSweep only covers a gate
// that was already busy; losing the race here is the same
// outcome and used to be silent.
if (notify)
NotifySweep(
Resources.HellionStrings.Retention_Error,
Dalamud.Interface.ImGuiNotification.NotificationType.Warning
);
return; return;
RetentionSweepRunning = true;
} }
try try
@@ -1240,20 +827,15 @@ public sealed class Plugin : IAsyncDalamudPlugin
Config.RetentionLastRunAt = DateTimeOffset.UtcNow; Config.RetentionLastRunAt = DateTimeOffset.UtcNow;
SaveConfig(); SaveConfig();
if (notify)
Util.WrapperUtil.AddNotification(
string.Format(Resources.HellionStrings.Retention_Success, deleted),
Dalamud.Interface.ImGuiNotification.NotificationType.Success
);
if (deleted > 0) if (deleted > 0)
{ {
Log.Information($"Retention sweep deleted {deleted} expired messages."); Log.Information($"Retention sweep deleted {deleted} expired messages.");
// Schedule on the next framework tick to avoid the ~194ms // Schedule on the next framework tick to avoid the ~194ms
// hitch from blocking with .Wait() while the frame finishes. // hitch from blocking with .Wait() while the framework
// The Config.Tabs enumeration in ClearAllTabs/FilterAllTabs is // finishes the current frame. Tabs-list mutation must
// now guarded by the shared Plugin.TabsListLock, so this // stay on the framework thread because Plugin.Config.Tabs
// tick scheduling is purely hitch-avoidance, not safety. // (Configuration.cs:222) is not lock-protected and
// AutoTellTabsService can mutate it from background paths.
// Pattern reference: SimpleTweaks // Pattern reference: SimpleTweaks
// Tweaks/Chat/CaseInsensitiveCommands.cs:45. // Tweaks/Chat/CaseInsensitiveCommands.cs:45.
Framework.RunOnTick(() => Framework.RunOnTick(() =>
@@ -1279,94 +861,40 @@ public sealed class Plugin : IAsyncDalamudPlugin
Log.Information("Retention sweep ran, nothing expired."); Log.Information("Retention sweep ran, nothing expired.");
} }
} }
finally
{
DbOperations.End(Util.DbOperation.RetentionSweep);
}
}
catch (Exception e) catch (Exception e)
{ {
Log.Error(e, "Retention sweep failed"); Log.Error(e, "Retention sweep failed");
if (notify)
NotifySweep(
Resources.HellionStrings.Retention_Error,
Dalamud.Interface.ImGuiNotification.NotificationType.Error
);
} }
finally finally
{ {
_retentionSweepRunning = false; lock (RetentionSweepLock)
RetentionSweepRunning = false;
} }
}) })
{ {
IsBackground = true, IsBackground = true,
}; }.Start();
try
{
worker.Start();
return true;
} }
catch (Exception e)
{
// The thread never ran, so nothing will clear the flag for us.
_retentionSweepRunning = false;
Log.Error(e, "Could not start the retention sweep thread");
return false;
}
}
// The sweep is a background thread that can outlive an unload, same as the
// settings-tab workers. A notification filed against a plugin that is gone
// belongs to nobody.
private void NotifySweep(
string message,
Dalamud.Interface.ImGuiNotification.NotificationType type
)
{
if (_isDisposing)
return;
Util.WrapperUtil.AddNotification(message, type);
}
// Read by the settings tab every frame so the manual button can say a run is
// in progress. The gate itself cannot answer that: it goes busy only once
// the worker reaches TryBegin, which is after Start returns.
private volatile bool _retentionSweepRunning;
internal bool RetentionSweepRunning => _retentionSweepRunning;
private void Draw() private void Draw()
{ {
// v1.9.0: time the whole handler (style + font prologue included). // v1.4.8 B2: pick up external edits of the active custom theme JSON
// Bail before measuring once teardown has begun — a late Draw tick
// must not touch ThemeRegistry / FontManager after DisposeAsync.
if (_isDisposing)
return;
var drawWatch = Stopwatch.StartNew();
try
{
// v1.4.8: pick up external edits of the active custom theme JSON
// without forcing the user to re-click the picker. The disk-stat is // without forcing the user to re-click the picker. The disk-stat is
// 1Hz-throttled inside RefreshActiveIfStale, so this is essentially // 1Hz-throttled inside RefreshActiveIfStale, so this is essentially
// free on built-in themes and ~1 stat/second on custom themes. // free on built-in themes and ~1 stat/second on custom themes.
ThemeRegistry.RefreshActiveIfStale(); ThemeRegistry.RefreshActiveIfStale();
using IDisposable _style = Ui.StyleEngine.GlobalStyleScope.Push( // Theme engine is always active; Classic is a theme, not a disabled state.
using IDisposable _style = HellionStyle.PushGlobal(
ThemeRegistry.Active, ThemeRegistry.Active,
ThemeRegistry,
Config.WindowOpacity Config.WindowOpacity
); );
// Advance every held hover value once, before any window draws. Sits ChatLogWindow.BeginFrame();
// above the early returns below so a hidden main window still lets
// pop-out hovers fade instead of freezing mid-blend.
Ui.StyleEngine.HoverState.BeginFrame();
if (Config.HideInLoadingScreens && Condition[ConditionFlag.BetweenAreas]) if (Config.HideInLoadingScreens && Condition[ConditionFlag.BetweenAreas])
{ {
ChatLogWindow.FinalizeFrame();
TypingIpc.Update(); TypingIpc.Update();
return; return;
} }
@@ -1379,57 +907,27 @@ public sealed class Plugin : IAsyncDalamudPlugin
) )
) )
{ {
ChatLogWindow.FinalizeFrame();
TypingIpc.Update(); TypingIpc.Update();
return; return;
} }
ChatLogWindow.HideStateCheck();
Interface.UiBuilder.DisableUserUiHide = !Config.HideWhenUiHidden; Interface.UiBuilder.DisableUserUiHide = !Config.HideWhenUiHidden;
ChatLogWindow.DefaultText = ImGui.GetStyle().Colors[(int)ImGuiCol.Text];
// Stateless, so it needs no machine: there is no gesture that shows
// the chat while nobody is logged in.
if (Config.HideWhenNotLoggedIn && !ClientState.IsLoggedIn)
{
TypingIpc.Update();
return;
}
_hideReason = Util.ChatHideState.Next(
_hideReason,
new Util.ChatHideState.Inputs(
Config.HideInBattle,
InBattle,
Config.HideDuringCutscenes,
CutsceneActive || GposeActive,
ChatActivationRequested
)
);
ChatActivationRequested = false;
if (Util.ChatHideState.Hides(_hideReason))
{
TypingIpc.Update();
return;
}
// RegularFont is nullable only because the live rebuild path // RegularFont is nullable only because the live rebuild path
// disposes it before reassigning; both ends of that swap happen on // disposes it before reassigning; both ends of that swap happen on
// this same draw thread, so it cannot be null here. // this same draw thread, so it cannot be null here.
var useRegularFont = Config.FontsEnabled || Config.UseHellionFont; using ((Config.FontsEnabled ? FontManager.RegularFont! : FontManager.Axis).Push())
using ((useRegularFont ? FontManager.RegularFont! : FontManager.Axis).Push())
WindowSystem.Draw(); WindowSystem.Draw();
ChatLogWindow.FinalizeFrame();
TypingIpc.Update(); TypingIpc.Update();
FileDialogManager.Draw(); FileDialogManager.Draw();
} }
finally
{
// finally so the early-return frames (loading screen / NG+) record
// their (cheap) time too instead of freezing on the last full frame.
drawWatch.Stop();
LastDrawMs = drawWatch.Elapsed.TotalMilliseconds;
}
}
internal void SaveConfig() internal void SaveConfig()
{ {
@@ -1438,13 +936,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
// Config.Tabs across the save so JSON includes them. Cloning only the // Config.Tabs across the save so JSON includes them. Cloning only the
// unpinned subset keeps the allocation proportional to // unpinned subset keeps the allocation proportional to
// AutoTellTabsLimit (<=15) instead of the full tab list. // AutoTellTabsLimit (<=15) instead of the full tab list.
// The strip/restore mutates the tab LIST, so it shares TabsListLock
// with the worker add/remove and the refilter snapshot. Re-entrant: the
// one worker caller (HandleTell) already holds it; framework callers take
// it here. SavePluginConfig runs inside (short, in-memory) — the documented fallback
// (serialize a copy outside the lock) is a tracked pre-beta to-do.
lock (TabsListLock)
{
var unpinnedTempTabs = Config.Tabs.Where(TabLifecycleHelpers.IsInUnpinnedPool).ToList(); var unpinnedTempTabs = Config.Tabs.Where(TabLifecycleHelpers.IsInUnpinnedPool).ToList();
Config.Tabs.RemoveAll(TabLifecycleHelpers.ShouldStripOnSave); Config.Tabs.RemoveAll(TabLifecycleHelpers.ShouldStripOnSave);
@@ -1452,7 +943,6 @@ public sealed class Plugin : IAsyncDalamudPlugin
Config.Tabs.AddRange(unpinnedTempTabs); Config.Tabs.AddRange(unpinnedTempTabs);
} }
}
internal void LanguageChanged(string langCode) internal void LanguageChanged(string langCode)
{ {
@@ -1476,6 +966,9 @@ public sealed class Plugin : IAsyncDalamudPlugin
private void FrameworkUpdate(IFramework framework) private void FrameworkUpdate(IFramework framework)
{ {
if (DeferredSaveFrames >= 0 && DeferredSaveFrames-- == 0)
SaveConfig();
if (!Config.HideChat) if (!Config.HideChat)
return; return;
+16 -296
View File
@@ -15,7 +15,7 @@ namespace HellionChat;
// Builds the generic-host DI container that drives v1.5.0+. The factory is // Builds the generic-host DI container that drives v1.5.0+. The factory is
// invoked synchronously from Plugin.ctor (after the schema gate clears) so the // invoked synchronously from Plugin.ctor (after the schema gate clears) so the
// container exists before PluginLifecycle.LoadAsync runs. For the // container exists before PluginLifecycle.LoadAsync runs. See plan §1 for the
// deliberate divergence from Lightless' deferred Func-delegate pattern. // deliberate divergence from Lightless' deferred Func-delegate pattern.
internal static class PluginHostFactory internal static class PluginHostFactory
{ {
@@ -29,15 +29,6 @@ internal static class PluginHostFactory
logging.AddDalamudLogging(dependencies.PluginLog); logging.AddDalamudLogging(dependencies.PluginLog);
logging.SetMinimumLevel(LogLevel.Trace); logging.SetMinimumLevel(LogLevel.Trace);
}) })
// ValidateOnBuild eagerly instantiates every singleton at Build time
// so missing registrations / ConstructorCallSite cycles throw on
// load instead of producing a silent hang. ValidateScopes is cheap
// (we only use singletons) but guards against future Scoped misuse.
.UseDefaultServiceProvider(o =>
{
o.ValidateOnBuild = true;
o.ValidateScopes = true;
})
.ConfigureServices(services => ConfigureServices(services, plugin, dependencies)) .ConfigureServices(services => ConfigureServices(services, plugin, dependencies))
.Build(); .Build();
} }
@@ -48,7 +39,7 @@ internal static class PluginHostFactory
PluginHostDependencies dependencies PluginHostDependencies dependencies
) )
{ {
// Dalamud services (21 [PluginService] singletons). // Block A — Dalamud services (21 [PluginService] singletons).
services.AddSingleton(dependencies); services.AddSingleton(dependencies);
services.AddSingleton(dependencies.PluginInterface); services.AddSingleton(dependencies.PluginInterface);
services.AddSingleton(dependencies.PluginLog); services.AddSingleton(dependencies.PluginLog);
@@ -77,7 +68,7 @@ internal static class PluginHostFactory
services.AddSingleton(plugin.WindowSystem); services.AddSingleton(plugin.WindowSystem);
services.AddSingleton<PluginLifecycle>(); services.AddSingleton<PluginLifecycle>();
// HellionChat singletons. Factory lambdas because most // Block B — HellionChat singletons. Factory lambdas because most
// classes are internal-sealed and the default activator only sees // classes are internal-sealed and the default activator only sees
// public ctors. // public ctors.
services.AddSingleton<IPlatformUtil>(_ => new DalamudPlatformUtil()); services.AddSingleton<IPlatformUtil>(_ => new DalamudPlatformUtil());
@@ -89,6 +80,7 @@ internal static class PluginHostFactory
services.AddSingleton(sp => new FontManager( services.AddSingleton(sp => new FontManager(
sp.GetRequiredService<IDalamudPluginInterface>() sp.GetRequiredService<IDalamudPluginInterface>()
)); ));
services.AddSingleton(_ => new StatusBar());
services.AddSingleton(sp => new IpcManager(sp.GetRequiredService<ILogger<IpcManager>>())); services.AddSingleton(sp => new IpcManager(sp.GetRequiredService<ILogger<IpcManager>>()));
services.AddSingleton(sp => new ExtraChat(sp.GetRequiredService<ILogger<ExtraChat>>())); services.AddSingleton(sp => new ExtraChat(sp.GetRequiredService<ILogger<ExtraChat>>()));
@@ -100,23 +92,6 @@ internal static class PluginHostFactory
sp.GetRequiredService<ILogger<ThemeRegistry>>() sp.GetRequiredService<ILogger<ThemeRegistry>>()
)); ));
services.AddSingleton(_ => new Ui.StyleEngine.TokenResolver());
// Transient: each surface owns its motes, so two backdrops on screen do
// not drift in lockstep.
services.AddSingleton(sp => new Ui.Components.Settings.SectionRenderer(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddTransient(sp => new Ui.StyleEngine.SurfaceBackdrop(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.StyleEngine.PushStack(
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new GameFunctions.GameFunctions( services.AddSingleton(sp => new GameFunctions.GameFunctions(
sp.GetRequiredService<Plugin>(), sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<ILogger<GameFunctions.GameFunctions>>(), sp.GetRequiredService<ILogger<GameFunctions.GameFunctions>>(),
@@ -124,7 +99,6 @@ internal static class PluginHostFactory
)); ));
services.AddSingleton(sp => new TypingIpc( services.AddSingleton(sp => new TypingIpc(
sp.GetRequiredService<Plugin>(), sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.Components.InputBar>(),
sp.GetRequiredService<ILogger<TypingIpc>>() sp.GetRequiredService<ILogger<TypingIpc>>()
)); ));
@@ -133,143 +107,6 @@ internal static class PluginHostFactory
sp.GetRequiredService<ILogger<Integrations.HonorificService>>(), sp.GetRequiredService<ILogger<Integrations.HonorificService>>(),
sp.GetRequiredService<IFramework>() sp.GetRequiredService<IFramework>()
)); ));
services.AddSingleton(sp => new Services.TellRouterService(
sp.GetRequiredService<MessageManager>(),
sp.GetRequiredService<ILogger<Services.TellRouterService>>()
));
services.AddSingleton(sp => new Ui.Components.HonorificHeader(
sp.GetRequiredService<Integrations.HonorificService>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.Components.Sidebar(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<ILogger<Ui.Components.Sidebar>>(),
sp.GetRequiredService<Ui.Windows.ChannelPopoutPool>()
));
services.AddSingleton(sp => new Ui.Components.MessageList(
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<Ui.Components.ChunkRenderer>()
));
services.AddSingleton(_ => new Ui.Components.SymbolPicker());
services.AddSingleton(sp => new Ui.Components.ThemeQuickPicker(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Plugin>()
));
services.AddSingleton(sp => new Ui.Components.InputBar(
sp.GetRequiredService<Ui.Components.SymbolPicker>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>(),
sp.GetRequiredService<ILogger<Ui.Components.InputBar>>(),
() => sp.GetRequiredService<Plugin>().SettingsWindow.Toggle(),
sp.GetRequiredService<Ui.CommandHelpWindow>(),
sp.GetRequiredService<Ui.Components.ThemeQuickPicker>(),
() => sp.GetRequiredService<Plugin>().MainWindow.UserHide()
));
services.AddSingleton(sp => new Ui.Components.Settings.TabSidebar(
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.Components.Settings.ContentArea(
sp.GetRequiredService<Ui.StyleEngine.SurfaceBackdrop>()
));
services.AddSingleton(sp => new Ui.Components.Settings.ThemePicker(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.Components.Settings.SectionRenderer>()
));
services.AddSingleton(sp => new Ui.Components.Settings.ColorPicker(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.Components.Settings.SectionRenderer>()
));
services.AddSingleton(sp => new Ui.Components.Settings.LivePreviewPanel(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>(),
sp.GetRequiredService<FontManager>()
));
services.AddSingleton(sp => new Ui.Components.Settings.ThemeImportExportRow(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<ILogger<Ui.Components.Settings.ThemeImportExportRow>>()
));
services.AddSingleton(sp => new Ui.Components.Settings.FontsSection(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<Ui.Components.Settings.SectionRenderer>()
));
services.AddSingleton(sp => new Ui.Components.Settings.ChatColourPicker(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.Components.Settings.SectionRenderer>()
));
services.AddSingleton(sp => new Ui.Components.Settings.Tabs.AppearanceTab(
sp.GetRequiredService<Ui.Components.Settings.ThemePicker>(),
sp.GetRequiredService<Ui.Components.Settings.ColorPicker>(),
sp.GetRequiredService<Ui.Components.Settings.LivePreviewPanel>(),
sp.GetRequiredService<Ui.Components.Settings.ThemeImportExportRow>(),
sp.GetRequiredService<Ui.Components.Settings.FontsSection>(),
sp.GetRequiredService<Ui.Components.Settings.ChatColourPicker>()
));
services.AddSingleton(sp => new Ui.Components.Settings.Tabs.GeneralTab(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.Components.Settings.Tabs.ChatTab(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.Components.Settings.Tabs.WindowTab(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.Components.Settings.Tabs.ChannelsTab(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.Components.Settings.Tabs.DataPrivacyTab(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>(),
sp.GetRequiredService<ILogger<Ui.Components.Settings.Tabs.DataPrivacyTab>>()
));
services.AddSingleton(sp => new Ui.Components.Settings.Tabs.AboutTab(
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Integrations.HonorificService>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<IPlatformUtil>()
));
services.AddSingleton(sp => new Ui.Components.StatusBar(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<FontManager>()
));
services.AddSingleton(sp => new Ui.Components.TopTabBar(
sp.GetRequiredService<Ui.Windows.ChannelPopoutPool>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
services.AddSingleton(sp => new Ui.Windows.MainWindow(
sp.GetRequiredService<Ui.Components.HonorificHeader>(),
sp.GetRequiredService<Ui.Components.Sidebar>(),
sp.GetRequiredService<Ui.Components.TopTabBar>(),
sp.GetRequiredService<Ui.Components.MessageList>(),
sp.GetRequiredService<Ui.Components.InputBar>(),
sp.GetRequiredService<Ui.Components.StatusBar>(),
sp.GetRequiredService<Lender<PayloadHandler>>(),
sp.GetRequiredService<Ui.Windows.ChannelPopoutPool>(),
sp.GetRequiredService<Ui.StyleEngine.SurfaceBackdrop>()
));
services.AddSingleton(sp => new Integrations.FailedTellNotifier(
sp.GetRequiredService<ILogger<Integrations.FailedTellNotifier>>()
));
services.AddSingleton(sp => new Integrations.CustomAudioPlayer(
sp.GetRequiredService<ILogger<Integrations.CustomAudioPlayer>>()
));
services.AddSingleton(sp => new MessageManager( services.AddSingleton(sp => new MessageManager(
sp.GetRequiredService<Plugin>(), sp.GetRequiredService<Plugin>(),
@@ -291,116 +128,33 @@ internal static class PluginHostFactory
); );
}); });
// Factory-lambdas for ChunkRenderer, PayloadHandler, and Lender<PayloadHandler> // Block C — Windows. WindowSystem.AddWindow is called from
// because all three are internal-sealed (ActivatorUtilities can't reflect into
// internal ctors) and Lender<T> has an internal ctor by design.
// PayloadHandler registered twice: once as singleton for G/H, once via Lender<T> for per-frame isolation (I/J/K).
services.AddSingleton(sp => new Ui.Components.ChunkRenderer(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<ILogger<Ui.Components.ChunkRenderer>>(),
sp.GetRequiredService<GameFunctions.GameFunctions>()
));
services.AddSingleton(sp => MakePayloadHandler(sp));
services.AddSingleton(sp => new Lender<PayloadHandler>(() => MakePayloadHandler(sp)));
// Pop-out windows: each gets its OWN MessageList + InputBar so the
// channel pill and message scroll are per-window. The PayloadHandler is
// attached post-build (ChannelPopoutInitHostedService), NEVER via ctor
// (would close a silent FactoryCallSite cycle).
services.AddSingleton<Func<int, Ui.Windows.ChannelPopoutWindow>>(sp =>
slot => new Ui.Windows.ChannelPopoutWindow(
slot,
new Ui.Components.MessageList(
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<Ui.Components.ChunkRenderer>()
),
new Ui.Components.InputBar(
sp.GetRequiredService<Ui.Components.SymbolPicker>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>(),
sp.GetRequiredService<ILogger<Ui.Components.InputBar>>(),
() => sp.GetRequiredService<Plugin>().SettingsWindow.Toggle(),
sp.GetRequiredService<Ui.CommandHelpWindow>()
),
sp.GetRequiredService<ILogger<Ui.Windows.ChannelPopoutWindow>>(),
sp.GetRequiredService<FontManager>(),
sp.GetRequiredService<Ui.StyleEngine.SurfaceBackdrop>(),
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
)
);
services.AddSingleton(sp => new Ui.Windows.ChannelPopoutPool(
sp.GetRequiredService<Func<int, Ui.Windows.ChannelPopoutWindow>>(),
sp.GetRequiredService<ILogger<Ui.Windows.ChannelPopoutPool>>()
));
// Windows. WindowSystem.AddWindow is called from
// PluginLifecycle.LoadAsync on the framework thread. // PluginLifecycle.LoadAsync on the framework thread.
services.AddSingleton(sp => new Ui.Windows.SettingsWindow( services.AddSingleton(sp => new ChatLogWindow(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<ILogger<ChatLogWindow>>(),
sp.GetRequiredService<ILoggerFactory>()
));
services.AddSingleton(sp => new SettingsWindow(
sp.GetRequiredService<Plugin>(), sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.Components.Settings.TabSidebar>(),
sp.GetRequiredService<Ui.Components.Settings.ContentArea>(),
sp.GetRequiredService<Ui.Components.Settings.ThemePicker>(),
sp.GetRequiredService<Ui.Components.Settings.ColorPicker>(),
sp.GetRequiredService<Ui.Components.Settings.LivePreviewPanel>(),
sp.GetRequiredService<Ui.Components.Settings.Tabs.AppearanceTab>(),
sp.GetRequiredService<Ui.Components.Settings.Tabs.GeneralTab>(),
sp.GetRequiredService<Ui.Components.Settings.Tabs.ChatTab>(),
sp.GetRequiredService<Ui.Components.Settings.Tabs.WindowTab>(),
sp.GetRequiredService<Ui.Components.Settings.Tabs.ChannelsTab>(),
sp.GetRequiredService<Ui.Components.Settings.Tabs.DataPrivacyTab>(),
sp.GetRequiredService<Ui.Components.Settings.Tabs.AboutTab>(),
sp.GetRequiredService<ILoggerFactory>() sp.GetRequiredService<ILoggerFactory>()
)); ));
services.AddSingleton(sp => new DbViewer( services.AddSingleton(sp => new DbViewer(
sp.GetRequiredService<Plugin>(), sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<ILogger<DbViewer>>() sp.GetRequiredService<ILogger<DbViewer>>()
)); ));
services.AddSingleton(sp => new InputPreview( services.AddSingleton(sp => new InputPreview(sp.GetRequiredService<ChatLogWindow>()));
sp.GetRequiredService<Ui.Components.ChunkRenderer>(), services.AddSingleton(sp => new CommandHelpWindow(sp.GetRequiredService<ChatLogWindow>()));
sp.GetRequiredService<Lender<PayloadHandler>>(),
sp.GetRequiredService<Ui.Windows.MainWindow>(),
sp.GetRequiredService<Ui.Components.InputBar>(),
sp.GetRequiredService<ILogger<InputPreview>>()
));
// No MainWindow ctor-param: breaks the InputBar -> CommandHelpWindow ->
// MainWindow -> InputBar singleton cycle. MainWindow is wired post-build
// via CommandHelpWindowInitHostedService.
services.AddSingleton(sp => new CommandHelpWindow(
sp.GetRequiredService<Ui.Components.ChunkRenderer>(),
sp.GetRequiredService<ILogger<CommandHelpWindow>>()
));
services.AddSingleton(sp => new SeStringDebugger(sp.GetRequiredService<Plugin>())); services.AddSingleton(sp => new SeStringDebugger(sp.GetRequiredService<Plugin>()));
#if DEBUG services.AddSingleton(sp => new DebuggerWindow(sp.GetRequiredService<Plugin>()));
services.AddSingleton(sp => new Ui.Windows.WidgetGalleryWindow( services.AddSingleton(sp => new FirstRunWizard(sp.GetRequiredService<Plugin>()));
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.StyleEngine.TokenResolver>()
));
#endif
// The style lab: variants side by side, in-game, against the live theme.
// Permanent, and deliberately not behind DEBUG: style decisions get
// made in the build that actually ships.
services.AddSingleton(sp => new Ui.Windows.InputBarLabWindow(
sp.GetRequiredService<Plugin>()
));
services.AddSingleton(sp => new DebuggerWindow(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<PayloadHandler>()
));
services.AddSingleton(sp => new FirstRunWizard(
sp.GetRequiredService<Plugin>(),
sp.GetRequiredService<Ui.StyleEngine.SurfaceBackdrop>()
));
// Hosted-service adapters: thin wrappers around the existing init // Hosted-service adapters: thin wrappers around the existing init
// methods so the service class bodies stay unchanged. FontManager // methods so the service class bodies stay unchanged. FontManager
// does not need one — its ctor runs the init inline inside a single // does not need one — its ctor runs the init inline inside a single
// SuppressAutoRebuild block on eager resolve. // SuppressAutoRebuild block on eager resolve.
services.AddHostedService(sp => new ThemeRegistryInitHostedService( services.AddHostedService(sp => new ThemeRegistryInitHostedService(
sp.GetRequiredService<ThemeRegistry>(), sp.GetRequiredService<ThemeRegistry>()
sp.GetRequiredService<FontManager>()
)); ));
services.AddHostedService(sp => new IpcManagerInitHostedService( services.AddHostedService(sp => new IpcManagerInitHostedService(
sp.GetRequiredService<IpcManager>() sp.GetRequiredService<IpcManager>()
@@ -418,41 +172,7 @@ internal static class PluginHostFactory
services.AddHostedService(sp => new AutoTellTabsServiceInitHostedService( services.AddHostedService(sp => new AutoTellTabsServiceInitHostedService(
sp.GetRequiredService<AutoTellTabsService>() sp.GetRequiredService<AutoTellTabsService>()
)); ));
// Must come AFTER AutoTell's registration: both subscribe MessageProcessed,
// and AutoTell subscribing first lets the router's IsOpen-guard see the
// already-opened pop-out (FIFO framework-tick ordering, no double-pop).
services.AddHostedService(sp => new TellRouterServiceInitHostedService(
sp.GetRequiredService<Services.TellRouterService>()
));
services.AddHostedService(
sp => new Infrastructure.Hosting.FailedTellNotifierInitHostedService(
sp.GetRequiredService<Integrations.FailedTellNotifier>()
)
);
services.AddHostedService(sp => new PayloadHandlerInitHostedService(
sp.GetRequiredService<PayloadHandler>(),
sp.GetRequiredService<Ui.Components.MessageList>()
));
services.AddHostedService(sp => new CommandHelpWindowInitHostedService(
sp.GetRequiredService<Ui.CommandHelpWindow>(),
sp.GetRequiredService<Ui.Windows.MainWindow>()
));
services.AddHostedService(sp => new ChannelPopoutInitHostedService(
sp.GetRequiredService<Ui.Windows.ChannelPopoutPool>(),
sp.GetRequiredService<PayloadHandler>()
));
} }
private static PayloadHandler MakePayloadHandler(IServiceProvider sp) =>
new(
sp.GetRequiredService<ThemeRegistry>(),
sp.GetRequiredService<IpcManager>(),
sp.GetRequiredService<GameFunctions.GameFunctions>(),
sp.GetRequiredService<Ui.Components.InputBar>(),
sp.GetRequiredService<Ui.Windows.MainWindow>(),
sp.GetRequiredService<Ui.Components.ChunkRenderer>(),
sp.GetRequiredService<ILogger<PayloadHandler>>()
);
} }
internal sealed record PluginHostDependencies( internal sealed record PluginHostDependencies(
+2 -11
View File
@@ -58,23 +58,14 @@ internal sealed class PluginLifecycle : IAsyncDisposable
private static void RegisterWindows(Plugin plugin) private static void RegisterWindows(Plugin plugin)
{ {
plugin.WindowSystem.AddWindow(plugin.MainWindow); plugin.WindowSystem.AddWindow(plugin.ChatLogWindow);
plugin.WindowSystem.AddWindow(plugin.SettingsWindow); plugin.WindowSystem.AddWindow(plugin.SettingsWindow);
plugin.WindowSystem.AddWindow(plugin.DbViewer); plugin.WindowSystem.AddWindow(plugin.DbViewer);
plugin.WindowSystem.AddWindow(Plugin.InputPreview); plugin.WindowSystem.AddWindow(plugin.InputPreview);
plugin.WindowSystem.AddWindow(plugin.CommandHelpWindow); plugin.WindowSystem.AddWindow(plugin.CommandHelpWindow);
plugin.WindowSystem.AddWindow(plugin.SeStringDebugger); plugin.WindowSystem.AddWindow(plugin.SeStringDebugger);
#if DEBUG
plugin.WindowSystem.AddWindow(plugin.WidgetGallery);
#endif
plugin.WindowSystem.AddWindow(plugin.InputBarLab);
plugin.WindowSystem.AddWindow(plugin.DebuggerWindow); plugin.WindowSystem.AddWindow(plugin.DebuggerWindow);
plugin.WindowSystem.AddWindow(plugin.FirstRunWizard); plugin.WindowSystem.AddWindow(plugin.FirstRunWizard);
// Pop-out pool: register all pre-allocated instances ONCE here on the
// framework thread. Open/Close at runtime is IsOpen-only, never AddWindow.
foreach (var popout in plugin.ChannelPopoutPool.Instances)
plugin.WindowSystem.AddWindow(popout);
} }
public async ValueTask DisposeAsync() public async ValueTask DisposeAsync()
-154
View File
@@ -1,154 +0,0 @@
using HellionChat.Code;
using HellionChat.Resources;
namespace HellionChat.Privacy;
// The eight buckets the privacy surface sorts channels into. Eighty-nine
// checkboxes in one flat list is not a choice anybody makes; eight named groups
// is. Shared by the export form and the persist grid so the two screens
// describe channels the same way.
//
// Headings are functions, not strings, so a language switch at runtime relabels
// them on the next frame. A captured string would keep the language the window
// happened to be opened in.
//
// Game Master channels follow ChatTypeExt.Parent(), which already pairs each of
// them with its player counterpart. Filing them all under system traffic reads
// tidier but puts GmTell -- a private two-person conversation -- outside the
// direct-messages group, and an access request that quietly drops part of what
// it promises is the dangerous kind of gap.
//
// Every ChatType belongs to exactly one group, and a build-suite test pins that.
// A channel in no group cannot be picked in any of these screens, which reads as
// a missing checkbox rather than as an omission.
internal static class ChannelGroups
{
internal static readonly (Func<string> Heading, ChatType[] Types)[] All =
[
(
() => HellionStrings.Privacy_Group_DirectMessages,
[ChatType.TellIncoming, ChatType.TellOutgoing, ChatType.GmTell]
),
(
() => HellionStrings.Privacy_Group_PartyAlliance,
[
ChatType.Party,
ChatType.CrossParty,
ChatType.Alliance,
ChatType.PvpTeam,
ChatType.PvpTeamAnnouncement,
ChatType.PvpTeamLoginLogout,
ChatType.GmParty,
]
),
(
() => HellionStrings.Privacy_Group_FreeCompany,
[
ChatType.FreeCompany,
ChatType.FreeCompanyAnnouncement,
ChatType.FreeCompanyLoginLogout,
ChatType.GmFreeCompany,
]
),
(
() => HellionStrings.Privacy_Group_Linkshells,
[
ChatType.Linkshell1,
ChatType.Linkshell2,
ChatType.Linkshell3,
ChatType.Linkshell4,
ChatType.Linkshell5,
ChatType.Linkshell6,
ChatType.Linkshell7,
ChatType.Linkshell8,
ChatType.GmLinkshell1,
ChatType.GmLinkshell2,
ChatType.GmLinkshell3,
ChatType.GmLinkshell4,
ChatType.GmLinkshell5,
ChatType.GmLinkshell6,
ChatType.GmLinkshell7,
ChatType.GmLinkshell8,
]
),
(
() => HellionStrings.Privacy_Group_CrossLinkshells,
[
ChatType.CrossLinkshell1,
ChatType.CrossLinkshell2,
ChatType.CrossLinkshell3,
ChatType.CrossLinkshell4,
ChatType.CrossLinkshell5,
ChatType.CrossLinkshell6,
ChatType.CrossLinkshell7,
ChatType.CrossLinkshell8,
]
),
(
() => HellionStrings.Privacy_Group_ExtraChat,
[
ChatType.ExtraChatLinkshell1,
ChatType.ExtraChatLinkshell2,
ChatType.ExtraChatLinkshell3,
ChatType.ExtraChatLinkshell4,
ChatType.ExtraChatLinkshell5,
ChatType.ExtraChatLinkshell6,
ChatType.ExtraChatLinkshell7,
ChatType.ExtraChatLinkshell8,
]
),
(
() => HellionStrings.Privacy_Group_PublicChat,
[
ChatType.Say,
ChatType.Shout,
ChatType.Yell,
ChatType.NoviceNetwork,
ChatType.NoviceNetworkSystem,
ChatType.CustomEmote,
ChatType.StandardEmote,
ChatType.GmSay,
ChatType.GmShout,
ChatType.GmYell,
ChatType.GmNoviceNetwork,
]
),
(
() => HellionStrings.Privacy_Group_SystemLogs,
[
ChatType.System,
ChatType.Notice,
ChatType.Urgent,
ChatType.Echo,
ChatType.NpcDialogue,
ChatType.NpcAnnouncement,
ChatType.LootNotice,
ChatType.LootRoll,
ChatType.RetainerSale,
ChatType.Crafting,
ChatType.Gathering,
ChatType.Sign,
ChatType.RandomNumber,
ChatType.MessageBook,
ChatType.Alarm,
ChatType.Orchestrion,
ChatType.GlamourNotifications,
ChatType.PeriodicRecruitmentNotification,
ChatType.GatheringSystem,
ChatType.Progress,
ChatType.Debug,
ChatType.Error,
ChatType.Item,
ChatType.Action,
ChatType.BattleSystem,
ChatType.Damage,
ChatType.Healing,
ChatType.Miss,
ChatType.GainBuff,
ChatType.GainDebuff,
ChatType.LoseBuff,
ChatType.LoseDebuff,
]
),
];
}
+1 -26
View File
@@ -4,7 +4,7 @@ namespace HellionChat.Privacy;
internal static class PrivacyDefaults internal static class PrivacyDefaults
{ {
// Failsafe for ChatTypes added by future FFXIV patches. New installs // F3.1: failsafe for ChatTypes added by future FFXIV patches. New installs
// persist unknown channels so a major patch's added ChatType isn't silently // persist unknown channels so a major patch's added ChatType isn't silently
// dropped before the user can opt in or out. Existing configs keep their // dropped before the user can opt in or out. Existing configs keep their
// explicit choice — see Configuration.cs PrivacyPersistUnknownChannels. // explicit choice — see Configuration.cs PrivacyPersistUnknownChannels.
@@ -114,29 +114,4 @@ internal static class PrivacyDefaults
[ChatType.StandardEmote] = 1, [ChatType.StandardEmote] = 1,
[ChatType.NoviceNetwork] = 1, [ChatType.NoviceNetwork] = 1,
}; };
// Roleplay: Privacy-First + Say + both emote types. Public-distance
// channels (Shout, Yell) stay out — they are public-noise from
// strangers, not story content. Novice Network also stays out;
// it is not RP-adjacent and would dilute the profile's intent.
internal static readonly IReadOnlySet<ChatType> RoleplayWhitelist = new HashSet<ChatType>(
PrivacyFirstWhitelist
)
{
ChatType.Say,
ChatType.CustomEmote,
ChatType.StandardEmote,
};
// RP sessions function as story logs: Say + emotes need a longer
// window than Casual's 1-day public-chat window. 30 days for Say
// keeps in-character dialogue scrollable across multiple sessions,
// 90 days for emotes mirrors the Privacy-First conversation default.
internal static readonly IReadOnlyDictionary<ChatType, int> RoleplayRetentionOverrides =
new Dictionary<ChatType, int>
{
[ChatType.Say] = 30,
[ChatType.CustomEmote] = 90,
[ChatType.StandardEmote] = 90,
};
} }
-51
View File
@@ -1,51 +0,0 @@
namespace HellionChat.Privacy;
// The rule that decides whether a message is written to disk, as plain logic.
//
// It lives apart from Configuration because Configuration implements a Dalamud
// interface, and the build suite cannot load Dalamud.dll -- the runtime resolves
// the declaring type before it ever reaches the method body, so even a static
// call on it fails. This is the single most consequential branch in the plugin,
// and it belongs where it can be pinned.
internal static class StorageRule
{
// v1.12.0 corrected the last term. A known channel the user had unticked
// used to fall through to the unknown-type failsafe, so the channel grid did
// nothing at all whenever that failsafe was on. It is on by default, so the
// filter stored everything while its own description promised "only messages
// from allowed channels are written to the database".
internal static bool Allows(bool listed, bool knownType, bool persistUnknownTypes) =>
listed || (!knownType && persistUnknownTypes);
// Carry-over for configs written before that correction. Where the failsafe
// made the list irrelevant and no channel was ever picked, the old rule
// stored everything; the corrected rule would store nothing. Switching the
// filter off keeps the behaviour and states it where the user can see it.
//
// A config that does have picks keeps them and starts honouring them, which
// is the point of the change.
internal static bool ShouldDisableFilterOnV24(
bool filterEnabled,
bool persistUnknownTypes,
int listedCount
) => filterEnabled && persistUnknownTypes && listedCount == 0;
// Why a retroactive cleanup cannot be offered, or that it can.
internal enum CleanupAvailability
{
Available,
// Nothing is filtered, so nothing in the database contradicts the rule.
FilterDisabled,
// The rule keeps no channel at all. CleanupRetainOnly refuses an empty
// allowlist on purpose -- that request is a full wipe, and a full wipe
// has its own button with its own confirmation.
NothingListed,
}
internal static CleanupAvailability CleanupState(bool filterEnabled, int listedCount) =>
!filterEnabled ? CleanupAvailability.FilterDisabled
: listedCount == 0 ? CleanupAvailability.NothingListed
: CleanupAvailability.Available;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 KiB

@@ -0,0 +1,68 @@
.:;+xXXX$$$$$$$$XXx+;:
.X$+ .;+X$$$$$$$$$$$$$$$$$$$$$$$$$$$x:
;$xx$$X+:... .....::+X$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$;.
X$; .:+xXXX$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X:
$$; :++xX$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X;
$$x. .+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X.
x$$; ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X+;::::::;x$$$$$:
:$$$; .+$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X+:. .+$$$$$$$$$X+;;:
;$$$+. :X$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X;: :$$$$$$$$$$$$$$$$X;.
.+$$$X: ..;X$$$$$$$$$$$$$$$$$$$$$$$$$$X;.. :$$$$$$$$$$$$$$$$$$$$X:
;$$$$$X+::::+X$$$$$$$$$$$$$$$$$$$$$X;. .$$$$$$$$$$$$$$$$$$$$$$$X;
+$$$$$$$$$$$$$$$$$$$$$$$$$$$$X+: Hellion Forge x$$$$$$$$$$$$$$$$$$$$$$$$$X:
.;x$$$$$$$$$$$$$$$$$$$$$x;: .X$$$$$$$$$$$$$$$$$$$$$$$$$$$+
.;+$$$$$$$$$$X+;:.. .X$$$$$$$$$$$$$$$$$$$$$$$$$$$$+
.X$$$$$$$$$$$$$$$$$$$$$$$$$$$$$;
.X$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X
x$$$$$$$$$$$$$$$$$$$$$$$$$$$$$X
;$$$$$$xx$$$$$$$$$$$$$$$$$$$$$x
.$$$$$$x+$$$$$$$$$$$$$$$$$$$$$x
:+X$$$$$$X;$$$$$$$$$$$$$$$$$$$$$$:
;$$$$$$$$$$;$$$$$$$$$$$$$$$$$$$$$$X.
+$$$$$$$$$$;x$$$$$$$$$$$$$$$$$$$$$$+
x$$$$$$$$$$:$$$$$$$$$$$$$$$$$$$$$$X:
.X$$$$$$$$$.:$$$$$$$$$$$$$$$$$$$$$$;
:X$$X;;;;: .$$$$$$$$$$$$$$$$$$$$$$X.
.$$$$X .$$$$$$$$$$$$$$$$$$$$$$$:
.$$$$+ .X$$$$$$$$$$$$$$$$$$$$$$;
;$$$$: .X$$$$$$$$$$$$$$$$$$$$$$x
:X$$$+ .$$$$$$$$$$$$$$$$$$$$$$$X
+$$$x :$$$$$$$$$$$$$$$$$$$$$$$X
;$$X: $$$$$$$$$$$$$$$$$$$$$$$$X
x$$$$$$$$$$$$$$$$$$$$$$$$X
+$$$$$$$$$$$$$$$$$$$$$$$$$+
.+$$$$$$$$$$$$$$$$$$$$$$$$$$;
. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$:
:X$x$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
.XX$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+
;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$+$;
.. ++X$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$:+$:
:$$+. ;$$$$$$$$$$$$$$X$$$$$$$$$$$$$$$$$$$$$;:$$+
.x+X$X: X$$$$$$$$$$x::;:;$$$$$$$$$$$$$$$$$$X: ;$X.
:X.x$$$:.::::::;x+:X$$$$;$$$$$$$$$$$$$$$$$$: :X;
:x.x$$$$$$$$$$$$$$$$$;;$:$$$$$$$$$$$$$$$$$: :$+
:Xx$$$$$$$$$$$$$$$$$: ;X;$$$$$$$$$$$$$$$$: .+$$;
;$$$$$$$$$$$$$$$$$$; .X+X$$$$$$$$$$$$$$$+ .+$+.
+$$$$$$$$$$$$$$$$$$$$$$$;+$$$$$$$$$$$$$$X: .+X:
+$$$$$$$$$$$$$$$$$$$$$$$$$+:$$$$$$$$$$$$$+.+$+.
;$$$$$$$$$$$$$$$$$$$$$$$$$$$X;$$$$$$$$$$$$$$X:
+X: .:X$$$$$$$$x+++x$$$$$$$$;:X$$$$$$$$$$$X:
:x.;$;+$$$$$:. :X$$$$X :$$$$$$$$$$X:
;x :X$$$; .x$$x X$$; .:+.$$$$$$$$$$x
xx.X$$X: X$;.:$X:.X$$$$$$$$$:
+$$$$X. ;$;::: .$$$$$$$$$:
;$$$; :+X$$$$XX$; X$$$$$$$$:
;$$X: .:x$x$$$$$X. x$$$$$$$$:
:X$X: :+x; :$$$$$: +$$$$$$$X:
:++$X+xXX;. +$$$$. +$$$$$$$+.
... .X$$$X. +$$$$$$$:
;$$$$; .X$$$$$$x.
;$$X; :X$$$$$$;
;$$$$$$x.
.X$$$$$$;
;$$$$$$+
+$$$$$;
:X$$$$;.
;$$$$+.
.x$$$X:
.+$$X;
@@ -1,4 +1,4 @@
Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter) Copyright 2013 The Exo 2 Project Authors (https://github.com/googlefonts/Exo-2.0)
This Font Software is licensed under the SIL Open Font License, Version 1.1. This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: This license is copied below, and is also available with a FAQ at:
Binary file not shown.
+77 -246
View File
@@ -41,9 +41,11 @@ internal class HellionStrings
private static string Get(string key) private static string Get(string key)
=> ResourceManager.GetString(key, resourceCulture) ?? key; => ResourceManager.GetString(key, resourceCulture) ?? key;
internal static string Privacy_Tab_Title => Get(nameof(Privacy_Tab_Title));
internal static string Privacy_FilterEnabled_Name => Get(nameof(Privacy_FilterEnabled_Name)); internal static string Privacy_FilterEnabled_Name => Get(nameof(Privacy_FilterEnabled_Name));
internal static string Privacy_FilterEnabled_Description => Get(nameof(Privacy_FilterEnabled_Description)); internal static string Privacy_FilterEnabled_Description => Get(nameof(Privacy_FilterEnabled_Description));
internal static string Privacy_FilterEnabled_StorageOnly_Help => Get(nameof(Privacy_FilterEnabled_StorageOnly_Help)); internal static string Privacy_FilterEnabled_StorageOnly_Help => Get(nameof(Privacy_FilterEnabled_StorageOnly_Help));
internal static string Privacy_Filter_Tree_Heading => Get(nameof(Privacy_Filter_Tree_Heading));
internal static string Privacy_Whitelist_Help => Get(nameof(Privacy_Whitelist_Help)); internal static string Privacy_Whitelist_Help => Get(nameof(Privacy_Whitelist_Help));
internal static string Privacy_Preset_PrivacyFirst => Get(nameof(Privacy_Preset_PrivacyFirst)); internal static string Privacy_Preset_PrivacyFirst => Get(nameof(Privacy_Preset_PrivacyFirst));
internal static string Privacy_Preset_ClearAll => Get(nameof(Privacy_Preset_ClearAll)); internal static string Privacy_Preset_ClearAll => Get(nameof(Privacy_Preset_ClearAll));
@@ -59,10 +61,11 @@ internal class HellionStrings
internal static string Privacy_PersistUnknown_Name => Get(nameof(Privacy_PersistUnknown_Name)); internal static string Privacy_PersistUnknown_Name => Get(nameof(Privacy_PersistUnknown_Name));
internal static string Privacy_PersistUnknown_Description => Get(nameof(Privacy_PersistUnknown_Description)); internal static string Privacy_PersistUnknown_Description => Get(nameof(Privacy_PersistUnknown_Description));
internal static string Cleanup_Unavailable_FilterOff => Get(nameof(Cleanup_Unavailable_FilterOff)); internal static string Cleanup_Heading => Get(nameof(Cleanup_Heading));
internal static string Cleanup_Unavailable_NothingListed => Get(nameof(Cleanup_Unavailable_NothingListed));
internal static string Cleanup_Help_Intro => Get(nameof(Cleanup_Help_Intro)); internal static string Cleanup_Help_Intro => Get(nameof(Cleanup_Help_Intro));
internal static string Cleanup_Help_SavedNote => Get(nameof(Cleanup_Help_SavedNote));
internal static string Cleanup_Preview_Stale => Get(nameof(Cleanup_Preview_Stale)); internal static string Cleanup_Preview_Stale => Get(nameof(Cleanup_Preview_Stale));
internal static string Retention_Help_SavedNote => Get(nameof(Retention_Help_SavedNote));
internal static string Cleanup_RefreshPreview => Get(nameof(Cleanup_RefreshPreview)); internal static string Cleanup_RefreshPreview => Get(nameof(Cleanup_RefreshPreview));
internal static string Cleanup_NoPreview => Get(nameof(Cleanup_NoPreview)); internal static string Cleanup_NoPreview => Get(nameof(Cleanup_NoPreview));
internal static string Cleanup_TotalStored => Get(nameof(Cleanup_TotalStored)); internal static string Cleanup_TotalStored => Get(nameof(Cleanup_TotalStored));
@@ -91,8 +94,8 @@ internal class HellionStrings
internal static string Retention_Tag_Global => Get(nameof(Retention_Tag_Global)); internal static string Retention_Tag_Global => Get(nameof(Retention_Tag_Global));
internal static string Retention_Reset_Button => Get(nameof(Retention_Reset_Button)); internal static string Retention_Reset_Button => Get(nameof(Retention_Reset_Button));
internal static string Retention_Apply_Label => Get(nameof(Retention_Apply_Label)); internal static string Retention_Apply_Label => Get(nameof(Retention_Apply_Label));
internal static string Retention_Apply_Tooltip => Get(nameof(Retention_Apply_Tooltip));
internal static string Retention_Running => Get(nameof(Retention_Running)); internal static string Retention_Running => Get(nameof(Retention_Running));
internal static string Retention_RunNow_Tooltip => Get(nameof(Retention_RunNow_Tooltip));
internal static string Retention_LastRun_Never => Get(nameof(Retention_LastRun_Never)); internal static string Retention_LastRun_Never => Get(nameof(Retention_LastRun_Never));
internal static string Retention_LastRun_At => Get(nameof(Retention_LastRun_At)); internal static string Retention_LastRun_At => Get(nameof(Retention_LastRun_At));
internal static string Retention_Success => Get(nameof(Retention_Success)); internal static string Retention_Success => Get(nameof(Retention_Success));
@@ -113,41 +116,8 @@ internal class HellionStrings
internal static string Wizard_Reopen_Button => Get(nameof(Wizard_Reopen_Button)); internal static string Wizard_Reopen_Button => Get(nameof(Wizard_Reopen_Button));
internal static string Wizard_Cancel_Label => Get(nameof(Wizard_Cancel_Label)); internal static string Wizard_Cancel_Label => Get(nameof(Wizard_Cancel_Label));
internal static string Wizard_Cancel_Tooltip => Get(nameof(Wizard_Cancel_Tooltip)); internal static string Wizard_Cancel_Tooltip => Get(nameof(Wizard_Cancel_Tooltip));
internal static string Wizard_Step1_Title => Get(nameof(Wizard_Step1_Title));
internal static string Wizard_Step1_Subtitle => Get(nameof(Wizard_Step1_Subtitle));
internal static string Wizard_Step1_Footer_Hint => Get(nameof(Wizard_Step1_Footer_Hint));
internal static string Wizard_Step1_PluginNotice => Get(nameof(Wizard_Step1_PluginNotice));
internal static string Wizard_Step1_Heritage => Get(nameof(Wizard_Step1_Heritage));
internal static string Wizard_Step1_Skip_Label => Get(nameof(Wizard_Step1_Skip_Label));
internal static string Wizard_Step1_Skip_Tooltip => Get(nameof(Wizard_Step1_Skip_Tooltip));
internal static string Wizard_Step2_Title => Get(nameof(Wizard_Step2_Title));
internal static string Wizard_Profile_Recommended_Badge => Get(nameof(Wizard_Profile_Recommended_Badge));
internal static string Wizard_Profile_Roleplay_Heading => Get(nameof(Wizard_Profile_Roleplay_Heading));
internal static string Wizard_Profile_Roleplay_Description => Get(nameof(Wizard_Profile_Roleplay_Description));
internal static string Wizard_Profile_Roleplay_Apply => Get(nameof(Wizard_Profile_Roleplay_Apply));
internal static string Wizard_Nav_Back => Get(nameof(Wizard_Nav_Back));
internal static string Wizard_Nav_Next => Get(nameof(Wizard_Nav_Next));
internal static string Wizard_Nav_Finish => Get(nameof(Wizard_Nav_Finish));
internal static string Wizard_Step3_Title => Get(nameof(Wizard_Step3_Title));
internal static string Wizard_Step3_Section_History => Get(nameof(Wizard_Step3_Section_History));
internal static string Wizard_Step3_Section_TellTabs => Get(nameof(Wizard_Step3_Section_TellTabs));
internal static string Wizard_Step3_Section_Visual => Get(nameof(Wizard_Step3_Section_Visual));
internal static string Wizard_Step3_FilterIncludePreviousSessions_Label => Get(nameof(Wizard_Step3_FilterIncludePreviousSessions_Label));
internal static string Wizard_Step3_AutoTellTabsHistoryPreload_Label => Get(nameof(Wizard_Step3_AutoTellTabsHistoryPreload_Label));
internal static string Wizard_Step3_UseCompactDensity_Label => Get(nameof(Wizard_Step3_UseCompactDensity_Label));
internal static string Wizard_Step3_PrettierTimestamps_Label => Get(nameof(Wizard_Step3_PrettierTimestamps_Label));
internal static string Wizard_Step3_Theme_Label => Get(nameof(Wizard_Step3_Theme_Label));
internal static string Wizard_Step4_Title => Get(nameof(Wizard_Step4_Title));
internal static string Wizard_Step4_SummaryHeading => Get(nameof(Wizard_Step4_SummaryHeading));
internal static string Wizard_Step4_Summary_Profile => Get(nameof(Wizard_Step4_Summary_Profile));
internal static string Wizard_Step4_Summary_History => Get(nameof(Wizard_Step4_Summary_History));
internal static string Wizard_Step4_Summary_TellTabs => Get(nameof(Wizard_Step4_Summary_TellTabs));
internal static string Wizard_Step4_Summary_Visual => Get(nameof(Wizard_Step4_Summary_Visual));
internal static string Wizard_Step4_Summary_Unchanged => Get(nameof(Wizard_Step4_Summary_Unchanged));
internal static string Wizard_Step4_Summary_Off => Get(nameof(Wizard_Step4_Summary_Off));
internal static string Wizard_Step4_TestHint => Get(nameof(Wizard_Step4_TestHint));
internal static string Wizard_Step4_SettingsHint => Get(nameof(Wizard_Step4_SettingsHint));
internal static string Export_Heading => Get(nameof(Export_Heading));
internal static string Export_Help => Get(nameof(Export_Help)); internal static string Export_Help => Get(nameof(Export_Help));
internal static string Export_Range_Label => Get(nameof(Export_Range_Label)); internal static string Export_Range_Label => Get(nameof(Export_Range_Label));
internal static string Export_Sender_Label => Get(nameof(Export_Sender_Label)); internal static string Export_Sender_Label => Get(nameof(Export_Sender_Label));
@@ -233,6 +203,8 @@ internal class HellionStrings
internal static string Privacy_AutoTellTabs_Preload_Hint => Get(nameof(Privacy_AutoTellTabs_Preload_Hint)); internal static string Privacy_AutoTellTabs_Preload_Hint => Get(nameof(Privacy_AutoTellTabs_Preload_Hint));
// Hellion Chat — Settings UX Polish v10 wipe migration // Hellion Chat — Settings UX Polish v10 wipe migration
internal static string SettingsRefactor_Migration_Title => Get(nameof(SettingsRefactor_Migration_Title));
internal static string SettingsRefactor_Migration_Content => Get(nameof(SettingsRefactor_Migration_Content));
// Hellion Chat — Settings UX Polish 8-tab structure // Hellion Chat — Settings UX Polish 8-tab structure
internal static string Settings_Tab_General => Get(nameof(Settings_Tab_General)); internal static string Settings_Tab_General => Get(nameof(Settings_Tab_General));
@@ -244,6 +216,24 @@ internal class HellionStrings
internal static string Settings_Tab_Information => Get(nameof(Settings_Tab_Information)); internal static string Settings_Tab_Information => Get(nameof(Settings_Tab_Information));
// v1.1.0 — Settings card-grid overview // v1.1.0 — Settings card-grid overview
internal static string Settings_Card_General_Title => Get(nameof(Settings_Card_General_Title));
internal static string Settings_Card_General_Subtext => Get(nameof(Settings_Card_General_Subtext));
internal static string Settings_Card_Appearance_Title => Get(nameof(Settings_Card_Appearance_Title));
internal static string Settings_Card_Appearance_Subtext => Get(nameof(Settings_Card_Appearance_Subtext));
internal static string Settings_Card_Themes_Title => Get(nameof(Settings_Card_Themes_Title));
internal static string Settings_Card_Themes_Subtext => Get(nameof(Settings_Card_Themes_Subtext));
internal static string Settings_Card_Window_Title => Get(nameof(Settings_Card_Window_Title));
internal static string Settings_Card_Window_Subtext => Get(nameof(Settings_Card_Window_Subtext));
internal static string Settings_Card_Chat_Title => Get(nameof(Settings_Card_Chat_Title));
internal static string Settings_Card_Chat_Subtext => Get(nameof(Settings_Card_Chat_Subtext));
internal static string Settings_Card_Tabs_Title => Get(nameof(Settings_Card_Tabs_Title));
internal static string Settings_Card_Tabs_Subtext => Get(nameof(Settings_Card_Tabs_Subtext));
internal static string Settings_Card_Privacy_Title => Get(nameof(Settings_Card_Privacy_Title));
internal static string Settings_Card_Privacy_Subtext => Get(nameof(Settings_Card_Privacy_Subtext));
internal static string Settings_Card_Database_Title => Get(nameof(Settings_Card_Database_Title));
internal static string Settings_Card_Database_Subtext => Get(nameof(Settings_Card_Database_Subtext));
internal static string Settings_Card_Information_Title => Get(nameof(Settings_Card_Information_Title));
internal static string Settings_Card_Information_Subtext => Get(nameof(Settings_Card_Information_Subtext));
// v1.1.0 — Themes-Settings-Tab // v1.1.0 — Themes-Settings-Tab
internal static string Settings_Tab_Themes => Get(nameof(Settings_Tab_Themes)); internal static string Settings_Tab_Themes => Get(nameof(Settings_Tab_Themes));
@@ -256,7 +246,11 @@ internal class HellionStrings
internal static string Settings_Themes_ApplyChatColors_Apply => Get(nameof(Settings_Themes_ApplyChatColors_Apply)); internal static string Settings_Themes_ApplyChatColors_Apply => Get(nameof(Settings_Themes_ApplyChatColors_Apply));
internal static string Settings_Themes_ApplyChatColors_Keep => Get(nameof(Settings_Themes_ApplyChatColors_Keep)); internal static string Settings_Themes_ApplyChatColors_Keep => Get(nameof(Settings_Themes_ApplyChatColors_Keep));
internal static string Settings_Language_FFXIVCoverage_Warning => Get(nameof(Settings_Language_FFXIVCoverage_Warning)); // Hellion Chat — General-Tab section headings
internal static string Settings_General_Input_Heading => Get(nameof(Settings_General_Input_Heading));
internal static string Settings_General_Audio_Heading => Get(nameof(Settings_General_Audio_Heading));
internal static string Settings_General_Performance_Heading => Get(nameof(Settings_General_Performance_Heading));
internal static string Settings_General_Language_Heading => Get(nameof(Settings_General_Language_Heading));
// Hellion Chat — Appearance-Tab section headings // Hellion Chat — Appearance-Tab section headings
internal static string Settings_Appearance_Theme_Heading => Get(nameof(Settings_Appearance_Theme_Heading)); internal static string Settings_Appearance_Theme_Heading => Get(nameof(Settings_Appearance_Theme_Heading));
@@ -264,27 +258,34 @@ internal class HellionStrings
internal static string Settings_Appearance_Colours_Heading => Get(nameof(Settings_Appearance_Colours_Heading)); internal static string Settings_Appearance_Colours_Heading => Get(nameof(Settings_Appearance_Colours_Heading));
internal static string Settings_Appearance_Timestamps_Heading => Get(nameof(Settings_Appearance_Timestamps_Heading)); internal static string Settings_Appearance_Timestamps_Heading => Get(nameof(Settings_Appearance_Timestamps_Heading));
// Hellion Chat — Window-Tab section headings (pre-cycle legacy, kept for reference) // Hellion Chat — Window-Tab section headings
internal static string Settings_Window_Hide_Heading => Get(nameof(Settings_Window_Hide_Heading));
internal static string Settings_Window_InactivityHide_Heading => Get(nameof(Settings_Window_InactivityHide_Heading));
internal static string Settings_Window_Frame_Heading => Get(nameof(Settings_Window_Frame_Heading)); internal static string Settings_Window_Frame_Heading => Get(nameof(Settings_Window_Frame_Heading));
internal static string Settings_Window_Tooltips_Heading => Get(nameof(Settings_Window_Tooltips_Heading));
// Hellion Chat — Chat-Tab section headings
internal static string Settings_Chat_AutoTellTabs_Heading => Get(nameof(Settings_Chat_AutoTellTabs_Heading));
internal static string Settings_Chat_Behaviour_Heading => Get(nameof(Settings_Chat_Behaviour_Heading));
internal static string Settings_Chat_Preview_Heading => Get(nameof(Settings_Chat_Preview_Heading));
internal static string Settings_Chat_Emotes_Heading => Get(nameof(Settings_Chat_Emotes_Heading));
// Hellion Chat — Chat-Tab SymbolPicker // Hellion Chat — Chat-Tab SymbolPicker
internal static string Settings_Chat_SymbolPicker_Enable_Name => Get(nameof(Settings_Chat_SymbolPicker_Enable_Name)); internal static string Settings_Chat_SymbolPicker_Enable_Name => Get(nameof(Settings_Chat_SymbolPicker_Enable_Name));
internal static string Settings_Chat_SymbolPicker_Enable_Description => Get(nameof(Settings_Chat_SymbolPicker_Enable_Description)); internal static string Settings_Chat_SymbolPicker_Enable_Description => Get(nameof(Settings_Chat_SymbolPicker_Enable_Description));
// Hellion Chat — Database-Tab section headings // Hellion Chat — Database-Tab section headings
internal static string Settings_Database_Busy => Get(nameof(Settings_Database_Busy)); internal static string Settings_Database_Storage_Heading => Get(nameof(Settings_Database_Storage_Heading));
internal static string Settings_Database_ClearHint => Get(nameof(Settings_Database_ClearHint)); internal static string Settings_Database_Viewer_Heading => Get(nameof(Settings_Database_Viewer_Heading));
internal static string Settings_Database_ClearError => Get(nameof(Settings_Database_ClearError)); internal static string Settings_Database_Stats_Heading => Get(nameof(Settings_Database_Stats_Heading));
internal static string Settings_Database_Op_RetentionSweep => Get(nameof(Settings_Database_Op_RetentionSweep));
internal static string Settings_Database_Op_Export => Get(nameof(Settings_Database_Op_Export)); // Hellion Chat — Information-Tab section headings
internal static string Settings_Database_Op_Cleanup => Get(nameof(Settings_Database_Op_Cleanup)); internal static string Settings_Information_VersionInfo_Heading => Get(nameof(Settings_Information_VersionInfo_Heading));
internal static string Settings_Database_Op_Clear => Get(nameof(Settings_Database_Op_Clear)); internal static string Settings_Information_About_Heading => Get(nameof(Settings_Information_About_Heading));
internal static string Settings_Database_Op_Preview => Get(nameof(Settings_Database_Op_Preview)); internal static string Settings_Information_Changelog_Heading => Get(nameof(Settings_Information_Changelog_Heading));
internal static string Settings_Database_Op_Maintenance => Get(nameof(Settings_Database_Op_Maintenance));
// Hellion Chat — Default tab presets (channel-themed) // Hellion Chat — Default tab presets (channel-themed)
internal static string Tabs_Presets_System => Get(nameof(Tabs_Presets_System)); internal static string Tabs_Presets_System => Get(nameof(Tabs_Presets_System));
internal static string Tabs_Presets_Emote => Get(nameof(Tabs_Presets_Emote));
internal static string Tabs_Presets_FreeCompany => Get(nameof(Tabs_Presets_FreeCompany)); internal static string Tabs_Presets_FreeCompany => Get(nameof(Tabs_Presets_FreeCompany));
internal static string Tabs_Presets_Party => Get(nameof(Tabs_Presets_Party)); internal static string Tabs_Presets_Party => Get(nameof(Tabs_Presets_Party));
internal static string Tabs_Presets_Beginner => Get(nameof(Tabs_Presets_Beginner)); internal static string Tabs_Presets_Beginner => Get(nameof(Tabs_Presets_Beginner));
@@ -317,8 +318,14 @@ internal class HellionStrings
internal static string Settings_Window_ResetPosition_Description => Get(nameof(Settings_Window_ResetPosition_Description)); internal static string Settings_Window_ResetPosition_Description => Get(nameof(Settings_Window_ResetPosition_Description));
// Hellion Chat — v0.6.0 one-time hint banner shown inside pop-outs // Hellion Chat — v0.6.0 one-time hint banner shown inside pop-outs
internal static string Popout_v060_HintText => Get(nameof(Popout_v060_HintText));
internal static string Popout_v060_HintAck => Get(nameof(Popout_v060_HintAck));
internal static string Popout_v060_HintOpenSettings => Get(nameof(Popout_v060_HintOpenSettings));
// Hellion Chat — v0.6.1 pop-out header hint banner (discoverability) // Hellion Chat — v0.6.1 pop-out header hint banner (discoverability)
internal static string Hint_v061_PopOutHeader_Body => Get(nameof(Hint_v061_PopOutHeader_Body));
internal static string Hint_v061_PopOutHeader_Ack => Get(nameof(Hint_v061_PopOutHeader_Ack));
internal static string Hint_v061_PopOutHeader_OpenSettings => Get(nameof(Hint_v061_PopOutHeader_OpenSettings));
// Hellion Chat — v1.0.0 Chat 2 parallel-load conflict detection // Hellion Chat — v1.0.0 Chat 2 parallel-load conflict detection
internal static string ChatTwoConflictTitle => Get(nameof(ChatTwoConflictTitle)); internal static string ChatTwoConflictTitle => Get(nameof(ChatTwoConflictTitle));
@@ -334,7 +341,14 @@ internal class HellionStrings
internal static string Appearance_UseCompactDensity_Description => Get(nameof(Appearance_UseCompactDensity_Description)); internal static string Appearance_UseCompactDensity_Description => Get(nameof(Appearance_UseCompactDensity_Description));
// Hellion Chat — v1.2.1 Settings Cleanup: new card titles + subtexts // Hellion Chat — v1.2.1 Settings Cleanup: new card titles + subtexts
internal static string Settings_Card_ThemeAndLayout_Title => Get(nameof(Settings_Card_ThemeAndLayout_Title));
internal static string Settings_Card_ThemeAndLayout_Subtext => Get(nameof(Settings_Card_ThemeAndLayout_Subtext));
internal static string Settings_Card_FontsAndColours_Title => Get(nameof(Settings_Card_FontsAndColours_Title));
internal static string Settings_Card_FontsAndColours_Subtext => Get(nameof(Settings_Card_FontsAndColours_Subtext));
internal static string Settings_Card_DataManagement_Title => Get(nameof(Settings_Card_DataManagement_Title)); internal static string Settings_Card_DataManagement_Title => Get(nameof(Settings_Card_DataManagement_Title));
internal static string Settings_Card_DataManagement_Subtext => Get(nameof(Settings_Card_DataManagement_Subtext));
internal static string Settings_Card_Integrations_Title => Get(nameof(Settings_Card_Integrations_Title));
internal static string Settings_Card_Integrations_Subtext => Get(nameof(Settings_Card_Integrations_Subtext));
// Hellion Chat — v1.2.1 Theme & Layout tab section headings + WindowOpacity slider // Hellion Chat — v1.2.1 Theme & Layout tab section headings + WindowOpacity slider
internal static string Settings_ThemeAndLayout_Theme_Heading => Get(nameof(Settings_ThemeAndLayout_Theme_Heading)); internal static string Settings_ThemeAndLayout_Theme_Heading => Get(nameof(Settings_ThemeAndLayout_Theme_Heading));
@@ -343,108 +357,26 @@ internal class HellionStrings
internal static string Settings_ThemeAndLayout_WindowOpacity_Name => Get(nameof(Settings_ThemeAndLayout_WindowOpacity_Name)); internal static string Settings_ThemeAndLayout_WindowOpacity_Name => Get(nameof(Settings_ThemeAndLayout_WindowOpacity_Name));
internal static string Settings_ThemeAndLayout_WindowOpacity_Description => Get(nameof(Settings_ThemeAndLayout_WindowOpacity_Description)); internal static string Settings_ThemeAndLayout_WindowOpacity_Description => Get(nameof(Settings_ThemeAndLayout_WindowOpacity_Description));
// Hellion Chat — v1.2.1 Fonts & Colours tab section headings
internal static string Settings_FontsAndColours_Fonts_Heading => Get(nameof(Settings_FontsAndColours_Fonts_Heading));
internal static string Settings_FontsAndColours_Colours_Heading => Get(nameof(Settings_FontsAndColours_Colours_Heading));
// Hellion Chat — v1.2.1 Data Management tab section headings // Hellion Chat — v1.2.1 Data Management tab section headings
internal static string Settings_DataManagement_Storage_Heading => Get(nameof(Settings_DataManagement_Storage_Heading));
internal static string Settings_DataManagement_Retention_Heading => Get(nameof(Settings_DataManagement_Retention_Heading));
internal static string Settings_DataManagement_Cleanup_Heading => Get(nameof(Settings_DataManagement_Cleanup_Heading));
internal static string Settings_DataManagement_Export_Heading => Get(nameof(Settings_DataManagement_Export_Heading));
internal static string Settings_DataManagement_DbViewer_Heading => Get(nameof(Settings_DataManagement_DbViewer_Heading));
internal static string Settings_DataManagement_Advanced_Heading => Get(nameof(Settings_DataManagement_Advanced_Heading)); internal static string Settings_DataManagement_Advanced_Heading => Get(nameof(Settings_DataManagement_Advanced_Heading));
// v1.5.6: Data & Privacy tab section titles // Hellion Chat — v1.2.1 Window-tab Behaviour heading (replaces Frame heading)
internal static string Settings_Section_PrivacyFilter => Get(nameof(Settings_Section_PrivacyFilter)); internal static string Settings_Window_Frame_Behaviour_Heading => Get(nameof(Settings_Window_Frame_Behaviour_Heading));
internal static string Settings_Section_Storage => Get(nameof(Settings_Section_Storage));
internal static string Settings_Section_Retention => Get(nameof(Settings_Section_Retention));
internal static string Settings_Section_Cleanup => Get(nameof(Settings_Section_Cleanup));
internal static string Settings_Section_Export => Get(nameof(Settings_Section_Export));
internal static string Settings_Section_Telemetry => Get(nameof(Settings_Section_Telemetry));
internal static string Settings_Theme_ActiveTheme => Get(nameof(Settings_Theme_ActiveTheme));
internal static string Settings_Theme_ForkAndEdit => Get(nameof(Settings_Theme_ForkAndEdit));
internal static string Settings_Theme_ForkTooltip => Get(nameof(Settings_Theme_ForkTooltip));
internal static string Settings_Theme_EditTheme => Get(nameof(Settings_Theme_EditTheme));
internal static string Settings_Theme_Editing => Get(nameof(Settings_Theme_Editing));
internal static string Settings_Theme_Group_Surfaces => Get(nameof(Settings_Theme_Group_Surfaces));
internal static string Settings_Theme_Group_Borders => Get(nameof(Settings_Theme_Group_Borders));
internal static string Settings_Theme_Group_Text => Get(nameof(Settings_Theme_Group_Text));
internal static string Settings_Theme_Group_Identity => Get(nameof(Settings_Theme_Group_Identity));
internal static string Settings_Theme_Group_Status => Get(nameof(Settings_Theme_Group_Status));
internal static string Settings_Theme_Save => Get(nameof(Settings_Theme_Save));
internal static string Settings_Theme_Cancel => Get(nameof(Settings_Theme_Cancel));
internal static string Settings_Theme_ResetToSource => Get(nameof(Settings_Theme_ResetToSource));
internal static string Settings_Theme_ResetUnavailable => Get(nameof(Settings_Theme_ResetUnavailable));
internal static string Settings_Theme_LockedTooltip => Get(nameof(Settings_Theme_LockedTooltip));
internal static string Settings_Theme_Custom => Get(nameof(Settings_Theme_Custom));
internal static string Settings_Tabs_Duplicate => Get(nameof(Settings_Tabs_Duplicate));
internal static string Settings_Theme_ForkActive => Get(nameof(Settings_Theme_ForkActive));
internal static string Settings_Theme_ImportFile => Get(nameof(Settings_Theme_ImportFile));
internal static string Settings_Theme_ImportPathHint => Get(nameof(Settings_Theme_ImportPathHint));
internal static string Settings_Theme_ExportDialogTitle => Get(nameof(Settings_Theme_ExportDialogTitle));
internal static string Settings_Theme_Category_Cool => Get(nameof(Settings_Theme_Category_Cool));
internal static string Settings_Theme_Category_Natural => Get(nameof(Settings_Theme_Category_Natural));
internal static string Settings_Theme_Category_Classic => Get(nameof(Settings_Theme_Category_Classic));
internal static string Settings_Theme_Category_Retro => Get(nameof(Settings_Theme_Category_Retro));
internal static string Settings_Fonts_Bundled => Get(nameof(Settings_Fonts_Bundled));
internal static string Settings_Fonts_GameFont => Get(nameof(Settings_Fonts_GameFont));
internal static string Settings_Fonts_Global => Get(nameof(Settings_Fonts_Global));
internal static string Settings_Fonts_Active => Get(nameof(Settings_Fonts_Active));
internal static string Settings_Preview_TypeAMessage => Get(nameof(Settings_Preview_TypeAMessage));
internal static string StatusBar_Tabs_One => Get(nameof(StatusBar_Tabs_One));
internal static string StatusBar_Tabs_Other => Get(nameof(StatusBar_Tabs_Other));
internal static string StatusBar_Tells_One => Get(nameof(StatusBar_Tells_One));
internal static string StatusBar_Tells_Other => Get(nameof(StatusBar_Tells_Other));
internal static string StatusBar_Messages => Get(nameof(StatusBar_Messages));
internal static string StatusBar_MessagesThousands => Get(nameof(StatusBar_MessagesThousands));
internal static string Settings_Preview_TitleMock => Get(nameof(Settings_Preview_TitleMock));
internal static string Settings_Preview_StatusOpen => Get(nameof(Settings_Preview_StatusOpen));
internal static string ChannelHeader_NotLoggedIn => Get(nameof(ChannelHeader_NotLoggedIn));
internal static string InputBar_More_Tooltip => Get(nameof(InputBar_More_Tooltip));
internal static string Settings_Section_Links => Get(nameof(Settings_Section_Links));
internal static string Settings_Section_Behaviour => Get(nameof(Settings_Section_Behaviour));
internal static string Settings_Section_Keybinds => Get(nameof(Settings_Section_Keybinds));
internal static string Settings_Section_Notifications => Get(nameof(Settings_Section_Notifications));
internal static string Settings_Section_DisplayModes => Get(nameof(Settings_Section_DisplayModes));
internal static string Settings_Section_History => Get(nameof(Settings_Section_History));
internal static string Settings_Section_CommandHelp => Get(nameof(Settings_Section_CommandHelp));
internal static string Settings_Section_PluginDisclosure => Get(nameof(Settings_Section_PluginDisclosure));
internal static string Settings_Section_LayoutMode => Get(nameof(Settings_Section_LayoutMode));
internal static string Settings_Section_Opacity => Get(nameof(Settings_Section_Opacity));
internal static string Settings_Section_ResizeBehaviour => Get(nameof(Settings_Section_ResizeBehaviour));
internal static string Settings_Section_TellAutoOpen => Get(nameof(Settings_Section_TellAutoOpen));
internal static string Settings_Section_Sidebar => Get(nameof(Settings_Section_Sidebar));
internal static string Settings_Section_Brand => Get(nameof(Settings_Section_Brand));
internal static string Settings_Section_Integrations => Get(nameof(Settings_Section_Integrations));
internal static string Settings_Section_Credits => Get(nameof(Settings_Section_Credits));
internal static string Settings_Section_License => Get(nameof(Settings_Section_License));
internal static string Settings_Keybinds_Hint => Get(nameof(Settings_Keybinds_Hint));
internal static string Settings_Keybinds_CycleNext => Get(nameof(Settings_Keybinds_CycleNext));
internal static string Settings_Keybinds_CyclePrevious => Get(nameof(Settings_Keybinds_CyclePrevious));
internal static string Settings_General_Language_Description => Get(nameof(Settings_General_Language_Description));
internal static string Settings_Chat_Clock24_Name => Get(nameof(Settings_Chat_Clock24_Name));
internal static string Settings_Chat_PreviousSessions_Name => Get(nameof(Settings_Chat_PreviousSessions_Name));
internal static string Settings_Chat_PreviousSessions_Description => Get(nameof(Settings_Chat_PreviousSessions_Description));
internal static string Settings_Chat_CommandHelpSide_Name => Get(nameof(Settings_Chat_CommandHelpSide_Name));
internal static string Settings_Chat_CommandHelpSide_Description => Get(nameof(Settings_Chat_CommandHelpSide_Description));
internal static string Settings_Channels_TellAutoOpenMode_Name => Get(nameof(Settings_Channels_TellAutoOpenMode_Name));
internal static string Settings_Channels_TellAutoOpenMode_Description => Get(nameof(Settings_Channels_TellAutoOpenMode_Description));
internal static string Settings_Channels_TellSwitchAlways_Name => Get(nameof(Settings_Channels_TellSwitchAlways_Name));
internal static string Settings_Channels_TellSwitchAlways_Description => Get(nameof(Settings_Channels_TellSwitchAlways_Description));
internal static string Settings_Window_LayoutSidebar => Get(nameof(Settings_Window_LayoutSidebar));
internal static string Settings_Window_LayoutTopTabs => Get(nameof(Settings_Window_LayoutTopTabs));
internal static string Settings_Window_TabPlacement_Name => Get(nameof(Settings_Window_TabPlacement_Name));
internal static string Settings_Window_TabPlacement_Description => Get(nameof(Settings_Window_TabPlacement_Description));
internal static string Settings_Window_TitleBar_Name => Get(nameof(Settings_Window_TitleBar_Name));
internal static string Settings_Window_PopoutTitleBar_Name => Get(nameof(Settings_Window_PopoutTitleBar_Name));
internal static string Settings_Window_AllowMove_Name => Get(nameof(Settings_Window_AllowMove_Name));
internal static string Settings_Window_AllowResize_Name => Get(nameof(Settings_Window_AllowResize_Name));
internal static string Settings_Window_SidebarThreshold_Name => Get(nameof(Settings_Window_SidebarThreshold_Name));
internal static string Settings_Window_SidebarThreshold_Description => Get(nameof(Settings_Window_SidebarThreshold_Description));
internal static string Settings_Window_PreviewPosition_Name => Get(nameof(Settings_Window_PreviewPosition_Name));
internal static string Settings_Window_PreviewOnlyTyping_Name => Get(nameof(Settings_Window_PreviewOnlyTyping_Name));
internal static string Settings_About_GiteaRepo => Get(nameof(Settings_About_GiteaRepo));
internal static string Settings_About_CustomRepo => Get(nameof(Settings_About_CustomRepo));
internal static string Settings_Section_AutoTranslate => Get(nameof(Settings_Section_AutoTranslate));
internal static string Settings_Emotes_Block => Get(nameof(Settings_Emotes_Block));
internal static string Settings_Telemetry_None => Get(nameof(Settings_Telemetry_None));
internal static string Settings_Section_Database => Get(nameof(Settings_Section_Database));
// Hellion Chat — v1.2.1 Migration v15 → v16 toast // Hellion Chat — v1.2.1 Migration v15 → v16 toast
internal static string Migration_v16_OverrideStyle_Toast => Get(nameof(Migration_v16_OverrideStyle_Toast));
// Hellion Chat — v1.3.0 Integrations (Honorific + Coming-Soon roadmap) — now in About tab // Hellion Chat — v1.3.0 Integrations tab (Honorific + Coming-Soon roadmap)
internal static string Settings_Tab_Integrations => Get(nameof(Settings_Tab_Integrations));
internal static string Settings_Integrations_Intro => Get(nameof(Settings_Integrations_Intro)); internal static string Settings_Integrations_Intro => Get(nameof(Settings_Integrations_Intro));
internal static string Settings_Integrations_Honorific_SectionHeader => Get(nameof(Settings_Integrations_Honorific_SectionHeader)); internal static string Settings_Integrations_Honorific_SectionHeader => Get(nameof(Settings_Integrations_Honorific_SectionHeader));
internal static string Settings_Integrations_Honorific_Status_Detected => Get(nameof(Settings_Integrations_Honorific_Status_Detected)); internal static string Settings_Integrations_Honorific_Status_Detected => Get(nameof(Settings_Integrations_Honorific_Status_Detected));
@@ -479,105 +411,4 @@ internal class HellionStrings
internal static string DbViewer_FullTextToggle => Get(nameof(DbViewer_FullTextToggle)); internal static string DbViewer_FullTextToggle => Get(nameof(DbViewer_FullTextToggle));
internal static string DbViewer_FullTextToggle_Hint_Indexing => Get(nameof(DbViewer_FullTextToggle_Hint_Indexing)); internal static string DbViewer_FullTextToggle_Hint_Indexing => Get(nameof(DbViewer_FullTextToggle_Hint_Indexing));
internal static string DbViewer_FullTextToggle_Hint_PhraseMode => Get(nameof(DbViewer_FullTextToggle_Hint_PhraseMode)); internal static string DbViewer_FullTextToggle_Hint_PhraseMode => Get(nameof(DbViewer_FullTextToggle_Hint_PhraseMode));
// Hellion Chat — v1.5.4 header quick-picker + reduce-motion toggle
internal static string Settings_QuickPicker_Tooltip => Get(nameof(Settings_QuickPicker_Tooltip));
internal static string InputBar_InsertSymbol_Tooltip =>
Get(nameof(InputBar_InsertSymbol_Tooltip));
internal static string InputBar_Settings_Tooltip => Get(nameof(InputBar_Settings_Tooltip));
internal static string InputBar_HideChat_Tooltip => Get(nameof(InputBar_HideChat_Tooltip));
internal static string InputBar_PopIn_Tooltip => Get(nameof(InputBar_PopIn_Tooltip));
internal static string Settings_QuickPicker_Themes_Header => Get(nameof(Settings_QuickPicker_Themes_Header));
internal static string Settings_QuickPicker_Tabs_Header => Get(nameof(Settings_QuickPicker_Tabs_Header));
internal static string Settings_ThemeAndLayout_ReduceMotion_Name => Get(nameof(Settings_ThemeAndLayout_ReduceMotion_Name));
internal static string Settings_ThemeAndLayout_ReduceMotion_Description => Get(nameof(Settings_ThemeAndLayout_ReduceMotion_Description));
// Failed-tell notification
internal static string FailedTell_Notification_Generic => Get(nameof(FailedTell_Notification_Generic));
internal static string FailedTell_Notification_Named => Get(nameof(FailedTell_Notification_Named));
internal static string Settings_Chat_NotifyFailedTell_Name => Get(nameof(Settings_Chat_NotifyFailedTell_Name));
internal static string Settings_Chat_NotifyFailedTell_Description => Get(nameof(Settings_Chat_NotifyFailedTell_Description));
// Per-tab notification sound
internal static string Tabs_NotificationSound_Enable_Name => Get(nameof(Tabs_NotificationSound_Enable_Name));
internal static string Tabs_NotificationSound_Description => Get(nameof(Tabs_NotificationSound_Description));
internal static string Tabs_NotificationSound_Option => Get(nameof(Tabs_NotificationSound_Option));
internal static string Tabs_NotificationSound_Preview => Get(nameof(Tabs_NotificationSound_Preview));
internal static string Tabs_NotificationSound_CustomOption => Get(nameof(Tabs_NotificationSound_CustomOption));
// Scroll-to-bottom and item/flag linking
internal static string ChatLog_ScrollToBottom_Tooltip => Get(nameof(ChatLog_ScrollToBottom_Tooltip));
internal static string ChatLog_Insert_MapFlag => Get(nameof(ChatLog_Insert_MapFlag));
internal static string ChatLog_Insert_ItemLink => Get(nameof(ChatLog_Insert_ItemLink));
// v1.5.6: plugin-disclosure warning
internal static string Settings_Chat_NotifyPluginDisclosure_Name => Get(nameof(Settings_Chat_NotifyPluginDisclosure_Name));
internal static string Settings_Chat_NotifyPluginDisclosure_Description => Get(nameof(Settings_Chat_NotifyPluginDisclosure_Description));
internal static string ChatInput_PluginDisclosure_Warning => Get(nameof(ChatInput_PluginDisclosure_Warning));
// v1.5.6: world suffix + name format display options
internal static string Settings_Chat_WorldSuffix_Name => Get(nameof(Settings_Chat_WorldSuffix_Name));
internal static string Settings_Chat_WorldSuffix_Description => Get(nameof(Settings_Chat_WorldSuffix_Description));
internal static string Settings_Chat_NameForm_Name => Get(nameof(Settings_Chat_NameForm_Name));
internal static string Settings_Chat_NameForm_Description => Get(nameof(Settings_Chat_NameForm_Description));
internal static string NameDisplay_WorldSuffix_Never => Get(nameof(NameDisplay_WorldSuffix_Never));
internal static string NameDisplay_WorldSuffix_OtherWorldOnly => Get(nameof(NameDisplay_WorldSuffix_OtherWorldOnly));
internal static string NameDisplay_WorldSuffix_Always => Get(nameof(NameDisplay_WorldSuffix_Always));
internal static string NameDisplay_NameForm_Full => Get(nameof(NameDisplay_NameForm_Full));
internal static string NameDisplay_NameForm_FirstNameOnly => Get(nameof(NameDisplay_NameForm_FirstNameOnly));
internal static string NameDisplay_NameForm_Initials => Get(nameof(NameDisplay_NameForm_Initials));
// v1.5.6: inactive window opacity
internal static string Settings_ThemeAndLayout_WindowOpacityInactive_Name => Get(nameof(Settings_ThemeAndLayout_WindowOpacityInactive_Name));
internal static string Settings_ThemeAndLayout_WindowOpacityInactive_Description => Get(nameof(Settings_ThemeAndLayout_WindowOpacityInactive_Description));
// v1.5.6: custom sound volume
internal static string Settings_General_CustomSoundVolume_Name => Get(nameof(Settings_General_CustomSoundVolume_Name));
internal static string Settings_General_CustomSoundVolume_Description => Get(nameof(Settings_General_CustomSoundVolume_Description));
// v1.5.6: General tab collapsible section titles
internal static string Settings_Section_Input => Get(nameof(Settings_Section_Input));
internal static string Settings_Section_Sound => Get(nameof(Settings_Section_Sound));
internal static string Settings_Section_Language => Get(nameof(Settings_Section_Language));
internal static string Settings_Section_Performance => Get(nameof(Settings_Section_Performance));
internal static string Settings_Section_Sound_TabsHint => Get(nameof(Settings_Section_Sound_TabsHint));
// v1.5.6: Chat tab collapsible section titles
internal static string Settings_Section_Messages => Get(nameof(Settings_Section_Messages));
internal static string Settings_Section_InputPreview => Get(nameof(Settings_Section_InputPreview));
internal static string Settings_Section_AutoTellTabs => Get(nameof(Settings_Section_AutoTellTabs));
internal static string Settings_Section_Emotes => Get(nameof(Settings_Section_Emotes));
internal static string Settings_Section_LinksTooltips => Get(nameof(Settings_Section_LinksTooltips));
internal static string Settings_Section_NoviceNetwork => Get(nameof(Settings_Section_NoviceNetwork));
// v1.5.6: Appearance tab collapsible section titles
internal static string Settings_Section_Theme => Get(nameof(Settings_Section_Theme));
internal static string Settings_Section_Fonts => Get(nameof(Settings_Section_Fonts));
internal static string Settings_Section_Colours => Get(nameof(Settings_Section_Colours));
internal static string Settings_Section_WindowStyle => Get(nameof(Settings_Section_WindowStyle));
internal static string Settings_Section_Timestamps => Get(nameof(Settings_Section_Timestamps));
internal static string Settings_Section_Animations => Get(nameof(Settings_Section_Animations));
// v1.5.6: Window tab collapsible section titles
internal static string Settings_Section_Hide => Get(nameof(Settings_Section_Hide));
internal static string Settings_Section_InactivityHide => Get(nameof(Settings_Section_InactivityHide));
internal static string Settings_Section_Frame => Get(nameof(Settings_Section_Frame));
// v1.5.6: Tabs tab per-tab-item sub-section titles
internal static string Settings_Section_Tab_Channels => Get(nameof(Settings_Section_Tab_Channels));
internal static string Settings_Section_Tab_Display => Get(nameof(Settings_Section_Tab_Display));
internal static string Settings_Section_Tab_Notification => Get(nameof(Settings_Section_Tab_Notification));
internal static string Settings_Section_Tab_Input => Get(nameof(Settings_Section_Tab_Input));
internal static string Settings_Section_Tab_PopOut => Get(nameof(Settings_Section_Tab_PopOut));
internal static string Settings_Section_Tab_Volume_AllTabsHint => Get(nameof(Settings_Section_Tab_Volume_AllTabsHint));
// v1.5.6: About tab collapsible section titles
internal static string Settings_Section_Extensions => Get(nameof(Settings_Section_Extensions));
internal static string Settings_Section_PluginInfo => Get(nameof(Settings_Section_PluginInfo));
internal static string Settings_Section_Project => Get(nameof(Settings_Section_Project));
internal static string Settings_Section_Translators => Get(nameof(Settings_Section_Translators));
internal static string Settings_Section_Changelog => Get(nameof(Settings_Section_Changelog));
} }
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
-18
View File
@@ -1860,24 +1860,6 @@ namespace HellionChat.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Latin Extended.
/// </summary>
internal static string ExtraGlyphRanges_LatinExtended_Name {
get {
return ResourceManager.GetString("ExtraGlyphRanges_LatinExtended_Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Greek.
/// </summary>
internal static string ExtraGlyphRanges_Greek_Name {
get {
return ResourceManager.GetString("ExtraGlyphRanges_Greek_Name", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Pick a folder location for export.. /// Looks up a localized string similar to Pick a folder location for export..
/// </summary> /// </summary>
+2 -26
View File
@@ -527,10 +527,10 @@
<value>Finestra emergent</value> <value>Finestra emergent</value>
</data> </data>
<data name="Options_HideSameTimestamps_Name"> <data name="Options_HideSameTimestamps_Name">
<value>Amaga les marques de temps redundants</value> <value>Hide timestamps when redundant</value>
</data> </data>
<data name="Options_HideSameTimestamps_Description"> <data name="Options_HideSameTimestamps_Description">
<value>Amaga la marca de temps quan el missatge anterior ja en té la mateixa.</value> <value>Hide timestamps when previous messages have the same timestamp.</value>
</data> </data>
<data name="Options_ShowPopOutTitleBar_Name"> <data name="Options_ShowPopOutTitleBar_Name">
<value>Show title bar for popped-out tabs</value> <value>Show title bar for popped-out tabs</value>
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Tenyeix el selector de canal amb el color del canal</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>El botó selector de canal al costat del camp d'entrada es tenyeix amb el color del canal actiu. Coincideix amb la tonalitat del text d'entrada.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Amaga mentre el menú New Game+ estigui obert</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Amaga el xat mentre el menú New Game+ estigui obert. En tancar el menú, el xat torna a aparèixer.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Llatí estès</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Grec</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-20
View File
@@ -1,18 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
Language.de.resx — Hellion Forge maintainer-extended translation
Locale: de (German)
Maintainer: Hellion Forge / Hellion Online Media
Status: Native-speaker maintained
Review: Continuous (native maintainer)
Hellion Forge maintains this file with native-speaker quality,
including the keys post-dating the last upstream Chat 2 Crowdin sync.
Corrections welcome via the Hellion Forge Discord:
https://discord.gg/X9V7Kcv5gR
-->
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
@@ -1495,10 +1481,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latein erweitert</value>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Griechisch</value>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
+1 -25
View File
@@ -731,7 +731,7 @@
<value>Decir</value> <value>Decir</value>
</data> </data>
<data name="ChatType_Shout"> <data name="ChatType_Shout">
<value>Vociferar</value> <value>Shout</value>
</data> </data>
<data name="ChatType_TellOutgoing"> <data name="ChatType_TellOutgoing">
<value>Tell (saliente)</value> <value>Tell (saliente)</value>
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Teñir el selector de canal con el color del canal</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>El botón selector de canal junto al campo de entrada se tiñe con el color del canal activo. Coincide con el tinte del texto de entrada.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Ocultar mientras el menú New Game+ esté abierto</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Oculta el chat mientras el menú New Game+ esté abierto. Al cerrar el menú, el chat se muestra de nuevo.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latín extendido</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Griego</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Teinter le sélecteur de canal avec la couleur du canal</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>Le bouton sélecteur de canal à côté du champ de saisie est teinté avec la couleur du canal actif. Correspond à la teinte du texte de saisie.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Masquer pendant que le menu New Game+ est ouvert</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Masque le chat pendant que le menu New Game+ est ouvert. Fermer le menu réaffiche le chat.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latin étendu</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Grec</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
+2 -26
View File
@@ -527,10 +527,10 @@
<value>Pop out</value> <value>Pop out</value>
</data> </data>
<data name="Options_HideSameTimestamps_Name"> <data name="Options_HideSameTimestamps_Name">
<value>Nascondi gli orari ridondanti</value> <value>Hide timestamps when redundant</value>
</data> </data>
<data name="Options_HideSameTimestamps_Description"> <data name="Options_HideSameTimestamps_Description">
<value>Nasconde l'orario quando il messaggio precedente ha già lo stesso.</value> <value>Hide timestamps when previous messages have the same timestamp.</value>
</data> </data>
<data name="Options_ShowPopOutTitleBar_Name"> <data name="Options_ShowPopOutTitleBar_Name">
<value>Show title bar for popped-out tabs</value> <value>Show title bar for popped-out tabs</value>
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Colora il selettore di canale con il colore del canale</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>Il pulsante selettore di canale accanto al campo di input viene colorato con il colore del canale attivo. Corrisponde alla colorazione del testo di input.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Nascondi mentre il menu New Game+ è aperto</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Nasconde la chat mentre il menu New Game+ è aperto. Chiudendo il menu, la chat riappare.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latino esteso</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Greco</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>チャンネルセレクターをチャンネル色で着色する</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>入力フィールドの隣のチャンネルセレクターボタンが、現在アクティブなチャンネルの色で着色されます。入力テキスト自体の色合いと一致します。</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>ニューゲーム+メニューが開いている間は非表示</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>ニューゲーム+メニューが開いている間、チャットを非表示にします。メニューを閉じるとチャットが再表示されます。</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>拡張ラテン</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>ギリシャ語</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>채널 선택기를 채널 색상으로 채색</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>입력 필드 옆의 채널 선택기 버튼이 현재 활성 채널 색상으로 채색됩니다. 입력 텍스트 자체의 색조와 일치합니다.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>뉴게임+ 메뉴가 열려 있는 동안 숨김</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>뉴게임+ 메뉴가 열려 있는 동안 채팅을 숨깁니다. 메뉴를 닫으면 채팅이 다시 표시됩니다.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>확장 라틴</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>그리스어</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Kanaalkiezer kleuren met kanaalkleur</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>De kanaalkiezerknop naast het invoerveld krijgt de kleur van het actieve kanaal. Komt overeen met de tint van de invoertekst zelf.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Verbergen terwijl het New Game+ menu open is</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Verberg de chat terwijl het New Game+ menu open is. Het sluiten van het menu toont de chat weer.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latijn uitgebreid</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Grieks</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Colorir o seletor de canal com a cor do canal</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>O botão seletor de canal ao lado do campo de entrada é colorido com a cor do canal ativo. Combina com a coloração do próprio texto de entrada.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Ocultar enquanto o menu New Game+ estiver aberto</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Oculta o chat enquanto o menu New Game+ estiver aberto. Fechar o menu mostra o chat novamente.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latim estendido</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Grego</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
-6
View File
@@ -1478,10 +1478,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latin Extended</value>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Greek</value>
</data>
</root> </root>
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Colorează selectorul de canal cu culoarea canalului</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>Butonul selector de canal de lângă câmpul de intrare este colorat cu culoarea canalului activ. Se potrivește cu nuanța textului de intrare.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Ascunde cât timp meniul New Game+ este deschis</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Ascunde chatul cât timp meniul New Game+ este deschis. Închiderea meniului afișează chatul din nou.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Latină extinsă</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Greacă</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Окрашивать кнопку выбора канала в цвет канала</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>Кнопка выбора канала рядом с полем ввода окрашивается в цвет активного канала. Совпадает с окраской самого текста ввода.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Скрывать, пока открыто меню New Game+</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Скрывать чат, пока открыто меню New Game+. При закрытии меню чат снова отображается.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Расширенная латиница</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Греческий</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
-24
View File
@@ -1466,28 +1466,4 @@ Your old database can still be recovered, please contact the plugin author for h
<data name="ChatExport_Initial" xml:space="preserve"> <data name="ChatExport_Initial" xml:space="preserve">
<value>Loading logs ...</value> <value>Loading logs ...</value>
</data> </data>
<data name="Options_ColorSelectedInputChannelButton_Name" xml:space="preserve">
<value>Färga kanalväljaren med kanalens färg</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_ColorSelectedInputChannelButton_Description" xml:space="preserve">
<value>Kanalväljarknappen bredvid inmatningsfältet färgas med den aktiva kanalens färg. Matchar färgningen av själva inmatningstexten.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Dölj medan New Game+ menyn är öppen</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Dölj chatten medan New Game+ menyn är öppen. När menyn stängs visas chatten igen.</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_LatinExtended_Name" xml:space="preserve">
<value>Utökat latin</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
<data name="ExtraGlyphRanges_Greek_Name" xml:space="preserve">
<value>Grekiska</value>
<comment>AI-assisted machine translation. Pending native-speaker review.</comment>
</data>
</root> </root>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More