docs(website): record the uo-link client config-decrypt contract and the dashboard mixed tier #61
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/uolink-client-contract-and-sitemode-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What & why
Doc side of website#107. Two corrections found by a live smoke test of the site (all 200 routes at every access level).
website/ARCHITECTURE.md— the "uoLinkClientnever throws" invariant was true of the HTTP call but not of resolving the config, which decrypts the stored auth token and throws when the ciphertext can't be authenticated (SECRET_ENC_KEYrotated, or a DB dump restored under a different key). In practice that 500'dGET /admin/uo-link/configand everychar/roster/vendorslookup on both the admin and player surfaces. Spell out that this is now handled inside the client, reported as{ ok: false, status: 0, error: 'uo-link config unreadable' }with a distinctERRORlog, and thatGET /admin/uo-link/configkeeps working — it is the screen an admin needs to re-enter the token and recover.website/BACKEND_DESIGN.md—GET /dashboardis staff-wide whilePUT /site-modeon the same screen isadminOnly, the one place a single screen spans two tiers. That subtlety wasn't written down, and the client had in fact missed it (the toggle rendered for editors, who were then 403'd). Note that the client must gate the control itself rather than relying on the route gate that admitted the user to the page.How it was tested
Documentation only — no code. Both statements verified against the running server: the four affected routes were reproduced returning 500 with a corrupted
auth_token_enc, then re-checked returning 200/503 after the fix; the editor/admin dashboard difference was confirmed in the browser at both roles.Checklist
AI-assisted contributions (required)
Claude Code (Opus 5). I have reviewed and understandevery change, and take responsibility for it. AI-authored commits are
marked with a
Co-Authored-By/Assisted-Bytrailer.License
(GNU GPL v3.0 or later), and I have the right to contribute it.
Two corrections found by a live smoke test of all 200 routes at every access level (website PR: fix/uolink-client-throw-and-sitemode-gate). ARCHITECTURE.md: the "uoLinkClient never throws" invariant was true of the HTTP call but not of resolving the config, which decrypts the stored auth token and throws when the ciphertext can't be authenticated (SECRET_ENC_KEY rotated, or a DB dump restored under a different key). Spell out that this is now handled inside the client, reported as { ok: false, error: 'uo-link config unreadable' } with a distinct ERROR log, and that GET /admin/uo-link/config keeps working — it is the screen an admin needs to re-enter the token and recover. BACKEND_DESIGN.md: GET /dashboard is staff-wide while PUT /site-mode on the same screen is adminOnly — the one place a single screen spans two tiers. Note that the client must gate that control itself rather than relying on the route gate that admitted the user to the page. Co-Authored-By: Claude <noreply@anthropic.com>