guild-admin-redesign #3

Merged
shinuwa merged 11 commits from guild-admin-redesign into main 2026-12-01 13:01:48 +00:00

11 commits

Author SHA1 Message Date
aa8bb1ebaa Split dailyShare.js and document the shared exported functions with JSDoc
dailyShare.js held fillTemplate and formatCountdown, used across the whole TCG,
under a Daily Card name. They now live in textFormat.js at the root, and the
Daily Card helpers in daily/dailyFormat.js.

173 exported functions that other files call now explain what they return and
how they treat missing values: the server game rules, the toolbox storage chain,
the shared hooks and utilities, and the TCG display helpers. website/AGENTS.md
asks the same of new shared functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 13:32:20 +01:00
166790245f Turn the comments that describe functions into JSDoc so the editor shows them on hover
The 669 // comments sitting right above a function, method or hook become
/** */ blocks, unchanged in wording; eslint directives stay right above the
line they target. website/AGENTS.md now asks for JSDoc on function comments
and // inside function bodies. ExpeditionPlanner.jsx grew past 300 lines and
gets its full header, as the header test requires.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:51:47 +01:00
88c7bf8317 Group Sokko TCG's interface files by Guild quest and card rendering
The 48 files of the Daily Card, Expeditions, Daily Team and race, Broken
Mirror and card rendering move to daily/, expeditions/, team/, mirror/ and
rendering/ under website/src/features/cards, with every relative import
rewritten. The root keeps the page, server calls, cache and the player
sections outside the Guild. The cards README, the quest recipe and the
current docs follow the new paths; dated audits and plans keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:35:18 +01:00
863050437f File Sokko G's dated documents under docs/audits and docs/plans and renumber the design system sections
The UX audit and the toolbox loading profile join docs/audits, the P06 usage
study joins the plans it closes, and the finished holographic flares plan
moves to docs/plans with its date. Links follow them. DESIGN_SYSTEM.md no
longer has two sections 8 and two sections 11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:27:25 +01:00
ae739b08ad Check in the tests that central files keep their full headers and that every tool has a compactor
tests/file-headers.test.mjs now fails when a source file over 300 lines lacks
"Utilisé par :" and @see, when a listed central file lacks "Utilisé par :", or
when a file adding methods through Object.assign does not say so. The eleven
files below the bar are completed, so no waiting list is needed.
tests/toolbox-compactors.test.mjs makes sure every tool type has a storage
compactor, the gap found while documenting the toolboxes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:22:50 +01:00
d8c94f6834 Give the server, React entry, shared hooks and scripts headers that explain their role and pitfalls
Document how server.mjs keeps the site up when an API is misconfigured and
reports it on /api/health, the cache and CSP policy, the share API's
synchronous reservation, the trust placed in X-Forwarded-For, the hooks main.jsx
wires once, and how to run each script. The deploy script header now recalls
that CI runs the copy installed on the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:00:04 +01:00
fe21c2d899 Give the toolbox files headers that explain their role, callers and pitfalls
Document the storage chain (optimistic state, write queue, compare-and-write
transactions, cross-tab sync), the tool registry, actions and pages, the
contract a tool receives through its context, and the encrypted sharing
whose key never reaches the server. The compactor registry header no longer
calls itself strict: a missing compactor writes data as-is, now tracked in
sokko-g-afbw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:14:46 +01:00
34b412d968 Give Sokko TCG's interface files headers that explain their role, callers and pitfalls
Document the page, API client, offline cache, card renderer, quest pages and
admin dashboard: how stale responses are ignored, where the CSRF token lives,
which requests are idempotent and what the admin checks really protect. Fix
the Broken Mirror headers that still described two levels instead of three,
and the cards README that still described the stale-response bug as open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 09:56:58 +01:00
73bd5ae21c Give Sokko TCG's server files headers that explain their role, callers and pitfalls
Each core file of services/cards now says where it sits, its entry points,
who calls it and what to watch for: admin checks living in the service, the
methods added to ExpeditionService and TeamService by Object.assign, the
InTx suffix, settings defaults that do not change an existing database, and
rules shared with the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 09:47:18 +01:00
22b397ebfa Document Sokko G's architecture and folders, and move JavaScript file headers to JSDoc @file blocks
Add ARCHITECTURE.md (layers, flows, folder map, glossary), CONTRIBUTING.md
(setup and step-by-step recipes) and a README in each main folder, with an
index of docs/. Convert the 511 JavaScript headers from "// Rôle :" lines to
JSDoc @file blocks, define a three-level header template in website/AGENTS.md
and check the header in tests/file-headers.test.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 09:42:13 +01:00
c43702b864 Reorganize the Guild section of Sokko TCG's administration
The Guild settings stacked three levels of navigation (admin menu, quest
tabs wrapping on two lines, Expedition tabs), hid whether each quest was
open until its tab was opened, gave every quest a different layout, wrote
the day's figures as sentences and laid out settings loosely.

- The Guild opens on one card per quest, built like the player's Guild
  board: the quest illustration, its state badge, the day's figures as
  small one-line rectangles and a "Régler" button.
- Inside the Guild, the admin menu lists the five quests; the collapsed
  half-screen menu reads "Guilde › <quête>".
- Each quest starts with a breadcrumb and the header of a collection page:
  illustration, state badge, "Ouvert aux joueurs" switch (confirmed before
  applying), summary and the day's figures, then what follows the day
  (Current Race circuit, today's hard mirror, running expeditions).
- The broken mirror sets its three mirrors in the drop-rate table (picture,
  games today, base gain, per remaining move, move margin).
- Expedition destinations are aligned list rows with a switch.
- Settings groups keep the NDS panels used by the Shop. The Guild layout
  moves to its own sheet, _nebula-admin-guild.scss.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 16:53:28 +01:00