feat(toolkit): add structured media authoring
ci/woodpecker/push/woodpecker Pipeline was successful
Lint and Build Checks / Lint, Test, and Build (push) Failing after 368h6m42s

This commit is contained in:
2026-06-24 11:29:32 -05:00
parent 52fb52a617
commit 47567589e4
56 changed files with 4222 additions and 686 deletions
+18 -6
View File
@@ -67,9 +67,11 @@ __tests__/ # Jest tests
- Route state persists through refreshes.
- Settings persist resolution, autosave, mute, and master/music/ambience/speech/SFX volume.
- Browser background music is implemented in `useBackgroundMusic.web.ts`.
- Change Log content is sourced from `src/data/changelog.json`.
- Credits Toolkit data is sourced from `src/data/credits.json` and synced through the socket server.
- Toolkit placeholder datasets live under `src/data/toolkit/` as empty arrays until schemas stabilize.
- Change Log content is sourced from `src/data/toolkit/changelog.json`.
- Credits Toolkit data is sourced from `src/data/toolkit/credits.json` and synced through the socket server.
- Toolkit Images and Audio records can upload files through the socket into `src/assets/images/uploads/` and `src/assets/music/uploads/`.
- Toolkit seed datasets live under `src/data/toolkit/` and are exported through `src/data/index.ts`.
- Shared data interfaces live under `src/data/types/`.
## Common Tasks
@@ -96,14 +98,23 @@ __tests__/ # Jest tests
2. Add a typed model and runtime validation near the data export.
3. Extend `socket/contentStore.cjs` and `socket/server.mjs` for server read/save/watch behavior.
4. Extend `src/socket/toolkitSocketClient.ts` and a store under `src/state/` for client state.
5. Keep Toolkit UI read-only unless editable forms are explicitly requested.
5. Keep Toolkit forms schema-driven from JSON fields unless a resource needs a custom editor.
### Add or change data content
1. Read `src/data/AGENTS.md` first.
2. Keep app-imported JSON covered by a typed export and runtime validation.
3. Keep Toolkit placeholder resources as arrays in `src/data/toolkit/` until concrete schemas are requested.
4. Add tests for new data shape, ordering, or placeholder expectations.
3. Export data through `src/data/index.ts` so state stores and screens use one import surface.
4. Keep app content JSON such as Changelog, Credits, and Legal under `src/data/toolkit/`.
5. Update `src/data/types/` when schemas or Toolkit content fields change.
6. Add tests for new data shape, ordering, or Toolkit content expectations.
### Before committing or pushing
1. Review whether the work creates a meaningful product, gameplay, Toolkit, content, build, or process change.
2. Add or update an entry in `src/data/toolkit/changelog.json` for meaningful deliverables before committing or pushing.
3. Keep changelog entries concise, user-facing, and tied to the visible deliverable. Do not rely on Husky to write changelog content.
4. If a commit intentionally has no changelog entry, mention the reason in the final handoff.
### Work with assets
@@ -143,6 +154,7 @@ npm run start
- UI changes: `npm run lint`, `npm run test -- --runInBand`, `npm run web:build`
- Electron changes: `npm run electron:build`
- Socket changes: run tests plus `npm run dev:toolkit` and check `/health`
- Commit or push handoff: confirm `src/data/toolkit/changelog.json` was updated for meaningful deliverables or state why it was not needed.
- Commit validation: `npm run validate:commit`
Husky runs `npm run version:bump-build` and then `npm run validate:commit` on pre-commit. The version bump updates package metadata and public `.env` build fields for `version-yyyymmdd-last7commit` display.