* fix(workspace): one filename rule for project writes and import
Project archive import rejects Windows device names, trailing dots or spaces and names that collide after NFC and lowercase folding, because a ZIP assembled on Linux can otherwise collapse into one file on Windows or a default macOS volume. Writes had no such rule: projectPath rejected separators, control characters, dot-prefixed segments and the ignored build folders, and nothing else.
Two failures followed from that asymmetry. A write batch containing con.html passed validation and then failed inside the transaction when the filesystem refused the reserved name. A batch containing both A.css and a.css reported two changed files and two hashes in the revision, but on a case-insensitive volume only one file existed, so one edit was silently lost.
Review follow-ups shaped the final version:
- The portable-name rule now lives once, in shared/project-name.ts, and both workspace writes and the ZIP reader use it. It rejects reserved device names and trailing dots or spaces on every platform, so a Linux-authored project can no longer export an archive that import refuses; otherwise the asymmetry simply moved to the export side.
- Only case and NFC folding is a filesystem property, so it stays conditional. Callers pass the fold policy, and the predicate and duplicate helper are exported with an explicit parameter instead of reading the platform inside, which lets the Linux suite cover both branches.
- The entry-file guard keeps exact paths. Duplicate detection folds, but "does this batch create index.html" now compares exact names, so a batch of Index.html no longer passes the guard that a case-insensitive volume would otherwise satisfy.
Validation: tests/projects.test.ts passes 9/9 on Windows, covering reserved names and trailing dots on any platform, the importAsset target guard, the folded duplicate rejection, the differently cased entry file, and a normal write that reads back. tests/project-archive.test.ts gains two cases in a file the distribution lane already runs: the shared predicate and duplicate helper in both fold modes, and a ZIP containing con.html being refused by readProjectZip. The archive suite and tests/phase1.test.ts keep their two pre-existing Windows failures (symlink creation needs a privilege this environment does not grant), and npm run check passes.
* test: exercise project filename guards in the archive CI lane
---------
Co-authored-by: lefarcen <935902669@qq.com>
* Add branded welcome template for initial projects
Use the same editable OpenMotion welcome source for first-run initialization and template copies, while keeping new projects blank and preserving existing edits. Retain the required offline assets and licenses in application packages and add regression coverage.
* Update shipped template guides for the fourth builtin
Registering the OpenMotion welcome template changes the catalog to four
bundled editable templates and 895 entries. Align the remaining current
guides that still described three templates and 894 entries, and add the
welcome project to the editable-template table in the reverse-engineering
README.
Generated-By: looper 0.16.2 (runner=fixer, agent=pi)
* Align the last shipped guides with four bundled templates
Two current guides that ship in the npm distribution still described the
catalog as three official Studio templates: the editor-fork template
creation note and the Presenter Tech package README. Both now say four,
matching /api/templates, the gallery totals and the docs already updated
by the previous pass.
Generated-By: looper 0.16.2 (runner=fixer, agent=pi)
* Fix the last three-template claim in the shipped catalog guide
docs/template-catalog.md ships in the npm distribution through
scripts/distribution.ts, and its "页面与数据" section still told users the home
Motion gallery shows three editable templates. The gallery defaults to the
builtin category, template-library.ts registers openmotion-welcome as the
fourth builtin and tests/catalog.test.ts asserts a builtin total of 4, so the
sentence now says four and names the official welcome film, matching the other
sections of the same page and the guides aligned by 86a43946 and 2f425338.
Generated-By: looper 0.16.2 (runner=fixer, agent=pi)
* Clarify catalog documentation after welcome template review
---------
Co-authored-by: 罗高 <luogao@192.168.5.135>