Commit Graph

931 Commits

Author SHA1 Message Date
JonKazama-Hellion 5b33a21d15 Localize the Hellion Chat surface area (EN + DE)
Add HellionStrings.resx as the English source and HellionStrings.de.resx
for German, with a hand-maintained Designer.cs that mirrors the layout
of Language.Designer.cs. Resource files live next to the upstream
Language.resx but are kept entirely separate so upstream cherry-picks
never collide with our translations and any future Hellion-only
translation tooling (Crowdin, manual contribution) can target this
file without touching the Chat 2 dictionary.

Plugin.LanguageChanged now updates HellionStrings.Culture alongside
Language.Culture so every UI string flips to the active locale at the
same moment. The Privacy tab title, master switch, channel groups
(now resolved per frame so the language can change without restart),
preset buttons, failsafe toggle, retention section, cleanup section,
status messages and notification bodies all read from HellionStrings.
The migration toast also takes its title and body from there.

Translations follow the project's German style: Du-Form, full
diacritics (ä, ö, ü), no em-dashes inside flowing prose, "Whitelist"
and "Linkshell" kept as-is because they are the established terms.
2026-05-01 20:03:18 +02:00
JonKazama-Hellion 353596fa43 Fall back to spec retention defaults before the global default
GetRetentionDays previously dropped straight from a missing user
override to RetentionDefaultDays, so every channel showed 30 days
in the UI even though the spec lists 365 for Tells and 90 for own-
conversation channels. Insert a middle layer: user override → spec
default → global default. The retention sweep now seeds its policy
from PrivacyDefaults.DefaultRetentionDays first and lets explicit
user overrides win on top, and the per-channel UI tags each row as
[override], [spec], or [global] so the source of the value is
visible without guessing.
2026-05-01 18:52:54 +02:00
JonKazama-Hellion 68c7185cea Add per-channel message retention with daily background sweep
Privacy filter trimmed history "by what" — this adds the time axis.
Each ChatType gets its own retention window in days; channels
without an explicit override fall back to a configurable global
default. The master switch defaults to OFF: the plugin never
deletes history without explicit user consent.

MessageStore.DeleteByRetentionPolicy builds an OR'd WHERE clause
over (ChatType = X AND Date < cutoff_X) plus a NOT IN catch-all
for the global default, hard-deletes matches, and only runs VACUUM
when something was actually removed.

Plugin.RunRetentionSweepIfDue runs at most once per 24 hours on a
background thread (off the load path) and persists the timestamp
so subsequent restarts skip the sweep until enough time has
passed. The Privacy tab gains a retention section with the master
switch, default-days input, per-channel override tree, reset
buttons, and a Ctrl+Shift "apply now" action that mirrors the
auto-sweep but on demand.

Spec defaults: Tells 365 days, own-conversation channels (Party,
Cross-Party, Alliance, PvP Team, FC, Linkshells 1-8, Cross-World
Linkshells 1-8, ExtraChat 1-8) 90 days, fallback 30 days.
2026-05-01 18:47:31 +02:00
JonKazama-Hellion e7b6cf245c Drop FC announcements and login/logout from Privacy-First defaults
FreeCompanyAnnouncement (Company Board) and FreeCompanyLoginLogout
are broadcasts, not personal conversation, and the design spec only
listed plain "Free Company" as a Privacy-First default channel.
Existing users who want to keep them can still tick the boxes in
the Privacy tab.
2026-05-01 18:43:17 +02:00
JonKazama-Hellion f0d6d64666 Migrate from ChatTwo layout at file level, not directory level
The original migration skipped the database move whenever
pluginConfigs/HellionChat already existed. In practice that
directory is materialised by Dalamud before our plugin constructor
runs, so the check was effectively always true and the legacy
chat-sqlite.db plus the EmoteCacheV1 directory stayed behind.

Walk the legacy directory entry by entry instead. Move every file
or subdirectory whose name is not already present on the target
side, then delete the legacy directory if it ends up empty. This
handles both fresh installs and the realistic case where Dalamud
has pre-created an empty config directory for the new plugin.
2026-05-01 18:40:06 +02:00
JonKazama-Hellion 2401ea5864 Add retroactive cleanup for the existing database
The privacy filter only catches new messages. Two new MessageStore
methods support a one-shot retroactive sweep: GetMessageCountsByChatType
returns a (ChatType, count) snapshot so the UI can preview the impact,
and CleanupRetainOnly hard-deletes everything outside the supplied
allowlist and runs VACUUM to reclaim disk space.

