You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Major feature pass alongside server PR #24 (allowed_servers + is_admin on
/api/auth/whoami + strict ingest gate). Backward-compatible with v0.1.13
config files on disk — legacy BlacklistedCharacters migrates to the new
structured BlacklistedEntries on Load.
Settings panel changes
- Server URL field locks (with 🔒 glyph + tooltip) for non-admin accounts.
Plugin opportunistically calls /auth/whoami on startup and after every
Test Connection / Save click; URL unlocks only when the server returns
is_admin=true. Fail-CLOSED — outdated server (no field) → URL locked.
- New "✦ ALLOWED SERVERS" card showing the read-only list the site permits
uploads from. Defaults to ["Varsoon", "Wuoshi"] until whoami returns the
list. Inline warning when the current logging server isn't allowed.
- New "▤ EVENT LOG" card in the right column (TableLayoutPanel split).
Captures + uploads + HTTP request/response summaries with severity
colours, toolbar (Clear / Copy / Auto-scroll / category filters), and a
500-entry ring buffer. Bearer token never appears in any log line.
- "Don't upload as" blacklist now a row-based editor with [Character]
[Server (dropdown)] [✕ Remove] rows + an Add button. Server dropdown is
pre-populated with the allowed-servers list. Doubled visible area
(84px → 180px). Fixes the issue where same-named alts on different
servers couldn't be selectively blacklisted.
UI polish
- Embedded Cinzel variable font (SIL OFL 1.1, ~125KB) for the EQ2
LEXICON UPLOADER title and all card section headings. Loaded via
PrivateFontCollection so users don't need it installed; body text
stays Segoe UI for legibility.
- Rounded buttons (6px radius) via custom RoundedButton control with
proper parent-bg painting in OnPaintBackground so corners blend
cleanly into the card behind. Rounded card borders (8px) via the
same path helper.
- Spacing breathing room: root padding 16 → 24/20/24/24; card-to-card
gap 12 → 16; header-to-first-card gap 12 → 18.
Core
- UploadClient: ExtractJsonBool + ExtractJsonStringArray helpers (same
fail-closed posture as the existing ExtractJsonString). TestConnection
returns IsAdmin (default false) and AllowedServers (default null →
caller substitutes built-in default). New RequestCompleted event
fires after every HTTP exchange with anonymised summary (verb, URL,
status, duration, success, 200-char response excerpt) — never the
token, never the payload body.
- New EventLog Core type (thread-safe ring buffer, EntryAdded event,
Snapshot, Clear). Pure, no ACT/WinForms refs.
- PluginConfig: new BlacklistedEntry (Character + Server) class.
IsBlacklisted now takes (character, server). Server="" means
"any server" (legacy semantics). Load() migrates legacy
BlacklistedCharacters → BlacklistedEntries with Server="";
idempotent.
Tests: 234 passing (up from 215). New coverage for ExtractJsonBool,
ExtractJsonStringArray, EventLog ring-buffer + thread-safety, the new
(character, server) blacklist match semantics, and the legacy
list-of-string → list-of-entry migration on Load.
Server-side contract for the new whoami fields is documented in
CLAUDE.md → "Required server-side changes". Server PR landed as
VortexUK/EQ2Lexicon#24 — the plugin reads what the server now ships.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,6 +139,22 @@ Every upload includes an `X-Lexicon-Signature` header: HMAC-SHA256 of the reques
139
139
140
140
**Rollout coordination with the server**: ship the server's signature validator in *opportunistic* mode first (validate only if header present, reject only if validation fails) so existing v0.1.7 installs keep uploading. Flip to *strict* mode (require the header) once telemetry shows ≥98% of uploads carry it — pulled from the `User-Agent` header which UploadClient sets to `EQ2LexiconACTPlugin/<assembly version>`.
141
141
142
+
## Required server-side changes (pending in [VortexUK/EQ2Lexicon](https://github.com/VortexUK/EQ2Lexicon))
143
+
144
+
The plugin already wires UI for two fields that the production server does not yet emit. Until the server PRs land, the plugin falls back to safe defaults (URL field stays locked; allowed-servers card shows a built-in list).
145
+
146
+
### `is_admin` on `/api/auth/whoami`
147
+
148
+
Add a boolean `is_admin` to the JSON response. Drives the Server URL field's editability gate in the plugin — only admins can change the endpoint. Fail-CLOSED in the plugin: if the field is missing the URL stays locked, so a non-admin can never see a writable URL field by simply pointing at an old build of the server. Same opportunistic-rollout pattern as the HMAC header in v0.1.8 — additive field, ignored by old clients, used by new ones.
149
+
150
+
### `allowed_servers` on `/api/auth/whoami`
151
+
152
+
Add an array of EQ2 server name strings (e.g. `["Varsoon", "Wuoshi"]`) the user is permitted to upload from. Drives the ALLOWED SERVERS card in the settings panel — read-only display so the user knows up-front which characters' parses will reach the site. The list could be a global default, per-guild, or per-user — server's choice; the plugin just renders what it's given. Sanitisation in the plugin caps each entry at 64 chars and the whole array at 32 entries to keep a hostile/buggy server from breaking the UI layout.
153
+
154
+
When absent, the plugin uses a built-in default of `["Varsoon", "Wuoshi"]` (the two active English-language EQ2 TLE servers as of 2026). When the server starts returning the field, the built-in default is replaced by whatever the site says on the next whoami round-trip.
155
+
156
+
Future enforcement: the server should *also* validate `logger_server` on incoming uploads against the same list and reject mismatched uploads with a 403. The plugin's display is courtesy/transparency; the real gate is the server.
157
+
142
158
## Update awareness (v0.1.8+)
143
159
144
160
The plugin fetches `https://api.github.com/repos/VortexUK/EQ2LexiconACTPlugin/releases` once per ACT session, compares the assembly version to the published tags, and:
The EQ2 Lexicon ACT Plugin redistributes the following third-party assets.
4
+
5
+
## Cinzel font
6
+
7
+
The plugin embeds [Cinzel](https://github.com/google/fonts/tree/main/ofl/cinzel) (the variable font `Cinzel[wght].ttf`) by Natanael Gama, licensed under the [SIL Open Font License 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL).
8
+
9
+
The full OFL text is bundled inside the DLL at `src/Resources/Fonts/OFL.txt` and reproduced here for convenience: <https://github.com/google/fonts/blob/main/ofl/cinzel/OFL.txt>
10
+
11
+
The OFL grants permission to use, embed, and redistribute the font under the conditions in the license — most relevantly:
12
+
13
+
- The font may not be sold by itself.
14
+
- The font (or modified versions) when bundled inside a software package may be distributed at no extra charge, with the OFL included.
15
+
16
+
We meet these conditions by shipping the unmodified Cinzel variable font as an embedded resource in `EQ2Lexicon.ACTPlugin.dll` along with the OFL.txt notice file.
0 commit comments