Commit graph

123 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
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
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
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
067a4a8fd6 Fix the audit's concurrency, stale state and delivery findings
Some checks failed
Validate and deploy Sokko G / validate (push) Failing after 19m40s
Validate and deploy Sokko G / deploy (push) Has been skipped
Share uploads now reserve their slot, bytes and per-IP count before the
disk check, so simultaneous uploads can no longer exceed the limits.
Writes to a share's metadata run one after another, and a revocation can
no longer be undone by a pending read count.

The TCG page ignores a state reload that started before or during a
mutation, the last mutation wins, and returning to the page triggers a
single reload. The card cache confirms writes only once the IndexedDB
transaction completes and shows only the current player's copy. The
administration panel loads on demand, which shrinks the TCG chunk from
311.6 to 191.8 kB.

A new /api/health route answers 503 when the cards or shares API failed
to start. The deploy script ships the commit's production dependencies
with the build, waits up to 30 s for a healthy server instead of trusting
systemctl is-active, and restores node_modules on rollback. Both Forgejo
workflows check the route on the public site. The updated script applies
once reinstalled on the server.

Unused helpers, the ignored join role and duplicate button selectors are
removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:38:20 +01:00
08e28ee70d Evaluate calculator and goal tree formulas without eval
The production CSP forbids unsafe-eval, so the Function() call behind both
tools threw, every result came back empty and the calculator save and update
buttons stayed disabled in production. Dev worked because Vite sends no CSP.
Both now reuse the eval-free parser of the table formula engine, and a test
fails if client code evaluates strings again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 18:50:40 +01:00
7046515d20 Close the security gaps found by the application audit
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 20m8s
Validate and deploy Sokko G / deploy (push) Successful in 10s
Imported toolboxes could run scripts on the site origin through image data
URLs, so only bitmap images are now accepted at import, display and opening.
The Cards game and its fake admin login no longer turn on when NODE_ENV is
missing, and the Node server now sends a CSP and the other security headers.

The deployment script no longer runs files owned by the service account as
root, the services cannot gain privileges through sudo, and the deployment
key stays in a single workflow step with actions pinned by commit. The script
and systemd units must still be reinstalled on the server after delivery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 10:55:35 +01:00
72b3b15c7e Make calculator child drafts atomic
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 18m6s
Validate and deploy Sokko G / deploy (push) Successful in 9s
2026-10-30 20:02:48 +01:00
c08452d5a4 Add quantitative tasks with checklist controls to the planner
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 17m38s
Validate and deploy Sokko G / deploy (push) Successful in 9s
2026-10-24 15:02:33 +02:00
954240adf9 Standardize modal focus and keyboard behavior 2026-10-15 00:03:13 +02:00
0fc18cd8b9 Improve compact desktop usability and action guidance
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s
2026-10-05 21:47:16 +02:00
808610dcf2 Add planner-aware memos and unified tool configuration panels
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-10-03 15:58:33 +02:00
0acf5ecf21 Add toolbox spaces and recover from stale asset bundles
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-29 21:31:49 +02:00
0959c6740b Refine the calculator result layout
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-29 15:18:35 +02:00
51853245ad Improve calculator progress tracking and responsive layout
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-29 11:19:11 +02:00
bd4059c9c1 Add checklist switching and contextual memo ticker
All checks were successful
Deploy Sokko G / deploy (push) Successful in 19s
2026-09-28 09:40:29 +02:00
386212041f Improve toolbox checklists, image browsing, and guide integration
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-27 22:26:39 +02:00
b5901b31e3 Allow toolbox tools to collapse into their headers
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-09-24 14:05:17 +02:00
14f1b79cbc Move guide checklist controls into a collapsible header toggle
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-24 08:26:48 +02:00
418921934b Add wheel segment colors and hover labels
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-15 19:19:09 +02:00
d0e1fd73b1 Defer media loading and strengthen persistence tests
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-12 23:28:05 +02:00
b0e340efc7 Fix Notepad synchronization across pages and external updates
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-12 12:36:31 +02:00
b470a34b2a Isolate RNG drafts and fix image editor lifecycle
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-11 20:28:07 +02:00
7c0b72f914 Initialize session state by page and module identity
Some checks failed
Deploy Sokko G / deploy (push) Failing after 3s
2026-09-11 14:05:41 +02:00
4f644ca116 Preserve memo drafts and stabilize goal tree selection
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-11 13:58:00 +02:00
b9cc77a4d1 Restore React purity checks and streamline inline drafts
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-11 09:17:45 +02:00
748415082b Coalesce quota refreshes and consolidate shared helpers
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-10 20:03:57 +02:00
7521d50626 Fix recursive table evaluation caching
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-10 14:38:12 +02:00
34524d2961 Share toolbox components and fix image and calendar updates
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-10 14:19:55 +02:00
865a4ffd97 Consolidate toolbox loaders and reset helpers
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-10 13:45:48 +02:00
6c61e11f9a Fix Notepad render loop and stabilize toolbox modules
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-10 13:37:48 +02:00
c096cc07fe Reduce idle timer updates and stabilize toolbox normalization
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-09 20:04:45 +02:00
cce3f3c7f8 Clean up dead toolbox code and harden routing and static serving 2026-09-09 15:52:17 +02:00
184314d913 Fix toolbox persistence, table evaluation, and onboarding panel styling
Some checks failed
Deploy Sokko G / deploy (push) Failing after 2s
2026-09-09 15:02:48 +02:00
6e64cfacd5 Improve chance simulator forecasts and tracking UI
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-07 16:03:35 +02:00
25889a23ba Normalize spaced RNG draw costs
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-09-05 08:58:36 +02:00
f8231c748f Refine RNG simulator layout and simulation stats
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-05 00:19:08 +02:00
055fb78d60 Unify category autocomplete fields
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-09-04 14:09:08 +02:00
e3d823d0b1 Fix temporary annotation storage toast spam
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
2026-09-03 20:17:17 +02:00
9aa98c892d Extend NDS patterns and migrate shared UI surfaces
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-09-02 15:50:04 +02:00
fef7735a1d Split randomizer views and align NDS toolbox vocabulary
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-09-01 19:47:22 +02:00
6b85e58765 Add chance simulator toolbox and refine checklist interactions
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-08-31 15:16:36 +02:00
35fe877d58 add randomizer module
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-08-31 09:10:38 +02:00
07de342fc2 Polish Nebula design system controls before release
All checks were successful
Deploy Sokko G / deploy (push) Successful in 16s
2026-08-29 16:07:16 +02:00
817e21567b Migrate site controls to Nebula design system
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
2026-08-29 09:16:58 +02:00
91d99d6ca4 Update memo layout and library import examples
All checks were successful
Deploy Sokko G / deploy (push) Successful in 16s
2026-08-25 19:17:19 +02:00
6125336338 add multi-page notepad and memos toolbox tool
All checks were successful
Deploy Sokko G / deploy (push) Successful in 16s
2026-08-25 12:03:11 +02:00
a0d7e80a1a Split remaining toolbox modules by responsibility
All checks were successful
Deploy Sokko G / deploy (push) Successful in 16s
2026-08-25 09:33:15 +02:00
6dd64f87c3 Refactor large toolbox modules
All checks were successful
Deploy Sokko G / deploy (push) Successful in 16s
2026-08-25 08:20:56 +02:00