The Privacy tab gains a new section with a refresh-preview button, a
keep/delete summary, a per-channel breakdown tree, and a Ctrl+Shift
confirm. The cleanup runs on a background thread so a 800+ MB VACUUM
does not block the settings UI; tabs are rebuilt via the framework
thread once the delete finishes. The cleanup deliberately uses the
saved Plugin.Config whitelist (not unsaved Mutable edits) so it stays
consistent with the prospective filter.
2026-05-01 18:34:28 +02:00
JonKazama-Hellion 465aadbb1a Brand the fork as Hellion Chat with independent plugin state
Switch the assembly name to HellionChat so Dalamud uses
pluginConfigs/HellionChat for our config file and database
directory, instead of sharing those locations with the upstream
Chat 2 plugin. Code namespace stays ChatTwo.* so upstream
cherry-picks apply cleanly.

Rename the DalamudPackager manifest to HellionChat.yaml with
fork-specific name, author, repo URL, description, tags and
changelog. Plugin.PluginName becomes "Hellion Chat".

Add a one-shot migration in the plugin constructor that runs
before GetPluginConfig: if pluginConfigs/ChatTwo.json or the
ChatTwo/ directory exist and our equivalents don't, move them
into the HellionChat layout. Idempotent: only fires on the first
load where legacy paths are present and ours are not.
2026-05-01 18:26:11 +02:00
JonKazama-Hellion 1ad5cb3164 Add privacy filter with channel whitelist (GDPR Art. 25)
Introduce an opt-out channel whitelist so the database only persists
messages from channels the user explicitly wants to keep. Default
profile follows GDPR data minimization: own conversations only
(Tells, Party, FC, Linkshells, Cross-World Linkshells, Alliance,
ExtraChat). Public chat (Say/Shout/Yell), Novice Network, NPC
dialogue and system logs are dropped by default.

The filter sits inside MessageStore.UpsertMessage so any current or
future write path is covered uniformly. Configuration provides an
IsAllowedForStorage(ChatType) helper plus a "persist unknown
channels" failsafe (default off) for ChatTypes added by future
patches.

A new Privacy settings tab exposes the whitelist as grouped
checkboxes with three preset buttons (Privacy-First, Clear all,
Select all). Configuration version bumps from 6 to 7; existing
users are migrated to the Privacy-First defaults on first load
and notified once via the Dalamud notification manager.

Also includes a small .env.example and gitignore hygiene for local
development setup.
2026-05-01 18:20:09 +02:00
JonKazama-Hellion 94064bf9e4 Make Migrate3 idempotent against partial application
If Migrate3 has already applied its schema changes but failed to
bump user_version (e.g. process crashed between ALTER and
SetMigrationVersion), the next run currently hits a duplicate
column error because ALTER TABLE ADD COLUMN is not idempotent in
SQLite.

