You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added `src/engine/persistence/FilePersistenceService.js` as the shared engine owner for browser text file persistence mechanics: file text reads, file-handle text reads/writes, and text download creation.
5
+
- Updated V2/workspace file flows to import directly from `src/engine/persistence/index.js`: Workspace Manager V2, Preview Generator V2, Asset Manager V2, Object Vector Studio V2, Palette Manager V2, Text to Speech V2, shared project workspace import/export, and shared game manifest file loading.
6
+
- Moved obvious reusable text file mechanics from active non-V2 tool files while keeping picker UI, repo path decisions, preview generation decisions, image/object URL preview logic, and manifest workflow behavior local to those tools.
-`readFileText()` preserves modern `file.text()` behavior and preserves FileReader fallback behavior for callers that still need it.
30
+
-`downloadTextFile()` preserves existing JSON/SVG download behavior and supports the prior append-to-body pattern used by Asset Manager V2 and Text to Speech V2.
31
+
-`readFileHandleText()` and `writeFileHandleText()` keep Workspace Manager V2 and Preview Generator V2 in charge of repo path validation, read-back verification, and user-facing workflow messages.
32
+
- Remaining direct FileReader/object URL usage is image decode, image preview, fake repo-handle emulation, or engine runtime blob download behavior, not reusable text file persistence.
33
+
34
+
## Validation
35
+
- PASS: `git diff --check`
36
+
- PASS: `node --check` for all changed JavaScript files.
37
+
- PASS: targeted import validation for import-safe changed modules.
38
+
- PASS: targeted FilePersistenceService behavior validation for text reads, FileReader fallback, file-handle read/write, and text download creation.
39
+
- PASS: `npm run test:workspace-v2` - 58 passed.
40
+
- INFO: `npm run build` is unavailable in this repo (npm reports missing script); `npm run` was used to confirm available scripts.
41
+
- SKIPPED: full samples smoke test, per request.
42
+
- PASS: repo-structured ZIP created at `tmp/PR_26140_048-move-file-persistence-to-engine_delta.zip` and `zipfile.testzip()` returned ok.
- Valid WARN details were added for changed files with spaces in their paths that the existing guardrail parser did not list.
51
+
52
+
## Manual Validation
53
+
- Open Workspace Manager V2, select repo, select a game, and verify the game dropdown/tool tiles still populate.
54
+
- Launch Asset Manager V2, Object Vector Studio V2, Palette Manager V2, Text to Speech V2, and Preview Generator V2 from Workspace Manager and verify import/export or save/read-back actions behave as before.
0 commit comments