Compare commits
68 Commits
v1.2.3
...
e594258cf3
| Author | SHA1 | Date | |
|---|---|---|---|
| e594258cf3 | |||
| bb863c5b32 | |||
| 0797d1a517 | |||
| 8dc8b87580 | |||
| baeec369e6 | |||
| a1f2b22b19 | |||
| 5931f2f301 | |||
| 0b25df0ea7 | |||
| b75c7b177a | |||
| ccc5a4e17a | |||
| daa800c8b1 | |||
| a531973c0d | |||
| 4c8b0da3da | |||
| 9a8a014795 | |||
| 9640d336a6 | |||
| 12ce015d83 | |||
| f455bf4736 | |||
| 9bc66c7cf3 | |||
| e9022de150 | |||
| cb327b8073 | |||
| 1c354d18bb | |||
| 0ed88691c2 | |||
| c64fcfd4d1 | |||
| 6689cdb968 | |||
| 345aa3ea2a | |||
| 1ffc41f97d | |||
| 36b92f0520 | |||
| cb612044ea | |||
| 71081d8344 | |||
| 54bfeb0f6f | |||
| 5f83c70292 | |||
| 3d7883ee01 | |||
| e4ee7aaafa | |||
| aff2528a6f | |||
| 0d2ee63420 | |||
| de9d1ac60b | |||
| 19f7099af0 | |||
| f8a734d93f | |||
| 3f7e86b32e | |||
| e5bf375b42 | |||
| 93329087a9 | |||
| 72d568e5b3 | |||
| c9dfd024b2 | |||
| 8c624a0032 | |||
| 079e280226 | |||
| 3bdf45c29c | |||
| d257a41660 | |||
| 36f2bbd8d1 | |||
| da291b7fca | |||
| c8485233d5 | |||
| 2d768e4edb | |||
| e58376bf50 | |||
| dceb028184 | |||
| 33a4d94c44 | |||
| b2f158f893 | |||
| da6da32651 | |||
| 477591e2fa | |||
| ddb293399e | |||
| 7494b001a2 | |||
| 9f0a40bedc | |||
| 8da05c3080 | |||
| 5b5f52f86e | |||
| af3caa9b96 | |||
| 206b25b8d6 | |||
| 00deef01a4 | |||
| 74e2c655f0 | |||
| fa91c4e847 | |||
| 1125caabca |
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
# .githooks/pre-push — invokes preflight.sh (A/B/C/D=build).
|
||||
exec scripts/preflight.sh
|
||||
@@ -8,7 +8,7 @@ body:
|
||||
value: |
|
||||
Thanks for reporting. Please fill in the fields below so I can
|
||||
reproduce the issue. If this is a security issue, stop here and
|
||||
use the [private vulnerability advisory](https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new)
|
||||
report it privately to [kontakt@hellion-media.de](mailto:kontakt@hellion-media.de?subject=%5BHellionChat%20Security%5D)
|
||||
instead.
|
||||
|
||||
- type: input
|
||||
|
||||
@@ -2,8 +2,8 @@ blank_issues_enabled: false
|
||||
|
||||
contact_links:
|
||||
- name: Security vulnerability
|
||||
url: https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new
|
||||
about: Do not open a public issue for security problems. Use the private advisory instead.
|
||||
url: mailto:kontakt@hellion-media.de?subject=%5BHellionChat%20Security%5D
|
||||
about: Do not open a public issue for security problems. Report by e-mail instead.
|
||||
|
||||
- name: Upstream Chat 2 issue
|
||||
url: https://github.com/Infiziert90/ChatTwo/issues
|
||||
|
||||
@@ -3,9 +3,9 @@ Thanks for contributing to HellionChat. Please fill in the sections
|
||||
below so the review goes quickly. Delete sections that genuinely do
|
||||
not apply, but do not delete the whole template.
|
||||
|
||||
If this is a security fix, stop here and use a private security
|
||||
advisory instead:
|
||||
https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new
|
||||
If this is a security fix, stop here and report it privately by
|
||||
e-mail instead of opening a public PR:
|
||||
mailto:kontakt@hellion-media.de?subject=%5BHellionChat%20Security%5D
|
||||
-->
|
||||
|
||||
## Summary
|
||||
@@ -23,7 +23,6 @@ https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new
|
||||
- [ ] Documentation only
|
||||
- [ ] Translation update
|
||||
- [ ] Build, CI or tooling change
|
||||
- [ ] Upstream cherry-pick from Chat 2
|
||||
|
||||
## Linked issue
|
||||
|
||||
@@ -53,7 +52,6 @@ new commands, new translations, removed behaviour. If none, write
|
||||
bump and is it covered by the existing migration tests?
|
||||
- Does this change the schema in MessageStore?
|
||||
- Does this change the repo.json or HellionChat.yaml manifest fields?
|
||||
- Does this affect the upstream cherry-pick path? See docs/UPSTREAM_SYNC.md.
|
||||
-->
|
||||
|
||||
## Checklist
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
subtitle: "Plugin Integrations: Honorific"
|
||||
versionsnatur: "Plugin-Integration-Cycle 1"
|
||||
---
|
||||
- Erste Plugin-Integration eingebaut, Cycle 1 von 6 auf der Roadmap
|
||||
- **Honorific-Custom-Titles im Chat-Header** — der Titel den du in Honorific gesetzt hast erscheint jetzt links über dem Message-Log mit der von dir gewählten Farbe, Auto-Hide wenn Honorific nicht installiert ist oder kein Custom-Titel aktiv ist
|
||||
- **Krone-Icon plus Tooltip** vor dem Titel-Text, damit klar ist woher der Slot kommt ohne dass der User raten muss
|
||||
- **Neuer Integrations-Settings-Tab** mit Status-Indikator (erkannt, nicht installiert, inkompatibel) und Toggle. Plus Vorschau-Block der die fünf weiteren geplanten Cycles ankündigt: Kontextmenü-Aktionen, Smart Notifications (NotificationMaster), RP-Status-Block (Moodles und LightlessClient), ExtraChat-Channels, Quick-DM-Button (XIVInstantMessenger)
|
||||
- **Maintainer-Attribution** im Tab als Höflichkeits-Geste, zwei Buttons zum Honorific-Repo und zum Caraxi-Profil. Plus Hellion-Forge-Discord-Button für Community-Vorschläge zu künftigen Integrationen
|
||||
- Keine Migration, keine Schema-Änderung. Wer Honorific eh schon nutzt sieht den Custom-Titel automatisch sobald HellionChat aktualisiert
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
subtitle: Critical Lifecycle Fixes
|
||||
versionsnatur: Stability-Hotfix
|
||||
---
|
||||
|
||||
**Hellion Chat 1.4.0 — Critical Lifecycle Fixes**
|
||||
|
||||
Erster Sub-Patch der v1.4.x Polish-Sweep-Serie. Sieben
|
||||
bekannte Lifecycle- und Race-Bugs aus den Audit-Pässen
|
||||
abgearbeitet, bevor Performance- und Architektur-Refactors
|
||||
draufkommen.
|
||||
|
||||
- **SQLite-Dispose** lehnt sich nicht mehr an GC-Druck zur
|
||||
Datei-Freigabe an, Pooling=false auf der Connection macht
|
||||
den manuellen GC.Collect überflüssig
|
||||
- **Worker-Threads** (PendingMessage, RetentionSweep) sind
|
||||
jetzt explizit IsBackground=true, das Plugin-Domain kann
|
||||
sauber unloaden bei XIVLauncher-Reload ohne darauf zu warten
|
||||
- **EmoteCache-Loader** von async-void auf async-Task mit
|
||||
shared Task-Tracker, drain-on-Dispose. Kein Schreib-Risiko
|
||||
mehr auf disposed EmoteImages-Einträge nach Plugin-Reload
|
||||
- **DisposeAsync-Timeout** (10s) warnt jetzt laut statt silent
|
||||
zu failen
|
||||
- **Plugin-Dispose** flushed pending DeferredSave bevor Services
|
||||
abgebaut werden, Settings-Änderungen aus den letzten Frames
|
||||
vor Disable überleben jetzt zuverlässig
|
||||
- **v13→v14 Config-Migration** liest pre-v13-Backup und überträgt
|
||||
HellionThemeWindowOpacity in das neue WindowOpacity-Feld statt
|
||||
auf 0.85 zurückzufallen
|
||||
|
||||
Keine Schema-Bumps, keine User-sichtbaren Funktions-Änderungen
|
||||
außer dass Reload und Shutdown spürbar sauberer laufen.
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
subtitle: Theme Engine Performance
|
||||
versionsnatur: Performance-Patch
|
||||
---
|
||||
|
||||
**Hellion Chat 1.4.1 — Theme Engine Performance**
|
||||
|
||||
Zweiter Sub-Patch der v1.4.x Polish-Sweep-Serie. Heap-Pressure
|
||||
aus dem Theme-Engine-Render-Pfad eliminiert, Custom-Theme-
|
||||
Hot-Reload überlebt transiente File-Locks beim Editor-Save.
|
||||
Plus zehnter Built-In und überarbeitete Author-Credits.
|
||||
|
||||
- **ABGR-Cache auf den Theme-Records.** Beim Theme-Register
|
||||
(Built-In oder Custom) werden alle Color-Slots einmalig in
|
||||
ABGR-Pack-Form vor-konvertiert. HellionStyle.PushGlobal
|
||||
liest aus dem Cache statt pro Slot pro Frame durch
|
||||
ColourUtil.RgbaToAbgr zu jagen. Real gemessene
|
||||
Frame-Time-Recovery: **~13 %** in typischer Render-Szene
|
||||
(Plan-Erwartung war 2-6 % konservativ, real ~10-15 %)
|
||||
- **Custom-Theme File-Lock-Härtung.** Wenn der User ein
|
||||
Theme-JSON gerade speichert während HellionChat reloaden
|
||||
will, fängt der Loader jetzt explizit Sharing-Violation
|
||||
und Lock-Violation ab. Last-Known-Good-Snapshot bleibt im
|
||||
Picker, beim nächsten Tick wird automatisch retry'd —
|
||||
vorher fiel das Theme aus der Liste bis zum Plugin-Reload
|
||||
- **Defensive Cache-Refresh beim Theme-Switch.** Falls ein
|
||||
Theme auf einem alten Pfad ohne Cache-Fill in den Speicher
|
||||
gekommen ist, holt Switch() das beim Anwenden nach
|
||||
- **Synthwave Sunset als zehnter Built-In.** Hot Magenta +
|
||||
Cyan auf Mitternachts-Violett, 80s-Neon-Grid-Vibes für
|
||||
Late-Night-Raids
|
||||
- **Author-Credits konsolidiert.** Brand-Themes laufen jetzt
|
||||
unter „Hellion Forge". Mint Grove und Forge Merchantman
|
||||
werden Carla Beleandis als Community-Geste zugeschrieben.
|
||||
|
||||
Keine Schema-Bumps, keine User-sichtbaren Funktions-
|
||||
Änderungen außer dass die Frames in Theme-getrieben
|
||||
rendernden Szenen merklich glatter laufen und ein neues
|
||||
Theme im Picker steht.
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
subtitle: ChatLog Frame-Hot-Path
|
||||
versionsnatur: Performance-Patch
|
||||
---
|
||||
|
||||
**Hellion Chat 1.4.2 — ChatLog Frame-Hot-Path**
|
||||
|
||||
Dritter Sub-Patch der v1.4.x Polish-Sweep-Serie. Drei
|
||||
Per-Frame-Allokations-Quellen aus dem ChatLogWindow-Render-
|
||||
Pfad und der Settings-StatusBar eliminiert.
|
||||
|
||||
- **Card-Mode-Border-Loop entlastet.** DrawMessages hebt
|
||||
Theme, DrawList, Window-Left, Window-Right und die ABGR-
|
||||
Border-Color einmalig vor den Per-Message-Loop. Bei 100
|
||||
sichtbaren Messages sind das gut 500 redundante P/Invokes
|
||||
und Property-Reads, die der Hoist eliminiert. Pop-Out-
|
||||
Heavy-Setups (mehrere parallele Chat-Windows) profitieren
|
||||
proportional, weil der Hoist pro DrawMessages-Call greift,
|
||||
also pro Window
|
||||
- **Auto-Tell Tab-Tint und Icon gecached.** Die Hash-Color-
|
||||
Berechnung für Auto-Tell-Tabs lief pro Tab pro Frame, mit
|
||||
zwei String-Allokationen pro Tab (eine für Tint-Hash, eine
|
||||
für Icon-Hash). Der neue TabTintCache liest pre-computed
|
||||
Werte aus dem Tab und rechnet nur neu wenn das Tell-Target
|
||||
drifted. Beide Caches haben separate Validation-Keys, also
|
||||
keine Cross-Invalidation zwischen Tint- und Icon-Pfad.
|
||||
AutoTellTabTint selbst bleibt pure Hash-Helper, weiterhin
|
||||
ohne Tab-Awareness
|
||||
- **StatusBar-Aggregation hinter Cache-Gate.** Die Status-
|
||||
Leiste am unteren Window-Rand summiert die Tab-Message-
|
||||
Counts und zählt die Auto-Tell-Tabs pro Frame. Der Cache-
|
||||
Gate (1 Sekunde) lag bisher hinter den LINQ-Pfaden, also
|
||||
liefen Sum und Count trotzdem pro Frame. Jetzt vor dem
|
||||
Gate, plus die LINQ-Pfade durch eine Single-Pass-Foreach
|
||||
ersetzt. Die Aggregation läuft auf etwa 1 % der Frames
|
||||
|
||||
Realistische Frame-Time-Recovery: 2-5 % in typischen Szenen,
|
||||
Pop-Out-Heavy-Setups potenziell mehr durch die Card-Border-
|
||||
Multiplikation pro Window.
|
||||
|
||||
Keine Schema-Bumps, keine User-sichtbaren Funktions-
|
||||
Änderungen außer dass die Frames im Chat-Log und in der
|
||||
Settings-Statusleiste merklich glatter laufen.
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
subtitle: Async-Lifecycle + Gitea-Cutover
|
||||
versionsnatur: Architecture-Refactor
|
||||
---
|
||||
|
||||
**Hellion Chat 1.4.3 — Plugin-Load Async-Init + Repo-Cutover**
|
||||
|
||||
Vierter Sub-Patch der v1.4.x Polish-Sweep-Serie. Plugin-
|
||||
Lifecycle auf Dalamud's `IAsyncDalamudPlugin`-API migriert
|
||||
und das Custom-Repo zieht von GitHub auf Gitea um.
|
||||
|
||||
- **Async-Plugin-Architektur.** Konstruktor übernimmt nur
|
||||
noch die Bootstrap-Essentials (Config-Load, Language-Init,
|
||||
Conflict-Detection). Migrationen, Service-Allokationen,
|
||||
Window-Konstruktion und Hook-Subscription wandern in
|
||||
LoadAsync, sodass Dalamud die UI während der schweren
|
||||
Arbeit responsive halten kann. Per-Line-CaptureFailure in
|
||||
DisposeAsync mirrort LightlessSync's Pattern, plus
|
||||
Idempotency-Guard gegen Reload-Races
|
||||
- **Custom-Repo-URL umgezogen auf Gitea.** Bestehende Tester
|
||||
müssen einmalig in XIVLauncher die Custom-Repo-URL auf
|
||||
`https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/repo.json`
|
||||
umstellen, dann XIVLauncher neu starten. Das alte
|
||||
GitHub-Repo bleibt als eingefrorener v1.4.2-Snapshot
|
||||
stehen und wird nicht mehr aktualisiert
|
||||
- **Schema-Gate statt Migrations-Kette.** Die v9 → v16
|
||||
Migrationen sind raus, ersetzt durch einen harten
|
||||
Schema-Check in Phase 1. Configs auf Schema v16+ laden
|
||||
direkt; ältere Configs (vor v1.2.1) bekommen jetzt eine
|
||||
klare „install v1.4.2 first"-Fehlermeldung statt eines
|
||||
impliziten Migrations-Pfads
|
||||
- **AutoTranslate-Cache läuft im Hintergrund.** Der Cache
|
||||
füllt sich jetzt fire-and-forget statt blockierend im
|
||||
Plugin-Load. Trade-off: die erste Auto-Translate-Nutzung
|
||||
einer Session kann einen kurzen Hitch haben, dafür kein
|
||||
300-ms-Block beim Plugin-Start
|
||||
- **Plugin-Load-Zeit ehrlich.** Median 3,7 s über fünf
|
||||
Reloads, vergleichbar mit v1.4.2. Der Async-Refactor ist
|
||||
Foundation für künftige Lazy-Init-Optimierungen (v1.4.4)
|
||||
und Code-Architektur-Hygiene, kein direkter
|
||||
User-spürbarer Speed-Win in dieser Release
|
||||
|
||||
Keine User-sichtbaren Funktions-Änderungen außer dem
|
||||
Repo-URL-Update. Settings, Themes und Tabs bleiben
|
||||
unangetastet.
|
||||
@@ -8,19 +8,19 @@ Dalamud main plugin repo. To install:
|
||||
|
||||
1. In XIVLauncher: **Settings → Experimental → Custom Plugin Repositories**
|
||||
2. Add the URL:
|
||||
`https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/repo.json`
|
||||
`https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/repo.json`
|
||||
3. Enable, save, then `/xlplugins` → search **Hellion Chat** → install
|
||||
|
||||
## Project documents
|
||||
|
||||
- [README](https://github.com/JonKazama-Hellion/HellionChat/blob/main/README.md) — features, architecture, build
|
||||
- [Privacy notice](https://github.com/JonKazama-Hellion/HellionChat/blob/main/PRIVACY.md) — what the plugin stores and sends
|
||||
- [Third-party notices](https://github.com/JonKazama-Hellion/HellionChat/blob/main/docs/THIRD_PARTY_NOTICES.md) — dependencies and licences
|
||||
- [Security policy](https://github.com/JonKazama-Hellion/HellionChat/blob/main/SECURITY.md) — vulnerability reporting
|
||||
- [Support](https://github.com/JonKazama-Hellion/HellionChat/blob/main/SUPPORT.md) — bug reports, questions, contact paths
|
||||
- [README](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/README.md) — features, architecture, build
|
||||
- [Privacy notice](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/PRIVACY.md) — what the plugin stores and sends
|
||||
- [Third-party notices](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/docs/THIRD_PARTY_NOTICES.md) — dependencies and licences
|
||||
- [Security policy](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/SECURITY.md) — vulnerability reporting
|
||||
- [Support](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/SUPPORT.md) — bug reports, questions, contact paths
|
||||
|
||||
## Licence
|
||||
|
||||
[EUPL-1.2](https://github.com/JonKazama-Hellion/HellionChat/blob/main/LICENSE).
|
||||
[EUPL-1.2](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/src/branch/main/LICENSE).
|
||||
Based on [Chat 2](https://github.com/Infiziert90/ChatTwo) by Infi and Anna,
|
||||
also EUPL-1.2.
|
||||
|
||||
@@ -3,6 +3,12 @@ name: Build
|
||||
# Verifies that every push to main and every PR still builds against the
|
||||
# current Dalamud staging branch. Does not produce release artefacts; the
|
||||
# release workflow handles that on tag.
|
||||
#
|
||||
# Linux runner: gitea.com Cloud Actions provides ubuntu-latest. The plugin
|
||||
# csproj targets net10.0-windows, but `dotnet build` cross-compiles on
|
||||
# Linux as long as the Dalamud staging assemblies are present at the
|
||||
# expected lookup path ($(HOME)/.xlcore/dalamud/Hooks/dev/, which the
|
||||
# Dalamud SDK 15 uses on Linux).
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -21,7 +27,7 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
name: Build (Release)
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
@@ -34,23 +40,14 @@ jobs:
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
- name: Download Dalamud staging
|
||||
shell: pwsh
|
||||
run: |
|
||||
$hooks = Join-Path $env:APPDATA "XIVLauncher\addon\Hooks\dev"
|
||||
New-Item -ItemType Directory -Force -Path $hooks | Out-Null
|
||||
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile dalamud.zip
|
||||
Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks
|
||||
hooks="$HOME/.xlcore/dalamud/Hooks/dev"
|
||||
mkdir -p "$hooks"
|
||||
curl -fsSL https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -o dalamud.zip
|
||||
unzip -oq dalamud.zip -d "$hooks"
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore HellionChat/HellionChat.csproj
|
||||
|
||||
- name: Build (Release)
|
||||
run: dotnet build HellionChat/HellionChat.csproj --configuration Release --no-restore
|
||||
|
||||
- name: Upload build output
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: HellionChat-build-${{ github.run_number }}
|
||||
path: HellionChat/bin/Release/**/HellionChat/**
|
||||
if-no-files-found: warn
|
||||
retention-days: 14
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
name: CodeQL
|
||||
|
||||
# Replaces the GitHub default-setup CodeQL scan. The default setup runs
|
||||
# without resolving the Dalamud assemblies (they live in a user-AppData
|
||||
# path) and reports "Low C# analysis quality" because call-target
|
||||
# resolution sits at ~64%. This workflow downloads the Dalamud staging
|
||||
# distribution before the build, runs a manual dotnet build, and then
|
||||
# lets CodeQL analyse the fully-resolved compilation. Quality climbs
|
||||
# back above the 85% thresholds.
|
||||
#
|
||||
# This workflow only consumes trusted inputs: the tag/branch ref via
|
||||
# the standard checkout action, and the Dalamud distribution URL which
|
||||
# is pinned to a goatcorp-controlled GitHub Pages target. No user-
|
||||
# controlled event payload (issue title, PR body, commit message) flows
|
||||
# into a run-step.
|
||||
#
|
||||
# Disable the default setup in the repo before this workflow lands:
|
||||
# Settings -> Code security -> Code scanning -> "CodeQL analysis" tile
|
||||
# -> Switch to advanced.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '17 6 * * 1'
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
jobs:
|
||||
analyze-csharp:
|
||||
name: Analyze (csharp)
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 30
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup .NET 10
|
||||
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
|
||||
with:
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
- name: Download Dalamud staging
|
||||
shell: pwsh
|
||||
run: |
|
||||
$hooks = Join-Path $env:APPDATA "XIVLauncher\addon\Hooks\dev"
|
||||
New-Item -ItemType Directory -Force -Path $hooks | Out-Null
|
||||
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile dalamud.zip
|
||||
Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
||||
with:
|
||||
languages: csharp
|
||||
build-mode: manual
|
||||
queries: security-extended
|
||||
|
||||
- name: Restore
|
||||
run: dotnet restore HellionChat/HellionChat.csproj
|
||||
|
||||
- name: Build (Release)
|
||||
run: dotnet build HellionChat/HellionChat.csproj --configuration Release --no-restore
|
||||
|
||||
- name: Perform CodeQL analysis
|
||||
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
||||
with:
|
||||
category: /language:csharp
|
||||
|
||||
analyze-actions:
|
||||
name: Analyze (actions)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
||||
with:
|
||||
languages: actions
|
||||
build-mode: none
|
||||
|
||||
- name: Perform CodeQL analysis
|
||||
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
|
||||
with:
|
||||
category: /language:actions
|
||||
@@ -34,10 +34,9 @@ jobs:
|
||||
announce:
|
||||
name: Post changelog to Hellion Forge
|
||||
runs-on: ubuntu-latest
|
||||
# The DISCORD_FORGE_WEBHOOK secret lives under Settings → Environments
|
||||
# → Webhook (case-sensitive). Without this declaration the secret is
|
||||
# not in scope for the job.
|
||||
environment: Webhook
|
||||
# The DISCORD_FORGE_WEBHOOK secret is set as a repo-level Actions Secret
|
||||
# on Gitea (Settings → Actions → Secrets). Repo-level secrets are in
|
||||
# scope for every job by default, no environment: declaration needed.
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
@@ -134,7 +133,7 @@ jobs:
|
||||
# ---------- Embed-Payload bauen ----------
|
||||
$payload = [ordered]@{
|
||||
username = "Forge Herald"
|
||||
avatar_url = "https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/icon.png"
|
||||
avatar_url = "https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/icon.png"
|
||||
content = "<@&1500489631555260446>"
|
||||
allowed_mentions = [ordered]@{
|
||||
parse = @()
|
||||
@@ -143,7 +142,7 @@ jobs:
|
||||
embeds = @(
|
||||
[ordered]@{
|
||||
title = $title
|
||||
url = "https://github.com/JonKazama-Hellion/HellionChat/releases/tag/$tag"
|
||||
url = "https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/$tag"
|
||||
color = 12730636
|
||||
description = $description
|
||||
footer = [ordered]@{ text = $footerText }
|
||||
|
||||
@@ -2,15 +2,19 @@ name: Release
|
||||
|
||||
# Triggered when a vX.Y.Z tag is pushed. Builds the plugin against the
|
||||
# current Dalamud staging branch, locates the latest.zip produced by
|
||||
# DalamudPackager and attaches it to the matching GitHub Release.
|
||||
# DalamudPackager and attaches it to the matching Gitea Release.
|
||||
#
|
||||
# User-controlled inputs touched by this workflow:
|
||||
# - the tag name (filtered by on.tags = v*, validated again at runtime
|
||||
# against ^v\d+\.\d+\.\d+$ before being used in any string)
|
||||
# All other values are either repo-controlled (paths under
|
||||
# HellionChat/bin/Release derived from Get-ChildItem) or pinned URLs to
|
||||
# goatcorp / GitHub. Nothing from a webhook event payload (issue/PR
|
||||
# HellionChat/bin/Release derived from find / Get-ChildItem) or pinned
|
||||
# URLs to goatcorp / gitea. Nothing from a webhook event payload (issue/PR
|
||||
# titles, commit messages, etc.) flows into a run-step.
|
||||
#
|
||||
# Linux runner: gitea.com Cloud Actions only ships ubuntu-latest. The
|
||||
# plugin csproj targets net10.0-windows, `dotnet build` cross-compiles on
|
||||
# Linux when the Dalamud staging assemblies sit under $(HOME)/.xlcore/...
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -33,7 +37,7 @@ permissions:
|
||||
jobs:
|
||||
release:
|
||||
name: Build and attach release ZIP
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
@@ -52,27 +56,25 @@ jobs:
|
||||
dotnet-version: 10.0.x
|
||||
|
||||
- name: Download Dalamud staging
|
||||
shell: pwsh
|
||||
run: |
|
||||
$hooks = Join-Path $env:APPDATA "XIVLauncher\addon\Hooks\dev"
|
||||
New-Item -ItemType Directory -Force -Path $hooks | Out-Null
|
||||
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -OutFile dalamud.zip
|
||||
Expand-Archive -Force -Path dalamud.zip -DestinationPath $hooks
|
||||
hooks="$HOME/.xlcore/dalamud/Hooks/dev"
|
||||
mkdir -p "$hooks"
|
||||
curl -fsSL https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -o dalamud.zip
|
||||
unzip -oq dalamud.zip -d "$hooks"
|
||||
|
||||
- name: Build (Release)
|
||||
run: dotnet build HellionChat/HellionChat.csproj --configuration Release
|
||||
|
||||
- name: Locate latest.zip
|
||||
id: locate
|
||||
shell: pwsh
|
||||
run: |
|
||||
$zip = Get-ChildItem -Path HellionChat\bin\Release -Recurse -Filter latest.zip | Select-Object -First 1
|
||||
if (-not $zip)
|
||||
{
|
||||
throw "latest.zip not found under HellionChat\bin\Release"
|
||||
}
|
||||
Write-Host "Found: $($zip.FullName)"
|
||||
"path=$($zip.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
|
||||
zip="$(find HellionChat/bin/Release -name latest.zip -print -quit)"
|
||||
if [ -z "$zip" ]; then
|
||||
echo "latest.zip not found under HellionChat/bin/Release" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Found: $zip"
|
||||
echo "path=$zip" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Build a release body from the matching changelog block in
|
||||
# HellionChat.yaml plus a static install / docs footer. Fails the
|
||||
@@ -150,8 +152,13 @@ jobs:
|
||||
Write-Host $body
|
||||
Write-Host "----------------------------------------"
|
||||
|
||||
- name: Attach to GitHub release
|
||||
uses: softprops/action-gh-release@v3
|
||||
# Gitea-native release action. Creates the release if the tag has no
|
||||
# release yet, or updates the existing one. body_path provides the
|
||||
# generated release body, files attaches latest.zip. The auto-injected
|
||||
# GITHUB_TOKEN on Gitea Actions has Gitea-API scope and is sufficient
|
||||
# for release write.
|
||||
- name: Attach to Gitea release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
# Explicit tag_name so the action targets the correct release in
|
||||
# both push:tags (auto) and workflow_dispatch (manual recovery)
|
||||
@@ -160,5 +167,4 @@ jobs:
|
||||
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
|
||||
files: ${{ steps.locate.outputs.path }}
|
||||
body_path: release-body.md
|
||||
fail_on_unmatched_files: true
|
||||
generate_release_notes: false
|
||||
api_key: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
.envrc
|
||||
!.env.example
|
||||
.vscode/
|
||||
scripts/
|
||||
scripts/setup-dev-env.sh
|
||||
|
||||
# Local test project (stays out of the published plugin repo;
|
||||
# pure-function safety net for refactor cycles)
|
||||
|
||||
@@ -15,9 +15,11 @@ to make a contribution land smoothly.
|
||||
- Read the [README](README.md) so you understand the scope: a
|
||||
privacy-focused, EUPL-1.2-licensed Dalamud plugin that intentionally
|
||||
removes the upstream webinterface and ships privacy-first defaults.
|
||||
- Read [`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md). Cherry-picks
|
||||
from upstream Chat 2 are selective and deliberate; not everything
|
||||
that lands there belongs here.
|
||||
- Read [`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md). Active
|
||||
cherry-picking from upstream Chat 2 has ended in the v1.4.x cycle;
|
||||
HellionChat continues as an independent codebase. Existing
|
||||
upstream-derived code keeps its attribution. New contributions
|
||||
stand on their own and do not need to be cherry-pick-compatible.
|
||||
- Read [`SECURITY.md`](SECURITY.md). Anything security-sensitive goes
|
||||
through a private advisory, never a public issue or PR.
|
||||
- Read the [Code of Conduct](CODE_OF_CONDUCT.md).
|
||||
@@ -43,9 +45,11 @@ to make a contribution land smoothly.
|
||||
"Was gegenüber Chat 2 fehlt".
|
||||
- Features that bypass the privacy filter or weaken the default
|
||||
retention behaviour without an explicit, documented opt-in.
|
||||
- Sweeping refactors that touch large parts of the codebase. They make
|
||||
selective upstream cherry-picks much harder and the maintenance cost
|
||||
outweighs the benefit for a one-person project.
|
||||
- Sweeping refactors that touch large parts of the codebase. The
|
||||
maintenance cost outweighs the benefit for a one-person project.
|
||||
(This used to be doubly important because of the upstream
|
||||
cherry-pick path; that path is closed now, but the rule still
|
||||
holds on its own merits.)
|
||||
- AI-generated code dropped in without disclosure or human review. See
|
||||
[`docs/AI_DISCLOSURE.md`](docs/AI_DISCLOSURE.md) for how I handle
|
||||
AI assistance on my side; I expect comparable transparency from
|
||||
@@ -117,9 +121,15 @@ Hellion-specific strings live in
|
||||
direct pull requests.
|
||||
|
||||
The upstream Chat 2 strings in `HellionChat/Resources/Language.*.resx`
|
||||
are **not** translated here. They are owned by the upstream project
|
||||
and synced in via cherry-pick. Please contribute those to
|
||||
[Infiziert90/ChatTwo](https://github.com/Infiziert90/ChatTwo) instead.
|
||||
are **not** translated here. They are kept as-is from the last
|
||||
upstream sync and remain the work of the Chat 2 Crowdin community.
|
||||
Active cherry-picking from upstream ended in the v1.4.x cycle (see
|
||||
[`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md)), so future
|
||||
translation improvements to those upstream strings will not flow
|
||||
into HellionChat automatically anymore. If you have improvements
|
||||
for the original Chat 2 strings, please contribute them to
|
||||
[Infiziert90/ChatTwo](https://github.com/Infiziert90/ChatTwo)
|
||||
directly.
|
||||
|
||||
## Licensing
|
||||
|
||||
@@ -145,3 +155,19 @@ I respond on weekdays during European business hours and take weekends
|
||||
and FFXIV patch days off. A pull request that sits for a few days has
|
||||
not been ignored. Pinging once after a week is fine; please do not
|
||||
ping daily.
|
||||
|
||||
## First-time setup
|
||||
|
||||
After cloning, run once:
|
||||
|
||||
```bash
|
||||
./scripts/setup-hooks.sh
|
||||
```
|
||||
|
||||
This wires `core.hooksPath` to `.githooks/`. The pre-push hook runs preflight
|
||||
(versions/manifest/changelog/build).
|
||||
|
||||
### Test suite
|
||||
|
||||
The plugin's test suite lives in a separate local repository and is not part of
|
||||
this codebase. If you need access for development, contact the maintainer.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// HellionChat/Branding/BrandingLinks.cs
|
||||
namespace HellionChat.Branding;
|
||||
|
||||
// Centralised so a future invite rotation only touches one file. The same
|
||||
// link is currently hard-coded in repo.json, README.md, SUPPORT.md,
|
||||
// CONTRIBUTORS.md and HellionChat.yaml — those will be migrated to consume
|
||||
// this constant in a separate housekeeping sweep
|
||||
internal static class BrandingLinks
|
||||
{
|
||||
public const string HellionForgeDiscordInvite = "https://discord.gg/X9V7Kcv5gR";
|
||||
}
|
||||
@@ -92,6 +92,13 @@ public class Configuration : IPluginConfiguration
|
||||
// to fall back to the user's chosen system or Dalamud font.
|
||||
public bool UseHellionFont = true;
|
||||
|
||||
// Cycle 1 of the plugin-integration roadmap. When Honorific is installed
|
||||
// and reports a custom title, render it in the chat header above the
|
||||
// message log. Auto-hides regardless when Honorific is missing or the
|
||||
// active title is original/empty, so leaving this on is safe even for
|
||||
// users who don't run Honorific.
|
||||
public bool ShowHonorificTitleInHeader = true;
|
||||
|
||||
// Hellion Chat — Auto-Tell-Tabs. When enabled, an incoming or outgoing
|
||||
// /tell spawns a session-only tab dedicated to that conversation
|
||||
// partner. See spec: Hellion Chat Auto-Tell-Tabs Spec (Obsidian).
|
||||
@@ -372,6 +379,7 @@ public class Configuration : IPluginConfiguration
|
||||
|
||||
FirstRunCompleted = other.FirstRunCompleted;
|
||||
UseHellionFont = other.UseHellionFont;
|
||||
ShowHonorificTitleInHeader = other.ShowHonorificTitleInHeader;
|
||||
|
||||
// v1.1.0 theme engine fields
|
||||
Theme = other.Theme;
|
||||
@@ -474,6 +482,16 @@ public class Tab
|
||||
// session. NonSerialized because the temp tab itself is session-only.
|
||||
[NonSerialized] public bool IsGreeted;
|
||||
|
||||
// v1.4.2 — TabTintCache uses separate validation keys per cache so a
|
||||
// TellTarget change picked up by GetTint can't strand GetIcon (or vice
|
||||
// versa) with a stale entry that looks fresh on the shared key.
|
||||
[NonSerialized] internal string? _cachedTintTellName;
|
||||
[NonSerialized] internal uint _cachedTintTellWorld;
|
||||
[NonSerialized] internal uint _cachedTellTint;
|
||||
[NonSerialized] internal string? _cachedIconTellName;
|
||||
[NonSerialized] internal uint _cachedIconTellWorld;
|
||||
[NonSerialized] internal string? _cachedTellIcon;
|
||||
|
||||
public bool Matches(Message message)
|
||||
{
|
||||
if (!message.Matches(SelectedChannels, ExtraChatAll, ExtraChatChannels))
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Numerics;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Numerics;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Dalamud.Interface.Textures;
|
||||
@@ -73,6 +74,19 @@ public static class EmoteCache
|
||||
private static CancellationTokenSource Cts = new();
|
||||
internal static CancellationToken Token => Cts.Token;
|
||||
|
||||
// Drain target for in-flight loads on Dispose; without this an orphan
|
||||
// continuation could still write to a torn-down Texture/Frames field.
|
||||
private static readonly ConcurrentBag<Task> PendingLoads = new();
|
||||
|
||||
internal static void TrackLoad(Task loadTask, string emoteCode)
|
||||
{
|
||||
PendingLoads.Add(loadTask.ContinueWith(t =>
|
||||
{
|
||||
if (t.IsFaulted)
|
||||
Plugin.Log.Error(t.Exception!, $"EmoteCache load failed for {emoteCode}");
|
||||
}, TaskScheduler.Default));
|
||||
}
|
||||
|
||||
public static async Task LoadData()
|
||||
{
|
||||
if (State is not LoadingState.Unloaded)
|
||||
@@ -135,10 +149,20 @@ public static class EmoteCache
|
||||
|
||||
public static void Dispose()
|
||||
{
|
||||
// Cancel in-flight downloads / texture creates so the async-void
|
||||
// Load methods bail out before they touch a disposed TextureProvider.
|
||||
Cts.Cancel();
|
||||
|
||||
// 5s upper bound; anything still running gets abandoned.
|
||||
try
|
||||
{
|
||||
Task.WaitAll(PendingLoads.ToArray(), TimeSpan.FromSeconds(5));
|
||||
}
|
||||
catch (AggregateException)
|
||||
{
|
||||
// Faults already logged in TrackLoad.
|
||||
}
|
||||
|
||||
while (PendingLoads.TryTake(out _)) { }
|
||||
|
||||
foreach (var emote in EmoteImages.Values)
|
||||
emote.InnerDispose();
|
||||
}
|
||||
@@ -233,11 +257,12 @@ public static class EmoteCache
|
||||
public ImGuiEmote Prepare(Emote emote)
|
||||
{
|
||||
var ct = EmoteCache.Token;
|
||||
Task.Run(() => Load(emote, ct), ct);
|
||||
// Task.Run keeps the sync prefix off the ImGui render thread.
|
||||
EmoteCache.TrackLoad(Task.Run(() => LoadAsyncTracked(emote, ct), ct), emote.Code);
|
||||
return this;
|
||||
}
|
||||
|
||||
private async void Load(Emote emote, CancellationToken ct)
|
||||
private async Task LoadAsyncTracked(Emote emote, CancellationToken ct)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -251,8 +276,6 @@ public static class EmoteCache
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// Plugin disposed mid-load; the EmoteImages entry is also
|
||||
// being torn down, no extra cleanup needed.
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -310,11 +333,11 @@ public static class EmoteCache
|
||||
public ImGuiGif Prepare(Emote emote)
|
||||
{
|
||||
var ct = EmoteCache.Token;
|
||||
Task.Run(() => Load(emote, ct), ct);
|
||||
EmoteCache.TrackLoad(Task.Run(() => LoadAsyncTracked(emote, ct), ct), emote.Code);
|
||||
return this;
|
||||
}
|
||||
|
||||
private async void Load(Emote emote, CancellationToken ct)
|
||||
private async Task LoadAsyncTracked(Emote emote, CancellationToken ct)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -100,6 +100,19 @@ public class FontManager
|
||||
JpRange = BuildRange(GlyphRangesJapanese.GlyphRanges);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Async wrapper around <see cref="BuildFonts"/> for the Phase-1 LoadAsync
|
||||
/// path. The font-atlas build is CPU-bound, so we offload via Task.Run and
|
||||
/// honour the cancellation token at the scheduling boundary; this lets the
|
||||
/// font build run in parallel with the theme init without blocking the
|
||||
/// loader. Settings-driven manual rebuilds keep using the sync entry point.
|
||||
/// </summary>
|
||||
public async Task BuildFontsAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
await Task.Run(BuildFonts, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public void BuildFonts()
|
||||
{
|
||||
SetUpRanges();
|
||||
|
||||
@@ -16,6 +16,18 @@ public unsafe class ChatBox
|
||||
}
|
||||
|
||||
public static void SendMessage(string message)
|
||||
{
|
||||
var bytes = ValidateMessage(message);
|
||||
SendMessageUnsafe(bytes);
|
||||
}
|
||||
|
||||
// Validation split out so the deterministic checks (UTF-8 length, sanitise
|
||||
// round-trip) can run in xUnit without ClientStructs game memory. The
|
||||
// sanitiser is injectable so tests can pin throw behaviour without invoking
|
||||
// Utf8String->SanitizeString, which only resolves in-process. Returns the
|
||||
// already-encoded bytes so SendMessage doesn't pay GetBytes twice.
|
||||
// TEST-MIRROR: ../../../Hellion Build test/GameFunctions/ChatBoxTests.cs
|
||||
internal static byte[] ValidateMessage(string message, Func<string, string>? sanitiserOverride = null)
|
||||
{
|
||||
var bytes = Encoding.UTF8.GetBytes(message);
|
||||
if (bytes.Length == 0)
|
||||
@@ -24,10 +36,11 @@ public unsafe class ChatBox
|
||||
if (bytes.Length > 500)
|
||||
throw new ArgumentException(Language.ChatBox_Error_Too_Long, nameof(message));
|
||||
|
||||
if (message.Length != SanitiseText(message).Length)
|
||||
var sanitiser = sanitiserOverride ?? SanitiseText;
|
||||
if (message.Length != sanitiser(message).Length)
|
||||
throw new ArgumentException(Language.ChatBox_Error_Invalid, nameof(message));
|
||||
|
||||
SendMessageUnsafe(bytes);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
private static string SanitiseText(string text)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
0.1.0 is our bootstrap release; the underlying Chat 2 base is
|
||||
called out in the yaml changelog so users can see what it
|
||||
derives from. -->
|
||||
<Version>1.2.3</Version>
|
||||
<Version>1.4.3</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<!-- Honor packages.lock.json on restore so floating version ranges
|
||||
|
||||
@@ -31,28 +31,54 @@ description: |-
|
||||
- Independent plugin state — own config file and database directory,
|
||||
so Hellion Chat does not share state with upstream Chat 2
|
||||
|
||||
v1.1.0 — Theme engine with five built-in themes (Hellion Arctic,
|
||||
Chat 2 Klassik, Event Horizon, Moonlit Bloom, Mint Grove) plus
|
||||
JSON-based custom-theme authoring. Settings rebuilt around a card
|
||||
grid with section detail views. See docs/THEME-AUTHORING.md.
|
||||
v1.3.0 First plugin integration cycle. Honorific custom titles
|
||||
are shown in the chat header above the message log, with auto-detect
|
||||
and silent fallback when Honorific is not installed.
|
||||
|
||||
v1.2.3 — Theme catalogue grown to nine built-in themes:
|
||||
Hellion Arctic, Hellion Spectrum (CVD-safe Deuteran/Protan),
|
||||
Chat 2 Klassik, Event Horizon, Moonlit Bloom, Mint Grove,
|
||||
Night Blue, Indigo Violet, Forge Merchantman.
|
||||
v1.4.0 — Critical Lifecycle Fixes. Plugin reload and shutdown
|
||||
are cleaner: SQLite no longer leans on GC pressure to release
|
||||
its file, worker threads are explicitly background, deferred
|
||||
config saves no longer get lost mid-disable, and pre-v13 config
|
||||
backups carry the user's custom theme opacity into the v14 schema
|
||||
instead of falling back to the default.
|
||||
|
||||
v1.4.1 — Theme Engine Performance plus a tenth built-in.
|
||||
HellionStyle.PushGlobal reads pre-computed ABGR values from a
|
||||
per-theme cache instead of converting RGBA per slot per frame
|
||||
(~13 % render-time recovery in typical scenes). Custom-theme
|
||||
hot-reload survives transient file locks (editor mid-save
|
||||
keeps the last-known-good snapshot). Synthwave Sunset joins
|
||||
as the tenth built-in theme — Hot Magenta + Cyan on midnight
|
||||
violet, 80s neon-grid vibes.
|
||||
|
||||
v1.4.2 — ChatLog Frame-Hot-Path. Three per-frame allocation
|
||||
patterns gone from the chat-log render path: card-mode borders
|
||||
hoist invariants out of the per-message loop, auto-tell tab
|
||||
tint and icon get a per-tab cache, and the status bar gates
|
||||
its tab aggregation behind the same one-second cache it uses
|
||||
for the format strings.
|
||||
|
||||
v1.4.3 — Plugin-Load Async-Init plus Repo-Cutover. Plugin
|
||||
migrated to Dalamud's IAsyncDalamudPlugin so the heavy work
|
||||
(migrations, service allocations, window construction, hook
|
||||
subscription) runs in LoadAsync without blocking Dalamud's
|
||||
UI. Schema-gate replaces the v9 → v16 migration chain;
|
||||
configs on schema v16+ load directly. Custom-repo URL moves
|
||||
to gitea.hellion-forge.cloud, the GitHub repo stays as a
|
||||
frozen v1.4.2 snapshot.
|
||||
|
||||
Based on Chat 2 by Infi and Anna, licensed under EUPL-1.2.
|
||||
|
||||
Modding & support: join the Hellion Forge Discord at
|
||||
https://discord.gg/X9V7Kcv5gR — community for Hellion Chat and
|
||||
other Hellion Online Media plugins/tools.
|
||||
repo_url: https://github.com/JonKazama-Hellion/HellionChat
|
||||
repo_url: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat
|
||||
accepts_feedback: true
|
||||
icon_url: https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/icon.png
|
||||
icon_url: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/icon.png
|
||||
image_urls:
|
||||
- https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/chatWindow.png
|
||||
- https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/settingsOverview.png
|
||||
- https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/HellionChat/images/themesPicker.png
|
||||
- https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/chatWindow.png
|
||||
- https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/settingsOverview.png
|
||||
- https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/HellionChat/images/themesPicker.png
|
||||
tags:
|
||||
- Social
|
||||
- UI
|
||||
@@ -60,371 +86,131 @@ tags:
|
||||
- Replacement
|
||||
- Privacy
|
||||
changelog: |-
|
||||
**Hellion Chat 1.2.3 — Theme Expansion**
|
||||
**Hellion Chat 1.4.3 — Plugin-Load Async-Init + Repo-Cutover (2026-05-08)**
|
||||
|
||||
Four new built-in themes round out the picker. No engine changes,
|
||||
no settings touched — just more colour options.
|
||||
Plugin lifecycle migrated to Dalamud's `IAsyncDalamudPlugin`
|
||||
API. The constructor now does only the bootstrap-essentials
|
||||
(config load, language init, conflict detection); migrations,
|
||||
service allocations, window construction and hook subscription
|
||||
move to LoadAsync. Dalamud can keep its UI responsive while the
|
||||
heavy work runs.
|
||||
|
||||
- **Night Blue** — Royal Blue on deep marine. Cool tech-dashboard
|
||||
mood, distinct from the brand themes.
|
||||
- **Indigo Violet** — Royal Violet on deep indigo with a turquoise-
|
||||
mint counter for an aurora glitter feel. Sister to Event Horizon
|
||||
but darker and denser; the turquoise accent keeps the two
|
||||
distinguishable.
|
||||
- **Forge Merchantman** — Patina bronze on workshop slate, warm
|
||||
amber counter. Hellion Forge given a theme of its own — sister
|
||||
to Hellion Arctic but greener and warmer instead of cold cyan.
|
||||
- **Hellion Spectrum** — Deuteran/Protan-safe channel colours
|
||||
using Wong/Okabe-Ito palette tones. Channel identity (Tell pink,
|
||||
Yell yellow, Shout orange, Party blue, FC green) is preserved;
|
||||
tones are chosen so each channel stays distinguishable under
|
||||
red-green colour vision deficiency. Covers the ~99% of CVD cases
|
||||
that are red-green.
|
||||
- IAsyncDalamudPlugin two-phase load with per-line CaptureFailure
|
||||
in DisposeAsync (mirrors LightlessSync's pattern); idempotency
|
||||
guard protects against reload races
|
||||
- Schema-gate replaces the v9 → v16 migration chain. Configs
|
||||
on schema v16+ load directly; older configs trigger an
|
||||
"install v1.4.2 first" error so the historic migration
|
||||
path stays intact
|
||||
- AutoTranslate.PreloadCache moved off the load path. First
|
||||
use may have a sub-second hitch instead of every-load; the
|
||||
upstream chose differently, we accept first-use latency
|
||||
- FontManager.BuildFonts is called sync at the start of
|
||||
LoadAsync; Dalamud rebuilds the font atlas on its own
|
||||
pipeline so the custom Hellion-Exo2 font appears with a
|
||||
brief font-pop after load (matches ChatTwo's behaviour)
|
||||
- Custom-repo URL moved to gitea.hellion-forge.cloud/
|
||||
JonKazama-Hellion/HellionChat. GitHub repo stays as a
|
||||
frozen v1.4.2 snapshot; new releases ship from Gitea.
|
||||
Existing testers need to update the custom-repo URL once
|
||||
- Plugin-load time in this release sits at ~3.7 s median
|
||||
(5 reloads), comparable to v1.4.2. Async migration is
|
||||
foundational for v1.4.4 Lazy-Init optimisations rather
|
||||
than an immediate user-perceived win
|
||||
|
||||
No schema bump, no migration. Default theme is unchanged (Hellion
|
||||
Arctic). Existing custom themes keep working.
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
**Hellion Chat 1.2.1 — Settings Cleanup**
|
||||
**Hellion Chat 1.4.2 — ChatLog Frame-Hot-Path**
|
||||
|
||||
Re-sorted the settings menu so related options live together. Card names
|
||||
now describe their contents in plain words — "Theme & Layout", "Fonts &
|
||||
Colours", "Data Management" — and each card has a short subtitle so you
|
||||
don't have to guess where a setting lives. No new features, just
|
||||
housekeeping.
|
||||
Third sub-patch of the v1.4.x Polish Sweep series. Per-frame
|
||||
allocations from the chat-log render path eliminated.
|
||||
|
||||
Card changes:
|
||||
- DrawMessages card-mode hoists theme/drawList/winLeft/winRight/
|
||||
borderColorAbgr out of the per-message loop. About 500
|
||||
redundant calls per frame at 100 visible messages, multiplied
|
||||
by every pop-out window
|
||||
- Auto-tell tab tint and icon use a per-tab cache. Hash
|
||||
computation and string allocation only happen when the tell
|
||||
target name or world drifts. AutoTellTabTint stays a pure
|
||||
hash helper; cache lives in a thin TabTintCache wrapper
|
||||
- Status bar gates its tab aggregation behind the same
|
||||
one-second cache it already used for the format strings.
|
||||
LINQ Sum and Count replaced with a single foreach pass
|
||||
that runs on roughly 1% of frames
|
||||
|
||||
- Theme & Layout (new) collects the theme picker, window frame style
|
||||
(title bar, sidebar, hide button, pop-out title bar) and the timestamp
|
||||
style options.
|
||||
- Fonts & Colours (new) is the new home for font choice, font size and
|
||||
per-channel chat colours.
|
||||
- Data Management (new) is everything you do with stored messages:
|
||||
retention windows, cleanup, export, the database viewer and the
|
||||
advanced shift-click tools. All previously scattered between Privacy
|
||||
and Database.
|
||||
- Privacy is now focused on one job: the privacy filter.
|
||||
- Chat absorbs the Auto-Tell-Tabs history preload slider that used to
|
||||
live under Privacy.
|
||||
- General groups the keybind mode under Input where it belongs.
|
||||
Realistic frame-time recovery: 2-5% in typical scenes, more
|
||||
on pop-out-heavy setups because the card-border hoist scales
|
||||
per window.
|
||||
|
||||
Cleanup:
|
||||
|
||||
- Removed legacy "Style override" option and the unused style-name field
|
||||
— both made obsolete by the Themes system in 1.1.0.
|
||||
- Removed the legacy WindowAlpha slider; if you had it set, the value is
|
||||
automatically migrated to Theme & Layout → Window Style → Window
|
||||
Transparency.
|
||||
- Removed the unused ShowThemeQuickPicker schema field.
|
||||
|
||||
Migration v15 → v16:
|
||||
|
||||
- A backup of your previous config is written to
|
||||
pluginConfigs/HellionChat.json.pre-v16-backup before the schema change,
|
||||
in case you want to roll back manually.
|
||||
- All other settings are preserved unchanged.
|
||||
- One-time toast on first start if you previously had Style override
|
||||
enabled — it explains the change. Users who never touched that setting
|
||||
see no toast.
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
**Hellion Chat 1.2.0 — Layout Refresh**
|
||||
**Hellion Chat 1.4.1 — Theme Engine Performance**
|
||||
|
||||
Second UI cycle: tab layouts modernised in both modes, a new
|
||||
bottom status bar, card-rows as default message render, and
|
||||
Auto-Tell tabs that you can finally tell apart at a glance.
|
||||
Second sub-patch of the v1.4.x Polish Sweep series. Heap
|
||||
pressure from the theme engine's per-frame render path
|
||||
removed, plus a tenth built-in theme and hardening for
|
||||
the custom-theme hot-reload.
|
||||
|
||||
Sidebar (icon-only, fixed 44 px):
|
||||
- Theme records carry a pre-computed ABGR-packed cache
|
||||
for every color slot; cache is filled when the theme
|
||||
is registered and refreshed defensively on every
|
||||
Switch()
|
||||
- HellionStyle.PushGlobal reads ABGR values from the
|
||||
cache instead of calling ColourUtil.RgbaToAbgr per
|
||||
slot per frame; ~13 % render-time recovery measured
|
||||
in typical scenes (plan estimate was 2–6 %, real
|
||||
~10–15 %)
|
||||
- ThemeRegistry custom-theme reload distinguishes a
|
||||
recoverable file lock (editor mid-save) from a
|
||||
permanent IO failure; locked themes keep their
|
||||
last-known-good snapshot and retry on the next
|
||||
lookup instead of dropping out of the picker
|
||||
- New built-in: Synthwave Sunset — Hot Magenta + Cyan
|
||||
on midnight violet, 80s neon-grid vibes; tenth theme
|
||||
in the picker
|
||||
- Author credits refreshed: brand themes are credited
|
||||
as "Hellion Forge"; Mint Grove and Forge Merchantman
|
||||
now credited to Carla Beleandis as a community thanks
|
||||
|
||||
- Tab name on hover-tooltip, vertical accent pill on the
|
||||
active tab, child background no longer paints the top
|
||||
padding area.
|
||||
- Per-tab custom icons via Settings → Tabs.
|
||||
- Auto-Tell tabs: each partner gets a hashed icon (envelope/
|
||||
star/heart/bell/bookmark/flag/fire) plus hashed color
|
||||
(12-color palette) — 84 distinct combinations.
|
||||
- Pulsing red dot in the top-right of any tab with unread
|
||||
messages, subtle 2-second sine pulse, respects
|
||||
Configuration.ReduceMotion.
|
||||
No schema bump, no user-visible behaviour change other
|
||||
than smoother frames on GC-sensitive setups and one
|
||||
additional colour option.
|
||||
|
||||
Top tabs:
|
||||
|
||||
- Accent underline pill on the active tab instead of the old
|
||||
background fill. Icon prefixes were attempted but reverted
|
||||
— Dalamud's default font atlas has no FontAwesome glyphs.
|
||||
|
||||
Bottom status bar (22 px, 1×/sec cached):
|
||||
|
||||
- Active channel with color dot, Privacy-First badge, tab +
|
||||
message counters, auto-tell counter (hidden at zero),
|
||||
plugin version (right-aligned, muted).
|
||||
|
||||
Message rendering:
|
||||
|
||||
- Card rows by default — sender header in channel color, body
|
||||
on its own line, subtle border between cards.
|
||||
- Compact-Density toggle in Appearance returns the classic
|
||||
single-line `[HH:mm] Sender: Text` layout.
|
||||
|
||||
Bug fixes from in-game testing:
|
||||
|
||||
- Settings save no longer wipes chat history. Refilter cycle
|
||||
only runs when filter-relevant settings actually changed
|
||||
(privacy, channel selection); cosmetic changes leave the
|
||||
chat intact. Persistent and Auto-Tell tabs both survive.
|
||||
- Hellion Schrift (Exo 2) no longer blocks font-size
|
||||
adjustment — 4K users can scale up properly.
|
||||
- Sidebar buttons align with the first message row, status
|
||||
bar version slot is no longer clipped.
|
||||
|
||||
Migration v14 → v15: legacy theme fields removed
|
||||
(HellionThemeEnabled, HellionThemeWindowOpacity). All other
|
||||
settings preserved.
|
||||
|
||||
Polish (lerps, theme crossfade, header quick-picker) follows
|
||||
in v1.3.0.
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
**Hellion Chat 1.1.0 — Theme Foundation**
|
||||
**Hellion Chat 1.4.0 — Critical Lifecycle Fixes**
|
||||
|
||||
First major UI cycle after the standalone v1.0.0 cut. Theme engine,
|
||||
five built-in themes, customisable JSON themes, modernised settings
|
||||
layout.
|
||||
First sub-patch of the v1.4.x Polish Sweep series. Seven
|
||||
known lifecycle and race bugs eliminated before any
|
||||
performance refactor sits on top.
|
||||
|
||||
New themes (Settings → Themes):
|
||||
|
||||
- **Hellion Arctic** — the brand default, Arctic Cyan + Ember Glow
|
||||
on industrial slate.
|
||||
- **Chat 2 Klassik** — Steel Blue on neutral grey, eckige Kanten.
|
||||
The upstream Chat 2 look on the new engine.
|
||||
- **Event Horizon** — Cosmic Purple on near-black. Deep-space mood.
|
||||
- **Moonlit Bloom** — Bloom Magenta + Soft Sage on deep-violet
|
||||
night.
|
||||
- **Mint Grove** — Mint Green + Honey Amber on deep forest. First
|
||||
member of the Grove family.
|
||||
|
||||
Theme engine highlights:
|
||||
|
||||
- Slug-based selection in Settings → Themes with mini-mockup
|
||||
previews per theme.
|
||||
- Click a theme card and the whole plugin (chat, settings,
|
||||
pop-outs, viewer) repaints instantly.
|
||||
- Custom themes via JSON in pluginConfigs/HellionChat/themes/.
|
||||
Example template seeded on first launch.
|
||||
- Optional per-theme chat-channel colours. When a theme proposes
|
||||
its own chat colours and yours differ, a dezent banner offers
|
||||
Apply / Keep — never auto-overwriting.
|
||||
- Migration v13 → v14: existing users land on Hellion Arctic. Pick
|
||||
Chat 2 Klassik to keep the upstream look.
|
||||
|
||||
Settings layout:
|
||||
|
||||
- New card-grid overview on Settings open. Click a card to drill
|
||||
into the section.
|
||||
- Breadcrumb back to overview, ESC also returns.
|
||||
- Detail view drops the redundant tab list — section content uses
|
||||
the full width.
|
||||
|
||||
Branding:
|
||||
|
||||
- Plugin icon swapped from the ChatTwo derivative to the Hellion
|
||||
Forge hammer.
|
||||
- New docs/THEME-AUTHORING.md walks you through writing your own
|
||||
themes with the Forge logo on top.
|
||||
|
||||
Technical:
|
||||
|
||||
- HellionStyle.PushGlobal is now theme-driven. Configuration.
|
||||
HellionThemeEnabled is deprecated and will be removed in v1.2.0.
|
||||
- New ThemeRegistry singleton with LastWriteTime-cached custom-
|
||||
theme loader.
|
||||
- 51 local unit tests cover the data model, registry, JSON round-
|
||||
trip and built-in sanity checks.
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
**Hellion Chat 1.0.3 — Polish patch**
|
||||
|
||||
- New: optionally hide chat (and every other plugin window) while the
|
||||
New Game+ menu is open. Toggle in Settings → Window → Frame, default
|
||||
off. Closing the menu restores all windows.
|
||||
- New: optionally tint the channel selector button next to the input
|
||||
field with the currently active channel's colour. Toggle in
|
||||
Settings → Appearance → Colours, default on. Matches the existing
|
||||
input-text tint and respects ExtraChat overrides.
|
||||
- Fix: status, item and other inline hover icons keep their original
|
||||
aspect ratio. Debuff icons with non-square dimensions are no longer
|
||||
visually squished into a 32×32 box.
|
||||
- Diagnostic: hide-state transitions (battle, cutscene, user-hide,
|
||||
cutscene override) are now logged on Verbose level for easier bug
|
||||
reports — off by default, enable with `/xllog set HellionChat verbose`.
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
**Hellion Chat 1.0.1 — Window Position Recovery**
|
||||
|
||||
- Automatic bounds check on the first draw after plugin load.
|
||||
When the persisted window position has no overlap with the
|
||||
primary viewport, the window snaps to a safe top-left default.
|
||||
Helpful after a monitor disconnect, resolution change or
|
||||
multi-monitor layout switch between sessions.
|
||||
- New "Reset Window Position" button in Settings → Window → Frame
|
||||
as a manual escape hatch for edge cases the automatic check
|
||||
doesn't catch.
|
||||
|
||||
Tested on Linux/Wayland with a hard-cut three-monitor reduction;
|
||||
window recovers cleanly without manual JSON editing.
|
||||
|
||||
Housekeeping carried over since v1.0.0:
|
||||
|
||||
- Documentation restructured into docs/ folder. New CHANGELOG,
|
||||
CONTRIBUTORS, LEARNING-JOURNEY and ROADMAP added
|
||||
- Stale ChatTwo/* paths in repo configs updated to HellionChat/*
|
||||
- Pidgin parser library bumped from 3.3.0 to 3.5.1 (CIString
|
||||
Unicode fix relevant for non-ASCII channel/tab names)
|
||||
- GitHub Actions: actions/setup-dotnet bumped 4 → 5,
|
||||
github/codeql-action bumped 3 → 4
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
**Hellion Chat 1.0.0 — Standalone Major Release**
|
||||
|
||||
First fully standalone release. Internal cleanup plus a sweep of
|
||||
pre-existing correctness, security, threading and resource-leak
|
||||
fixes carried over from the upstream codebase. No user action
|
||||
required — auto-update applies cleanly, configuration and database
|
||||
paths unchanged.
|
||||
|
||||
Standalone identity:
|
||||
|
||||
- Code namespace consolidated from ChatTwo.* to HellionChat.* across
|
||||
all source files
|
||||
- IPC channels migrated from ChatTwo.* to HellionChat.* (6 channels:
|
||||
Register, Available, Unregister, Invoke, GetChatInputState,
|
||||
ChatInputStateChanged) — third-party plugins that bound to the old
|
||||
channels need to be updated; none known at release time
|
||||
- ImGui popup ID renamed to hellionchat-context-popup
|
||||
- Repository folder restructured (ChatTwo/ → HellionChat/), all CI
|
||||
and build paths updated accordingly
|
||||
- Public-facing descriptions reworded from upstream-fork framing to
|
||||
standalone framing (Chat 2 attribution preserved per EUPL-1.2)
|
||||
- Colour preset 'ChatTwo Default' is now 'Klassik (Chat 2 Default)'
|
||||
|
||||
Safety:
|
||||
|
||||
- Plugin now refuses to load when upstream Chat 2 is also active —
|
||||
bilingual conflict message in EN/DE, throw before any subsystem
|
||||
initialization, prevents the runtime crash that previously occurred
|
||||
when both plugins replaced the same chat window in parallel
|
||||
- SQLite native binary bumped to 3.50.3 (CVE-2025-6965 memory
|
||||
corruption from aggregate-term overflow, CVE-2025-7709)
|
||||
- NuGet restore now honors packages.lock.json so transitive
|
||||
dependencies don't drift between machines or CI runs
|
||||
|
||||
Default tab layout sharpened (one-time tab reset on first start):
|
||||
|
||||
The first-run tab layout is reorganized into five thematic tabs
|
||||
based on external tester feedback. General contains only Say,
|
||||
Yell and Shout (immediate-surroundings public chat). System
|
||||
absorbs the gameplay-event streams (NpcDialogue, Loot, Crafting,
|
||||
Gathering, PF recruitment pings) and announcement noise
|
||||
(BattleSystem, FreeCompanyAnnouncement, PvpTeamAnnouncement)
|
||||
that previously lived in General. FreeCompany, Group and
|
||||
Linkshell each own their channel set. The static Tell tab is
|
||||
gone — Auto-Tell-Tabs spawns per-conversation tabs on demand.
|
||||
The Beginner / Novice-Network preset is no longer added by
|
||||
default but is still available via Settings, Tabs.
|
||||
|
||||
This is a one-time tab-layout reset for users on config version
|
||||
12 or older. Privacy, Retention, Theme and every other setting
|
||||
is preserved. Your previous tab configuration is written to
|
||||
pluginConfigs/HellionChat.json.pre-v13-backup so you can restore
|
||||
it manually if you prefer the old layout.
|
||||
|
||||
Crash-class fixes (formerly latent in upstream):
|
||||
|
||||
- MathUtil.HasOverlap now uses a correct AABB test; identical or
|
||||
edge-touching rectangles are no longer reported as non-overlapping
|
||||
- ChatCode.Equals compares fields directly instead of GetHashCode;
|
||||
removes the hash-collision anti-pattern
|
||||
- IpcManager.Dispose uses UnregisterAction to match the matching
|
||||
RegisterAction call; previous mismatch leaked the action
|
||||
subscription on every plugin reload
|
||||
- ExtraChat.Dispose now unsubscribes all three IPC subscriptions
|
||||
(was only the first); leaks closed
|
||||
- TellTarget.FromTarget guards against a zero IPlayerCharacter.Address
|
||||
before dereferencing the unsafe Character* cast
|
||||
- GameFunctions ResolveTextCommandPlaceholderDetour null-checks the
|
||||
Hook reference instead of using the null-forgiving operator
|
||||
- Popout.cs and SettingsTabs/Tabs.cs bounds-check list indexing so
|
||||
a tab drop or empty-worlds list no longer crashes the UI
|
||||
- Debugger.cs now declares IDisposable so the existing Dispose runs
|
||||
|
||||
Correctness fixes:
|
||||
|
||||
- GlobalParametersCache.GetValue captures Cache into a local before
|
||||
the bounds check, so a concurrent Refresh can't slip a different
|
||||
array between check and read
|
||||
- IconUtil binary search bounds initialized to entries.Length-1 and
|
||||
reset on redirect-restart; entries.Length==0 short-circuits
|
||||
- Sheets.WorldsOnDatacenter now compares DataCenter.RowId (was
|
||||
Region.RowId) so it actually returns same-DC worlds
|
||||
- Message.cs back-reference loop iterates the processed Sender/Content
|
||||
properties so chunks added by CheckMessageContent get Message set
|
||||
- Language.zh-Hans Webinterface_Start_Success corrected to
|
||||
"网页界面已启动" (was "网页界面已停止")
|
||||
|
||||
Threading and async:
|
||||
|
||||
- AutoTranslate Entries/ValidEntries are now serialized behind a
|
||||
single lock; the preload worker thread and main thread no longer
|
||||
race on the underlying dictionary/hash set
|
||||
- Privacy retention and cleanup workers bound their framework-refresh
|
||||
waits to 5 seconds with a logged timeout; a hung framework tick can
|
||||
no longer deadlock the background worker
|
||||
|
||||
Resource handling:
|
||||
|
||||
- EmoteCache reuses the static HttpClient instead of allocating a new
|
||||
one per call (closed socket leak)
|
||||
- FontManager wraps HttpClient/HttpResponseMessage in using-blocks
|
||||
and adds EnsureSuccessStatusCode; failed downloads no longer
|
||||
silently produce a zero-byte font file
|
||||
- SearchSelector mixes the row index into the ImGui ID stack so
|
||||
selectables don't collapse to a single ambiguous ID
|
||||
- SettingsTabs/Chat blocked-emote add-button now opens its selector
|
||||
popup on left-click
|
||||
|
||||
Performance:
|
||||
|
||||
- DbViewer text export caches filteredHistory.Count once instead of
|
||||
re-enumerating the IEnumerable on every batch (O(N) instead of
|
||||
O(N²) on large histories)
|
||||
|
||||
License attribution (NOTICE.md, COPYRIGHT, THIRD_PARTY_NOTICES.md
|
||||
and the Credits section in README) is unchanged.
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
**Hellion Chat 0.6.1 — Pop-Out Discoverability & /tell Auto-Pop-Out**
|
||||
|
||||
- Pop-out button now visible in the chat header (no more hunting
|
||||
through the right-click menu)
|
||||
- One-time hint banner explains pop-out tabs and the right-click
|
||||
shortcut
|
||||
- New setting: open new /tell tabs directly as pop-out windows
|
||||
(Settings → Chat → Auto-Tell-Tabs)
|
||||
- Pop-out input is now enabled by default — closing a pop-out still
|
||||
returns the tab to the sidebar
|
||||
- Bugfix: dropping or logging out with an LRU/popped auto-tell tab
|
||||
now also closes its pop-out window (no more ghost windows)
|
||||
- Bugfix: dead zone below the chat input bar when the v0.6.0 pop-out
|
||||
hint banner was visible (also fixed retroactively for the v0.6.0
|
||||
banner inside pop-outs)
|
||||
- MessageStore disposal no longer triggers GC.Collect
|
||||
globally; Pooling=false on the SQLite connection means
|
||||
there's nothing left to clean up by hand
|
||||
- PendingMessage and RetentionSweep worker threads are
|
||||
explicitly marked IsBackground=true so the plugin domain
|
||||
can unload during XIVLauncher reload without waiting
|
||||
for them
|
||||
- EmoteCache image and gif loaders moved from async-void
|
||||
to async Task with a shared task tracker, draining
|
||||
on Dispose so an in-flight load can no longer write
|
||||
to a disposed EmoteImages entry
|
||||
- DisposeAsync 10s timeout now warns loudly instead of
|
||||
silently leaving the worker behind
|
||||
- Plugin.Dispose flushes any pending DeferredSaveFrames
|
||||
before tearing services down, so settings changes
|
||||
made in the last few frames before disable are no
|
||||
longer lost
|
||||
- The v13→v14 config migration now reads the pre-v13
|
||||
backup and carries HellionThemeWindowOpacity into the
|
||||
new WindowOpacity field instead of falling back to
|
||||
the default 0.85
|
||||
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
@@ -432,4 +218,4 @@ changelog: |-
|
||||
|
||||
---
|
||||
|
||||
Earlier history: https://github.com/JonKazama-Hellion/HellionChat/releases
|
||||
Earlier history: https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Ipc;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace HellionChat.Integrations;
|
||||
|
||||
// We pull Newtonsoft.Json into this single file for IPC compatibility:
|
||||
// Honorific serialises its TitleData with Newtonsoft (see
|
||||
// Honorific-master/IpcProvider.cs:9 and CustomTitle.cs:12). Using the
|
||||
// same library guarantees identical handling of System.Numerics.Vector3?
|
||||
// and the enum fields we ignore. Newtonsoft is a transitive dependency
|
||||
// via Dalamud, so no new NuGet entry is needed. The rest of HellionChat
|
||||
// keeps using System.Text.Json.
|
||||
internal sealed class HonorificService : IDisposable
|
||||
{
|
||||
private const string IpcNamespace = "Honorific";
|
||||
|
||||
// Major version of the Honorific IPC contract HellionChat is built against.
|
||||
// Used both by the runtime compatibility check and by the settings tab when
|
||||
// it tells the user which major version we expected, so the literal lives
|
||||
// in exactly one place.
|
||||
internal const uint ExpectedApiMajor = 3;
|
||||
|
||||
// IPC gates we subscribe to. Keep them as fields so Dispose can
|
||||
// unsubscribe the same instances we subscribed in the constructor.
|
||||
private readonly ICallGateSubscriber<(uint, uint)> _apiVersion;
|
||||
private readonly ICallGateSubscriber<string> _getLocalCharacterTitle;
|
||||
private readonly ICallGateSubscriber<string, object> _localCharacterTitleChanged;
|
||||
private readonly ICallGateSubscriber<object> _ready;
|
||||
private readonly ICallGateSubscriber<object> _disposing;
|
||||
|
||||
private readonly IPluginLog _log;
|
||||
private readonly IFramework _framework;
|
||||
private bool _versionWarningLogged;
|
||||
|
||||
public HonorificTitleData? CurrentTitle { get; private set; }
|
||||
public bool IsAvailable { get; private set; }
|
||||
public (uint Major, uint Minor)? DetectedApiVersion { get; private set; }
|
||||
|
||||
public HonorificService(IDalamudPluginInterface pluginInterface, IPluginLog log, IFramework framework)
|
||||
{
|
||||
_framework = framework;
|
||||
_log = log;
|
||||
|
||||
// Dalamud caches gate objects per-name for the lifetime of the
|
||||
// plugin interface, so we can register subscribers even when
|
||||
// Honorific isn't loaded yet — the gate just won't fire. Calling
|
||||
// InvokeFunc before Honorific is up will throw, which is why the
|
||||
// initial pull below is wrapped in try-catch.
|
||||
//
|
||||
// Thread-context: plugin constructors run on Dalamud's plugin-loader
|
||||
// thread, NOT the framework thread. Honorific's IPC handlers read
|
||||
// ObjectTable.LocalPlayer (Honorific IpcProvider.cs:61), which throws
|
||||
// "Not on main thread!" outside the framework thread. If Honorific is
|
||||
// already loaded when HellionChat starts, a synchronous InvokeFunc
|
||||
// here would surface that exception, the broad catch below would
|
||||
// mark IsAvailable=false, and OnTitleChanged's `if (!IsAvailable)`
|
||||
// gate would block every subsequent title update. We therefore
|
||||
// schedule the initial pull onto the framework thread via
|
||||
// IFramework.RunOnFrameworkThread so the IPC call sees the right
|
||||
// thread context.
|
||||
_apiVersion = pluginInterface
|
||||
.GetIpcSubscriber<(uint, uint)>($"{IpcNamespace}.ApiVersion");
|
||||
_getLocalCharacterTitle = pluginInterface
|
||||
.GetIpcSubscriber<string>($"{IpcNamespace}.GetLocalCharacterTitle");
|
||||
_localCharacterTitleChanged = pluginInterface
|
||||
.GetIpcSubscriber<string, object>($"{IpcNamespace}.LocalCharacterTitleChanged");
|
||||
_ready = pluginInterface
|
||||
.GetIpcSubscriber<object>($"{IpcNamespace}.Ready");
|
||||
_disposing = pluginInterface
|
||||
.GetIpcSubscriber<object>($"{IpcNamespace}.Disposing");
|
||||
|
||||
_localCharacterTitleChanged.Subscribe(OnTitleChanged);
|
||||
_ready.Subscribe(OnReady);
|
||||
_disposing.Subscribe(OnDisposing);
|
||||
|
||||
_framework.RunOnFrameworkThread(TryInitialPull);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Honorific may already be gone by the time we dispose. Wrap each
|
||||
// unsubscribe so a missing gate doesn't prevent the others from
|
||||
// unsubscribing — leaking even one subscription leaves a callback
|
||||
// alive that captures `this`, which keeps the whole service alive
|
||||
// and breaks plugin reload.
|
||||
TryUnsubscribe(() => _localCharacterTitleChanged.Unsubscribe(OnTitleChanged));
|
||||
TryUnsubscribe(() => _ready.Unsubscribe(OnReady));
|
||||
TryUnsubscribe(() => _disposing.Unsubscribe(OnDisposing));
|
||||
}
|
||||
|
||||
private void TryInitialPull()
|
||||
{
|
||||
try
|
||||
{
|
||||
var version = _apiVersion.InvokeFunc();
|
||||
DetectedApiVersion = version;
|
||||
|
||||
if (!IsApiVersionCompatible(version))
|
||||
{
|
||||
if (!_versionWarningLogged)
|
||||
{
|
||||
_log.Warning(
|
||||
"Honorific API version mismatch — expected major 3, " +
|
||||
"found {Major}.{Minor}. Disabling Honorific integration.",
|
||||
version.Item1, version.Item2);
|
||||
_versionWarningLogged = true;
|
||||
}
|
||||
IsAvailable = false;
|
||||
return;
|
||||
}
|
||||
|
||||
IsAvailable = true;
|
||||
_versionWarningLogged = false;
|
||||
// Pull the current title once at startup; from here on we rely
|
||||
// on LocalCharacterTitleChanged events.
|
||||
var json = _getLocalCharacterTitle.InvokeFunc();
|
||||
CurrentTitle = ParseTitleJson(json);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Honorific isn't installed or hasn't initialised yet. The Ready
|
||||
// event will give us a second chance later. Log at Debug so
|
||||
// users without Honorific don't see noise on every reload.
|
||||
_log.Debug(ex, "Honorific not available at HellionChat startup; awaiting Ready.");
|
||||
IsAvailable = false;
|
||||
CurrentTitle = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Honorific fires LocalCharacterTitleChanged through its nameplate hook
|
||||
// (Honorific-master/Plugin.cs:665), which means we get title updates on
|
||||
// character switches automatically as soon as the new character is
|
||||
// rendered. While the user is in the character-select menu, HellionChat's
|
||||
// window is hidden by default via HideWhenNotLoggedIn (Configuration.cs:152),
|
||||
// so the stale-title window between logout and login isn't user-visible.
|
||||
private void OnTitleChanged(string json)
|
||||
{
|
||||
// Don't update cached state when we've already decided we can't trust
|
||||
// Honorific (e.g. version mismatch). Subscription stays live in case a
|
||||
// compatible Honorific reloads, in which case Ready triggers TryInitialPull
|
||||
// and sets IsAvailable back to true.
|
||||
if (!IsAvailable) return;
|
||||
CurrentTitle = ParseTitleJson(json);
|
||||
}
|
||||
|
||||
private void OnReady()
|
||||
{
|
||||
// Honorific loaded after HellionChat; redo the version check and
|
||||
// initial pull. Idempotent on purpose — Honorific can fire Ready
|
||||
// more than once across reloads.
|
||||
//
|
||||
// Honorific's NotifyReady may dispatch from any thread, and
|
||||
// TryInitialPull eventually calls IPC handlers that read
|
||||
// ObjectTable.LocalPlayer — same "Not on main thread!" hazard as
|
||||
// the constructor path. Schedule onto the framework thread.
|
||||
_framework.RunOnFrameworkThread(TryInitialPull);
|
||||
}
|
||||
|
||||
private void OnDisposing()
|
||||
{
|
||||
// Honorific is unloading. Drop our cached state so the header
|
||||
// hides on the next frame; subscriptions stay registered because
|
||||
// the gates may come back later (Honorific reload).
|
||||
//
|
||||
// Race-note: Honorific's NotifyDisposing calls ChangedLocalCharacterTitle(null)
|
||||
// BEFORE SendMessage on the Disposing gate (IpcProvider.cs:109-111),
|
||||
// so OnTitleChanged is expected to fire first and already null out
|
||||
// CurrentTitle. We re-clear here as belt-and-braces; should the
|
||||
// ordering ever flip, ShouldRenderSlot would still gate on IsAvailable.
|
||||
CurrentTitle = null;
|
||||
IsAvailable = false;
|
||||
DetectedApiVersion = null;
|
||||
}
|
||||
|
||||
private void TryUnsubscribe(Action unsubscribe)
|
||||
{
|
||||
try
|
||||
{
|
||||
unsubscribe();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_log.Debug(ex, "Honorific unsubscribe failed (likely already gone).");
|
||||
}
|
||||
}
|
||||
|
||||
// Threading note: Dalamud fires IPC events on the framework thread and
|
||||
// ImGui renders on the framework thread, so OnTitleChanged and the
|
||||
// render path that reads CurrentTitle never race — OnTitleChanged is
|
||||
// safe to keep direct (no RunOnFrameworkThread wrap needed) because
|
||||
// LocalCharacterTitleChanged delivery is framework-thread by Dalamud
|
||||
// contract. If a future change moves either side onto a worker thread,
|
||||
// switch to volatile/Interlocked for the CurrentTitle field.
|
||||
//
|
||||
// The constructor's initial pull and OnReady, on the other hand, are
|
||||
// explicitly scheduled via IFramework.RunOnFrameworkThread because
|
||||
// they run outside that contract: the constructor executes on the
|
||||
// plugin-loader thread, and Honorific's NotifyReady can dispatch from
|
||||
// any thread. Both call paths eventually invoke IPC handlers that read
|
||||
// ObjectTable.LocalPlayer, which throws "Not on main thread!" off the
|
||||
// framework thread — see the constructor comment block for context.
|
||||
//
|
||||
// Divergence from ChatTwo/Ipc/ExtraChat.cs: that file uses `volatile`
|
||||
// on its state fields out of caution. We don't, because the framework-
|
||||
// thread delivery is the documented Dalamud contract. If the two files
|
||||
// ever need to share a threading audit, this is the place to revisit.
|
||||
|
||||
// --- Pure-logic helpers below; tested via HellionChat.Tests/Integrations. ---
|
||||
|
||||
internal static HonorificTitleData? ParseTitleJson(string json)
|
||||
{
|
||||
if (string.IsNullOrEmpty(json))
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
return JsonConvert.DeserializeObject<HonorificTitleData>(json);
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IsApiVersionCompatible((uint Major, uint Minor) apiVersion)
|
||||
{
|
||||
return apiVersion.Major == ExpectedApiMajor;
|
||||
}
|
||||
|
||||
internal static bool ShouldRenderSlot(
|
||||
bool toggleEnabled,
|
||||
bool isAvailable,
|
||||
HonorificTitleData? title)
|
||||
{
|
||||
if (!toggleEnabled) return false;
|
||||
if (!isAvailable) return false;
|
||||
if (title is null) return false;
|
||||
if (title.IsOriginal) return false;
|
||||
if (string.IsNullOrEmpty(title.Title)) return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Numerics;
|
||||
|
||||
namespace HellionChat.Integrations;
|
||||
|
||||
// Local DTO mirroring Honorific's TitleData shape. We replicate the structure
|
||||
// instead of referencing Honorific.dll because a hard build-time dependency
|
||||
// would couple the two assemblies and break HellionChat at load time when
|
||||
// Honorific is missing. Glow, Color3, GradientColourSet and GradientAnimationStyle
|
||||
// are intentionally omitted — Cycle 1 renders text in the primary Color only;
|
||||
// the "Honorific Full Fidelity" backlog item adds them later as a pure
|
||||
// extension that won't break this DTO's existing consumers.
|
||||
internal sealed record HonorificTitleData(
|
||||
string? Title,
|
||||
bool IsPrefix,
|
||||
bool IsOriginal,
|
||||
Vector3? Color
|
||||
);
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace HellionChat.Integrations;
|
||||
|
||||
// External URLs for the third-party plugins HellionChat integrates with.
|
||||
// Kept separate from BrandingLinks (which is for Hellion-owned URLs) so
|
||||
// future cycles can extend this file with maintainer attribution links
|
||||
// for Moodles, NotificationMaster, ExtraChat, etc. without polluting the
|
||||
// brand-links class.
|
||||
internal static class IntegrationLinks
|
||||
{
|
||||
public const string HonorificRepo = "https://github.com/Caraxi/Honorific";
|
||||
public const string HonorificAuthor = "https://github.com/Caraxi";
|
||||
}
|
||||
@@ -66,7 +66,12 @@ internal class MessageManager : IAsyncDisposable
|
||||
|
||||
Store = new MessageStore(DatabasePath());
|
||||
|
||||
PendingMessageThread = new Thread(() => ProcessPendingMessages(PendingThreadCancellationToken.Token));
|
||||
// IsBackground so a stuck worker never blocks plugin unload.
|
||||
// Cooperative cancel via PendingThreadCancellationToken first, background flag is the safety net.
|
||||
PendingMessageThread = new Thread(() => ProcessPendingMessages(PendingThreadCancellationToken.Token))
|
||||
{
|
||||
IsBackground = true,
|
||||
};
|
||||
PendingMessageThread.Start();
|
||||
|
||||
ContentIdResolverHook = Plugin.GameInteropProvider.HookFromAddress<RaptureLogModule.Delegates.AddMsgSourceEntry>(RaptureLogModule.MemberFunctionPointers.AddMsgSourceEntry, ContentIdResolver);
|
||||
@@ -85,19 +90,22 @@ internal class MessageManager : IAsyncDisposable
|
||||
Plugin.ChatGui.ChatMessageUnhandled -= ChatMessage;
|
||||
|
||||
await PendingThreadCancellationToken.CancelAsync();
|
||||
var timeout = 10_000; // 10s
|
||||
while (timeout > 0)
|
||||
{
|
||||
if (!PendingMessageThread.IsAlive)
|
||||
break;
|
||||
|
||||
timeout -= 100;
|
||||
// 10s cooperative window; Thread.Abort is gone since .NET 5, so a
|
||||
// stuck worker has to ride out the next AppDomain unload.
|
||||
var deadline = TimeSpan.FromSeconds(10);
|
||||
var stopwatch = Stopwatch.StartNew();
|
||||
while (stopwatch.Elapsed < deadline && PendingMessageThread.IsAlive)
|
||||
await Task.Delay(100);
|
||||
Plugin.Log.Debug("Sleeping because PendingMessageThread thread still alive");
|
||||
}
|
||||
|
||||
// CancellationTokenSource owns an unmanaged WaitHandle; dispose after the
|
||||
// worker thread has drained, otherwise it leaks across plugin reloads.
|
||||
if (PendingMessageThread.IsAlive)
|
||||
Plugin.Log.Warning(
|
||||
"PendingMessageThread did not observe cancellation within 10s. " +
|
||||
"Worker remains on a background thread; next plugin reload releases it. " +
|
||||
"If this recurs, file a bug with /xllog after the previous reload.");
|
||||
|
||||
// CTS owns an unmanaged WaitHandle; dispose even if the worker is
|
||||
// alive — it checks IsCancellationRequested via the linked token.
|
||||
PendingThreadCancellationToken.Dispose();
|
||||
|
||||
Store.Dispose();
|
||||
|
||||
@@ -131,11 +131,12 @@ internal class MessageStore : IDisposable
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Pooling=false (set in Connect) avoids ClearAllPools, which is
|
||||
// provider-wide and would touch other plugins' SQLite connections.
|
||||
// GC.Collect was here as a defensive flush; removed because explicit
|
||||
// Close already releases everything we hold.
|
||||
Connection.Close();
|
||||
Connection.Dispose();
|
||||
// Closing the connection doesn't immediately release the file.
|
||||
GC.Collect();
|
||||
GC.WaitForPendingFinalizers();
|
||||
}
|
||||
|
||||
private SqliteConnection Connect()
|
||||
|
||||
@@ -2,6 +2,7 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Runtime.ExceptionServices;
|
||||
using HellionChat.Ipc;
|
||||
using HellionChat.Resources;
|
||||
using HellionChat.Ui;
|
||||
@@ -17,7 +18,7 @@ using Dalamud.Interface.ImGuiFileDialog;
|
||||
namespace HellionChat;
|
||||
|
||||
// ReSharper disable once ClassNeverInstantiated.Global
|
||||
public sealed class Plugin : IDalamudPlugin
|
||||
public sealed class Plugin : IAsyncDalamudPlugin
|
||||
{
|
||||
public const string PluginName = "Hellion Chat";
|
||||
|
||||
@@ -41,30 +42,41 @@ public sealed class Plugin : IDalamudPlugin
|
||||
[PluginService] public static IAddonLifecycle AddonLifecycle { get; private set; } = null!;
|
||||
[PluginService] public static IPlayerState PlayerState { get; private set; } = null!;
|
||||
[PluginService] public static ISeStringEvaluator Evaluator { get; private set; } = null!;
|
||||
[PluginService] public static ISelfTestRegistry SelfTestRegistry { get; private set; } = null!;
|
||||
|
||||
public static Configuration Config = null!;
|
||||
public static FileDialogManager FileDialogManager { get; private set; } = null!;
|
||||
|
||||
public readonly WindowSystem WindowSystem = new(PluginName);
|
||||
public SettingsWindow SettingsWindow { get; }
|
||||
public ChatLogWindow ChatLogWindow { get; }
|
||||
public DbViewer DbViewer { get; }
|
||||
public InputPreview InputPreview { get; }
|
||||
public CommandHelpWindow CommandHelpWindow { get; }
|
||||
public SeStringDebugger SeStringDebugger { get; }
|
||||
public FirstRunWizard FirstRunWizard { get; }
|
||||
public DebuggerWindow DebuggerWindow { get; }
|
||||
|
||||
internal Commands Commands { get; }
|
||||
internal GameFunctions.GameFunctions Functions { get; }
|
||||
internal MessageManager MessageManager { get; }
|
||||
internal AutoTellTabsService AutoTellTabsService { get; }
|
||||
internal IpcManager Ipc { get; }
|
||||
internal ExtraChat ExtraChat { get; }
|
||||
internal TypingIpc TypingIpc { get; }
|
||||
internal FontManager FontManager { get; }
|
||||
// v1.4.3: properties moved from { get; } to { get; private set; } = null!;
|
||||
// because LoadAsync now owns construction of the Phase-2 services.
|
||||
// Phase-1 services use the same shape for consistency, even though
|
||||
// they're still allocated in the ctor.
|
||||
public SettingsWindow SettingsWindow { get; private set; } = null!;
|
||||
public ChatLogWindow ChatLogWindow { get; private set; } = null!;
|
||||
public DbViewer DbViewer { get; private set; } = null!;
|
||||
public InputPreview InputPreview { get; private set; } = null!;
|
||||
public CommandHelpWindow CommandHelpWindow { get; private set; } = null!;
|
||||
public SeStringDebugger SeStringDebugger { get; private set; } = null!;
|
||||
public FirstRunWizard FirstRunWizard { get; private set; } = null!;
|
||||
public DebuggerWindow DebuggerWindow { get; private set; } = null!;
|
||||
|
||||
internal Commands Commands { get; private set; } = null!;
|
||||
internal GameFunctions.GameFunctions Functions { get; private set; } = null!;
|
||||
internal MessageManager MessageManager { get; private set; } = null!;
|
||||
internal AutoTellTabsService AutoTellTabsService { get; private set; } = null!;
|
||||
internal IpcManager Ipc { get; private set; } = null!;
|
||||
internal ExtraChat ExtraChat { get; private set; } = null!;
|
||||
internal TypingIpc TypingIpc { get; private set; } = null!;
|
||||
internal FontManager FontManager { 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!;
|
||||
|
||||
// (B3) Lightless idempotency guard — Dalamud may fire DisposeAsync twice
|
||||
// in a reload race; second call short-circuits.
|
||||
private int _disposeStarted;
|
||||
|
||||
internal int DeferredSaveFrames = -1;
|
||||
|
||||
@@ -96,311 +108,59 @@ public sealed class Plugin : IDalamudPlugin
|
||||
|
||||
public Plugin()
|
||||
{
|
||||
// Phase-1 ctor stays minimal: bootstrap-essentials only (conflict
|
||||
// gate, config load, language + ImGui init, WindowSystem skeleton).
|
||||
// Schema migrations and every service / window allocation moved to
|
||||
// LoadAsync so the sync ctor returns fast. On failure here nothing
|
||||
// is initialized yet, so just throw — there is nothing to clean up.
|
||||
|
||||
// Refuse to start if upstream Chat 2 is loaded — prevents IPC
|
||||
// channel collisions and double-replacement of the in-game chat
|
||||
// window. Throwing here makes Dalamud abort the load cleanly with
|
||||
// our localized message instead of crashing FFXIV mid-frame.
|
||||
ChatTwoConflictDetector.ThrowIfChatTwoIsLoaded(Interface);
|
||||
|
||||
GameStarted = Process.GetCurrentProcess().StartTime.ToUniversalTime();
|
||||
|
||||
// Hellion Chat: take over config + database from upstream ChatTwo
|
||||
// before Dalamud loads our plugin config. Idempotent: only acts on
|
||||
// the first start where the legacy paths exist and ours don't.
|
||||
MigrateFromChatTwoLayout();
|
||||
|
||||
Config = Interface.GetPluginConfig() as Configuration ?? new Configuration();
|
||||
|
||||
// Schema-gate: v1.4.3 only supports config schema v16. Older configs
|
||||
// went through their migrations in v1.2.1 (v15→v16) and earlier; users
|
||||
// who skipped past those releases need to install v1.4.2 first to run
|
||||
// the migration chain, then upgrade to v1.4.3.
|
||||
if (Config.Version < 16)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
$"HellionChat v1.4.3 requires config schema v16, got v{Config.Version}. " +
|
||||
"Please install v1.4.2 first to migrate the configuration, then upgrade to v1.4.3.");
|
||||
}
|
||||
|
||||
// Hellion Chat — Auto-Tell-Tabs Defense-in-Depth. SaveConfig
|
||||
// already strips temp tabs before persistence, but a previous
|
||||
// crash or external write could have left them in the JSON.
|
||||
// Drop them on load to guarantee the session-only invariant.
|
||||
Config.Tabs.RemoveAll(t => t.IsTempTab);
|
||||
|
||||
LanguageChanged(Interface.UiLanguage);
|
||||
ImGuiUtil.Initialize(this);
|
||||
|
||||
DeferredSaveFrames = -1;
|
||||
|
||||
// WindowSystem skeleton is initialised by the readonly field above —
|
||||
// no AddWindow yet; window construction lives in LoadAsync.
|
||||
}
|
||||
|
||||
public async Task LoadAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
try
|
||||
{
|
||||
GameStarted = Process.GetCurrentProcess().StartTime.ToUniversalTime();
|
||||
|
||||
// Hellion Chat: take over config + database from upstream ChatTwo
|
||||
// before Dalamud loads our plugin config. Idempotent: only acts on
|
||||
// the first start where the legacy paths exist and ours don't.
|
||||
MigrateFromChatTwoLayout();
|
||||
|
||||
Config = Interface.GetPluginConfig() as Configuration ?? new Configuration();
|
||||
|
||||
// Hellion Chat — Auto-Tell-Tabs Defense-in-Depth. SaveConfig
|
||||
// already strips temp tabs before persistence, but a previous
|
||||
// crash or external write could have left them in the JSON.
|
||||
// Drop them on load to guarantee the session-only invariant.
|
||||
Config.Tabs.RemoveAll(t => t.IsTempTab);
|
||||
|
||||
// Hellion Chat v9 → v10 — wipes the configuration so the new 8-tab
|
||||
// layout starts from defaults instead of mapping every previous setting
|
||||
// to its new position. Backup-Failure ist non-fatal, der Wipe läuft
|
||||
// trotzdem; dem User fehlt dann nur das manuelle Restore-Sicherheitsnetz.
|
||||
if (Config.Version < 10)
|
||||
{
|
||||
var pluginConfigsDir = Interface.ConfigDirectory.Parent?.FullName;
|
||||
if (pluginConfigsDir is not null)
|
||||
{
|
||||
var liveConfigPath = Path.Combine(pluginConfigsDir, $"{Interface.InternalName}.json");
|
||||
var backupPath = Path.Combine(pluginConfigsDir, $"{Interface.InternalName}.json.pre-v10-backup");
|
||||
|
||||
try
|
||||
{
|
||||
if (File.Exists(liveConfigPath))
|
||||
{
|
||||
File.Copy(liveConfigPath, backupPath, overwrite: true);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Warning(ex, "HellionChat: pre-v10 config backup failed");
|
||||
}
|
||||
}
|
||||
|
||||
Config = new Configuration
|
||||
{
|
||||
Version = 10,
|
||||
FirstRunCompleted = true,
|
||||
};
|
||||
SaveConfig();
|
||||
|
||||
Notification.AddNotification(new Dalamud.Interface.ImGuiNotification.Notification
|
||||
{
|
||||
Title = HellionStrings.SettingsRefactor_Migration_Title,
|
||||
Content = HellionStrings.SettingsRefactor_Migration_Content,
|
||||
Type = Dalamud.Interface.ImGuiNotification.NotificationType.Info,
|
||||
InitialDuration = TimeSpan.FromSeconds(25),
|
||||
});
|
||||
}
|
||||
|
||||
// Hellion Chat v10 → v11 — adds the global Configuration.PopOutInputEnabled
|
||||
// master switch and SeenPopOutInputHint flag for the v0.6.0 pop-out
|
||||
// input feature. Lightweight migration: defaults both fields,
|
||||
// no user-facing notification because the change is opt-in only.
|
||||
if (Config.Version < 11)
|
||||
{
|
||||
Config.PopOutInputEnabled = false;
|
||||
Config.SeenPopOutInputHint = false;
|
||||
Config.Version = 11;
|
||||
SaveConfig();
|
||||
Log.Information(
|
||||
"Migrated config v10 → v11: PopOutInputEnabled added (global, default off), " +
|
||||
"SeenPopOutInputHint added (default false)");
|
||||
}
|
||||
|
||||
// Hellion Chat v11 → v12 — flips Configuration.PopOutInputEnabled from
|
||||
// the v0.6.0 opt-in default (false) to opt-out (true) per v0.6.1 UX
|
||||
// polish. Hard-flip is a deliberate design call (see Spec section 5.7);
|
||||
// users are notified via the v0.6.1 hint banner (SeenPopOutHeaderHint
|
||||
// reset). Re-toggle after migration is preserved because this block
|
||||
// only fires for Version < 12.
|
||||
if (Config.Version < 12)
|
||||
{
|
||||
Config.PopOutInputEnabled = true;
|
||||
Config.SeenPopOutHeaderHint = false;
|
||||
Config.Version = 12;
|
||||
SaveConfig();
|
||||
Log.Information(
|
||||
"Migrated config v11 → v12: PopOutInputEnabled hard-flipped to true (v0.6.1 default), " +
|
||||
"SeenPopOutHeaderHint reset to false (v0.6.1 banner re-armed)");
|
||||
}
|
||||
|
||||
// Hellion Chat v12 → v13 — hard-resets the tab layout to the
|
||||
// sharpened v1.0.0 defaults (5 thematic tabs, see TabsUtil and
|
||||
// the default-fill block below). Existing tab state is wiped
|
||||
// because per-channel mapping from the old General preset to
|
||||
// the new General/System split would be ambiguous and would
|
||||
// produce subtly wrong results for users who tweaked the old
|
||||
// layout. A timestamped backup of the live config is written
|
||||
// alongside it as a manual restore safety net. The wipe scope
|
||||
// is intentionally narrow: only Config.Tabs is reset; Privacy,
|
||||
// Retention, Theme and every other knob keeps its current value.
|
||||
if (Config.Version < 13)
|
||||
{
|
||||
var pluginConfigsDir = Interface.ConfigDirectory.Parent?.FullName;
|
||||
if (pluginConfigsDir is not null)
|
||||
{
|
||||
var liveConfigPath = Path.Combine(pluginConfigsDir, $"{Interface.InternalName}.json");
|
||||
var backupPath = Path.Combine(pluginConfigsDir, $"{Interface.InternalName}.json.pre-v13-backup");
|
||||
|
||||
try
|
||||
{
|
||||
if (File.Exists(liveConfigPath))
|
||||
File.Copy(liveConfigPath, backupPath, overwrite: true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Warning(ex, "HellionChat: pre-v13 config backup failed");
|
||||
}
|
||||
}
|
||||
|
||||
Config.Tabs.Clear();
|
||||
Config.Version = 13;
|
||||
SaveConfig();
|
||||
|
||||
Log.Information(
|
||||
"Migrated config v12 → v13: tab layout hard-reset to v1.0.0 defaults; " +
|
||||
"pre-v13 config backup written next to the live file. " +
|
||||
"Default tabs will be populated by the Tabs.Count == 0 block.");
|
||||
|
||||
Notification.AddNotification(new Dalamud.Interface.ImGuiNotification.Notification
|
||||
{
|
||||
Title = HellionStrings.SettingsRefactor_Migration_Title,
|
||||
Content = HellionStrings.SettingsRefactor_Migration_Content,
|
||||
Type = Dalamud.Interface.ImGuiNotification.NotificationType.Info,
|
||||
InitialDuration = TimeSpan.FromSeconds(25),
|
||||
});
|
||||
}
|
||||
|
||||
// Hellion Chat v13 → v14 — theme-engine migration. Alle User landen
|
||||
// auf "hellion-arctic" als neues Default-Theme; die alte
|
||||
// HellionThemeEnabled-Flag wird deprecated und nur noch ein Release
|
||||
// als Safety-Net im JSON behalten. Window-Opacity wandert von
|
||||
// HellionThemeWindowOpacity in das neue WindowOpacity-Feld.
|
||||
if (Config.Version < 14)
|
||||
{
|
||||
Config.Theme = "hellion-arctic";
|
||||
// v1.2.0: alter Opacity-Wert wird nicht mehr migriert (Field entfernt).
|
||||
// User die direkt v13 → v15 springen bekommen den Default 0.85.
|
||||
Config.ReduceMotion = false;
|
||||
Config.UseCompactDensity = false;
|
||||
Config.Version = 14;
|
||||
SaveConfig();
|
||||
Log.Information(
|
||||
"Migrated config v13 → v14: theme engine introduced, all users land on hellion-arctic; " +
|
||||
"pick chat2-classic in Settings → Themes for the upstream look");
|
||||
}
|
||||
|
||||
if (Config.Version < 15)
|
||||
{
|
||||
// v1.2.0 — keine Datenmigration nötig. Removal der deprecated
|
||||
// Theme-Felder ist reine Schema-Bereinigung (System.Text.Json
|
||||
// ignoriert unbekannte Felder im JSON, daher kein Crash bei
|
||||
// Configs die noch HellionThemeEnabled/HellionThemeWindowOpacity
|
||||
// serialisiert haben — die Werte verfallen einfach).
|
||||
Config.Version = 15;
|
||||
SaveConfig();
|
||||
Log.Information(
|
||||
"Migrated config v14 → v15: legacy theme fields removed " +
|
||||
"(HellionThemeEnabled, HellionThemeWindowOpacity)");
|
||||
}
|
||||
|
||||
// Hellion Chat v15 → v16 — Settings Cleanup. Re-Sortierung der
|
||||
// Tabs auf der UI-Seite (datenneutral). 4 tote Felder verfallen
|
||||
// beim System.Text.Json-Deserialize (OverrideStyle, ChosenStyle,
|
||||
// WindowAlpha, ShowThemeQuickPicker — sind alle nicht mehr im
|
||||
// Configuration-Schema definiert). WindowAlpha wird zuvor auf
|
||||
// WindowOpacity gemappt damit User die ihn gesetzt hatten ihre
|
||||
// Transparenz-Einstellung behalten.
|
||||
if (Config.Version < 16)
|
||||
{
|
||||
var pluginConfigsDir = Interface.ConfigDirectory.Parent?.FullName;
|
||||
var liveConfigPath = pluginConfigsDir is not null
|
||||
? Path.Combine(pluginConfigsDir, $"{Interface.InternalName}.json")
|
||||
: null;
|
||||
|
||||
// Backup-Datei neben der live Config — Pattern aus v13 Branch.
|
||||
if (pluginConfigsDir is not null && liveConfigPath is not null)
|
||||
{
|
||||
var backupPath = Path.Combine(pluginConfigsDir, $"{Interface.InternalName}.json.pre-v16-backup");
|
||||
try
|
||||
{
|
||||
if (File.Exists(liveConfigPath))
|
||||
File.Copy(liveConfigPath, backupPath, overwrite: true);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Warning(ex, "HellionChat: pre-v16 config backup failed");
|
||||
}
|
||||
}
|
||||
|
||||
// Pre-v16 Felder einmalig roh aus dem JSON lesen, da sie nicht
|
||||
// mehr im Configuration-Schema sind (und damit aus Config nicht
|
||||
// mehr abrufbar). WindowAlpha → WindowOpacity Mapping nur wenn
|
||||
// User WindowOpacity noch nicht selbst angefasst hat (Default
|
||||
// 0.85), sonst gewinnt der User-Wert.
|
||||
float oldWindowAlpha = 100f;
|
||||
bool oldOverrideStyle = false;
|
||||
if (liveConfigPath is not null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (File.Exists(liveConfigPath))
|
||||
{
|
||||
var rawJson = File.ReadAllText(liveConfigPath);
|
||||
using var doc = System.Text.Json.JsonDocument.Parse(rawJson);
|
||||
if (doc.RootElement.TryGetProperty("WindowAlpha", out var alphaProp)
|
||||
&& alphaProp.ValueKind == System.Text.Json.JsonValueKind.Number)
|
||||
{
|
||||
oldWindowAlpha = alphaProp.GetSingle();
|
||||
}
|
||||
if (doc.RootElement.TryGetProperty("OverrideStyle", out var ovProp)
|
||||
&& ovProp.ValueKind is System.Text.Json.JsonValueKind.True)
|
||||
{
|
||||
oldOverrideStyle = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Warning(ex, "HellionChat: pre-v16 legacy-field lookup failed, defaults assumed");
|
||||
}
|
||||
}
|
||||
|
||||
if (oldWindowAlpha != 100f
|
||||
&& Math.Abs(Config.WindowOpacity - 0.85f) < 0.001f)
|
||||
{
|
||||
Config.WindowOpacity = Math.Clamp(oldWindowAlpha / 100f, 0.5f, 1.0f);
|
||||
Log.Information(
|
||||
$"Migrated WindowAlpha {oldWindowAlpha} to WindowOpacity {Config.WindowOpacity}");
|
||||
}
|
||||
else if (oldWindowAlpha != 100f)
|
||||
{
|
||||
Log.Information(
|
||||
$"Skipped WindowAlpha→WindowOpacity migration: WindowOpacity already user-set " +
|
||||
$"({Config.WindowOpacity}), legacy WindowAlpha value {oldWindowAlpha} dropped.");
|
||||
}
|
||||
|
||||
if (oldOverrideStyle)
|
||||
{
|
||||
Notification.AddNotification(new Dalamud.Interface.ImGuiNotification.Notification
|
||||
{
|
||||
Title = "Hellion Chat 1.2.1",
|
||||
Content = HellionStrings.Migration_v16_OverrideStyle_Toast,
|
||||
Type = Dalamud.Interface.ImGuiNotification.NotificationType.Info,
|
||||
InitialDuration = TimeSpan.FromSeconds(25),
|
||||
});
|
||||
}
|
||||
|
||||
// v1.2.1 Default-Bumps für UX-Verbesserungen. Pattern: nur
|
||||
// migrieren wenn der User noch auf dem alten Default ist.
|
||||
// Bei bool-Werten ist die Erkennung pragmatisch — wer den
|
||||
// alten Default aktiv ausgeschaltet hatte, erlebt das als
|
||||
// Regression und stellt es einmal in den Settings zurück.
|
||||
// Der Trade-Off ist akzeptabel weil die alten Defaults in
|
||||
// v1.2.0 erst neu eingeführt wurden und kaum jemand aktiv
|
||||
// umgeschaltet hat.
|
||||
if (!Config.UseCompactDensity)
|
||||
{
|
||||
Config.UseCompactDensity = true;
|
||||
Log.Information("v16 default-bump: UseCompactDensity false → true");
|
||||
}
|
||||
if (!Config.HideInNewGamePlusMenu)
|
||||
{
|
||||
Config.HideInNewGamePlusMenu = true;
|
||||
Log.Information("v16 default-bump: HideInNewGamePlusMenu false → true");
|
||||
}
|
||||
if (!Config.HideSameTimestamps)
|
||||
{
|
||||
Config.HideSameTimestamps = true;
|
||||
Log.Information("v16 default-bump: HideSameTimestamps false → true");
|
||||
}
|
||||
if (Config.MaxLinesToRender == 5000)
|
||||
{
|
||||
Config.MaxLinesToRender = 2500;
|
||||
Log.Information("v16 default-bump: MaxLinesToRender 5000 → 2500");
|
||||
}
|
||||
if (Config.ChatColours.Count == 0)
|
||||
{
|
||||
foreach (var (channel, colour) in Resources.ChatColourPresets.All["Hellion"].Colours)
|
||||
Config.ChatColours[channel] = colour;
|
||||
Log.Information("v16 default-bump: ChatColours empty → Hellion brand preset");
|
||||
}
|
||||
|
||||
Config.Version = 16;
|
||||
SaveConfig();
|
||||
Log.Information(
|
||||
"Migrated config v15 → v16: settings cleanup, " +
|
||||
"OverrideStyle/ChosenStyle/WindowAlpha/ShowThemeQuickPicker dropped from schema");
|
||||
}
|
||||
|
||||
// Hellion v1.0.0 default tab layout. Five thematically separated
|
||||
// tabs: General catches the immediate-surroundings public chat
|
||||
// (Say/Yell/Shout) only; System absorbs the rest of the technical
|
||||
@@ -418,42 +178,54 @@ public sealed class Plugin : IDalamudPlugin
|
||||
Config.Tabs.Add(TabsUtil.HellionLinkshell);
|
||||
}
|
||||
|
||||
LanguageChanged(Interface.UiLanguage);
|
||||
ImGuiUtil.Initialize(this);
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
FileDialogManager = new FileDialogManager();
|
||||
|
||||
Commands = new Commands();
|
||||
Functions = new GameFunctions.GameFunctions(this);
|
||||
Ipc = new IpcManager();
|
||||
TypingIpc = new TypingIpc(this);
|
||||
ExtraChat = new ExtraChat();
|
||||
// Sync allocation + handle registration. BuildFonts() registers
|
||||
// IFontHandles with Dalamud's UiBuilder.FontAtlas — registration
|
||||
// itself is non-blocking (handles stored, lambdas queued). Dalamud
|
||||
// rebuilds the atlas on its own pipeline a few frames later; first
|
||||
// frames render with the default font until the rebuild lands and
|
||||
// ImGui switches to Hellion-Exo2 / NotoSans (visible "font-pop").
|
||||
// Mirrors ChatTwo Plugin.cs:152.
|
||||
FontManager = new FontManager();
|
||||
FontManager.BuildFonts();
|
||||
|
||||
// v1.1.0 — Theme-Engine init. Custom-Themes liegen in
|
||||
// pluginConfigs/HellionChat/themes/, lazy geladen beim ersten Get.
|
||||
// Theme init stays sync on the LoadAsync continuation — cheap,
|
||||
// and Active is read every Draw frame, so the registry must be
|
||||
// wired before the first hook fires.
|
||||
var customThemesDir = Path.Combine(Interface.ConfigDirectory.FullName, "themes");
|
||||
Directory.CreateDirectory(customThemesDir);
|
||||
SeedExampleThemeIfEmpty(customThemesDir);
|
||||
ThemeRegistry = new Themes.ThemeRegistry(customThemesDir);
|
||||
ThemeRegistry.Switch(Config.Theme);
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
// Service allocations: order encodes dependencies. Commands is
|
||||
// alloc-only here; Initialise() runs after windows exist so the
|
||||
// slash-commands can toggle their visibility. HonorificService
|
||||
// registers IPC subscribers up-front so Ready/Disposing events
|
||||
// are caught from the very first frame.
|
||||
FileDialogManager = new FileDialogManager();
|
||||
Commands = new Commands();
|
||||
Functions = new GameFunctions.GameFunctions(this);
|
||||
Ipc = new IpcManager();
|
||||
TypingIpc = new TypingIpc(this);
|
||||
ExtraChat = new ExtraChat();
|
||||
HonorificService = new Integrations.HonorificService(Interface, Log, Framework);
|
||||
StatusBar = new Ui.StatusBar();
|
||||
MessageManager = new MessageManager(this);
|
||||
|
||||
MessageManager = new MessageManager(this); // Does it require UI?
|
||||
|
||||
// Hellion Chat — Auto-Tell-Tabs service. Subscribes to the
|
||||
// MessageManager's MessageProcessed event for live tells and
|
||||
// to ClientState.Logout for the cleanup pass. Created after
|
||||
// MessageManager so the constructor can hand off the live
|
||||
// store and event source.
|
||||
// Auto-Tell-Tabs subscribes to MessageManager.MessageProcessed for
|
||||
// live tells and to ClientState.Logout for cleanup; needs the live
|
||||
// store handed in at construction.
|
||||
AutoTellTabsService = new AutoTellTabsService(this, MessageManager, MessageManager.Store);
|
||||
AutoTellTabsService.Initialize();
|
||||
|
||||
// Hellion Chat — daily retention sweep, off-thread so it never
|
||||
// blocks plugin load. Skips itself when disabled or already ran
|
||||
// within the past 24 hours.
|
||||
RunRetentionSweepIfDue();
|
||||
// SelfTest steps poll Active per frame and need the registry wired.
|
||||
SelfTestRegistry.RegisterTestSteps([
|
||||
new SelfTests.ThemeSwitchSelfTestStep(this),
|
||||
]);
|
||||
|
||||
ChatLogWindow = new ChatLogWindow(this);
|
||||
SettingsWindow = new SettingsWindow(this);
|
||||
@@ -478,17 +250,38 @@ public sealed class Plugin : IDalamudPlugin
|
||||
if (!Config.FirstRunCompleted)
|
||||
FirstRunWizard.IsOpen = true;
|
||||
|
||||
FontManager.BuildFonts();
|
||||
|
||||
Interface.UiBuilder.DisableCutsceneUiHide = true;
|
||||
Interface.UiBuilder.DisableGposeUiHide = true;
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
// let all the other components register, then initialize commands
|
||||
Commands.Initialise();
|
||||
|
||||
// Daily retention sweep, fire-and-forget. Skips itself when
|
||||
// disabled or when it already ran within the past 24 hours.
|
||||
RunRetentionSweepIfDue();
|
||||
|
||||
if (Config.ShowEmotes)
|
||||
_ = EmoteCache.LoadData(); // Fire-and-forget, exceptions caught inside
|
||||
|
||||
if (Interface.Reason is not PluginLoadReason.Boot)
|
||||
MessageManager.FilterAllTabsAsync();
|
||||
|
||||
Interface.UiBuilder.DisableCutsceneUiHide = true;
|
||||
Interface.UiBuilder.DisableGposeUiHide = true;
|
||||
|
||||
#if !DEBUG
|
||||
// Fire-and-forget on a worker thread. The first auto-translate use of
|
||||
// a session may have a sub-second hitch if the cache hasn't filled yet,
|
||||
// but that's preferable to making every user wait ~300 ms during
|
||||
// plugin load for a cache they may never touch. ChatTwo (upstream)
|
||||
// does this sync; we trade load-time for first-use latency.
|
||||
_ = Task.Run(AutoTranslate.PreloadCache, cancellationToken);
|
||||
#endif
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
// (B1) Hooks last: every service and window must be live before
|
||||
// Dalamud fires our first Draw / FrameworkUpdate tick. Anything
|
||||
// earlier risks rendering against null FontManager / ThemeRegistry.
|
||||
Framework.Update += FrameworkUpdate;
|
||||
Interface.UiBuilder.Draw += Draw;
|
||||
Interface.LanguageChanged += LanguageChanged;
|
||||
@@ -497,58 +290,127 @@ public sealed class Plugin : IDalamudPlugin
|
||||
// most useful landing place; OpenConfigUi is already wired to
|
||||
// the same toggle inside SettingsWindow.
|
||||
Interface.UiBuilder.OpenMainUi += OpenMainUi;
|
||||
|
||||
if (Config.ShowEmotes)
|
||||
_ = EmoteCache.LoadData(); // Fire-and-forget intentional, exceptions are caught inside
|
||||
|
||||
#if !DEBUG
|
||||
// Avoid 300ms hitch when sending first message by preloading the
|
||||
// auto-translate cache. Don't do this in debug because it makes
|
||||
// profiling difficult.
|
||||
AutoTranslate.PreloadCache();
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch
|
||||
{
|
||||
Log.Error(ex, "Plugin load threw an error, turning off plugin");
|
||||
Dispose();
|
||||
|
||||
// Re-throw the exception to fail the plugin load.
|
||||
// Mirror the v1.4.0 load-failure recovery: hand off to DisposeAsync
|
||||
// so partially-built services are torn down. Swallow the cleanup
|
||||
// exception so the original load failure stays the visible cause.
|
||||
try { await DisposeAsync().ConfigureAwait(false); }
|
||||
catch { /* keep original failure */ }
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
// Suppressing this warning because Dispose() is called in Plugin() if the
|
||||
// load fails, so some values may not be initialized.
|
||||
// Suppressing this warning because DisposeAsync may run after a partial
|
||||
// LoadAsync, so some properties may not be initialized.
|
||||
[SuppressMessage("ReSharper", "ConditionalAccessQualifierIsNonNullableAccordingToAPIContract")]
|
||||
public void Dispose()
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
Interface.UiBuilder.OpenMainUi -= OpenMainUi;
|
||||
Interface.LanguageChanged -= LanguageChanged;
|
||||
Interface.UiBuilder.Draw -= Draw;
|
||||
Framework.Update -= FrameworkUpdate;
|
||||
GameFunctions.GameFunctions.SetChatInteractable(true);
|
||||
// (B3) Idempotency guard — Dalamud may reload-race us; second
|
||||
// call short-circuits so we don't double-dispose services.
|
||||
if (Interlocked.Exchange(ref _disposeStarted, 1) != 0)
|
||||
return;
|
||||
|
||||
WindowSystem?.RemoveAllWindows();
|
||||
ChatLogWindow?.Dispose();
|
||||
DbViewer?.Dispose();
|
||||
InputPreview?.Dispose();
|
||||
SettingsWindow?.Dispose();
|
||||
DebuggerWindow?.Dispose();
|
||||
SeStringDebugger?.Dispose();
|
||||
Exception? failure = null;
|
||||
|
||||
TypingIpc?.Dispose();
|
||||
ExtraChat?.Dispose();
|
||||
Ipc?.Dispose();
|
||||
// Dispose the Auto-Tell-Tabs service before MessageManager so it
|
||||
// can cleanly unsubscribe from the MessageProcessed event before
|
||||
// its source goes away.
|
||||
AutoTellTabsService?.Dispose();
|
||||
MessageManager?.DisposeAsync().AsTask().Wait();
|
||||
Functions?.Dispose();
|
||||
Commands?.Dispose();
|
||||
// Hooks unsubscribe FIRST so no Draw / FrameworkUpdate / LanguageChanged
|
||||
// tick can fire while we're tearing services down. Mirrors the
|
||||
// hooks-last subscribe order in LoadAsync.
|
||||
failure = CaptureFailure(failure, () => Interface.UiBuilder.OpenMainUi -= OpenMainUi);
|
||||
failure = CaptureFailure(failure, () => Interface.LanguageChanged -= LanguageChanged);
|
||||
failure = CaptureFailure(failure, () => Interface.UiBuilder.Draw -= Draw);
|
||||
failure = CaptureFailure(failure, () => Framework.Update -= FrameworkUpdate);
|
||||
|
||||
EmoteCache.Dispose();
|
||||
// v1.4.0 F5.3 — flush a pending DeferredSave before service teardown,
|
||||
// since FrameworkUpdate just got unsubscribed and won't fire it.
|
||||
failure = CaptureFailure(failure, () =>
|
||||
{
|
||||
if (DeferredSaveFrames >= 0)
|
||||
{
|
||||
SaveConfig();
|
||||
DeferredSaveFrames = -1;
|
||||
}
|
||||
});
|
||||
|
||||
// Auto-Tell-Tabs unsubscribes from MessageProcessed before MessageManager
|
||||
// goes away. Pure-memory cleanup, no framework-thread requirement.
|
||||
failure = CaptureFailure(failure, () => AutoTellTabsService?.Dispose());
|
||||
|
||||
// v1.4.0 F6.2 — MessageManager has its own async dispose path
|
||||
// (DB flush, pending-message thread shutdown). Run it before the
|
||||
// framework-block so the worker threads are quiesced first.
|
||||
if (MessageManager is not null)
|
||||
{
|
||||
failure = await CaptureFailureAsync(failure, () => MessageManager.DisposeAsync().AsTask())
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
// (B4) Game-Function / IPC / UI-Window cleanup MUST run on the
|
||||
// framework thread. WindowSystem mutations and IPC subscriber
|
||||
// disposes touch Dalamud state that's only safe from the framework.
|
||||
// Worker-thread DisposeAsync would race the next Draw tick.
|
||||
// Per-line CaptureFailure so a single throw can't strand the lines
|
||||
// behind it; mirrors Lightless DisposeFrameworkBoundServicesAsync.
|
||||
try
|
||||
{
|
||||
await Framework.RunOnFrameworkThread(() =>
|
||||
{
|
||||
// Game-Functions first — other services may still query
|
||||
// chat-interactable state during their Dispose.
|
||||
failure = CaptureFailure(failure, () => GameFunctions.GameFunctions.SetChatInteractable(true));
|
||||
|
||||
// IPC subscribers — dispose before windows so any final
|
||||
// event firing from the IPC source can't reach a half-torn
|
||||
// ChatLogWindow.
|
||||
failure = CaptureFailure(failure, () => HonorificService?.Dispose());
|
||||
failure = CaptureFailure(failure, () => TypingIpc?.Dispose());
|
||||
failure = CaptureFailure(failure, () => ExtraChat?.Dispose());
|
||||
failure = CaptureFailure(failure, () => Ipc?.Dispose());
|
||||
|
||||
// Windows — RemoveAllWindows first, then per-window Dispose.
|
||||
// Order matches the pre-v1.4.3 Dispose body byte-for-byte.
|
||||
// CommandHelpWindow and FirstRunWizard don't implement
|
||||
// IDisposable; their resources are reclaimed via WindowSystem.
|
||||
failure = CaptureFailure(failure, () => WindowSystem?.RemoveAllWindows());
|
||||
failure = CaptureFailure(failure, () => ChatLogWindow?.Dispose());
|
||||
failure = CaptureFailure(failure, () => DbViewer?.Dispose());
|
||||
failure = CaptureFailure(failure, () => InputPreview?.Dispose());
|
||||
failure = CaptureFailure(failure, () => SettingsWindow?.Dispose());
|
||||
failure = CaptureFailure(failure, () => DebuggerWindow?.Dispose());
|
||||
failure = CaptureFailure(failure, () => SeStringDebugger?.Dispose());
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
failure ??= ex;
|
||||
}
|
||||
|
||||
// Pure-memory cleanups — no Framework / UI / IPC touch, so they
|
||||
// run on whatever thread DisposeAsync resumes on.
|
||||
failure = CaptureFailure(failure, () => Functions?.Dispose());
|
||||
failure = CaptureFailure(failure, () => Commands?.Dispose());
|
||||
failure = CaptureFailure(failure, () => EmoteCache.Dispose());
|
||||
|
||||
if (failure is not null)
|
||||
ExceptionDispatchInfo.Capture(failure).Throw();
|
||||
}
|
||||
|
||||
// Lightless-pattern capture helpers: run cleanup, remember the FIRST
|
||||
// exception, keep going. Without these one mid-teardown failure would
|
||||
// skip every cleanup behind it and leave services half-torn.
|
||||
private static Exception? CaptureFailure(Exception? failure, Action action)
|
||||
{
|
||||
try { action(); }
|
||||
catch (Exception ex) { failure ??= ex; }
|
||||
return failure;
|
||||
}
|
||||
|
||||
private static async ValueTask<Exception?> CaptureFailureAsync(Exception? failure, Func<Task> action)
|
||||
{
|
||||
try { await action().ConfigureAwait(false); }
|
||||
catch (Exception ex) { failure ??= ex; }
|
||||
return failure;
|
||||
}
|
||||
|
||||
private static void MigrateFromChatTwoLayout()
|
||||
@@ -682,6 +544,11 @@ public sealed class Plugin : IDalamudPlugin
|
||||
policy[(int)(ushort)type] = days;
|
||||
var defaultDays = Config.RetentionDefaultDays;
|
||||
|
||||
// IsBackground = true for the same reason as PendingMessageThread:
|
||||
// a stuck sweep must never block plugin unload. RunRetentionSweepIfDue
|
||||
// guards the run-frequency, and the sweep itself uses the framework's
|
||||
// cooperative cancellation pattern. The background flag is the safety
|
||||
// net if the sweep ever takes longer than expected.
|
||||
new Thread(() =>
|
||||
{
|
||||
// Bail out cheaply if a manual sweep is already in flight; the
|
||||
|
||||
@@ -331,6 +331,8 @@ internal class HellionStrings
|
||||
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_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
|
||||
internal static string Settings_ThemeAndLayout_Theme_Heading => Get(nameof(Settings_ThemeAndLayout_Theme_Heading));
|
||||
@@ -356,4 +358,34 @@ internal class HellionStrings
|
||||
|
||||
// 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 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_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_NotInstalled => Get(nameof(Settings_Integrations_Honorific_Status_NotInstalled));
|
||||
internal static string Settings_Integrations_Honorific_Status_Incompatible => Get(nameof(Settings_Integrations_Honorific_Status_Incompatible));
|
||||
internal static string Settings_Integrations_Honorific_Toggle => Get(nameof(Settings_Integrations_Honorific_Toggle));
|
||||
internal static string Settings_Integrations_Honorific_ToggleHint => Get(nameof(Settings_Integrations_Honorific_ToggleHint));
|
||||
internal static string Settings_Integrations_Honorific_LinkRepo => Get(nameof(Settings_Integrations_Honorific_LinkRepo));
|
||||
internal static string Settings_Integrations_Honorific_LinkAuthor => Get(nameof(Settings_Integrations_Honorific_LinkAuthor));
|
||||
internal static string Settings_Integrations_ComingSoon_SectionHeader => Get(nameof(Settings_Integrations_ComingSoon_SectionHeader));
|
||||
internal static string Settings_Integrations_ComingSoon_Intro => Get(nameof(Settings_Integrations_ComingSoon_Intro));
|
||||
internal static string Settings_Integrations_ComingSoon_ContextMenu_Title => Get(nameof(Settings_Integrations_ComingSoon_ContextMenu_Title));
|
||||
internal static string Settings_Integrations_ComingSoon_ContextMenu_Description => Get(nameof(Settings_Integrations_ComingSoon_ContextMenu_Description));
|
||||
internal static string Settings_Integrations_ComingSoon_Notifications_Title => Get(nameof(Settings_Integrations_ComingSoon_Notifications_Title));
|
||||
internal static string Settings_Integrations_ComingSoon_Notifications_Description => Get(nameof(Settings_Integrations_ComingSoon_Notifications_Description));
|
||||
internal static string Settings_Integrations_ComingSoon_RPStatus_Title => Get(nameof(Settings_Integrations_ComingSoon_RPStatus_Title));
|
||||
internal static string Settings_Integrations_ComingSoon_RPStatus_Description => Get(nameof(Settings_Integrations_ComingSoon_RPStatus_Description));
|
||||
internal static string Settings_Integrations_ComingSoon_ExtraChat_Title => Get(nameof(Settings_Integrations_ComingSoon_ExtraChat_Title));
|
||||
internal static string Settings_Integrations_ComingSoon_ExtraChat_Description => Get(nameof(Settings_Integrations_ComingSoon_ExtraChat_Description));
|
||||
internal static string Settings_Integrations_ComingSoon_QuickDM_Title => Get(nameof(Settings_Integrations_ComingSoon_QuickDM_Title));
|
||||
internal static string Settings_Integrations_ComingSoon_QuickDM_Description => Get(nameof(Settings_Integrations_ComingSoon_QuickDM_Description));
|
||||
internal static string Settings_Integrations_GotAnIdea_SectionHeader => Get(nameof(Settings_Integrations_GotAnIdea_SectionHeader));
|
||||
internal static string Settings_Integrations_GotAnIdea_Body => Get(nameof(Settings_Integrations_GotAnIdea_Body));
|
||||
internal static string Settings_Integrations_GotAnIdea_LinkLabel => Get(nameof(Settings_Integrations_GotAnIdea_LinkLabel));
|
||||
|
||||
// Hellion Chat — v1.3.0 Honorific title slot tooltip
|
||||
internal static string ChatHeader_HonorificTitle_Tooltip => Get(nameof(ChatHeader_HonorificTitle_Tooltip));
|
||||
}
|
||||
|
||||
@@ -746,6 +746,12 @@
|
||||
<data name="Settings_Card_DataManagement_Subtext" xml:space="preserve">
|
||||
<value>Was passiert mit gespeicherten Daten — Aufbewahrung, Aufräumen, Export, DB-Stats.</value>
|
||||
</data>
|
||||
<data name="Settings_Card_Integrations_Title" xml:space="preserve">
|
||||
<value>Integrationen</value>
|
||||
</data>
|
||||
<data name="Settings_Card_Integrations_Subtext" xml:space="preserve">
|
||||
<value>Andere Dalamud-Plugins, mit denen HellionChat zusammenarbeitet. Auto-detected, mit Vorschau auf kommende Integrationen.</value>
|
||||
</data>
|
||||
<data name="Settings_ThemeAndLayout_Theme_Heading" xml:space="preserve">
|
||||
<value>Theme</value>
|
||||
</data>
|
||||
@@ -791,4 +797,82 @@
|
||||
<data name="Migration_v16_OverrideStyle_Toast" xml:space="preserve">
|
||||
<value>Hellion Chat 1.2.1 hat das Settings-Menü neu sortiert und die alte „Stilüberschreiben"-Option entfernt (überholt durch das Theme-System aus 1.1.0). Deine restlichen Einstellungen bleiben unverändert. Die Fenster-Transparenz ist nach „Theme & Layout" migriert. Ein Backup der vorherigen Config liegt unter pluginConfigs/HellionChat.json.pre-v16-backup neben der aktiven HellionChat.json.</value>
|
||||
</data>
|
||||
<data name="Settings_Tab_Integrations" xml:space="preserve">
|
||||
<value>Integrationen</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Intro" xml:space="preserve">
|
||||
<value>Plugin-Integrationen lassen HellionChat mit anderen installierten Dalamud-Plugins zusammenarbeiten. Jede Integration erkennt ihr Ziel automatisch und deaktiviert sich still, wenn das Ziel-Plugin fehlt.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_SectionHeader" xml:space="preserve">
|
||||
<value>Honorific</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Status_Detected" xml:space="preserve">
|
||||
<value>Erkannt (v{0}.{1})</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Status_NotInstalled" xml:space="preserve">
|
||||
<value>Nicht installiert</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Status_Incompatible" xml:space="preserve">
|
||||
<value>Inkompatible API-Version ({0} erwartet, {1}.{2} gefunden)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Toggle" xml:space="preserve">
|
||||
<value>Honorific-Titel im Chat-Header anzeigen</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_ToggleHint" xml:space="preserve">
|
||||
<value>Zeigt deinen Custom-Titel aus Honorific im Header über dem Chat-Log an, in der von dir gewählten Farbe.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_LinkRepo" xml:space="preserve">
|
||||
<value>Honorific auf GitHub</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_LinkAuthor" xml:space="preserve">
|
||||
<value>von Caraxi</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_SectionHeader" xml:space="preserve">
|
||||
<value>Demnächst</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_Intro" xml:space="preserve">
|
||||
<value>Diese Integrationen sind auf der Roadmap. Die Einstellungen erscheinen automatisch, sobald das jeweilige Plugin angebunden ist.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ContextMenu_Title" xml:space="preserve">
|
||||
<value>Kontextmenü-Aktionen</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ContextMenu_Description" xml:space="preserve">
|
||||
<value>Rechtsklick auf einen Namen im Chat: zu PlayerTrack springen, Lodestone-Profil öffnen oder mit einem Klick eine DM verfassen.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_Notifications_Title" xml:space="preserve">
|
||||
<value>Smart Notifications (NotificationMaster)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_Notifications_Description" xml:space="preserve">
|
||||
<value>Mentions und DMs über NotificationMaster: System-Toasts, Taskbar-Flash und Sounds pro Channel.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_RPStatus_Title" xml:space="preserve">
|
||||
<value>RP-Status-Block (Moodles · LightlessClient)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_RPStatus_Description" xml:space="preserve">
|
||||
<value>Moodles-Status-Icons und Pair-Badges direkt neben den Chat-Namen anzeigen, für mehr Roleplay-Kontext.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ExtraChat_Title" xml:space="preserve">
|
||||
<value>ExtraChat-Channels</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ExtraChat_Description" xml:space="preserve">
|
||||
<value>End-to-End-verschlüsselte Cross-Datacenter-Linkshells nativ in HellionChat hosten.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_QuickDM_Title" xml:space="preserve">
|
||||
<value>Quick-DM-Button (XIVInstantMessenger)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_QuickDM_Description" xml:space="preserve">
|
||||
<value>DM-Schnellzugriff direkt aus dem Chat-Fenster, ein Klick.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_GotAnIdea_SectionHeader" xml:space="preserve">
|
||||
<value>Idee?</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_GotAnIdea_Body" xml:space="preserve">
|
||||
<value>Idee für eine Plugin-Integration, die nicht auf der Liste steht? Komm auf den Hellion-Forge-Discord und schreib mir. Community-Input bestimmt die Roadmap.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_GotAnIdea_LinkLabel" xml:space="preserve">
|
||||
<value>Hellion Forge öffnen</value>
|
||||
</data>
|
||||
<data name="ChatHeader_HonorificTitle_Tooltip" xml:space="preserve">
|
||||
<value>Custom-Titel von Honorific</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -746,6 +746,12 @@
|
||||
<data name="Settings_Card_DataManagement_Subtext" xml:space="preserve">
|
||||
<value>What happens to stored data — retention, cleanup, export, DB stats.</value>
|
||||
</data>
|
||||
<data name="Settings_Card_Integrations_Title" xml:space="preserve">
|
||||
<value>Integrations</value>
|
||||
</data>
|
||||
<data name="Settings_Card_Integrations_Subtext" xml:space="preserve">
|
||||
<value>Other Dalamud plugins HellionChat reacts to. Auto-detected, with a "coming soon" preview of upcoming integrations.</value>
|
||||
</data>
|
||||
<data name="Settings_ThemeAndLayout_Theme_Heading" xml:space="preserve">
|
||||
<value>Theme</value>
|
||||
</data>
|
||||
@@ -791,4 +797,82 @@
|
||||
<data name="Migration_v16_OverrideStyle_Toast" xml:space="preserve">
|
||||
<value>Hellion Chat 1.2.1 reorganised the Settings menu and removed the legacy "Style override" option (made obsolete by the Themes system in 1.1.0). Your other settings are unchanged. Window opacity was migrated to Theme & Layout. A backup of your previous config is at pluginConfigs/HellionChat.json.pre-v16-backup next to the live HellionChat.json.</value>
|
||||
</data>
|
||||
<data name="Settings_Tab_Integrations" xml:space="preserve">
|
||||
<value>Integrations</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Intro" xml:space="preserve">
|
||||
<value>Plugin integrations let HellionChat react to other installed Dalamud plugins. Each integration auto-detects its target and silently disables itself when the target plugin is not present.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_SectionHeader" xml:space="preserve">
|
||||
<value>Honorific</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Status_Detected" xml:space="preserve">
|
||||
<value>Detected (v{0}.{1})</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Status_NotInstalled" xml:space="preserve">
|
||||
<value>Not installed</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Status_Incompatible" xml:space="preserve">
|
||||
<value>Incompatible API version ({0} expected, {1}.{2} detected)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_Toggle" xml:space="preserve">
|
||||
<value>Show Honorific title in chat header</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_ToggleHint" xml:space="preserve">
|
||||
<value>Displays your custom title from Honorific in the header above the chat log, in your chosen colour.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_LinkRepo" xml:space="preserve">
|
||||
<value>Honorific on GitHub</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_Honorific_LinkAuthor" xml:space="preserve">
|
||||
<value>by Caraxi</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_SectionHeader" xml:space="preserve">
|
||||
<value>Coming soon</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_Intro" xml:space="preserve">
|
||||
<value>These integrations are on the roadmap. The settings for each appear automatically once the underlying plugin is wired up.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ContextMenu_Title" xml:space="preserve">
|
||||
<value>Context menu actions</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ContextMenu_Description" xml:space="preserve">
|
||||
<value>Right-click a name in chat to jump to PlayerTrack, open the Lodestone profile, or compose a DM in one click.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_Notifications_Title" xml:space="preserve">
|
||||
<value>Smart notifications (NotificationMaster)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_Notifications_Description" xml:space="preserve">
|
||||
<value>Route mentions and DMs through NotificationMaster for system toasts, taskbar flash, and per-channel sounds.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_RPStatus_Title" xml:space="preserve">
|
||||
<value>RP status block (Moodles · LightlessClient)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_RPStatus_Description" xml:space="preserve">
|
||||
<value>Show Moodles status icons and pair-badges inline next to chat names for richer roleplay context.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ExtraChat_Title" xml:space="preserve">
|
||||
<value>ExtraChat channels</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_ExtraChat_Description" xml:space="preserve">
|
||||
<value>Host end-to-end-encrypted cross-datacenter linkshells natively in HellionChat.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_QuickDM_Title" xml:space="preserve">
|
||||
<value>Quick DM button (XIVInstantMessenger)</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_ComingSoon_QuickDM_Description" xml:space="preserve">
|
||||
<value>One-click DM compose without leaving the chat window.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_GotAnIdea_SectionHeader" xml:space="preserve">
|
||||
<value>Got an idea?</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_GotAnIdea_Body" xml:space="preserve">
|
||||
<value>Got an idea for a plugin integration that's not on this list? Hop on the Hellion Forge Discord and tell me. Community input drives the roadmap.</value>
|
||||
</data>
|
||||
<data name="Settings_Integrations_GotAnIdea_LinkLabel" xml:space="preserve">
|
||||
<value>Open Hellion Forge</value>
|
||||
</data>
|
||||
<data name="ChatHeader_HonorificTitle_Tooltip" xml:space="preserve">
|
||||
<value>Honorific custom title</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Plugin.SelfTest;
|
||||
using HellionChat.Themes;
|
||||
|
||||
namespace HellionChat.SelfTests;
|
||||
|
||||
// Validates the runtime theme-switch contract from the user side. The
|
||||
// caller toggles the active theme via Settings -> Theme & Layout, the
|
||||
// step polls ThemeRegistry.Active per frame and only passes once the
|
||||
// slug has moved away from the initial value and back. The ABGR cache
|
||||
// is sanity-checked on every frame: a freshly switched theme must carry
|
||||
// a populated cache, otherwise Switch() forgot the recompute and the UI
|
||||
// would still draw, just with all-transparent slots.
|
||||
internal sealed class ThemeSwitchSelfTestStep : ISelfTestStep
|
||||
{
|
||||
private readonly Plugin plugin;
|
||||
private string? initialSlug;
|
||||
private bool switchedAway;
|
||||
|
||||
public ThemeSwitchSelfTestStep(Plugin plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public string Name => "Hellion Chat - Theme switch";
|
||||
|
||||
public SelfTestStepResult RunStep()
|
||||
{
|
||||
var registry = this.plugin.ThemeRegistry;
|
||||
if (registry is null)
|
||||
return SelfTestStepResult.Fail;
|
||||
|
||||
var active = registry.Active;
|
||||
if (active is null)
|
||||
return SelfTestStepResult.Fail;
|
||||
|
||||
if (!HasPopulatedCache(active))
|
||||
return SelfTestStepResult.Fail;
|
||||
|
||||
if (this.initialSlug is null)
|
||||
{
|
||||
this.initialSlug = active.Slug;
|
||||
ImGui.Text($"Initial theme: \"{this.initialSlug}\". Open Settings -> Theme & Layout and pick a different theme.");
|
||||
return SelfTestStepResult.Waiting;
|
||||
}
|
||||
|
||||
if (!this.switchedAway)
|
||||
{
|
||||
if (!string.Equals(active.Slug, this.initialSlug, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
this.switchedAway = true;
|
||||
return SelfTestStepResult.Waiting;
|
||||
}
|
||||
|
||||
ImGui.Text($"Switch the active theme away from \"{this.initialSlug}\".");
|
||||
return SelfTestStepResult.Waiting;
|
||||
}
|
||||
|
||||
if (!string.Equals(active.Slug, this.initialSlug, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
ImGui.Text($"Switch back to \"{this.initialSlug}\" to finish the test.");
|
||||
return SelfTestStepResult.Waiting;
|
||||
}
|
||||
|
||||
return SelfTestStepResult.Pass;
|
||||
}
|
||||
|
||||
public void CleanUp()
|
||||
{
|
||||
this.initialSlug = null;
|
||||
this.switchedAway = false;
|
||||
}
|
||||
|
||||
// Any non-zero slot proves the cache was actually recomputed for the
|
||||
// current theme. We don't compare against a reference, because custom
|
||||
// themes can legitimately share slot values with a built-in.
|
||||
private static bool HasPopulatedCache(Theme theme)
|
||||
{
|
||||
var cache = theme.AbgrCache;
|
||||
return (cache.Primary
|
||||
| cache.WindowBg
|
||||
| cache.TextPrimary
|
||||
| cache.Border) != 0u;
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ internal static class EventHorizon
|
||||
public static Theme Build() => new(
|
||||
Slug: Slug,
|
||||
Name: "Event Horizon",
|
||||
Author: "Hellion Online Media",
|
||||
Author: "Hellion Forge",
|
||||
Description: "Cosmic Purple auf Near-Black. Deep-Space-Stimmung.",
|
||||
Colors: new ThemeColors(
|
||||
PrimaryDark: ColourUtil.HexToRgba("#7B3FCF"),
|
||||
|
||||
@@ -9,7 +9,7 @@ internal static class ForgeMerchantman
|
||||
public static Theme Build() => new(
|
||||
Slug: Slug,
|
||||
Name: "Forge Merchantman",
|
||||
Author: "Hellion Online Media",
|
||||
Author: "Carla Beleandis",
|
||||
Description: "Patina Bronze auf Workshop-Slate — Hellion Forge im Plugin.",
|
||||
Colors: new ThemeColors(
|
||||
PrimaryDark: ColourUtil.HexToRgba("#1F8A82"),
|
||||
|
||||
@@ -9,7 +9,7 @@ internal static class HellionArctic
|
||||
public static Theme Build() => new(
|
||||
Slug: Slug,
|
||||
Name: "Hellion Arctic",
|
||||
Author: "Hellion Online Media",
|
||||
Author: "Hellion Forge",
|
||||
Description: "Arctic Cyan + Ember Glow on industrial slate. Plugin default.",
|
||||
Colors: new ThemeColors(
|
||||
PrimaryDark: ColourUtil.HexToRgba("#0097A7"),
|
||||
|
||||
@@ -15,7 +15,7 @@ internal static class HellionSpectrum
|
||||
public static Theme Build() => new(
|
||||
Slug: Slug,
|
||||
Name: "Hellion Spectrum",
|
||||
Author: "Hellion Online Media",
|
||||
Author: "Hellion Forge",
|
||||
Description: "Deuteran/Protan-safe channels — Wong palette tones, channel identity preserved.",
|
||||
Colors: new ThemeColors(
|
||||
PrimaryDark: ColourUtil.HexToRgba("#005983"),
|
||||
|
||||
@@ -9,7 +9,7 @@ internal static class MintGrove
|
||||
public static Theme Build() => new(
|
||||
Slug: Slug,
|
||||
Name: "Mint Grove",
|
||||
Author: "Hellion Online Media",
|
||||
Author: "Carla Beleandis",
|
||||
Description: "Mint Green + Honey Amber auf Deep Forest. Naturthemen-tauglich.",
|
||||
Colors: new ThemeColors(
|
||||
PrimaryDark: ColourUtil.HexToRgba("#3CB371"),
|
||||
|
||||
@@ -9,7 +9,7 @@ internal static class MoonlitBloom
|
||||
public static Theme Build() => new(
|
||||
Slug: Slug,
|
||||
Name: "Moonlit Bloom",
|
||||
Author: "Hellion Online Media",
|
||||
Author: "Hellion Forge",
|
||||
Description: "Bloom Magenta + Soft Sage auf Deep Violet Night.",
|
||||
Colors: new ThemeColors(
|
||||
PrimaryDark: ColourUtil.HexToRgba("#C957D0"),
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
using HellionChat.Util;
|
||||
|
||||
namespace HellionChat.Themes.Builtin;
|
||||
|
||||
internal static class SynthwaveSunset
|
||||
{
|
||||
public const string Slug = "synthwave-sunset";
|
||||
|
||||
public static Theme Build() => new(
|
||||
Slug: Slug,
|
||||
Name: "Synthwave Sunset",
|
||||
Author: "Hellion Forge",
|
||||
Description: "Hot Magenta + Cyan on midnight violet. 80s neon-grid vibes for late-night raids.",
|
||||
Colors: new ThemeColors(
|
||||
PrimaryDark: ColourUtil.HexToRgba("#C71585"),
|
||||
Primary: ColourUtil.HexToRgba("#FF2D95"),
|
||||
PrimaryLight: ColourUtil.HexToRgba("#FF6BB6"),
|
||||
PrimaryGlow: ColourUtil.HexToRgba("#FF2D9599"),
|
||||
|
||||
AccentDark: ColourUtil.HexToRgba("#0098B8"),
|
||||
Accent: ColourUtil.HexToRgba("#00F0FF"),
|
||||
AccentLight: ColourUtil.HexToRgba("#5CFFFE"),
|
||||
|
||||
Identity: ColourUtil.HexToRgba("#FF2D95"),
|
||||
|
||||
WindowBg: ColourUtil.HexToRgba("#13041F"),
|
||||
ChildBg: ColourUtil.HexToRgba("#1E0A35"),
|
||||
FrameBg: ColourUtil.HexToRgba("#2A1247"),
|
||||
Surface: ColourUtil.HexToRgba("#3A1860"),
|
||||
SurfaceHover: ColourUtil.HexToRgba("#4A2475"),
|
||||
Border: ColourUtil.HexToRgba("#FF2D9566"),
|
||||
|
||||
TextPrimary: ColourUtil.HexToRgba("#F0DFFF"),
|
||||
TextMuted: ColourUtil.HexToRgba("#A88BC4"),
|
||||
TextDim: ColourUtil.HexToRgba("#6F4D8E"),
|
||||
|
||||
StatusSuccess: ColourUtil.HexToRgba("#39FF14"),
|
||||
StatusDanger: ColourUtil.HexToRgba("#FF3838"),
|
||||
StatusWarning: ColourUtil.HexToRgba("#FFD700"),
|
||||
StatusInfo: ColourUtil.HexToRgba("#00F0FF")
|
||||
),
|
||||
Layout: new ThemeLayout(
|
||||
WindowRounding: 5f, ChildRounding: 4f, PopupRounding: 4f,
|
||||
FrameRounding: 3f, GrabRounding: 3f, TabRounding: 3f,
|
||||
ScrollbarRounding: 3f, WindowBorderSize: 1f, FrameBorderSize: 1f
|
||||
),
|
||||
Typography: new ThemeTypography(),
|
||||
IsBuiltIn: true,
|
||||
ChatColors: new ThemeChatColors(new Dictionary<HellionChat.Code.ChatType, uint>
|
||||
{
|
||||
// Synthwave Sunset — Magenta dominiert die warmen Channels (Yell/Shout/FC),
|
||||
// Cyan dominiert die kühlen (Tell/Party). Neon-Akzente für Status-nahe Channels.
|
||||
[HellionChat.Code.ChatType.Say] = ColourUtil.HexToRgba("#F0DFFF"),
|
||||
[HellionChat.Code.ChatType.Yell] = ColourUtil.HexToRgba("#FF2D95"),
|
||||
[HellionChat.Code.ChatType.Shout] = ColourUtil.HexToRgba("#FF6BB6"),
|
||||
[HellionChat.Code.ChatType.TellIncoming] = ColourUtil.HexToRgba("#00F0FF"),
|
||||
[HellionChat.Code.ChatType.TellOutgoing] = ColourUtil.HexToRgba("#5CFFFE"),
|
||||
[HellionChat.Code.ChatType.Party] = ColourUtil.HexToRgba("#5CFFFE"),
|
||||
[HellionChat.Code.ChatType.Alliance] = ColourUtil.HexToRgba("#FF8C00"),
|
||||
[HellionChat.Code.ChatType.FreeCompany] = ColourUtil.HexToRgba("#FF2D95"),
|
||||
[HellionChat.Code.ChatType.NoviceNetwork] = ColourUtil.HexToRgba("#39FF14"),
|
||||
[HellionChat.Code.ChatType.CrossParty] = ColourUtil.HexToRgba("#5CFFFE"),
|
||||
[HellionChat.Code.ChatType.Linkshell1] = ColourUtil.HexToRgba("#39FF14"),
|
||||
[HellionChat.Code.ChatType.Linkshell2] = ColourUtil.HexToRgba("#FF8C00"),
|
||||
[HellionChat.Code.ChatType.Linkshell3] = ColourUtil.HexToRgba("#FFD700"),
|
||||
[HellionChat.Code.ChatType.Linkshell4] = ColourUtil.HexToRgba("#00F0FF"),
|
||||
[HellionChat.Code.ChatType.Linkshell5] = ColourUtil.HexToRgba("#FF6BB6"),
|
||||
[HellionChat.Code.ChatType.Linkshell6] = ColourUtil.HexToRgba("#FF2D95"),
|
||||
[HellionChat.Code.ChatType.Linkshell7] = ColourUtil.HexToRgba("#A88BC4"),
|
||||
[HellionChat.Code.ChatType.Linkshell8] = ColourUtil.HexToRgba("#5CFFFE"),
|
||||
[HellionChat.Code.ChatType.CustomEmote] = ColourUtil.HexToRgba("#FF6BB6"),
|
||||
[HellionChat.Code.ChatType.StandardEmote] = ColourUtil.HexToRgba("#A88BC4"),
|
||||
[HellionChat.Code.ChatType.Echo] = ColourUtil.HexToRgba("#A88BC4"),
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
using HellionChat.Util;
|
||||
|
||||
namespace HellionChat.Themes;
|
||||
|
||||
public sealed record Theme(
|
||||
@@ -10,4 +12,47 @@ public sealed record Theme(
|
||||
ThemeTypography Typography,
|
||||
bool IsBuiltIn,
|
||||
ThemeChatColors? ChatColors = null
|
||||
)
|
||||
{
|
||||
// Pre-computed ABGR mirror of ThemeColors so PushGlobal can skip the
|
||||
// RgbaToAbgr conversion per slot per frame.
|
||||
public ThemeAbgrCache AbgrCache { get; private set; }
|
||||
|
||||
public void RecomputeAbgrCache()
|
||||
{
|
||||
AbgrCache = new ThemeAbgrCache(
|
||||
PrimaryDark: ColourUtil.RgbaToAbgr(Colors.PrimaryDark),
|
||||
Primary: ColourUtil.RgbaToAbgr(Colors.Primary),
|
||||
PrimaryLight: ColourUtil.RgbaToAbgr(Colors.PrimaryLight),
|
||||
PrimaryGlow: ColourUtil.RgbaToAbgr(Colors.PrimaryGlow),
|
||||
AccentDark: ColourUtil.RgbaToAbgr(Colors.AccentDark),
|
||||
Accent: ColourUtil.RgbaToAbgr(Colors.Accent),
|
||||
AccentLight: ColourUtil.RgbaToAbgr(Colors.AccentLight),
|
||||
Identity: ColourUtil.RgbaToAbgr(Colors.Identity),
|
||||
WindowBg: ColourUtil.RgbaToAbgr(Colors.WindowBg),
|
||||
ChildBg: ColourUtil.RgbaToAbgr(Colors.ChildBg),
|
||||
FrameBg: ColourUtil.RgbaToAbgr(Colors.FrameBg),
|
||||
Surface: ColourUtil.RgbaToAbgr(Colors.Surface),
|
||||
SurfaceHover: ColourUtil.RgbaToAbgr(Colors.SurfaceHover),
|
||||
Border: ColourUtil.RgbaToAbgr(Colors.Border),
|
||||
TextPrimary: ColourUtil.RgbaToAbgr(Colors.TextPrimary),
|
||||
TextMuted: ColourUtil.RgbaToAbgr(Colors.TextMuted),
|
||||
TextDim: ColourUtil.RgbaToAbgr(Colors.TextDim),
|
||||
StatusSuccess: ColourUtil.RgbaToAbgr(Colors.StatusSuccess),
|
||||
StatusDanger: ColourUtil.RgbaToAbgr(Colors.StatusDanger),
|
||||
StatusWarning: ColourUtil.RgbaToAbgr(Colors.StatusWarning),
|
||||
StatusInfo: ColourUtil.RgbaToAbgr(Colors.StatusInfo));
|
||||
}
|
||||
}
|
||||
|
||||
// Mirrors ThemeColors slot-for-slot. The FillsAll21Slots test pins the
|
||||
// contract — a new slot without its mirror fails the build.
|
||||
public readonly record struct ThemeAbgrCache(
|
||||
uint PrimaryDark, uint Primary, uint PrimaryLight, uint PrimaryGlow,
|
||||
uint AccentDark, uint Accent, uint AccentLight,
|
||||
uint Identity,
|
||||
uint WindowBg, uint ChildBg, uint FrameBg,
|
||||
uint Surface, uint SurfaceHover, uint Border,
|
||||
uint TextPrimary, uint TextMuted, uint TextDim,
|
||||
uint StatusSuccess, uint StatusDanger, uint StatusWarning, uint StatusInfo
|
||||
);
|
||||
|
||||
@@ -63,7 +63,11 @@ internal static class ThemeJsonLoader
|
||||
|
||||
public static Theme LoadFromFile(string path)
|
||||
{
|
||||
var json = File.ReadAllText(path);
|
||||
// FileShare.Read lets concurrent readers and well-behaved editors share
|
||||
// the handle; atomic-replace editors still raise IOException, caught upstream.
|
||||
using var stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||
using var reader = new StreamReader(stream);
|
||||
var json = reader.ReadToEnd();
|
||||
return LoadFromString(json);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,13 @@ public sealed class ThemeRegistry
|
||||
{ IndigoViolet.Slug, IndigoViolet.Build() },
|
||||
{ ForgeMerchantman.Slug, ForgeMerchantman.Build() },
|
||||
{ MintGrove.Slug, MintGrove.Build() },
|
||||
{ SynthwaveSunset.Slug, SynthwaveSunset.Build() },
|
||||
};
|
||||
|
||||
// Centralised so the ten .Build() factories stay free of cache plumbing.
|
||||
foreach (var theme in _builtIns.Values)
|
||||
theme.RecomputeAbgrCache();
|
||||
|
||||
_active = _builtIns[DefaultSlug];
|
||||
_customThemesDir = customThemesDir;
|
||||
}
|
||||
@@ -45,7 +51,24 @@ public sealed class ThemeRegistry
|
||||
|
||||
public IEnumerable<Theme> AllCustom() => RefreshCustomCache();
|
||||
|
||||
public void Switch(string slug) => _active = Get(slug);
|
||||
public void Switch(string slug)
|
||||
{
|
||||
var theme = Get(slug);
|
||||
// Defensive — idempotent and cheap, so any future theme source
|
||||
// that forgets the cache fill still ends up with a populated one.
|
||||
theme.RecomputeAbgrCache();
|
||||
_active = theme;
|
||||
}
|
||||
|
||||
// 0x80070020 = SHARING_VIOLATION, 0x80070021 = LOCK_VIOLATION. Other
|
||||
// IO failures are permanent and get the theme dropped instead of retried.
|
||||
internal static bool IsRecoverableFileLock(Exception? ex)
|
||||
{
|
||||
if (ex is not IOException io)
|
||||
return false;
|
||||
var code = (uint)io.HResult;
|
||||
return code == 0x80070020u || code == 0x80070021u;
|
||||
}
|
||||
|
||||
// Custom-Themes werden lazy aus dem Verzeichnis geladen, Cache mit
|
||||
// LastWriteTime-Token. Eine geänderte JSON wird beim nächsten Lookup
|
||||
@@ -81,14 +104,19 @@ public sealed class ThemeRegistry
|
||||
try
|
||||
{
|
||||
theme = ThemeJsonLoader.LoadFromFile(path);
|
||||
theme.RecomputeAbgrCache();
|
||||
_customCache[key] = (theme, stamp);
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception ex) when (IsRecoverableFileLock(ex))
|
||||
{
|
||||
// Editor mid-save: keep the cached snapshot, leave the stamp
|
||||
// alone so the next refresh retries automatically.
|
||||
Plugin.Log.Debug($"Custom theme {Path.GetFileName(path)} is locked, keeping last known good");
|
||||
if (cached.Theme is not null)
|
||||
theme = cached.Theme;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Logging passiert in Plugin.cs durch den Aufrufer; hier still
|
||||
// ignorieren, damit ein einzelnes kaputtes JSON nicht alle
|
||||
// Custom-Themes blockt.
|
||||
_ = ex;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using HellionChat._Helpers;
|
||||
using HellionChat.Code;
|
||||
using HellionChat.Util;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
@@ -89,60 +90,42 @@ public sealed class ChatInputBar
|
||||
}
|
||||
}
|
||||
|
||||
private void SubmitCompact(Tab tab)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_state.Buffer))
|
||||
return;
|
||||
// TEST-MIRROR: ../_Helpers/CompactInputSubmitter.cs
|
||||
private void SubmitCompact(Tab tab) =>
|
||||
CompactInputSubmitter.TrySubmit(_state, tab, _host.SendChatBoxFromExternal);
|
||||
|
||||
var text = _state.Buffer;
|
||||
_state.Buffer = string.Empty;
|
||||
_state.HistoryCursor = -1;
|
||||
_host.SendChatBoxFromExternal(tab, text);
|
||||
}
|
||||
|
||||
// History-navigation callback for the compact input. Mirrors the main
|
||||
// window's logic but operates on _state.HistoryCursor and the shared
|
||||
// InputHistoryService. Index semantics match v0.5.x InputBacklog:
|
||||
// 0 = oldest, Count-1 = newest.
|
||||
// History-navigation callback for the compact input. Cursor math is
|
||||
// delegated to CompactInputHistoryNavigator; only the ImGui buffer
|
||||
// splice stays here because it needs the live callback data.
|
||||
// TEST-MIRROR: ../_Helpers/CompactInputHistoryNavigator.cs
|
||||
private int CompactCallback(scoped ref ImGuiInputTextCallbackData data)
|
||||
{
|
||||
if (data.EventFlag != ImGuiInputTextFlags.CallbackHistory)
|
||||
return 0;
|
||||
|
||||
var prev = _state.HistoryCursor;
|
||||
switch (data.EventKey)
|
||||
var direction = data.EventKey switch
|
||||
{
|
||||
case ImGuiKey.UpArrow:
|
||||
switch (_state.HistoryCursor)
|
||||
{
|
||||
case -1:
|
||||
var offset = 0;
|
||||
if (!string.IsNullOrWhiteSpace(_state.Buffer))
|
||||
{
|
||||
InputHistoryService.Push(_state.Buffer);
|
||||
offset = 1;
|
||||
}
|
||||
_state.HistoryCursor = InputHistoryService.Count - 1 - offset;
|
||||
break;
|
||||
case > 0:
|
||||
_state.HistoryCursor--;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ImGuiKey.DownArrow:
|
||||
if (_state.HistoryCursor != -1)
|
||||
if (++_state.HistoryCursor >= InputHistoryService.Count)
|
||||
_state.HistoryCursor = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (prev == _state.HistoryCursor)
|
||||
ImGuiKey.UpArrow => CompactInputHistoryNavigator.Direction.Up,
|
||||
ImGuiKey.DownArrow => CompactInputHistoryNavigator.Direction.Down,
|
||||
_ => (CompactInputHistoryNavigator.Direction?)null,
|
||||
};
|
||||
if (direction is null)
|
||||
return 0;
|
||||
|
||||
var historyStr = InputHistoryService.GetByCursor(_state.HistoryCursor) ?? string.Empty;
|
||||
data.DeleteChars(0, data.BufTextLen);
|
||||
data.InsertChars(0, historyStr);
|
||||
var (cursor, replacement) = CompactInputHistoryNavigator.Navigate(
|
||||
direction.Value,
|
||||
_state.HistoryCursor,
|
||||
_state.Buffer,
|
||||
() => InputHistoryService.Count,
|
||||
InputHistoryService.Push,
|
||||
InputHistoryService.GetByCursor);
|
||||
|
||||
_state.HistoryCursor = cursor;
|
||||
if (replacement is null)
|
||||
return 0;
|
||||
|
||||
data.DeleteChars(0, data.BufTextLen);
|
||||
data.InsertChars(0, replacement);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Text;
|
||||
using HellionChat.Code;
|
||||
using HellionChat.GameFunctions;
|
||||
using HellionChat.GameFunctions.Types;
|
||||
using HellionChat.Integrations;
|
||||
using HellionChat.Resources;
|
||||
using HellionChat.Util;
|
||||
using Dalamud.Game.Addon.Lifecycle;
|
||||
@@ -1202,6 +1203,15 @@ public sealed class ChatLogWindow : Window
|
||||
|
||||
var maxLines = Plugin.Config.MaxLinesToRender;
|
||||
var startLine = messages.Count > maxLines ? messages.Count - maxLines : 0;
|
||||
|
||||
// Card-mode pre-loop hoist: theme/drawList/winLeft/winRight/border
|
||||
// are invariant per DrawMessages call; only cursorY moves per row.
|
||||
var theme = Plugin.ThemeRegistry.Active;
|
||||
var drawList = ImGui.GetWindowDrawList();
|
||||
var winLeft = ImGui.GetWindowPos().X;
|
||||
var winRight = winLeft + ImGui.GetWindowSize().X;
|
||||
var borderColorAbgr = ColourUtil.RgbaToAbgr((theme.Colors.Border & 0xFFFFFF00u) | 0x33u);
|
||||
|
||||
for (var i = startLine; i < messages.Count; i++)
|
||||
{
|
||||
var message = messages[i];
|
||||
@@ -1343,7 +1353,6 @@ public sealed class ChatLogWindow : Window
|
||||
{
|
||||
if (message.Sender.Count > 0)
|
||||
{
|
||||
var theme = Plugin.ThemeRegistry.Active;
|
||||
var senderColor = Plugin.Functions.Chat.GetChannelColor(message.Code.Type)
|
||||
?? theme.Colors.TextPrimary;
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(senderColor)))
|
||||
@@ -1362,15 +1371,11 @@ public sealed class ChatLogWindow : Window
|
||||
// Subtile Border-Bottom als Card-Trenner. Border-Farbe mit
|
||||
// reduzierter Alpha (RGBA → 0x33) für dezente Trennung.
|
||||
{
|
||||
var theme = Plugin.ThemeRegistry.Active;
|
||||
var rowEndY = ImGui.GetCursorScreenPos().Y;
|
||||
var winLeft = ImGui.GetWindowPos().X;
|
||||
var winRight = winLeft + ImGui.GetWindowSize().X;
|
||||
var borderRgba = (theme.Colors.Border & 0xFFFFFF00u) | 0x33u;
|
||||
ImGui.GetWindowDrawList().AddLine(
|
||||
drawList.AddLine(
|
||||
new Vector2(winLeft + 4, rowEndY - 1),
|
||||
new Vector2(winRight - 4, rowEndY - 1),
|
||||
ColourUtil.RgbaToAbgr(borderRgba),
|
||||
borderColorAbgr,
|
||||
1f);
|
||||
ImGui.Dummy(new Vector2(0, 2));
|
||||
}
|
||||
@@ -1566,7 +1571,7 @@ public sealed class ChatLogWindow : Window
|
||||
{
|
||||
// v1.2.0 — Hash-Color-Tint differenziert parallele Auto-Tell-Tabs
|
||||
// visuell ohne dass User pro Tab manuell ein Custom-Icon setzen muss.
|
||||
iconColor = AutoTellTabTint.For(tab.TellTarget.Name, tab.TellTarget.World);
|
||||
iconColor = TabTintCache.GetTint(tab);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1681,7 +1686,17 @@ public sealed class ChatLogWindow : Window
|
||||
// log so users discover the feature without having to right-click the tab.
|
||||
// Renders only for the active tab in the main ChatLogWindow; pop-out
|
||||
// windows have their own render path and skip this toolbar.
|
||||
//
|
||||
// Hellion Chat v1.3.0 also renders the optional Honorific title slot
|
||||
// left of the pop-out button, when HonorificService reports an active
|
||||
// custom title and the user has ShowHonorificTitleInHeader enabled.
|
||||
private void DrawChatHeaderToolbar(Tab tab)
|
||||
{
|
||||
DrawHonorificTitleSlot();
|
||||
DrawPopOutButton(tab);
|
||||
}
|
||||
|
||||
private void DrawPopOutButton(Tab tab)
|
||||
{
|
||||
var avail = ImGui.GetContentRegionAvail().X;
|
||||
var iconWidth = ImGui.GetFrameHeight();
|
||||
@@ -1694,6 +1709,81 @@ public sealed class ChatLogWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
// Renders the Honorific custom title to the left of the pop-out button,
|
||||
// wrapped in guillemets to match how the game itself displays titles.
|
||||
// We lay out the title first, then DrawPopOutButton uses
|
||||
// GetContentRegionAvail to anchor itself flush right, which is why the
|
||||
// call order in DrawChatHeaderToolbar matters: title first, button second.
|
||||
//
|
||||
// The slot stays on the same line as the pop-out button so the chat
|
||||
// log doesn't lose vertical space; we use ImGui.SameLine after our
|
||||
// text so the cursor X is still on the toolbar row when the pop-out
|
||||
// button takes over.
|
||||
private void DrawHonorificTitleSlot()
|
||||
{
|
||||
var service = Plugin.HonorificService;
|
||||
var title = service.CurrentTitle;
|
||||
if (!HonorificService.ShouldRenderSlot(
|
||||
Plugin.Config.ShowHonorificTitleInHeader,
|
||||
service.IsAvailable,
|
||||
title))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Reserve space for the crown icon plus a small gap before the title,
|
||||
// then the title itself, then the gap-to-pop-out-button. We measure the
|
||||
// crown width inside the FontAwesome font push because FontAwesome
|
||||
// glyphs render in a different font than the regular ImGui text.
|
||||
const float gapAfterCrown = 4f;
|
||||
const float gapBeforeButton = 8f;
|
||||
var avail = ImGui.GetContentRegionAvail().X;
|
||||
var iconWidth = ImGui.GetFrameHeight();
|
||||
|
||||
float crownWidth;
|
||||
using (Plugin.FontManager.FontAwesome.Push())
|
||||
{
|
||||
crownWidth = ImGui.CalcTextSize(FontAwesomeIcon.Crown.ToIconString()).X;
|
||||
}
|
||||
|
||||
var maxTitleWidth = avail - iconWidth - gapBeforeButton - crownWidth - gapAfterCrown;
|
||||
if (maxTitleWidth <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var rendered = "«" + title!.Title + "»";
|
||||
rendered = StringUtil.TruncateToFitWidth(rendered, maxTitleWidth);
|
||||
|
||||
var titleColor = title.Color is { } c
|
||||
? new Vector4(c.X, c.Y, c.Z, 1f)
|
||||
: ImGui.GetStyle().Colors[(int)ImGuiCol.Text];
|
||||
|
||||
var theme = Plugin.ThemeRegistry.Active;
|
||||
|
||||
// Group so the tooltip's IsItemHovered check fires for hover anywhere
|
||||
// on the crown-plus-title pair, not just one of the two.
|
||||
ImGui.BeginGroup();
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(theme.Colors.TextMuted)))
|
||||
using (Plugin.FontManager.FontAwesome.Push())
|
||||
{
|
||||
ImGui.TextUnformatted(FontAwesomeIcon.Crown.ToIconString());
|
||||
}
|
||||
ImGui.SameLine(0f, gapAfterCrown);
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, titleColor))
|
||||
{
|
||||
ImGui.TextUnformatted(rendered);
|
||||
}
|
||||
ImGui.EndGroup();
|
||||
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip(HellionStrings.ChatHeader_HonorificTitle_Tooltip);
|
||||
}
|
||||
|
||||
ImGui.SameLine();
|
||||
}
|
||||
|
||||
// Hellion Chat v0.6.1 — One-Time-Hint-Banner introducing the chat header
|
||||
// pop-out toolbar button and the right-click pathway. Reuses the visual
|
||||
// pattern from Popout.cs DrawHintBannerIfNeeded so users see a familiar
|
||||
|
||||
@@ -19,21 +19,21 @@ internal static class HellionStyle
|
||||
/// </summary>
|
||||
internal static IDisposable Push(Theme theme)
|
||||
{
|
||||
var c = theme.Colors;
|
||||
var a = theme.AbgrCache;
|
||||
var stack = new StackHandle();
|
||||
stack.PushColor(ImGuiCol.Button, c.Primary);
|
||||
stack.PushColor(ImGuiCol.ButtonHovered, c.PrimaryLight);
|
||||
stack.PushColor(ImGuiCol.ButtonActive, c.PrimaryDark);
|
||||
stack.PushColor(ImGuiCol.FrameBg, c.FrameBg);
|
||||
stack.PushColor(ImGuiCol.FrameBgHovered, c.SurfaceHover);
|
||||
stack.PushColor(ImGuiCol.FrameBgActive, c.Surface);
|
||||
stack.PushColor(ImGuiCol.Border, c.Border);
|
||||
stack.PushColor(ImGuiCol.Header, c.Surface);
|
||||
stack.PushColor(ImGuiCol.HeaderHovered, c.SurfaceHover);
|
||||
stack.PushColor(ImGuiCol.HeaderActive, c.Identity);
|
||||
stack.PushColor(ImGuiCol.CheckMark, c.Primary);
|
||||
stack.PushColor(ImGuiCol.SliderGrab, c.Primary);
|
||||
stack.PushColor(ImGuiCol.SliderGrabActive, c.PrimaryLight);
|
||||
stack.PushColorAbgr(ImGuiCol.Button, a.Primary);
|
||||
stack.PushColorAbgr(ImGuiCol.ButtonHovered, a.PrimaryLight);
|
||||
stack.PushColorAbgr(ImGuiCol.ButtonActive, a.PrimaryDark);
|
||||
stack.PushColorAbgr(ImGuiCol.FrameBg, a.FrameBg);
|
||||
stack.PushColorAbgr(ImGuiCol.FrameBgHovered, a.SurfaceHover);
|
||||
stack.PushColorAbgr(ImGuiCol.FrameBgActive, a.Surface);
|
||||
stack.PushColorAbgr(ImGuiCol.Border, a.Border);
|
||||
stack.PushColorAbgr(ImGuiCol.Header, a.Surface);
|
||||
stack.PushColorAbgr(ImGuiCol.HeaderHovered, a.SurfaceHover);
|
||||
stack.PushColorAbgr(ImGuiCol.HeaderActive, a.Identity);
|
||||
stack.PushColorAbgr(ImGuiCol.CheckMark, a.Primary);
|
||||
stack.PushColorAbgr(ImGuiCol.SliderGrab, a.Primary);
|
||||
stack.PushColorAbgr(ImGuiCol.SliderGrabActive, a.PrimaryLight);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ internal static class HellionStyle
|
||||
{
|
||||
var c = theme.Colors;
|
||||
var l = theme.Layout;
|
||||
var a = theme.AbgrCache;
|
||||
var stack = new StackHandle();
|
||||
|
||||
var alphaByte = (uint)Math.Clamp((int)(windowOpacity * 255f), 0x55, 0xFF);
|
||||
@@ -76,60 +77,61 @@ internal static class HellionStyle
|
||||
stack.PushStyleVar(ImGuiStyleVar.WindowBorderSize, l.WindowBorderSize);
|
||||
stack.PushStyleVar(ImGuiStyleVar.FrameBorderSize, l.FrameBorderSize);
|
||||
|
||||
// Surfaces
|
||||
stack.PushColor(ImGuiCol.WindowBg, windowBgWithAlpha);
|
||||
stack.PushColor(ImGuiCol.ChildBg, childBgWithAlpha);
|
||||
stack.PushColor(ImGuiCol.PopupBg, c.ChildBg);
|
||||
stack.PushColor(ImGuiCol.Border, c.Border);
|
||||
stack.PushColor(ImGuiCol.BorderShadow, 0u);
|
||||
// Surfaces — WindowBg/ChildBg use the per-push opacity-modulated value,
|
||||
// so they go through the RGBA path; everything else reads from cache.
|
||||
stack.PushColor(ImGuiCol.WindowBg, windowBgWithAlpha);
|
||||
stack.PushColor(ImGuiCol.ChildBg, childBgWithAlpha);
|
||||
stack.PushColorAbgr(ImGuiCol.PopupBg, a.ChildBg);
|
||||
stack.PushColorAbgr(ImGuiCol.Border, a.Border);
|
||||
stack.PushColorAbgr(ImGuiCol.BorderShadow, 0u);
|
||||
|
||||
// Frames
|
||||
stack.PushColor(ImGuiCol.FrameBg, c.FrameBg);
|
||||
stack.PushColor(ImGuiCol.FrameBgHovered, c.SurfaceHover);
|
||||
stack.PushColor(ImGuiCol.FrameBgActive, c.Surface);
|
||||
stack.PushColorAbgr(ImGuiCol.FrameBg, a.FrameBg);
|
||||
stack.PushColorAbgr(ImGuiCol.FrameBgHovered, a.SurfaceHover);
|
||||
stack.PushColorAbgr(ImGuiCol.FrameBgActive, a.Surface);
|
||||
|
||||
// Title bars
|
||||
stack.PushColor(ImGuiCol.TitleBg, c.WindowBg);
|
||||
stack.PushColor(ImGuiCol.TitleBgActive, c.Identity);
|
||||
stack.PushColor(ImGuiCol.TitleBgCollapsed, c.WindowBg);
|
||||
stack.PushColorAbgr(ImGuiCol.TitleBg, a.WindowBg);
|
||||
stack.PushColorAbgr(ImGuiCol.TitleBgActive, a.Identity);
|
||||
stack.PushColorAbgr(ImGuiCol.TitleBgCollapsed, a.WindowBg);
|
||||
|
||||
// Buttons
|
||||
stack.PushColor(ImGuiCol.Button, c.Primary);
|
||||
stack.PushColor(ImGuiCol.ButtonHovered, c.PrimaryLight);
|
||||
stack.PushColor(ImGuiCol.ButtonActive, c.PrimaryDark);
|
||||
stack.PushColorAbgr(ImGuiCol.Button, a.Primary);
|
||||
stack.PushColorAbgr(ImGuiCol.ButtonHovered, a.PrimaryLight);
|
||||
stack.PushColorAbgr(ImGuiCol.ButtonActive, a.PrimaryDark);
|
||||
|
||||
// Headers / selectables
|
||||
stack.PushColor(ImGuiCol.Header, c.Surface);
|
||||
stack.PushColor(ImGuiCol.HeaderHovered, c.SurfaceHover);
|
||||
stack.PushColor(ImGuiCol.HeaderActive, c.Identity);
|
||||
stack.PushColorAbgr(ImGuiCol.Header, a.Surface);
|
||||
stack.PushColorAbgr(ImGuiCol.HeaderHovered, a.SurfaceHover);
|
||||
stack.PushColorAbgr(ImGuiCol.HeaderActive, a.Identity);
|
||||
|
||||
// Tabs
|
||||
stack.PushColor(ImGuiCol.Tab, c.FrameBg);
|
||||
stack.PushColor(ImGuiCol.TabHovered, c.PrimaryLight);
|
||||
stack.PushColor(ImGuiCol.TabActive, c.Identity);
|
||||
stack.PushColor(ImGuiCol.TabUnfocused, c.ChildBg);
|
||||
stack.PushColor(ImGuiCol.TabUnfocusedActive, c.PrimaryDark);
|
||||
stack.PushColorAbgr(ImGuiCol.Tab, a.FrameBg);
|
||||
stack.PushColorAbgr(ImGuiCol.TabHovered, a.PrimaryLight);
|
||||
stack.PushColorAbgr(ImGuiCol.TabActive, a.Identity);
|
||||
stack.PushColorAbgr(ImGuiCol.TabUnfocused, a.ChildBg);
|
||||
stack.PushColorAbgr(ImGuiCol.TabUnfocusedActive, a.PrimaryDark);
|
||||
|
||||
// Scrollbar
|
||||
stack.PushColor(ImGuiCol.ScrollbarBg, c.WindowBg);
|
||||
stack.PushColor(ImGuiCol.ScrollbarGrab, c.Surface);
|
||||
stack.PushColor(ImGuiCol.ScrollbarGrabHovered, c.AccentLight);
|
||||
stack.PushColor(ImGuiCol.ScrollbarGrabActive, c.Accent);
|
||||
stack.PushColorAbgr(ImGuiCol.ScrollbarBg, a.WindowBg);
|
||||
stack.PushColorAbgr(ImGuiCol.ScrollbarGrab, a.Surface);
|
||||
stack.PushColorAbgr(ImGuiCol.ScrollbarGrabHovered, a.AccentLight);
|
||||
stack.PushColorAbgr(ImGuiCol.ScrollbarGrabActive, a.Accent);
|
||||
|
||||
// Resize grip
|
||||
stack.PushColor(ImGuiCol.ResizeGrip, c.FrameBg);
|
||||
stack.PushColor(ImGuiCol.ResizeGripHovered, c.AccentLight);
|
||||
stack.PushColor(ImGuiCol.ResizeGripActive, c.Accent);
|
||||
stack.PushColorAbgr(ImGuiCol.ResizeGrip, a.FrameBg);
|
||||
stack.PushColorAbgr(ImGuiCol.ResizeGripHovered, a.AccentLight);
|
||||
stack.PushColorAbgr(ImGuiCol.ResizeGripActive, a.Accent);
|
||||
|
||||
// Check mark + slider grab
|
||||
stack.PushColor(ImGuiCol.CheckMark, c.Primary);
|
||||
stack.PushColor(ImGuiCol.SliderGrab, c.Primary);
|
||||
stack.PushColor(ImGuiCol.SliderGrabActive, c.PrimaryLight);
|
||||
stack.PushColorAbgr(ImGuiCol.CheckMark, a.Primary);
|
||||
stack.PushColorAbgr(ImGuiCol.SliderGrab, a.Primary);
|
||||
stack.PushColorAbgr(ImGuiCol.SliderGrabActive, a.PrimaryLight);
|
||||
|
||||
// Separator
|
||||
stack.PushColor(ImGuiCol.Separator, c.Border);
|
||||
stack.PushColor(ImGuiCol.SeparatorHovered, c.PrimaryLight);
|
||||
stack.PushColor(ImGuiCol.SeparatorActive, c.Primary);
|
||||
stack.PushColorAbgr(ImGuiCol.Separator, a.Border);
|
||||
stack.PushColorAbgr(ImGuiCol.SeparatorHovered, a.PrimaryLight);
|
||||
stack.PushColorAbgr(ImGuiCol.SeparatorActive, a.Primary);
|
||||
|
||||
return stack;
|
||||
}
|
||||
@@ -141,6 +143,9 @@ internal static class HellionStyle
|
||||
internal void PushColor(ImGuiCol slot, uint rgba)
|
||||
=> _items.Add(ImRaii.PushColor(slot, ColourUtil.RgbaToAbgr(rgba)));
|
||||
|
||||
internal void PushColorAbgr(ImGuiCol slot, uint abgr)
|
||||
=> _items.Add(ImRaii.PushColor(slot, abgr));
|
||||
|
||||
internal void PushStyleVar(ImGuiStyleVar var, float value)
|
||||
=> _items.Add(ImRaii.PushStyle(var, value));
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ public sealed class SettingsWindow : Dalamud.Interface.Windowing.Window
|
||||
new SettingsTabs.Tabs(Plugin, Mutable),
|
||||
new SettingsTabs.Privacy(Plugin, Mutable),
|
||||
new DataManagement(Plugin, Mutable),
|
||||
new SettingsTabs.Integrations(Plugin, Mutable),
|
||||
new Information(Mutable),
|
||||
];
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ internal sealed class SettingsOverview
|
||||
(FontAwesomeIcon.FolderTree, "Settings_Card_Tabs_Title", "Settings_Card_Tabs_Subtext"),
|
||||
(FontAwesomeIcon.ShieldAlt, "Settings_Card_Privacy_Title", "Settings_Card_Privacy_Subtext"),
|
||||
(FontAwesomeIcon.Database, "Settings_Card_DataManagement_Title", "Settings_Card_DataManagement_Subtext"),
|
||||
(FontAwesomeIcon.Plug, "Settings_Card_Integrations_Title", "Settings_Card_Integrations_Subtext"),
|
||||
(FontAwesomeIcon.InfoCircle, "Settings_Card_Information_Title", "Settings_Card_Information_Subtext"),
|
||||
];
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ internal sealed class Information : ISettingsTab
|
||||
ImGui.TextUnformatted(Language.Options_About_Github_Issues);
|
||||
ImGui.SameLine();
|
||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.ExternalLinkAlt, "githubIssues"))
|
||||
Dalamud.Utility.Util.OpenLink("https://github.com/JonKazama-Hellion/HellionChat/issues");
|
||||
Dalamud.Utility.Util.OpenLink("https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
using Dalamud.Bindings.ImGui;
|
||||
using Dalamud.Interface;
|
||||
using Dalamud.Interface.Utility.Raii;
|
||||
using HellionChat.Branding;
|
||||
using HellionChat.Integrations;
|
||||
using HellionChat.Resources;
|
||||
using HellionChat.Util;
|
||||
|
||||
namespace HellionChat.Ui.SettingsTabs;
|
||||
|
||||
// First settings tab introduced in v1.3.0 (Plugin Integrations Cycle 1).
|
||||
// Designed to grow organically: each future cycle adds a new section above
|
||||
// the "Coming soon" block and removes the corresponding stub item.
|
||||
internal sealed class Integrations : ISettingsTab
|
||||
{
|
||||
private Plugin Plugin { get; }
|
||||
private Configuration Mutable { get; }
|
||||
|
||||
public string Name => HellionStrings.Settings_Tab_Integrations + "###tabs-integrations";
|
||||
|
||||
internal Integrations(Plugin plugin, Configuration mutable)
|
||||
{
|
||||
Plugin = plugin;
|
||||
Mutable = mutable;
|
||||
}
|
||||
|
||||
public void Draw(bool changed)
|
||||
{
|
||||
ImGui.TextWrapped(HellionStrings.Settings_Integrations_Intro);
|
||||
ImGui.Spacing();
|
||||
ImGui.Spacing();
|
||||
|
||||
DrawHonorificSection();
|
||||
ImGui.Spacing();
|
||||
ImGui.Spacing();
|
||||
|
||||
DrawComingSoonSection();
|
||||
ImGui.Spacing();
|
||||
ImGui.Spacing();
|
||||
|
||||
DrawGotAnIdeaSection();
|
||||
}
|
||||
|
||||
private void DrawHonorificSection()
|
||||
{
|
||||
DrawSectionHeader(HellionStrings.Settings_Integrations_Honorific_SectionHeader);
|
||||
|
||||
DrawHonorificStatus();
|
||||
ImGui.Spacing();
|
||||
|
||||
// The toggle is enabled regardless of detection state — leaving it
|
||||
// on means "render when available, hide otherwise". Disabling the
|
||||
// toggle when Honorific is missing would force the user to retoggle
|
||||
// it every time Honorific is reloaded, which is worse UX than the
|
||||
// silent auto-hide.
|
||||
if (ImGui.Checkbox(
|
||||
HellionStrings.Settings_Integrations_Honorific_Toggle,
|
||||
ref Mutable.ShowHonorificTitleInHeader))
|
||||
{
|
||||
Plugin.SaveConfig();
|
||||
}
|
||||
|
||||
using (ImRaii.PushIndent())
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(Plugin.ThemeRegistry.Active.Colors.TextMuted)))
|
||||
{
|
||||
ImGui.TextWrapped(HellionStrings.Settings_Integrations_Honorific_ToggleHint);
|
||||
}
|
||||
}
|
||||
|
||||
// Maintainer attribution. Honorific has no LICENSE in its repo so we
|
||||
// can't bundle its assets, but linking to the upstream and the
|
||||
// author's profile is the polite minimum. Plain ImGui buttons keep
|
||||
// the visual weight modest, the FontAwesome Brands subset is not
|
||||
// guaranteed in Dalamud's font set so we use text labels.
|
||||
ImGui.Spacing();
|
||||
if (ImGui.Button(HellionStrings.Settings_Integrations_Honorific_LinkRepo))
|
||||
{
|
||||
Dalamud.Utility.Util.OpenLink(IntegrationLinks.HonorificRepo);
|
||||
}
|
||||
ImGui.SameLine();
|
||||
if (ImGui.Button(HellionStrings.Settings_Integrations_Honorific_LinkAuthor))
|
||||
{
|
||||
Dalamud.Utility.Util.OpenLink(IntegrationLinks.HonorificAuthor);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawHonorificStatus()
|
||||
{
|
||||
var theme = Plugin.ThemeRegistry.Active;
|
||||
var service = Plugin.HonorificService;
|
||||
|
||||
if (service.IsAvailable && service.DetectedApiVersion is { } version)
|
||||
{
|
||||
DrawStatusGlyph('●', theme.Colors.StatusSuccess);
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(string.Format(
|
||||
HellionStrings.Settings_Integrations_Honorific_Status_Detected,
|
||||
version.Major, version.Minor));
|
||||
}
|
||||
else if (service.DetectedApiVersion is { } incompatibleVersion)
|
||||
{
|
||||
DrawStatusGlyph('⚠', theme.Colors.StatusWarning);
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(string.Format(
|
||||
HellionStrings.Settings_Integrations_Honorific_Status_Incompatible,
|
||||
HonorificService.ExpectedApiMajor, incompatibleVersion.Major, incompatibleVersion.Minor));
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawStatusGlyph('○', theme.Colors.TextMuted);
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(HellionStrings.Settings_Integrations_Honorific_Status_NotInstalled);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DrawStatusGlyph(char glyph, uint rgba)
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(rgba)))
|
||||
{
|
||||
ImGui.TextUnformatted(glyph.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawComingSoonSection()
|
||||
{
|
||||
DrawSectionHeader(HellionStrings.Settings_Integrations_ComingSoon_SectionHeader);
|
||||
ImGui.TextWrapped(HellionStrings.Settings_Integrations_ComingSoon_Intro);
|
||||
ImGui.Spacing();
|
||||
|
||||
// Static list maintained in code (not Configuration). Each cycle
|
||||
// that lands a real integration removes its stub here and adds a
|
||||
// full section above the Coming Soon block.
|
||||
DrawComingSoonItem(
|
||||
HellionStrings.Settings_Integrations_ComingSoon_ContextMenu_Title,
|
||||
HellionStrings.Settings_Integrations_ComingSoon_ContextMenu_Description);
|
||||
DrawComingSoonItem(
|
||||
HellionStrings.Settings_Integrations_ComingSoon_Notifications_Title,
|
||||
HellionStrings.Settings_Integrations_ComingSoon_Notifications_Description);
|
||||
DrawComingSoonItem(
|
||||
HellionStrings.Settings_Integrations_ComingSoon_RPStatus_Title,
|
||||
HellionStrings.Settings_Integrations_ComingSoon_RPStatus_Description);
|
||||
DrawComingSoonItem(
|
||||
HellionStrings.Settings_Integrations_ComingSoon_ExtraChat_Title,
|
||||
HellionStrings.Settings_Integrations_ComingSoon_ExtraChat_Description);
|
||||
DrawComingSoonItem(
|
||||
HellionStrings.Settings_Integrations_ComingSoon_QuickDM_Title,
|
||||
HellionStrings.Settings_Integrations_ComingSoon_QuickDM_Description);
|
||||
}
|
||||
|
||||
private void DrawComingSoonItem(string title, string description)
|
||||
{
|
||||
var theme = Plugin.ThemeRegistry.Active;
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(theme.Colors.TextMuted)))
|
||||
using (Plugin.FontManager.FontAwesome.Push())
|
||||
{
|
||||
ImGui.TextUnformatted(FontAwesomeIcon.Hourglass.ToIconString());
|
||||
}
|
||||
ImGui.SameLine();
|
||||
ImGui.TextUnformatted(title);
|
||||
using (ImRaii.PushIndent())
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(theme.Colors.TextMuted)))
|
||||
{
|
||||
ImGui.TextWrapped(description);
|
||||
}
|
||||
}
|
||||
ImGui.Spacing();
|
||||
}
|
||||
|
||||
private void DrawGotAnIdeaSection()
|
||||
{
|
||||
DrawSectionHeader(HellionStrings.Settings_Integrations_GotAnIdea_SectionHeader);
|
||||
ImGui.TextWrapped(HellionStrings.Settings_Integrations_GotAnIdea_Body);
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGui.Button(HellionStrings.Settings_Integrations_GotAnIdea_LinkLabel))
|
||||
{
|
||||
Dalamud.Utility.Util.OpenLink(BrandingLinks.HellionForgeDiscordInvite);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawSectionHeader(string label)
|
||||
{
|
||||
var theme = Plugin.ThemeRegistry.Active;
|
||||
using (ImRaii.PushColor(ImGuiCol.Text, ColourUtil.RgbaToAbgr(theme.Colors.Primary)))
|
||||
{
|
||||
ImGui.TextUnformatted("── " + label + " ──");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,19 @@ internal sealed class StatusBar
|
||||
return $"{count} {(count == 1 ? "tell" : "tells")}";
|
||||
}
|
||||
|
||||
// Single-pass replacement for the LINQ Sum+Count pair in Draw. Pure
|
||||
// helper so a future LINQ regression gets pinned by xUnit.
|
||||
internal static (int messages, int tells) AggregateForStatusBar(IList<Tab> tabs)
|
||||
{
|
||||
int messages = 0, tells = 0;
|
||||
foreach (var t in tabs)
|
||||
{
|
||||
messages += t.Messages.Count;
|
||||
if (t.IsTempTab) tells++;
|
||||
}
|
||||
return (messages, tells);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test-Hook: Cache-Logic ohne reale Time-Source verifizieren.
|
||||
/// Nicht für Production-Render.
|
||||
@@ -80,12 +93,13 @@ internal sealed class StatusBar
|
||||
var theme = plugin.ThemeRegistry.Active;
|
||||
var now = Environment.TickCount64;
|
||||
|
||||
// Counts pro Frame berechnen ist günstig (List<>.Count, kleine
|
||||
// Sums); Format-String wird gecached.
|
||||
var tabs = Plugin.Config.Tabs.Count;
|
||||
var messages = Plugin.Config.Tabs.Sum(t => t.Messages.Count);
|
||||
var tells = Plugin.Config.Tabs.Count(t => t.IsTempTab);
|
||||
UpdateCacheIfDue(now, tabs, messages, tells);
|
||||
// Outer gate keeps the foreach out of the hot path 99% of frames.
|
||||
// UpdateCacheIfDue runs the same check internally — idempotent.
|
||||
if (now - _lastUpdateMs >= UpdateIntervalMs)
|
||||
{
|
||||
var (messages, tells) = AggregateForStatusBar(Plugin.Config.Tabs);
|
||||
UpdateCacheIfDue(now, Plugin.Config.Tabs.Count, messages, tells);
|
||||
}
|
||||
|
||||
// BorderTop als Trenner — DrawList-Line, ImGui-Separator hat zu viel Padding.
|
||||
var cursorY = ImGui.GetCursorScreenPos().Y;
|
||||
|
||||
@@ -61,7 +61,7 @@ internal static class TabIconMapping
|
||||
string? autoTellGlyph = null;
|
||||
if (tab.IsTempTab && tab.TellTarget != null && tab.TellTarget.IsSet())
|
||||
{
|
||||
autoTellGlyph = AutoTellTabTint.IconFor(tab.TellTarget.Name, tab.TellTarget.World);
|
||||
autoTellGlyph = TabTintCache.GetIcon(tab);
|
||||
}
|
||||
|
||||
var glyph = TabIconGlyphResolver.ResolveGlyphName(tab, autoTellGlyph);
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
namespace HellionChat.Ui;
|
||||
|
||||
// Per-Tab cache wrapper around the pure AutoTellTabTint hash helpers.
|
||||
// Each cache (tint, icon) carries its own name+world validation key so
|
||||
// neither read path mutates the other's state — refilling one never
|
||||
// invalidates the other. No string allocation in the steady-state lookup.
|
||||
internal static class TabTintCache
|
||||
{
|
||||
public static uint GetTint(Tab tab)
|
||||
{
|
||||
var name = tab.TellTarget.Name;
|
||||
var world = tab.TellTarget.World;
|
||||
if (tab._cachedTintTellName != name || tab._cachedTintTellWorld != world)
|
||||
{
|
||||
tab._cachedTintTellName = name;
|
||||
tab._cachedTintTellWorld = world;
|
||||
tab._cachedTellTint = AutoTellTabTint.For(name, world);
|
||||
}
|
||||
return tab._cachedTellTint;
|
||||
}
|
||||
|
||||
public static string GetIcon(Tab tab)
|
||||
{
|
||||
var name = tab.TellTarget.Name;
|
||||
var world = tab.TellTarget.World;
|
||||
if (tab._cachedTellIcon is null
|
||||
|| tab._cachedIconTellName != name
|
||||
|| tab._cachedIconTellWorld != world)
|
||||
{
|
||||
tab._cachedIconTellName = name;
|
||||
tab._cachedIconTellWorld = world;
|
||||
tab._cachedTellIcon = AutoTellTabTint.IconFor(name, world);
|
||||
}
|
||||
return tab._cachedTellIcon;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
|
||||
namespace HellionChat.Util;
|
||||
|
||||
@@ -29,4 +30,36 @@ internal static class StringUtil
|
||||
// separator to '.' so a German locale doesn't render "1,5GB".
|
||||
return (Math.Sign(byteCount) * num).ToString("0.#", CultureInfo.InvariantCulture) + suf[place];
|
||||
}
|
||||
|
||||
// Returns the text unchanged when it already fits the width budget,
|
||||
// otherwise the longest prefix plus a horizontal-ellipsis character that
|
||||
// still fits. Used by the chat header Honorific title slot and reused by
|
||||
// the chat-line truncation path in later cycles.
|
||||
public static string TruncateToFitWidth(string text, float maxWidth)
|
||||
{
|
||||
if (ImGui.CalcTextSize(text).X <= maxWidth)
|
||||
{
|
||||
return text;
|
||||
}
|
||||
|
||||
// Binary-search the longest prefix that fits with an ellipsis.
|
||||
const string ellipsis = "…";
|
||||
var lo = 0;
|
||||
var hi = text.Length;
|
||||
while (lo < hi)
|
||||
{
|
||||
var mid = (lo + hi + 1) / 2;
|
||||
var candidate = text[..mid] + ellipsis;
|
||||
if (ImGui.CalcTextSize(candidate).X <= maxWidth)
|
||||
{
|
||||
lo = mid;
|
||||
}
|
||||
else
|
||||
{
|
||||
hi = mid - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return lo == 0 ? ellipsis : text[..lo] + ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
|
||||
namespace HellionChat._Helpers;
|
||||
|
||||
// Pure-helper mirror of the compact pop-out history-navigation cursor
|
||||
// math. The original CompactCallback was tangled with ImGuiInputTextCallbackData
|
||||
// (DeleteChars/InsertChars), which can't be exercised in xUnit. The
|
||||
// ImGui buffer mutation stays at the call site; only the deterministic
|
||||
// cursor-and-replacement decision lives here.
|
||||
//
|
||||
// Index semantics match InputHistoryService:
|
||||
// index 0 = oldest entry
|
||||
// index Count - 1 = newest entry
|
||||
// cursor == -1 = "not browsing history"
|
||||
//
|
||||
// TEST-MIRROR: ../../../Hellion Build test/Ui/CompactInputHistoryNavigatorTests.cs
|
||||
public static class CompactInputHistoryNavigator
|
||||
{
|
||||
public enum Direction { Up, Down }
|
||||
|
||||
// replacement == null means: caller must NOT touch the buffer. This
|
||||
// distinguishes "cursor unchanged, leave the user's typing alone"
|
||||
// from "cursor moved to an empty slot, clear the buffer".
|
||||
public static (int cursor, string? replacement) Navigate(
|
||||
Direction direction,
|
||||
int currentCursor,
|
||||
string currentBuffer,
|
||||
Func<int> getCount,
|
||||
Action<string> push,
|
||||
Func<int, string?> getByCursor)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(getCount);
|
||||
ArgumentNullException.ThrowIfNull(push);
|
||||
ArgumentNullException.ThrowIfNull(getByCursor);
|
||||
|
||||
var prev = currentCursor;
|
||||
var next = currentCursor;
|
||||
|
||||
switch (direction)
|
||||
{
|
||||
case Direction.Up:
|
||||
if (currentCursor == -1)
|
||||
{
|
||||
// First Up press from a fresh buffer: stash whatever
|
||||
// the user typed so they can recover it after browsing.
|
||||
var offset = 0;
|
||||
if (!string.IsNullOrWhiteSpace(currentBuffer))
|
||||
{
|
||||
push(currentBuffer);
|
||||
offset = 1;
|
||||
}
|
||||
next = getCount() - 1 - offset;
|
||||
}
|
||||
else if (currentCursor > 0)
|
||||
{
|
||||
next--;
|
||||
}
|
||||
break;
|
||||
case Direction.Down:
|
||||
if (currentCursor != -1)
|
||||
{
|
||||
next++;
|
||||
if (next >= getCount())
|
||||
next = -1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (prev == next)
|
||||
return (next, null);
|
||||
|
||||
var replacement = getByCursor(next) ?? string.Empty;
|
||||
return (next, replacement);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using HellionChat.Ui;
|
||||
|
||||
namespace HellionChat._Helpers;
|
||||
|
||||
// Pure-helper mirror of the compact pop-out submit flow. ChatInputBar's
|
||||
// SubmitCompact used to inline this against a sealed ChatLogWindow, which
|
||||
// blocks Moq-based isolation. Lifting the deterministic part into a POCO
|
||||
// keeps the production call site a one-liner while letting xUnit assert
|
||||
// the buffer/cursor reset and the sender contract directly.
|
||||
// TEST-MIRROR: ../../../Hellion Build test/Ui/CompactInputSubmitterTests.cs
|
||||
public static class CompactInputSubmitter
|
||||
{
|
||||
public static bool TrySubmit(InputState state, Tab tab, Action<Tab, string> sender)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(state);
|
||||
ArgumentNullException.ThrowIfNull(tab);
|
||||
ArgumentNullException.ThrowIfNull(sender);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(state.Buffer))
|
||||
return false;
|
||||
|
||||
var text = state.Buffer;
|
||||
state.Buffer = string.Empty;
|
||||
state.HistoryCursor = -1;
|
||||
sender(tab, text);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 105 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 360 KiB After Width: | Height: | Size: 45 KiB |
@@ -35,9 +35,19 @@ edits minimal, isolated to clearly-marked Hellion files, and reversible.
|
||||
|
||||
Concrete example: when API 15 hit, I cherry-picked your fix for the
|
||||
BetterTTV emote regression with `git cherry-pick -x` so authorship and
|
||||
co-author trail stay intact. That is the standard I want to keep using as
|
||||
long as both projects are alive. You should never have to look at this
|
||||
fork and wonder if I quietly ate your work.
|
||||
co-author trail stay intact. That was the standard I held to as long
|
||||
as cherry-picking was viable, and you should never have to look at
|
||||
this fork and wonder if I quietly ate your work.
|
||||
|
||||
With ChatTwo entering its rework cycle, the active cherry-pick
|
||||
pipeline is closed since v1.4.x — see [docs/UPSTREAM_SYNC.md](docs/UPSTREAM_SYNC.md)
|
||||
for the full reasoning. The attribution standard stays exactly the
|
||||
same: every existing `(cherry picked from commit ...)` line remains
|
||||
in the git history, the EUPL-1.2 anchor lines in source files are
|
||||
untouched, and this NOTICE.md remains canonical. If anything from
|
||||
this point forward originates from Chat 2 it will be a hand-port at
|
||||
most, called out as such in the commit message and source comments,
|
||||
not a `git cherry-pick`.
|
||||
|
||||
If anything in this fork ever steps on something you would not be okay
|
||||
with, please reach out and I will fix it. Genuinely. The list of contacts
|
||||
@@ -48,7 +58,7 @@ is below.
|
||||
If something in HellionChat causes problems, especially if it relates back
|
||||
to Chat 2 or to anything Infi or Anna would want flagged:
|
||||
|
||||
- **GitHub Issues:** [JonKazama-Hellion/HellionChat/issues](https://github.com/JonKazama-Hellion/HellionChat/issues)
|
||||
- **Gitea Issues:** [JonKazama-Hellion/HellionChat/issues](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues)
|
||||
- **Discord:** `@j.j_kazama`
|
||||
- **Email (business):** kontakt@hellion-media.de
|
||||
|
||||
@@ -62,8 +72,10 @@ full-history-by-default position fits a much larger one, including the
|
||||
roleplaying community where chat archive is part of the play experience.
|
||||
Trying to upstream HellionChat's defaults would have meant arguing that
|
||||
Chat 2's defaults are wrong, and they are not. They are right for the
|
||||
user base ChatTwo serves. So I keep the fork separate, attribute clearly,
|
||||
and pull selected upstream patches when they apply.
|
||||
user base ChatTwo serves. So I keep the fork separate and attribute
|
||||
clearly. Active cherry-picking from upstream stopped in the v1.4.x
|
||||
cycle once Chat 2's rework made selective patches no longer portable;
|
||||
the existing cherry-pick trail stays in the git history.
|
||||
|
||||
## Why HellionChat left the GitHub fork network
|
||||
|
||||
@@ -72,8 +84,9 @@ that a fork is either a development branch or a dead mirror. HellionChat
|
||||
is neither. It is an independently-maintained EUPL-1.2 fork with its own
|
||||
release cadence, its own custom repo, its own user base. Detaching the
|
||||
fork-network relation just makes the situation honest. The git history,
|
||||
the cherry-pick trail, and the attribution stay exactly the same. The
|
||||
only thing that changes is the GitHub UI no longer says "forked from".
|
||||
the existing cherry-pick trail, and the attribution stay exactly the
|
||||
same. The only thing that changes is the GitHub UI no longer says
|
||||
"forked from".
|
||||
|
||||
## Trademarks and naming
|
||||
|
||||
|
||||
@@ -121,10 +121,10 @@ Adjust the channel whitelist or set retention to a low value. Both take effect i
|
||||
| Party | Why they appear | What reaches them | Their privacy policy |
|
||||
| --- | --- | --- | --- |
|
||||
| BetterTTV (NightDev LLC) | Optional emote rendering | HTTPS request for an emote ID; your IP | <https://betterttv.com/privacy> |
|
||||
| GitHub (Microsoft) | Plugin distribution via custom repo, issue tracker | Whatever GitHub sees from any HTTPS request to a public repo | <https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement> |
|
||||
| Hellion Forge (Gitea, self-hosted by Hellion Online Media) | Plugin distribution via custom repo, issue tracker | Whatever the Gitea instance sees from any HTTPS request to a public repo | <https://hellion-media.de/datenschutz> |
|
||||
| Dalamud / XIVLauncher (goatcorp) | Plugin loader, font subsystem, repo polling | Whatever Dalamud reports for itself; out of HellionChat's scope | <https://github.com/goatcorp/Dalamud> |
|
||||
|
||||
GitHub and the Dalamud/XIVLauncher loader are unavoidable for anyone playing FFXIV through Dalamud at all. BetterTTV is the only third party HellionChat introduces on top of that baseline, and it is opt-out via settings.
|
||||
The Hellion Forge Gitea instance and the Dalamud/XIVLauncher loader are unavoidable for anyone using HellionChat through Dalamud at all. BetterTTV is the only third party HellionChat introduces on top of that baseline, and it is opt-out via settings.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# Hellion Chat
|
||||
|
||||
[](https://github.com/JonKazama-Hellion/HellionChat/actions/workflows/build.yml)
|
||||
[](https://github.com/JonKazama-Hellion/HellionChat/security/code-scanning)
|
||||
[](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/actions/workflows/build.yml)
|
||||
[](LICENSE)
|
||||
[](https://github.com/JonKazama-Hellion/HellionChat/releases/latest)
|
||||
[](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/latest)
|
||||
[](https://github.com/goatcorp/Dalamud)
|
||||
[](https://dotnet.microsoft.com/)
|
||||
[](https://www.finalfantasyxiv.com/)
|
||||
@@ -12,13 +11,13 @@
|
||||
<img src="docs/images/hellion-forge.png" alt="Hellion Forge" width="180" />
|
||||
</p>
|
||||
|
||||
**Version 1.2.3** — Privacy-First-Chat-Plugin für FINAL FANTASY XIV / Dalamud, basierend auf [Chat 2](https://github.com/Infiziert90/ChatTwo) (EUPL-1.2).
|
||||
**Version 1.4.3** — Privacy-First-Chat-Plugin für FINAL FANTASY XIV / Dalamud, basierend auf [Chat 2](https://github.com/Infiziert90/ChatTwo) (EUPL-1.2).
|
||||
|
||||
Hellion Chat ist ein Privacy-First-Plugin auf dem Chat-2-Fundament. Der größte Teil der Engine kommt aus Chat 2 (Message-Store, Channel-Logik, Hook-System), die meisten Tastenkürzel funktionieren weiterhin wie gewohnt. Was sich ändert: schärfere Privacy-Defaults von Haus aus, eigene Slash-Commands unter `/hellionchat`, kein Webinterface mehr, und mit v1.1.0 eine Theme-Engine als Schritt in Richtung eigenes UI-Look-and-Feel.
|
||||
|
||||
Der Daten-Handling-Fokus liegt auf den DSGVO/EU-, US- und JP-Regelungen, soweit für ein Chat-Plugin praktisch umsetzbar: Speicherzeit pro Kanal, granulare Filter, Selbstauskunft per Export. Eine ausführliche Auflistung steht in [`PRIVACY.md`](PRIVACY.md).
|
||||
|
||||
Eigenständiges Repository, EUPL-1.2-lizenziert. Mit v1.0.0 ist der Standalone-Cut abgeschlossen: eigener Namespace `HellionChat.*`, eigene IPC-Kanäle, eigene Source-Tree-Struktur. Distribution über Custom-Repo. Selektive Cherry-Picks von Upstream-Chat-2 nach Bedarf, dokumentiert in [`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md).
|
||||
Eigenständiges Repository, EUPL-1.2-lizenziert. Mit v1.0.0 ist der Standalone-Cut abgeschlossen: eigener Namespace `HellionChat.*`, eigene IPC-Kanäle, eigene Source-Tree-Struktur. Distribution über Custom-Repo. Aktiver Upstream-Sync ist mit dem v1.4.x-Cycle beendet: Chat 2 befindet sich in einem grundlegenden Rework und Cherry-Picks sind nicht mehr portierbar. Hellion Chat geht ab da als unabhängige Codebase weiter, Hintergrund und Attribution in [`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md).
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
@@ -72,7 +71,11 @@ Hellion Chat wird unter **Hellion Forge** entwickelt, der spezialisierten Moddin
|
||||
|
||||
#### Custom Themes (v1.1.0)
|
||||
|
||||
HellionChat bringt eine Theme-Engine mit derzeit neun eingebauten Themes (Hellion Arctic, Hellion Spectrum, Chat 2 Klassik, Event Horizon, Moonlit Bloom, Mint Grove, Night Blue, Indigo Violet, Forge Merchantman) und ein JSON-basiertes Authoring-Format für eigene Themes. Schema und Schritt-für-Schritt-Anleitung in [`docs/THEME-AUTHORING.md`](docs/THEME-AUTHORING.md). Hellion Spectrum ist Deuteran/Protan-safe (rot-grün-Farbenblindheit) auf Basis der Wong/Okabe-Ito-Palette.
|
||||
HellionChat bringt eine Theme-Engine mit derzeit zehn eingebauten Themes (Hellion Arctic, Hellion Spectrum, Chat 2 Klassik, Event Horizon, Moonlit Bloom, Mint Grove, Night Blue, Indigo Violet, Forge Merchantman, Synthwave Sunset) und ein JSON-basiertes Authoring-Format für eigene Themes. Schema und Schritt-für-Schritt-Anleitung in [`docs/THEME-AUTHORING.md`](docs/THEME-AUTHORING.md). Hellion Spectrum ist Deuteran/Protan-safe (rot-grün-Farbenblindheit) auf Basis der Wong/Okabe-Ito-Palette.
|
||||
|
||||
#### Plugin-Integrationen (v1.3.0)
|
||||
|
||||
- **Honorific Custom-Titles im Chat-Header.** Wenn das Honorific-Plugin aktiv ist und ein Custom-Title gesetzt ist, wird er im Chat-Header über dem Message-Log angezeigt. Auto-Detect mit silent Fallback: ohne Honorific ist der Slot unsichtbar. Toggle in Settings, Integrationen, Honorific. Erste Cycle einer mehrstufigen Plugin-Integrations-Roadmap (Context-Menu, NotificationMaster, RP-Status, ExtraChat und XIVIM folgen).
|
||||
|
||||
### Pop-Out Convenience (v0.6.0)
|
||||
|
||||
@@ -166,7 +169,7 @@ Hellion Chat wird über ein Dalamud-**Custom-Repository** verteilt.
|
||||
1. Dalamud-Settings (`/xlsettings`) → **Experimental** öffnen.
|
||||
2. Neuen Eintrag unter **Custom Plugin Repositories** anlegen:
|
||||
```
|
||||
https://raw.githubusercontent.com/JonKazama-Hellion/HellionChat/main/repo.json
|
||||
https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/raw/branch/main/repo.json
|
||||
```
|
||||
3. **Save**, dann in `/xlplugins` → **All Plugins** → Refresh.
|
||||
4. Hellion Chat taucht in der Liste auf, dann installieren wie jedes andere Plugin.
|
||||
@@ -221,7 +224,7 @@ Eine optionale Submission ans Dalamud-Main-Plugin-Repo (zusätzlich zum eigenen
|
||||
|
||||
## Projektstatus
|
||||
|
||||
**Version 1.2.3** — Theme-Katalog auf neun Built-ins erweitert, Settings thematisch re-sortiert, Standalone-Cut abgeschlossen (Stand: 2026-05-06).
|
||||
**Version 1.4.3** — Plugin-Load Async-Init plus Repo-Cutover: Plugin auf Dalamud's IAsyncDalamudPlugin-API migriert. Der Konstruktor übernimmt nur noch Bootstrap-Essentials (Config-Load, Language-Init, Conflict-Detection); Migrationen, Service-Allokationen, Window-Konstruktion und Hook-Subscription wandern in LoadAsync, sodass Dalamud die UI während der schweren Arbeit responsive halten kann. Schema-Gate ersetzt die v9 → v16 Migrations-Kette; Configs auf Schema v16+ laden direkt, ältere Configs triggern eine "install v1.4.2 first"-Fehlermeldung. Custom-Repo-URL auf `gitea.hellion-forge.cloud` migriert; das GitHub-Repo bleibt als eingefrorener v1.4.2-Snapshot stehen. Plugin-Load-Zeit liegt bei ~3.7 s Median (5 Reloads), vergleichbar mit v1.4.2: Async-Migration ist Foundation für v1.4.4 Lazy-Init-Optimierungen, kein direkter User-spürbarer Win. Vierter Sub-Patch der v1.4.x Polish-Sweep-Serie (Stand: 2026-05-08).
|
||||
|
||||
Hellion Chat ist ein eigenständiges Plugin, kein Fork mehr im Repository-Sinne. Vollständig abgeschlossen:
|
||||
|
||||
@@ -237,9 +240,10 @@ Hellion Chat ist ein eigenständiges Plugin, kein Fork mehr im Repository-Sinne.
|
||||
- About-Tab im Hellion-Branding, EN und DE lokalisiert, mit License und Disclaimer
|
||||
- AI-Disclosure dokumentiert (siehe [`docs/AI_DISCLOSURE.md`](docs/AI_DISCLOSURE.md))
|
||||
- Standalone-Cut: Namespace `HellionChat.*`, IPC-Kanäle `HellionChat.*`, Source-Tree-Restructure, Conflict-Detection gegen Upstream Chat 2, SQLite-CVE-Härtung (3.50.3)
|
||||
- Theme-Engine mit neun eingebauten Themes plus JSON-Authoring-Format (Engine v1.1.0, Katalog erweitert in v1.2.3, inkl. CVD-safe Hellion Spectrum)
|
||||
- Theme-Engine mit zehn eingebauten Themes plus JSON-Authoring-Format (Engine v1.1.0, Katalog erweitert in v1.2.3, inkl. CVD-safe Hellion Spectrum; Synthwave Sunset in v1.4.1)
|
||||
- ABGR-Cache auf den Theme-Records: HellionStyle.PushGlobal liest pre-computed ABGR statt RGBA→ABGR pro Slot pro Frame (v1.4.1, ~13 % Render-Time-Recovery)
|
||||
|
||||
In Arbeit: schrittweise Modernisierung des UI-Look-and-Feel über die Theme-Engine hinaus. Was als Nächstes geplant ist und welche Themen langfristig auf der Liste stehen, steht in [`docs/ROADMAP.md`](docs/ROADMAP.md). Konkrete eingeplante Items werden zusätzlich im [GitHub-Issue-Tracker](https://github.com/JonKazama-Hellion/HellionChat/issues) mit dem `roadmap`-Label geführt.
|
||||
In Arbeit: schrittweise Modernisierung des UI-Look-and-Feel über die Theme-Engine hinaus. Was als Nächstes geplant ist und welche Themen langfristig auf der Liste stehen, steht in [`docs/ROADMAP.md`](docs/ROADMAP.md). Konkrete eingeplante Items werden zusätzlich im [Gitea-Issue-Tracker](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues) mit dem `roadmap`-Label geführt.
|
||||
|
||||
### Zur Release-Kadenz
|
||||
|
||||
@@ -250,7 +254,7 @@ Wer den Repo zum ersten Mal sieht, bemerkt schnell viele Releases und sehr viele
|
||||
## Community und Support
|
||||
|
||||
- **Hellion Forge Discord** (Modding- und Plugin-Community von Hellion Online Media): https://discord.gg/X9V7Kcv5gR
|
||||
- Bug-Reports und Feature-Requests: [GitHub Issues](https://github.com/JonKazama-Hellion/HellionChat/issues)
|
||||
- Bug-Reports und Feature-Requests: [Gitea Issues](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues)
|
||||
- Discord DM: `@j.j_kazama`
|
||||
- Weitere Kontaktwege (Security, Privacy, Quick-Questions): siehe [SUPPORT.md](SUPPORT.md)
|
||||
|
||||
@@ -306,7 +310,7 @@ Im Repo-Root liegen die Standard-Repository-Dokumente, vertiefende Dokumentation
|
||||
| [`docs/LEARNING-JOURNEY.md`](docs/LEARNING-JOURNEY.md) | Entwicklungsgeschichte, vom Web-Stack zu C# / Dalamud, was ich aus dem Fork gelernt habe. |
|
||||
| [`docs/IPC.md`](docs/IPC.md) | IPC-Kanal-Reference, Tuple-Payload-Felder, Migrations-Diff für Drittplugins. |
|
||||
| [`docs/THEME-AUTHORING.md`](docs/THEME-AUTHORING.md) | Theme-Engine-Authoring-Guide (EN): JSON-Schema, Color- und Layout-Slots, Channel-Identity-Regeln, Validierung. |
|
||||
| [`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md) | Cherry-Pick-Policy gegenüber Chat 2. |
|
||||
| [`docs/UPSTREAM_SYNC.md`](docs/UPSTREAM_SYNC.md) | Upstream-Sync-Stand: Cherry-Pick-Pipeline seit v1.4.x geschlossen, Attribution intakt. |
|
||||
| [`docs/THIRD_PARTY_NOTICES.md`](docs/THIRD_PARTY_NOTICES.md) | NuGet-Dependencies mit Lizenzen, Bundled Assets, Network-Status pro Komponente. |
|
||||
| [`docs/AI_DISCLOSURE.md`](docs/AI_DISCLOSURE.md) | Offenlegung der KI-Unterstützung im Entwicklungsprozess. |
|
||||
|
||||
|
||||
@@ -3,24 +3,20 @@
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you find a security issue in HellionChat, please do not open a
|
||||
public GitHub issue. Use one of the private channels below so I can
|
||||
public Gitea issue. Use one of the private channels below so I can
|
||||
investigate and ship a fix before the details go public.
|
||||
|
||||
**Preferred:**
|
||||
[Privately report a vulnerability](https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new)
|
||||
via GitHub Security Advisories. This routes the report directly to me
|
||||
and keeps the conversation off the public timeline.
|
||||
|
||||
**Alternative:**
|
||||
|
||||
| Channel | Address |
|
||||
| ---------- | -------------------------- |
|
||||
| Email | `kontakt@hellion-media.de` |
|
||||
| Discord DM | `@j.j_kazama` |
|
||||
|
||||
I respond on weekdays during European business hours. For urgent
|
||||
disclosures (active exploitation, user-data exposure) email is the
|
||||
fastest path.
|
||||
For urgent disclosures (active exploitation, user-data exposure) email
|
||||
is the fastest path.
|
||||
|
||||
I respond on weekdays during European business hours.
|
||||
|
||||
## Scope
|
||||
|
||||
|
||||
@@ -4,19 +4,19 @@ HellionChat is a small hobby project maintained by one person. There are a few d
|
||||
|
||||
## Bugs and feature requests
|
||||
|
||||
GitHub issues, using the templates:
|
||||
Gitea issues, using the templates:
|
||||
|
||||
- [Bug report](https://github.com/JonKazama-Hellion/HellionChat/issues/new?template=bug_report.yml)
|
||||
- [Feature request](https://github.com/JonKazama-Hellion/HellionChat/issues/new?template=feature_request.yml)
|
||||
- [Bug report](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues/new?template=bug_report.yml)
|
||||
- [Feature request](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues/new?template=feature_request.yml)
|
||||
|
||||
Please search [existing issues](https://github.com/JonKazama-Hellion/HellionChat/issues?q=is%3Aissue) first. Duplicates get closed and pointed at the original.
|
||||
Please search [existing issues](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues?type=issue) first. Duplicates get closed and pointed at the original.
|
||||
|
||||
## Security
|
||||
|
||||
Do **not** open a public issue for security-relevant findings. Use the private advisory route described in [SECURITY.md](SECURITY.md):
|
||||
|
||||
- [Private vulnerability advisory](https://github.com/JonKazama-Hellion/HellionChat/security/advisories/new)
|
||||
- Email `kontakt@hellion-media.de`
|
||||
- Email `kontakt@hellion-media.de` (preferred for security reports)
|
||||
- Discord DM `@j.j_kazama` for time-sensitive findings
|
||||
|
||||
## Privacy questions
|
||||
|
||||
|
||||
@@ -82,4 +82,4 @@ Both are good projects. Use what fits you best.
|
||||
## Contact
|
||||
|
||||
Questions about this disclosure:
|
||||
<https://github.com/JonKazama-Hellion/HellionChat/issues>
|
||||
<https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues>
|
||||
|
||||
@@ -5,13 +5,175 @@ sich an [Keep a Changelog](https://keepachangelog.com/de/1.0.0/), die
|
||||
Version-Nummern folgen [Semantischer Versionierung](https://semver.org/lang/de/).
|
||||
|
||||
Detaillierte Release-Notes pro Version stehen direkt am
|
||||
[GitHub-Release](https://github.com/JonKazama-Hellion/HellionChat/releases)
|
||||
[Gitea-Release](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases)
|
||||
und im Plugin-Changelog-Block (`HellionChat/HellionChat.yaml` →
|
||||
`changelog:`). Diese Datei fasst die Releases als Überblick zusammen
|
||||
und verlinkt für Details auf die Release-Pages.
|
||||
|
||||
---
|
||||
|
||||
## Hellion Chat 1.4.3 — Plugin-Load Async-Init + Repo-Cutover (2026-05-08)
|
||||
|
||||
Plugin lifecycle migrated to Dalamud's `IAsyncDalamudPlugin`
|
||||
API. The constructor now does only the bootstrap-essentials
|
||||
(config load, language init, conflict detection); migrations,
|
||||
service allocations, window construction and hook subscription
|
||||
move to `LoadAsync`. Dalamud can keep its UI responsive while
|
||||
the heavy work runs.
|
||||
|
||||
- `IAsyncDalamudPlugin` two-phase load with per-line
|
||||
`CaptureFailure` in `DisposeAsync` (mirrors LightlessSync's
|
||||
pattern); idempotency guard protects against reload races
|
||||
- Schema-gate replaces the v9 → v16 migration chain. Configs
|
||||
on schema v16+ load directly; older configs trigger an
|
||||
"install v1.4.2 first" error so the historic migration
|
||||
path stays intact
|
||||
- `AutoTranslate.PreloadCache` moved off the load path. First
|
||||
use may have a sub-second hitch instead of every-load; the
|
||||
upstream chose differently, we accept first-use latency
|
||||
- `FontManager.BuildFonts` is called sync at the start of
|
||||
`LoadAsync`; Dalamud rebuilds the font atlas on its own
|
||||
pipeline so the custom Hellion-Exo2 font appears with a
|
||||
brief font-pop after load (matches ChatTwo's behaviour)
|
||||
- Custom-repo URL moved to
|
||||
`gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat`.
|
||||
GitHub repo stays as a frozen v1.4.2 snapshot; new
|
||||
releases ship from Gitea. Existing testers need to
|
||||
update the custom-repo URL once
|
||||
- Plugin-load time in this release sits at ~3.7 s median
|
||||
(5 reloads), comparable to v1.4.2. Async migration is
|
||||
foundational for v1.4.4 Lazy-Init optimisations rather
|
||||
than an immediate user-perceived win
|
||||
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
---
|
||||
|
||||
## Hellion Chat 1.4.2 — ChatLog Frame-Hot-Path
|
||||
|
||||
Third sub-patch of the v1.4.x Polish Sweep series. Per-frame
|
||||
allocations from the chat-log render path eliminated.
|
||||
|
||||
- `DrawMessages` card-mode hoists `theme`/`drawList`/`winLeft`/
|
||||
`winRight`/`borderColorAbgr` out of the per-message loop. About
|
||||
500 redundant calls per frame at 100 visible messages, multiplied
|
||||
by every pop-out window
|
||||
- Auto-tell tab tint and icon use a per-tab cache. Hash
|
||||
computation and string allocation only happen when the tell
|
||||
target name or world drifts. `AutoTellTabTint` stays a pure
|
||||
hash helper; cache lives in a thin `TabTintCache` wrapper
|
||||
- Status bar gates its tab aggregation behind the same
|
||||
one-second cache it already used for the format strings.
|
||||
LINQ `Sum` and `Count` replaced with a single `foreach` pass
|
||||
that runs on roughly 1 % of frames
|
||||
|
||||
Realistic frame-time recovery: 2-5 % in typical scenes, more
|
||||
on pop-out-heavy setups because the card-border hoist scales
|
||||
per window.
|
||||
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
---
|
||||
|
||||
## Hellion Chat 1.4.1 — Theme Engine Performance
|
||||
|
||||
Second sub-patch of the v1.4.x Polish Sweep series. Heap
|
||||
pressure from the theme engine's per-frame render path
|
||||
removed, plus a tenth built-in theme and hardening for
|
||||
the custom-theme hot-reload.
|
||||
|
||||
- Theme records carry a pre-computed ABGR-packed cache
|
||||
for every color slot; cache is filled when the theme
|
||||
is registered and refreshed defensively on every
|
||||
`Switch()`
|
||||
- `HellionStyle.PushGlobal` reads ABGR values from the
|
||||
cache instead of calling `ColourUtil.RgbaToAbgr` per
|
||||
slot per frame; ~13 % render-time recovery measured
|
||||
in typical scenes (plan estimate was 2–6 %, real
|
||||
~10–15 %)
|
||||
- `ThemeRegistry` custom-theme reload distinguishes a
|
||||
recoverable file lock (editor mid-save) from a
|
||||
permanent IO failure; locked themes keep their
|
||||
last-known-good snapshot and retry on the next
|
||||
lookup instead of dropping out of the picker
|
||||
- New built-in: **Synthwave Sunset** — Hot Magenta + Cyan
|
||||
on midnight violet, 80s neon-grid vibes; tenth theme
|
||||
in the picker
|
||||
- Author credits refreshed: brand themes are credited
|
||||
as "Hellion Forge"; **Mint Grove** and **Forge
|
||||
Merchantman** now credited to **Carla Beleandis** as
|
||||
a community thanks
|
||||
|
||||
No schema bump, no user-visible behaviour change other
|
||||
than smoother frames on GC-sensitive setups and one
|
||||
additional colour option.
|
||||
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
---
|
||||
|
||||
## Hellion Chat 1.4.0 — Critical Lifecycle Fixes
|
||||
|
||||
First sub-patch of the v1.4.x Polish Sweep series. Seven
|
||||
known lifecycle and race bugs eliminated before any
|
||||
performance refactor sits on top.
|
||||
|
||||
- MessageStore disposal no longer triggers GC.Collect
|
||||
globally; Pooling=false on the SQLite connection means
|
||||
there's nothing left to clean up by hand
|
||||
- PendingMessage and RetentionSweep worker threads are
|
||||
explicitly marked IsBackground=true so the plugin domain
|
||||
can unload during XIVLauncher reload without waiting
|
||||
for them
|
||||
- EmoteCache image and gif loaders moved from async-void
|
||||
to async Task with a shared task tracker, draining
|
||||
on Dispose so an in-flight load can no longer write
|
||||
to a disposed EmoteImages entry
|
||||
- DisposeAsync 10s timeout now warns loudly instead of
|
||||
silently leaving the worker behind
|
||||
- Plugin.Dispose flushes any pending DeferredSaveFrames
|
||||
before tearing services down, so settings changes
|
||||
made in the last few frames before disable are no
|
||||
longer lost
|
||||
- The v13→v14 config migration now reads the pre-v13
|
||||
backup and carries HellionThemeWindowOpacity into the
|
||||
new WindowOpacity field instead of falling back to
|
||||
the default 0.85
|
||||
|
||||
Modding & support: join Hellion Forge — https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
---
|
||||
|
||||
## Hellion Chat 1.3.0 - Plugin Integrations: Honorific
|
||||
|
||||
First step on the plugin-integration roadmap. HellionChat now
|
||||
listens to Honorific and shows your custom title in the chat
|
||||
header. The slot auto-hides when Honorific is not installed,
|
||||
when no custom title is active, or when you are using the
|
||||
original FFXIV title.
|
||||
|
||||
- New "Integrations" settings tab
|
||||
- Honorific integration with auto-detection and live updates
|
||||
- "Coming soon" preview of the next five planned integrations:
|
||||
context menu actions, smart notifications, RP status block,
|
||||
ExtraChat channels, and quick DM compose
|
||||
- Maintainer attribution buttons for Honorific repo and Caraxi
|
||||
- New service-class pattern under HellionChat/Integrations/
|
||||
|
||||
Modding and support: join Hellion Forge - https://discord.gg/X9V7Kcv5gR
|
||||
|
||||
Based on Chat 2 1.35.3 (upstream Infiziert90/ChatTwo, EUPL-1.2).
|
||||
|
||||
---
|
||||
|
||||
## v1.2.3 — Theme Expansion (2026-05-06)
|
||||
|
||||
### Added
|
||||
@@ -156,7 +318,7 @@ Vier kleine Polish-Items aus dem Backlog gebündelt:
|
||||
auf Verbose-Level. Aus by default, Aktivierung via
|
||||
`/xllog set HellionChat verbose` für Bug-Report-Diagnose.
|
||||
|
||||
[Release-Notes 1.0.3](https://github.com/JonKazama-Hellion/HellionChat/releases/tag/v1.0.3)
|
||||
[Release-Notes 1.0.3](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/v1.0.3)
|
||||
|
||||
## [1.0.1] — 2026-05-04 — Window Position Recovery
|
||||
|
||||
@@ -172,7 +334,7 @@ Bundled housekeeping since v1.0.0: documentation restructured into
|
||||
parser library bumped from 3.3.0 to 3.5.1, GitHub Actions bumps for
|
||||
`actions/setup-dotnet` (4 → 5) and `github/codeql-action` (3 → 4).
|
||||
|
||||
[Release-Notes 1.0.1](https://github.com/JonKazama-Hellion/HellionChat/releases/tag/v1.0.1)
|
||||
[Release-Notes 1.0.1](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/v1.0.1)
|
||||
|
||||
## [1.0.0] — 2026-05-03 — Standalone Major Release
|
||||
|
||||
@@ -185,7 +347,7 @@ User auf Config-Version 12 oder älter neu strukturiert (5 thematische
|
||||
Tabs statt 6+ kitchen-sink). Sweep aus Critical- und Major-Findings
|
||||
aus dem Codebase-Audit eingearbeitet.
|
||||
|
||||
[Release-Notes 1.0.0](https://github.com/JonKazama-Hellion/HellionChat/releases/tag/v1.0.0)
|
||||
[Release-Notes 1.0.0](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/v1.0.0)
|
||||
|
||||
## [0.6.1] — 2026-05-03 — Pop-Out Discoverability & /tell Auto-Pop-Out
|
||||
|
||||
@@ -195,7 +357,7 @@ Pop-Out öffnen". Pop-Out-Input ist jetzt standardmäßig aktiv.
|
||||
Bugfixes: Ghost-Windows bei LRU-Drop / Logout, Dead-Zone unter dem
|
||||
Input-Bar bei aktivem Hint-Banner.
|
||||
|
||||
[Release-Notes 0.6.1](https://github.com/JonKazama-Hellion/HellionChat/releases/tag/v0.6.1)
|
||||
[Release-Notes 0.6.1](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/v0.6.1)
|
||||
|
||||
## [0.6.0] — 2026-05-03 — UX Polish: Pop-Out Input + Colour Presets
|
||||
|
||||
@@ -205,7 +367,7 @@ Text-Buffer pro Pop-Out. Sieben Built-in-Color-Presets (Klassik,
|
||||
High-Contrast, Pastell, Dark-Mode-Tuned, Hellion, Night Blue, Indigo
|
||||
Violet) zum One-Click-Apply. Konfigurations-Migration v10 → v11.
|
||||
|
||||
[Release-Notes 0.6.0](https://github.com/JonKazama-Hellion/HellionChat/releases/tag/v0.6.0)
|
||||
[Release-Notes 0.6.0](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/v0.6.0)
|
||||
|
||||
## [0.5.4] — 2026-05-02 — WrapText Hardening
|
||||
|
||||
@@ -215,7 +377,7 @@ CodeQL-Critical-Alert "unvalidated local pointer arithmetic"
|
||||
dauerhaft. Keine nutzersichtbare Verhaltensänderung — Word-Wrap-Output
|
||||
ist byte-identisch zu 0.5.3.
|
||||
|
||||
[Release-Notes 0.5.4](https://github.com/JonKazama-Hellion/HellionChat/releases/tag/v0.5.4)
|
||||
[Release-Notes 0.5.4](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/v0.5.4)
|
||||
|
||||
## [0.5.3] — 2026-05-02 — Pointer Arithmetic Hardening
|
||||
|
||||
@@ -223,7 +385,7 @@ Erster Anlauf zur Schließung des CodeQL-Critical-Alerts in
|
||||
`ImGuiUtil.WrapText`. Encoded-Byte-Buffer-Length wird vor der
|
||||
Pointer-Arithmetik via `GetByteCount` validiert.
|
||||
|
||||
[Release-Notes 0.5.3](https://github.com/JonKazama-Hellion/HellionChat/releases/tag/v0.5.3)
|
||||
[Release-Notes 0.5.3](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases/tag/v0.5.3)
|
||||
|
||||
---
|
||||
|
||||
@@ -232,7 +394,7 @@ Pointer-Arithmetik via `GetByteCount` validiert.
|
||||
Releases vor 0.5.3 (Bootstrap-Phase 0.1.0 bis 0.5.2) sind direkt am
|
||||
GitHub-Release-Stream einsehbar:
|
||||
|
||||
[Alle Releases](https://github.com/JonKazama-Hellion/HellionChat/releases)
|
||||
[Alle Releases](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/releases)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ Die Upstream-Sprach-Dateien (`Language.<lang>.resx`) sind nicht Teil dieser Date
|
||||
|
||||
## Wie du beitragen kannst
|
||||
|
||||
Bug-Reports, Feature-Wünsche und Pull-Requests laufen über [GitHub Issues](https://github.com/JonKazama-Hellion/HellionChat/issues). Workflow und Erwartungen stehen in [`../CONTRIBUTING.md`](../CONTRIBUTING.md), Code of Conduct in [`../CODE_OF_CONDUCT.md`](../CODE_OF_CONDUCT.md).
|
||||
Bug-Reports, Feature-Wünsche und Pull-Requests laufen über [Gitea Issues](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues). Workflow und Erwartungen stehen in [`../CONTRIBUTING.md`](../CONTRIBUTING.md), Code of Conduct in [`../CODE_OF_CONDUCT.md`](../CODE_OF_CONDUCT.md).
|
||||
|
||||
Tester-Pool für neue Versionen läuft über den Hellion-Forge-Discord: [discord.gg/X9V7Kcv5gR](https://discord.gg/X9V7Kcv5gR). Wer in den Tester-Channel rein will, einfach im Forge melden.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Geplante Arbeit nach dem v1.0.0 Standalone-Cut. Diese Liste ist absichtlich
|
||||
grob: konkrete Specs, Größenschätzungen und Repro-Steps liegen im
|
||||
internen Backlog. Tracking nach außen läuft über
|
||||
[GitHub Issues](https://github.com/JonKazama-Hellion/HellionChat/issues)
|
||||
[Gitea Issues](https://gitea.hellion-forge.cloud/JonKazama-Hellion/HellionChat/issues)
|
||||
mit dem `roadmap`-Label, sobald ein Item für einen Cycle eingeplant ist.
|
||||
|
||||
Reihenfolge ist Priorität, nicht Garantie. Items können sich verschieben
|
||||
@@ -12,13 +12,75 @@ Privacy-First-Schnittmenge des Plugins erweisen.
|
||||
|
||||
---
|
||||
|
||||
## Nächster Cycle (v1.3.0)
|
||||
## Nächster Cycle (v1.4.4)
|
||||
|
||||
**Polish & Motion** — Theme-Crossfade, Header-Quick-Picker,
|
||||
Lerp-Animationen, ggf. Theme-Family-Picker (Carls Grün-Familie
|
||||
mit Forest/Moss/Mint-Helligkeitsstufen).
|
||||
**Window-Lazy-Open + Render-Init-Cost-Optimisation** — die in v1.4.3
|
||||
gelegte IAsyncDalamudPlugin-Foundation jetzt für die echten User-
|
||||
spürbaren Wins nutzen. Window-Konstruktion erst beim ersten Open,
|
||||
Render-Path-Init-Kosten in den ersten Frames runter. Konkrete
|
||||
Kandidaten und Größenschätzungen werden im v1.4.4-Brainstorm
|
||||
konsolidiert.
|
||||
|
||||
Spec wird im Brainstorming-Cycle vor Beginn der Phase ausgearbeitet.
|
||||
## v1.4.3 — Plugin-Load Async-Init + Repo-Cutover (released 2026-05-08)
|
||||
|
||||
Vierter und größter Sub-Patch der v1.4.x Polish-Sweep-Serie. Plugin
|
||||
auf Dalamud's IAsyncDalamudPlugin-API migriert: der Konstruktor
|
||||
übernimmt nur noch Bootstrap-Essentials (Config-Load, Language-Init,
|
||||
Conflict-Detection), Migrationen, Service-Allokationen, Window-
|
||||
Konstruktion und Hook-Subscription wandern in LoadAsync. Schema-
|
||||
Gate ersetzt die v9 → v16 Migrations-Kette; Configs auf Schema
|
||||
v16+ laden direkt, ältere Configs triggern eine "install v1.4.2
|
||||
first"-Fehlermeldung. AutoTranslate.PreloadCache vom Load-Pfad
|
||||
runter. FontManager.BuildFonts läuft sync am Start von LoadAsync,
|
||||
Dalamud baut den Font-Atlas auf seiner eigenen Pipeline.
|
||||
Custom-Repo-URL auf `gitea.hellion-forge.cloud` cut-over, das
|
||||
GitHub-Repo bleibt als eingefrorener v1.4.2-Snapshot stehen.
|
||||
Plugin-Load-Zeit liegt bei ~3.7 s Median (5 Reloads), vergleichbar
|
||||
mit v1.4.2: Async-Migration ist Foundation für v1.4.4 Lazy-Init-
|
||||
Optimierungen, kein direkter User-spürbarer Win.
|
||||
|
||||
## v1.4.2 — ChatLog Frame-Hot-Path (released <Datum>)
|
||||
|
||||
Dritter Sub-Patch der v1.4.x Polish-Sweep-Serie. Per-Frame-
|
||||
Allokationen aus dem ChatLogWindow-Render-Pfad und der
|
||||
Settings-StatusBar eliminiert. Card-Mode-Border-Loop in
|
||||
DrawMessages hebt fünf Invarianten in einen Pre-Loop-Hoist,
|
||||
AutoTellTabTint bekommt einen Per-Tab-Cache via TabTintCache
|
||||
(separate Validation-Keys pro Cache, kein Cross-Invalidation),
|
||||
StatusBar zieht den Cache-Gate-Check vor die Aggregations
|
||||
und ersetzt LINQ Sum+Count durch eine Single-Pass-Foreach.
|
||||
|
||||
## v1.4.1 — Theme Engine Performance (released <Datum>)
|
||||
|
||||
Zweiter Sub-Patch der v1.4.x Polish-Sweep-Serie. ABGR-Cache
|
||||
auf den Theme-Records pre-computed, HellionStyle.PushGlobal
|
||||
liest aus dem Cache statt pro Slot pro Frame zu konvertieren.
|
||||
**~13 % Render-Time-Recovery** im Smoke-Test (Plan-Erwartung
|
||||
2-6 % war konservativ, real ~10-15 %). Custom-Theme-Hot-Reload
|
||||
überlebt transient File-Locks via Last-Known-Good-Snapshot.
|
||||
Plus: Synthwave Sunset als zehnter Built-In, Author-Credits
|
||||
auf Hellion Forge konsolidiert, Mint Grove + Forge Merchantman
|
||||
auf Carla Beleandis als Community-Thanks.
|
||||
|
||||
## v1.4.0 — Critical Lifecycle Fixes (released 2026-05-07)
|
||||
|
||||
Erster Sub-Patch der v1.4.x Polish-Sweep-Serie. Sieben P0-
|
||||
Findings aus Audit-Pass-3 und Pass-4 abgearbeitet:
|
||||
async-void-Loads, fehlende IsBackground-Flags, GC.Collect
|
||||
in Dispose, DeferredSave-Race und Pre-v13-Backup-Lookup für
|
||||
WindowOpacity. Keine Schema-Bumps, keine Funktions-
|
||||
Änderungen für den User außer dass Reload und Shutdown
|
||||
spürbar sauberer laufen.
|
||||
|
||||
## v1.3.0 - Plugin Integrations: Honorific (released 2026-05-07)
|
||||
|
||||
Erster Cycle der Plugin-Integrations-Roadmap. Honorific-Custom-
|
||||
Titles werden im Chat-Header angezeigt, mit Auto-Detect und
|
||||
silent Fallback. Neuer Integrations-Settings-Tab. Pattern-
|
||||
Etablierer für die fünf folgenden Cycles (Context-Menu,
|
||||
NotificationMaster, RP-Status-Block, ExtraChat, XIVIM).
|
||||
|
||||
Spec: [Plugin-Integrationen-Übersicht](../Hellion%20Chat%20Plugin-Integrationen.md)
|
||||
|
||||
## v1.2.3 — Theme Expansion (released 2026-05-06)
|
||||
|
||||
@@ -50,8 +112,13 @@ Aus dem ursprünglichen v1.1.0-Plan (Ad-Block / Spam-Filter, Receive-
|
||||
Suppressed-Tells-Toggle) wurden zugunsten der Theme-Engine zurück
|
||||
gestellt — beide Items leben weiter im Mittelfrist-Block.
|
||||
|
||||
## Mittelfristig (v1.2.x – v1.3.0)
|
||||
## Mittelfristig (v1.4.x+)
|
||||
|
||||
- **Plugin-Integrations-Roadmap (Cycles 2-6)** - sechs Plugin-
|
||||
Integrationen geplant, Honorific (Cycle 1) ist live, danach folgen
|
||||
Context-Menu, NotificationMaster, RP-Status-Block, ExtraChat und
|
||||
XIVIM in eigenen Cycles. Spec und Cycle-Reihenfolge in
|
||||
[Plugin-Integrationen-Übersicht](../Hellion%20Chat%20Plugin-Integrationen.md).
|
||||
- **Ad-Block / Spam-Filter** — Hybrid-Konzept aus eigenem Light-Filter und
|
||||
optionaler `NoSoliciting`-IPC-Integration. Adressiert Werbe-Spam in
|
||||
öffentlichen Channels und Tells. Aus dem v1.1.0-Plan zurückgestellt.
|
||||
@@ -156,6 +223,7 @@ aktuellen Stand getestet.
|
||||
|
||||
Hellion Chat ist EUPL-1.2-lizenziert. Konzept-Imports aus AGPL-3.0-Plugins
|
||||
(z.B. XIV Instant Messenger) sind ausschließlich architektonische
|
||||
Inspiration, kein Code-Port. Imports aus dem GPL-3.0-kompatiblen
|
||||
Upstream-Bestand laufen weiter über
|
||||
[`UPSTREAM_SYNC.md`](UPSTREAM_SYNC.md).
|
||||
Inspiration, kein Code-Port. Code-Imports aus dem Upstream-Bestand
|
||||
sind seit v1.4.x abgeschlossen, weil Chat 2 in einem grundlegenden
|
||||
Rework ist und selektive Patches nicht mehr sauber portierbar sind.
|
||||
Stand und Begründung in [`UPSTREAM_SYNC.md`](UPSTREAM_SYNC.md).
|
||||
|
||||
@@ -51,8 +51,9 @@ HellionChat is a fork of [Chat 2](https://github.com/Infiziert90/ChatTwo)
|
||||
by Infiziert90 (Infi) and Anna Clemens, also licensed under EUPL-1.2.
|
||||
The bulk of the code, including the message store architecture, the
|
||||
channel logic, the hook system and the ImGui chat window, originates
|
||||
from upstream. See `../NOTICE.md` and `UPSTREAM_SYNC.md` for the
|
||||
attribution and the cherry-pick policy.
|
||||
from upstream. See `../NOTICE.md` for the attribution; `UPSTREAM_SYNC.md`
|
||||
documents the upstream-sync history, including the close of active
|
||||
cherry-picking in the v1.4.x cycle.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
HellionChat is a standalone EUPL-1.2 plugin that originated from
|
||||
[Chat 2](https://github.com/Infiziert90/ChatTwo). Since v1.0.0 it
|
||||
lives under its own namespace, IPC channels and source tree. I no
|
||||
longer track upstream as a Git fork, but I do monitor Chat 2 commits
|
||||
regularly and cherry-pick selectively where it makes sense.
|
||||
lives under its own namespace, IPC channels and source tree. The
|
||||
active cherry-pick pipeline from upstream Chat 2 is closed since
|
||||
the v1.4.x cycle.
|
||||
|
||||
This document covers how that works so anyone (including future-me)
|
||||
can do it cleanly.
|
||||
This document covers what that means, why I closed it, and what
|
||||
stays in place.
|
||||
|
||||
## A Word on Intent
|
||||
|
||||
@@ -28,99 +28,77 @@ new UI from scratch and making deliberate architectural decisions that
|
||||
pull in a different direction. Some upstream patches will simply stop
|
||||
applying cleanly and that is expected.
|
||||
|
||||
## One-Time Setup
|
||||
## Why Cherry-Picking Stopped in v1.4.x
|
||||
|
||||
Add the upstream repo as a remote on a fresh clone:
|
||||
Two things converged:
|
||||
|
||||
```bash
|
||||
git remote add upstream https://github.com/Infiziert90/ChatTwo.git
|
||||
git fetch upstream
|
||||
```
|
||||
1. **Chat 2 is in a rework cycle.** Infi mentioned directly that
|
||||
parts of ChatTwo are being reworked and "stuff may not be able to
|
||||
be cherry picked anymore." Once the upstream code paths I would
|
||||
pull from no longer exist in the same shape, `git cherry-pick`
|
||||
stops being a meaningful tool — what would land would not be the
|
||||
change Infi wrote, it would be a hand-port of his concept.
|
||||
2. **HellionChat has drifted enough that selective patches require
|
||||
adaptation anyway.** The UI is being rebuilt, the theme engine
|
||||
sits on top of HellionStyle which has no upstream equivalent, the
|
||||
privacy filter changes how messages flow through MessageManager.
|
||||
Even before the rework was announced, more and more upstream
|
||||
patches needed adaptation rather than a clean apply.
|
||||
|
||||
Verify both remotes are wired up:
|
||||
Together those two points mean continuing to call this an "active
|
||||
cherry-pick pipeline" was no longer honest. So I closed it.
|
||||
|
||||
```bash
|
||||
git remote -v
|
||||
# origin https://github.com/JonKazama-Hellion/HellionChat.git (fetch)
|
||||
# origin https://github.com/JonKazama-Hellion/HellionChat.git (push)
|
||||
# upstream https://github.com/Infiziert90/ChatTwo.git (fetch)
|
||||
# upstream https://github.com/Infiziert90/ChatTwo.git (push)
|
||||
```
|
||||
## What Closing the Pipeline Means in Practice
|
||||
|
||||
`upstream` is read-only. Never push to it.
|
||||
- The `upstream` git remote was removed locally on 2026-05-08.
|
||||
Anyone setting up a fresh clone does **not** add it back.
|
||||
- New commits will not carry `(cherry picked from commit ...)`
|
||||
trailers. Anything that originates from Chat 2 from this point
|
||||
forward will be a hand-port at most, and it gets called out as
|
||||
such in its own commit message and in the relevant source comments.
|
||||
- The existing cherry-pick trail stays in the git history exactly as
|
||||
it is. Every `(cherry picked from commit ...)` line that was added
|
||||
with `-x` in earlier releases remains intact; that is the
|
||||
attribution paper trail and removing it would be wrong.
|
||||
|
||||
## Reviewing What Is New Upstream
|
||||
## What Does Not Change
|
||||
|
||||
Before any feature cycle I run a quick check:
|
||||
- **EUPL-1.2 anchor lines in source files.** Files that originated
|
||||
from Chat 2 keep their licence headers and any "based on
|
||||
Infiziert90/ChatTwo" notice exactly as they are. The licence
|
||||
obligations under EUPL-1.2 do not lapse because cherry-picking
|
||||
stopped.
|
||||
- **NOTICE.md** stays canonical. Attribution to Infi and Anna for the
|
||||
message store, channel logic, hook system, ImGui chat window and
|
||||
the localisation infrastructure remains the foundation statement of
|
||||
this fork.
|
||||
- **README acknowledgements.** The Acknowledgements section in
|
||||
`README.md`, the maintainer thanks in the About tab, and the
|
||||
`Language.*.resx` Crowdin translator credit list all stay as they
|
||||
are.
|
||||
- **The original `Language.*.resx` files** remain in the source tree
|
||||
in their last upstream-sync state. They are the work of the Chat 2
|
||||
Crowdin community and the existing translations stay valuable. They
|
||||
will not receive automatic upstream updates anymore — see
|
||||
CONTRIBUTING.md for what that means for translators.
|
||||
|
||||
```bash
|
||||
git fetch upstream
|
||||
git log --oneline main..upstream/main | head -30
|
||||
```
|
||||
## What Could Re-Open Later
|
||||
|
||||
That shows every commit Infi or contributors landed since the last
|
||||
sync. I read the messages and decide which ones apply to HellionChat.
|
||||
If Chat 2's rework lands and stabilises, and there is a piece of
|
||||
upstream code that I genuinely want in HellionChat, the path forward
|
||||
is **study and re-implement**, not cherry-pick. That means:
|
||||
|
||||
## What I Cherry-Pick
|
||||
- Read the upstream change, understand the design, port the concept
|
||||
to HellionChat's actual code paths.
|
||||
- Credit the upstream author in the commit message and, if the
|
||||
ported code is non-trivial, in a source-file comment.
|
||||
- Pre-clear with Infi if the port is large enough to warrant a
|
||||
conversation.
|
||||
|
||||
**Always:** security fixes, Dalamud API compatibility patches,
|
||||
BetterTTV and emote-cache fixes, regression fixes for upstream
|
||||
behaviour HellionChat still relies on.
|
||||
|
||||
**Sometimes:** small bug fixes in `MessageManager.cs`,
|
||||
`MessageStore.cs`, `ChatLogWindow.cs`, the Tabs system. These come in
|
||||
when they touch code I have not heavily modified.
|
||||
|
||||
**Never:** webinterface changes (the entire webinterface tree is gone
|
||||
in HellionChat), changes that conflict with the privacy filter, changes
|
||||
that re-add upstream defaults I deliberately reversed (full-history
|
||||
logging, Tell Exclusive defaults, etc.).
|
||||
|
||||
As HellionChat's UI moves further from the Chat 2 baseline, upstream
|
||||
patches will increasingly require adaptation rather than a clean
|
||||
apply. If a patch cannot be ported without breaking HellionChat
|
||||
behaviour or the privacy model, I skip it rather than force a
|
||||
compromised version in.
|
||||
|
||||
## How I Cherry-Pick
|
||||
|
||||
Always with `-x` so authorship and the original commit hash stay
|
||||
visible:
|
||||
|
||||
```bash
|
||||
git checkout -b sync/upstream-<topic> main
|
||||
git cherry-pick -x <upstream-commit-sha>
|
||||
```
|
||||
|
||||
`-x` appends a `(cherry picked from commit <sha>)` line to the commit
|
||||
message. That preserves upstream-author credit and lets anyone reading
|
||||
`git log` trace the change back to Chat 2. Commit messages stay
|
||||
identical to the upstream original; I do not rewrite them to match the
|
||||
HellionChat format.
|
||||
|
||||
## Conflict Handling
|
||||
|
||||
When a cherry-pick conflicts:
|
||||
|
||||
1. Resolve by hand. Do not rewrite upstream code to match HellionChat
|
||||
conventions; that is what the merge marker showed.
|
||||
2. If the conflict is fundamental (touches code that no longer exists
|
||||
in HellionChat), abort the cherry-pick and note why in the
|
||||
relevant GitHub issue or backlog item. Some upstream patches are
|
||||
simply not portable and that is fine.
|
||||
3. After a clean resolve the commit message stays as-is, with the
|
||||
`-x` footer Git appends automatically.
|
||||
|
||||
## Pushing the Sync
|
||||
|
||||
Cherry-picked commits go through the same review as any other change.
|
||||
The sync branch lands in `main` via a no-fast-forward merge, then gets
|
||||
a release tag if user-visible behaviour changed:
|
||||
|
||||
```bash
|
||||
git checkout main
|
||||
git merge --no-ff sync/upstream-<topic> -m "merge: upstream sync — <topic>"
|
||||
```
|
||||
This is heavier than `git cherry-pick -x` and that is the point.
|
||||
Cherry-picking was light because both codebases shared structure;
|
||||
once they do not, the proper attribution costs a real conversation
|
||||
rather than a flag on a git command.
|
||||
|
||||
## Contributing Back
|
||||
|
||||
@@ -138,17 +116,12 @@ A few things to note about that process:
|
||||
not push that decision onto his codebase.
|
||||
- This is not guaranteed for every change, only where it makes sense
|
||||
and where I am confident the fix is clean and self-contained.
|
||||
|
||||
## When Upstream Goes Silent
|
||||
|
||||
If Chat 2 stops receiving updates the remote stays configured and this
|
||||
workflow stays documented. The moment maintenance picks back up I am
|
||||
ready to pull again.
|
||||
- Whether it gets accepted is Infi's call, and a "no" is fine.
|
||||
|
||||
## When Upstream Takes a Direction I Cannot Follow
|
||||
|
||||
If a future Chat 2 release breaks compatibility with the HellionChat
|
||||
privacy philosophy in a way that cannot be resolved (mandatory cloud
|
||||
sync, removal of the local message store, an incompatible license
|
||||
change), HellionChat continues from the last compatible cherry-pick.
|
||||
The inherited history stays under EUPL-1.2 and stays attributed.
|
||||
sync, removal of the local message store, an incompatible licence
|
||||
change), HellionChat continues from where it is. The inherited
|
||||
history stays under EUPL-1.2 and stays attributed.
|
||||
|
||||
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# preflight.sh — pre-push gate. Blocks A/B/C verify config drift; Block D is a
|
||||
# headless `dotnet build` to catch compile-time API drift. Test execution lives
|
||||
# in the local Build-Suite repo and is NOT part of this preflight.
|
||||
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
echo "==> preflight: Block A — version consistency"
|
||||
./scripts/verify-version-consistency.sh
|
||||
|
||||
echo "==> preflight: Block B — manifest shape"
|
||||
./scripts/verify-manifest-shape.sh
|
||||
|
||||
echo "==> preflight: Block C — changelog sync"
|
||||
./scripts/verify-changelog-sync.sh
|
||||
|
||||
echo "==> preflight: Block D — plugin compile health"
|
||||
dotnet build HellionChat/HellionChat.csproj --configuration Release --nologo --verbosity quiet
|
||||
|
||||
echo "==> preflight: ALL GREEN"
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# setup-hooks.sh — installs pre-push hook via core.hooksPath. Idempotent.
|
||||
# Note: NO pre-commit hook — test execution is local-only in the Build-Suite repo,
|
||||
# so the plugin repo's pre-commit cannot run tests. Versions/manifest/changelog
|
||||
# checks happen on pre-push only.
|
||||
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
git config core.hooksPath .githooks
|
||||
chmod +x .githooks/pre-push
|
||||
echo "setup-hooks: core.hooksPath set to .githooks. pre-push live."
|
||||
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
# verify-changelog-sync.sh — Block C.
|
||||
# Strips .0 suffix from repo.json AssemblyVersion to derive the 3-digit tag/version.
|
||||
# yaml.changelog is a single multi-line block with **Hellion Chat X.Y.Z** subblocks.
|
||||
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
YAML="$ROOT/HellionChat/HellionChat.yaml"
|
||||
REPO_JSON="$ROOT/repo.json"
|
||||
FORGE_DIR="$ROOT/.github/forge-posts"
|
||||
|
||||
fail() { echo "verify-changelog-sync: FAIL — $1" >&2; exit 1; }
|
||||
ok() { echo "verify-changelog-sync: OK — $1"; }
|
||||
|
||||
VER="$(jq -r '.[0].AssemblyVersion' "$REPO_JSON" | sed -E 's/\.0$//')"
|
||||
TAG="v$VER"
|
||||
|
||||
grep -qE "^[[:space:]]*\*\*Hellion Chat ${VER}" "$YAML" \
|
||||
|| fail "$YAML changelog missing **Hellion Chat ${VER}** subblock. Fix: add the v${VER} block at the top of the changelog field."
|
||||
|
||||
jq -r '.[0].Changelog' "$REPO_JSON" | grep -qE "^[[:space:]]*\*\*Hellion Chat ${VER}" \
|
||||
|| fail "$REPO_JSON Changelog missing **Hellion Chat ${VER}** subblock. Fix: copy the yaml changelog over."
|
||||
|
||||
FORGE_FILE="$FORGE_DIR/${TAG}.md"
|
||||
[ -f "$FORGE_FILE" ] || fail "$FORGE_FILE missing. Fix: create from previous tag's file as template."
|
||||
|
||||
SUBTITLE="$(awk '/^---$/{f=!f; next} f && /^subtitle:/' "$FORGE_FILE" | sed -E 's/^subtitle:[[:space:]]*//' | tr -d '\"')"
|
||||
[ -n "$SUBTITLE" ] || fail "$FORGE_FILE frontmatter missing 'subtitle'."
|
||||
[ "${#SUBTITLE}" -le 60 ] || fail "$FORGE_FILE subtitle is ${#SUBTITLE} chars (max 60)."
|
||||
|
||||
NATUR="$(awk '/^---$/{f=!f; next} f && /^versionsnatur:/' "$FORGE_FILE" | sed -E 's/^versionsnatur:[[:space:]]*//' | tr -d '\"')"
|
||||
[ -n "$NATUR" ] || fail "$FORGE_FILE frontmatter missing 'versionsnatur'."
|
||||
[ "${#NATUR}" -le 40 ] || fail "$FORGE_FILE versionsnatur is ${#NATUR} chars (max 40)."
|
||||
|
||||
BODY="$(awk '/^---$/{f++; next} f==2' "$FORGE_FILE")"
|
||||
TITLE_LEN=$((${#VER} + 16 + ${#SUBTITLE}))
|
||||
FOOTER_LEN=80
|
||||
TOTAL=$((TITLE_LEN + ${#BODY} + FOOTER_LEN))
|
||||
[ "$TOTAL" -le 5500 ] || fail "Forge embed total ~${TOTAL} chars > 5500 cap."
|
||||
|
||||
YAML_VERSIONS="$(grep -cE '^[[:space:]]*\*\*Hellion Chat' "$YAML" || true)"
|
||||
[ "$YAML_VERSIONS" -le 4 ] || fail "$YAML changelog has $YAML_VERSIONS version subblocks (max 4). Fix: move oldest to docs/CHANGELOG.md."
|
||||
|
||||
ok "yaml/repo.json/forge-post in sync for $TAG, embed-total ~${TOTAL}/5500, $YAML_VERSIONS/4 subblocks"
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
# verify-manifest-shape.sh — Block B. Required fields in lowercase yaml,
|
||||
# DalamudApiLevel sanity in repo.json, no own DalamudPackager.targets,
|
||||
# Icon AND every ImageUrl reachable.
|
||||
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
YAML="$ROOT/HellionChat/HellionChat.yaml"
|
||||
REPO_JSON="$ROOT/repo.json"
|
||||
TARGETS_OWN="$ROOT/HellionChat/DalamudPackager.targets"
|
||||
|
||||
fail() { echo "verify-manifest-shape: FAIL — $1" >&2; exit 1; }
|
||||
ok() { echo "verify-manifest-shape: OK — $1"; }
|
||||
|
||||
for FIELD in name author punchline description repo_url icon_url image_urls tags changelog; do
|
||||
grep -qE "^${FIELD}:" "$YAML" || fail "$YAML missing required field: $FIELD"
|
||||
done
|
||||
|
||||
[ -f "$TARGETS_OWN" ] && fail "Own DalamudPackager.targets at $TARGETS_OWN strips Icon/ImageUrls. DELETE it; SDK default works."
|
||||
|
||||
API_LEVEL="$(jq -r '.[0].DalamudApiLevel' "$REPO_JSON")"
|
||||
case "$API_LEVEL" in
|
||||
''|null) fail "$REPO_JSON missing DalamudApiLevel" ;;
|
||||
esac
|
||||
[[ "$API_LEVEL" =~ ^[0-9]+$ ]] || fail "$REPO_JSON DalamudApiLevel must be integer, got: $API_LEVEL"
|
||||
[ "$API_LEVEL" -ge 12 ] || fail "$REPO_JSON DalamudApiLevel=$API_LEVEL is below SDK 15 floor (12)."
|
||||
|
||||
if [ "${HOOKS_OFFLINE:-0}" != "1" ]; then
|
||||
ICON_URL="$(jq -r '.[0].IconUrl' "$REPO_JSON")"
|
||||
curl -fsI "$ICON_URL" > /dev/null || fail "IconUrl unreachable: $ICON_URL"
|
||||
ok "IconUrl reachable: $ICON_URL"
|
||||
|
||||
COUNT="$(jq -r '.[0].ImageUrls | length' "$REPO_JSON")"
|
||||
[ "$COUNT" -ge 1 ] || fail "repo.json ImageUrls is empty"
|
||||
for i in $(seq 0 $((COUNT - 1))); do
|
||||
URL="$(jq -r ".[0].ImageUrls[$i]" "$REPO_JSON")"
|
||||
curl -fsI "$URL" > /dev/null || fail "ImageUrls[$i] unreachable: $URL"
|
||||
done
|
||||
ok "$COUNT ImageUrl(s) reachable, DalamudApiLevel=$API_LEVEL"
|
||||
else
|
||||
ok "skipped URL reachability (HOOKS_OFFLINE=1), DalamudApiLevel=$API_LEVEL"
|
||||
fi
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
# verify-version-consistency.sh — Block A of preflight.
|
||||
# csproj <Version> is 3-digit SemVer; repo.json AssemblyVersion is 4-digit (.0 suffix).
|
||||
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
CSPROJ="$ROOT/HellionChat/HellionChat.csproj"
|
||||
REPO_JSON="$ROOT/repo.json"
|
||||
|
||||
fail() { echo "verify-version-consistency: FAIL — $1" >&2; exit 1; }
|
||||
ok() { echo "verify-version-consistency: OK — $1"; }
|
||||
|
||||
CSPROJ_VER="$(grep -oE '<Version>[^<]+</Version>' "$CSPROJ" | head -1 | sed -E 's/<[^>]+>//g')"
|
||||
[ -n "$CSPROJ_VER" ] || fail "$CSPROJ has no <Version> element"
|
||||
|
||||
EXPECTED_4DIGIT="${CSPROJ_VER}.0"
|
||||
|
||||
REPO_VER="$(jq -r '.[0].AssemblyVersion' "$REPO_JSON")"
|
||||
[ "$REPO_VER" = "$EXPECTED_4DIGIT" ] \
|
||||
|| fail "csproj=$CSPROJ_VER expects repo.json AssemblyVersion=$EXPECTED_4DIGIT but got $REPO_VER. Fix: align in $REPO_JSON."
|
||||
|
||||
TEST_VER="$(jq -r '.[0].TestingAssemblyVersion' "$REPO_JSON")"
|
||||
[ "$TEST_VER" = "$EXPECTED_4DIGIT" ] \
|
||||
|| fail "TestingAssemblyVersion=$TEST_VER must match $EXPECTED_4DIGIT. Fix: align in $REPO_JSON."
|
||||
|
||||
TAG="v$CSPROJ_VER"
|
||||
for KEY in DownloadLinkInstall DownloadLinkUpdate DownloadLinkTesting; do
|
||||
URL="$(jq -r ".[0].$KEY" "$REPO_JSON")"
|
||||
case "$URL" in
|
||||
*"/$TAG/"*) ;;
|
||||
*) fail "$KEY=$URL does not contain tag $TAG. Fix: update $REPO_JSON $KEY to releases/download/$TAG/latest.zip." ;;
|
||||
esac
|
||||
done
|
||||
|
||||
ok "csproj=$CSPROJ_VER, repo.json=$EXPECTED_4DIGIT, tag $TAG present in DownloadLinks"
|
||||