Detect the recovery case by checking for the presence of the v3
target columns and the absence of the dropped Code column, and
just record the migration version when found.
2026-05-01 18:19:39 +02:00
Infi 89e1da1211 - Loc Update 2026-05-01 12:02:45 +02:00
Infi 3bc8a223c2 - Fix #175 2026-05-01 11:59:25 +02:00
Infi 7dc34c6013 - Sort rows in the database by date
- Add fast buttons to add/remove all channels
2026-05-01 02:10:10 +02:00
Infi 33c922aaf7 - Potential fix for null ref error
- Add logging around migration
2026-04-30 22:27:23 +02:00
Infi dcf77e27f2 - Fix migration not running for new users
- Use PlayerState for character
2026-04-30 18:14:15 +02:00
Infi b4cb8b25ec - API 15
- Migrate config for API 15
- Migrate database for API 15
- Allow usage of new target source
- Implement first tell target option
2026-04-30 02:59:58 +02:00
Infi 68810e23c1 - Export required files with json 2026-04-21 14:58:11 +02:00
Infi 93faf1b5bd - Null terminate bytes if passed to Utf8String 2026-04-19 21:18:47 +02:00
Infi 69c890facb - Add JSON export option for HTML test 2026-04-11 23:35:04 +02:00
Infi df0773ac65 - Implement message history export to text file 2026-04-10 22:17:37 +02:00
Infi c424311b24 - Check auto translation for commands and execute them instead of sending
- Plugin commands trigger the command helper window now
- Fix auto translation with empty text appearing
- Switch up all dalamud payload usage to ROSS if possible
- Prepare 7.5 changes
- Cleanup
2026-04-08 21:15:28 +02:00
Infi 9f7a6267f6 - Swap Queue to ConcurrentQueue 2026-03-22 15:03:37 +01:00
Infi 4341035c74 - Fix links not showing up in webinterface
- Switch to debug logging
2026-02-09 11:32:06 +01:00
Infi 638ec1a211 - Add safety around extra chat GUID parsing 2026-02-08 05:28:23 +01:00
Infi 6744c6676c - Add missing auto translates for the symbols 2026-01-20 11:27:37 +01:00
Infi 4f9a6cd5be - API 14 2025-12-19 06:49:18 +01:00
Infi 956e57a6bd - Loc update 2025-11-17 18:56:04 +01:00
Infi 10da674994 - Add a prebuild zip with the website as plogon doesn't support NodeJS building yet 2025-11-17 18:35:41 +01:00
Infi 602f245c34 - Switch to message id already generated 2025-11-17 17:53:01 +01:00
Infi 1ccb6b42ed - Delete old template file structure 2025-11-17 17:50:08 +01:00
Infi 4b94c6e30e - Identify web payloads better
- Switch to IconId field name
- Add unique id to every message
- Automate nodejs build step via csproj
- Add unread color to tab opener
- Add unread number to tab name
- Update ImageSharp dep
2025-11-17 17:48:53 +01:00
Infi 0ab2d15a87 Merge pull request #165 from Ennea/main
Mobile/portrait tab pane, smaller changes
2025-11-17 10:37:27 +01:00
Infi 1a30ef6f20 Merge pull request #164 from kedaewyn/typing-state-status
Add typing state IPC integration for enhanced Chat2 input handling
2025-11-17 10:33:45 +01:00
Ennea 7119838f81 tab pane styles/handling mobile/portrait, smaller changes
* tab pane in portrait mode now covers the entire viewport
* tab pane X turned into a chevron
* added divider between tab pane header and content
* changed default tab pane state to open
* added code to scroll messages back to bottom after tab pane animation
  and message input resize
2025-11-15 16:54:25 +01:00
Keda a6a93ed241 Add typing state IPC integration for enhanced Chat2 input handling 2025-11-15 00:17:39 +01:00
Infi c54efe5420 - Implement unread state sync for SSE 2025-10-01 21:30:41 +02:00
Infi ad77299e9e - Restructure imports to follow a more core architurcte 2025-10-01 21:11:14 +02:00
Infi d7326896b1 - Better handle newline paste
- Resize whenever box gets emptied
2025-10-01 20:29:00 +02:00
Infi 14336a9417 - Change dynamic textarea to better height scale 2025-10-01 19:49:58 +02:00
Infi 9f5255d71b Merge pull request #161 from Ennea/main
Add collapsible tab pane to web interface
2025-10-01 19:02:32 +02:00
Ennea f325ee1593 add css classes for unread indicators 2025-10-01 16:49:41 +02:00
Ennea 9f097b4df3 persist tab pane state, handle vertical scrolling in tab pane 2025-10-01 16:35:27 +02:00
Ennea 2cdc5bfcd9 add collapsible tab pane 2025-09-30 18:03:22 +02:00
Infi 11311316fd - Add textarea for input
- Remove channel switch button
- Integrate channel switch selection into channel name
- Fix state() warnings
2025-09-24 22:57:22 +02:00
Infi e2df709003 - Downgrade deps to fix current connection reset error 2025-09-20 17:21:08 +02:00
Infi 94b345c6a3 First implementation of sveltekit for webinterface 2025-09-20 16:07:46 +02:00
Infi 9b3e3f79e3 - Fix imgui asserts on table 2025-09-19 22:49:51 +02:00
Infi efdf69f782 - Fix incorrect function call for novice network
- Fix keybind handler being obsolete
2025-09-11 01:30:07 +02:00
Infi 8c4410e75c - Add glamour notifications chat type 2025-08-10 03:01:39 +02:00
Infi efddaf30ad - API 13 2025-08-06 22:24:45 +02:00
Infi b760de1799 - Switch 24h culture to enforce 00:00 formatting 2025-07-16 01:28:51 +02:00