Commit Graph

348 Commits

Author SHA1 Message Date
JonKazama-Hellion 68a6910c53 Add message export for GDPR Art. 15 right of access
The privacy story is incomplete without a way to actually hand the
data over. New Export section in the Privacy tab streams matching
messages to a Markdown, JSON or CSV file using Dalamud's file
dialog and a background thread, so the settings UI stays
responsive even when the export crawls a 150k-message archive.

MessageStore.StreamForExport returns a MessageEnumerator over
non-deleted rows filtered by ChatType list and date range, sorted
ascending. MessageExporter.ExportToFile takes that enumerator,
optionally narrows by SenderSource.TextValue substring (case-
insensitive), and writes one of three formats:

  Markdown — human-readable, day headers, [HH:mm] ChatType Sender:
  prefix per line, trailing total.

  JSON — single object with metadata (filter snapshot, exported_at,
  plugin name) and a messages array carrying id, ISO-8601 date,
  numeric and named ChatType, source/target kinds, receiver,
  content_id, sender plaintext, content plaintext.

  CSV — header line plus quoted-when-needed rows for spreadsheet
  ingestion.

Sender plaintext, channel filter, date range and format are
exposed as form fields above the Export button. Empty channel
selection means "all stored channels", a 0-day range means "no
time limit". Result count and target path are reported via
WrapperUtil notifications.
2026-05-01 20:41:58 +02:00
JonKazama-Hellion 33cfc7effa Add first-run wizard with three privacy profiles
Fresh installs now open a setup window on first plugin load that
asks the user to pick one of three starting profiles. Existing
ChatTwo users keep skipping the wizard because the v6→v7 migration
sets Configuration.FirstRunCompleted = true on the same pass that
seeds the Privacy-First defaults — they already saw the migration
notification and can reopen the wizard from the Privacy tab if
they want to choose differently.

The three profiles map to concrete configuration sets:

  Privacy-First (recommended): own-conversation whitelist (30
  channels), retention enabled with the spec defaults (Tells 365
  days, own-conversation channels 90, fallback 30).

  Casual: Privacy-First plus public chat (Say/Shout/Yell, both
  emote types, Novice Network) with a 1-day retention window so
  RP players can scroll back the last scene without keeping
  third-party speech forever.

  Full History: filter off, retention off, GDPR warning shown
  inline. Behaves like upstream Chat 2.

The wizard window is non-modal but covers a wide layout (three
side-by-side cards) and closing it without picking anything is
treated as accepting whatever defaults are already in place. The
Privacy tab gains a "show wizard again" button at the top so the
choice is reversible.
2026-05-01 20:30:25 +02:00
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 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 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
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 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 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 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
Keda a6a93ed241 Add typing state IPC integration for enhanced Chat2 input handling 2025-11-15 00:17:39 +01: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 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
Simon Schürrle 0d075ca060 Merge pull request #150
* Hash message links so messages with different links aren't considered…

* Add option to toggle if links should be considered for the message ha…
2025-06-22 20:17:19 +02:00
Infi 34c4d87a33 Merge pull request #152
Improve resource disposal practices
2025-06-22 20:15:21 +02:00
Infi e43167101b - Improve draw performance by adjusting if assumption 2025-06-22 12:49:05 +02:00
Darnell Williams 2cfd1b1487 Improve resource disposal practices
Wraps enumerators and commands in proper using blocks to ensure cleanup.
Adds async disposal for enumerators, reducing resource leakage risks.
2025-05-29 15:04:17 -05:00
Infi c9674b0646 - API 12
- Cleanup
2025-03-26 21:12:41 +01:00
Infi a6b71f50e6 - Check all tooltips for clipping 2025-03-15 14:00:26 +01:00
Infi 14cb3af13a - Allow temp channels again for fixed tabs
- French and Chinese loc update
2025-02-07 12:05:18 +01:00
Infi 8354db5b03 - Fix line break with ExtraChat channel names 2025-02-03 22:20:50 +01:00
Infi 5a78877abf - Increase page count
- /chat2Viewer is now sorted by date
- Echo everything that hasn't any channel set
- Fixed channel inputs are now enforced
- Added a warning for ECL channel mismatch
2025-02-03 13:05:26 +01:00
Infi f6dd0359e7 - Potential fix for tells getting stuck
- Allow debugger use outside of debug builds
2024-12-23 04:48:40 +01:00
Infi 70971d7b8a - Fix /r issues
- Scope the block functions menu entry
- Don't show MuteList if accountId is unset
2024-12-19 18:48:06 +01:00
Infi cb8abc9ed6 - Implement independent hide condition for popouts (closes #124) 2024-12-14 16:39:36 +01:00
Infi 92d4a75ec4 Small oops 2024-12-14 14:59:42 +01:00
Infi 97a8b96326 - Display name even if invalid channel is selected
- Add NoMove & NoResize to tabs
2024-12-14 14:54:20 +01:00
Infi 6144631b16 - Save ExtraChat channel 2024-12-02 19:26:52 +01:00
Infi 5bd6518e1a - Use EndConditional
- Fix #132 (maybe)
2024-11-21 13:59:45 +01:00
Infi d0a55e80ea - Switch SetTooltip to ImRaii based Tooltip
- Shorter date format for db viewer
2024-11-21 12:31:09 +01:00
Infi 1a1995759a - Handle NBSP payloads
- Use ingame version of axis font
2024-11-21 08:34:24 +01:00
Infi 56eff572b7 Fix #107 2024-11-18 20:06:29 +01:00
Infi cb7df12005 Potential fix for temp channel issues 2024-11-18 19:50:53 +01:00
Infi a648bcf60d Fix linkshell rotation 2024-11-17 19:16:21 +01:00
Infi bf27d3e853 Final API11 updates and new channel switcher 2024-11-16 21:06:35 +01:00
Infi 45fdac0dd6 API 11 2024-11-13 04:13:18 +01:00
Infi df503bf4f1 bump 2024-09-06 12:36:09 +02:00
aemsle 9ad613a702 Added tab support to Auto completion box 2024-09-05 00:17:47 +01:00
Infi 725fe449f8 - Support locked channels
- Implement render limit for webinterface [default 1000]
2024-09-02 12:46:09 +02:00
Infi 8d973ff966 Remove migration code 2024-08-30 23:53:34 +02:00
Infi db3d513f9e Loc the string 2024-08-29 19:06:49 +02:00
Infi cdf4f92ffa Allow users to collapse usage notice 2024-08-29 19:05:46 +02:00