Add persistent dark mode and server-assigned content IDs
This commit is contained in:
+26
-7
@@ -21,12 +21,12 @@ sound hooks remain in milestone 4.5. Playwright authoring/runs remain deferred.
|
||||
items/awards, or write an audit event. Form edits clear the previous preview.
|
||||
- **Publish changes:** repeats the same content validation under the existing
|
||||
catalog lock and writes the catalog version and audit atomically. Stale editors,
|
||||
duplicate IDs, missing sets, mixed payloads, unsupported values, and repeated
|
||||
missing sets, mixed payloads, unsupported values, and repeated
|
||||
references are rejected. Identical publication retries return the original result.
|
||||
|
||||
Sets are expanded into concrete values at publication, not stored as live links on
|
||||
acquired gear or earned titles. Published definitions/sets are append-only: use a new
|
||||
ID for a variation. Sets cannot reference other sets, so recursive composition is
|
||||
definition for a variation; its ID is assigned by the server. Sets cannot reference other sets, so recursive composition is
|
||||
not supported. Old catalogs without these collections remain valid. No new table
|
||||
or title-ownership migration is required for this milestone.
|
||||
|
||||
@@ -36,6 +36,21 @@ existing catalog publication path. Shared content API models are generated from
|
||||
The read-only preview uses authenticated same-origin POST
|
||||
`/api/control/catalog/preview` with the same draft body as publication.
|
||||
|
||||
## Follow-up: automatic IDs and dark mode
|
||||
|
||||
Content creation asks for names and properties only. The server assigns a random
|
||||
permanent ID when publishing a title, item, requirement set, or effect set. Preview
|
||||
does not reserve or display an ID. The audit stores the assigned identity, and an
|
||||
identical request retry returns that same ID, including after restart. Public API
|
||||
creation rejects client-supplied definition IDs. Existing catalog IDs/references
|
||||
and trusted seed/import paths remain compatible. The hidden request UUID is only
|
||||
an idempotency token, not a user-selected content identity.
|
||||
|
||||
The website and Control have a **Dark mode** toggle in their headers. The default
|
||||
follows the device preference; choosing light/dark saves the preference for both
|
||||
pages and syncs across tabs. Theme applies to forms, tables, dialogs, status badges,
|
||||
stat breakdowns, and content previews. Gameplay rendering is unchanged.
|
||||
|
||||
## Input and menus
|
||||
|
||||
Keyboard and movement buttons feed named input actions rather than duplicating
|
||||
@@ -55,20 +70,21 @@ in the catalog/audit. Arrival/death/disconnect screens retain their existing flo
|
||||
|
||||
## Manual test checklist
|
||||
|
||||
Use unique test IDs; published test content cannot currently be deleted.
|
||||
Use recognizable test names; the server creates IDs. Published test content cannot
|
||||
currently be deleted.
|
||||
|
||||
1. In **Control -> Content -> Requirement sets**, create `m2_level` with level >= 1.
|
||||
1. In **Control -> Content -> Requirement sets**, name a set `M2 Level` with level >= 1.
|
||||
Fill a reason, preview, and confirm the catalog version/audit has not changed.
|
||||
Publish; refresh and confirm the new set and one audit/version increment.
|
||||
2. Create effect set `m2_defence` with defence +2 flat and movement speed -5%.
|
||||
2. Create effect set `M2 Defence` with defence +2 flat and movement speed -5%.
|
||||
Preview/publish it. Create a ring with those two sets, drop chance 0, and any
|
||||
inline modifiers you want to inspect. Preview shows the expanded requirements
|
||||
and effects. Publish and confirm the equipment list contains the same values.
|
||||
3. Use **Control -> Characters -> Manage items and titles** to give the ring to a
|
||||
living character. Equip/unequip it in game and inspect the final stat breakdown.
|
||||
Confirm existing inventory, titles, health, and daily usage were not reset.
|
||||
4. Try publishing an already-used set ID: expect rejection and no version change.
|
||||
For stale editing, open drafts in two Control tabs, publish one, then preview/
|
||||
4. Confirm there is no permanent-ID input and publication shows an assigned ID in
|
||||
the catalog/audit. For stale editing, open drafts in two Control tabs, publish one, then preview/
|
||||
publish the other: expect a refresh conflict, not silent overwriting.
|
||||
5. Open inventory and settings together. Focus a settings field and press Esc:
|
||||
settings closes, inventory stays open. Press Esc again: inventory closes.
|
||||
@@ -76,6 +92,9 @@ Use unique test IDs; published test content cannot currently be deleted.
|
||||
6. Move with WASD/arrows and the on-screen controls, gather with E, attack with
|
||||
Space. Opening a menu or switching tabs stops movement. Typing in fields must
|
||||
not move/attack; returning focus must not leave a movement key stuck.
|
||||
7. Toggle dark mode on the public site, open Control, and reload. Confirm the choice
|
||||
persists and that dialogs, fields, stat rows, and badges remain readable. Switch
|
||||
back to light mode and check that both pages follow the new preference.
|
||||
|
||||
## Verification and limits
|
||||
|
||||
|
||||
Reference in New Issue
Block a user