feat: share a custom system as a .citysys file, and delete as a hide … - #117
Merged
Merged
Conversation
…that a reinstall undoes A published system exports as one readable JSON file with a cover: name, author, version, the CITY_NET version it came from, license, and its origin, who the system is across servers. A file is read on the server as untrusted input: capped in size, checked like the editor's own work, text kept as text, and it never carries characters or sheets. Installing is a preview that changes nothing, then new, update or keep both. An update only replaces a copy nobody has changed here, and never a system made here; keep both gives the copy its own id and origin, so the two never collide. Never a merge. A file with problems installs as a draft to fix, never as something a game can run. Deleting now hides a system instead of removing it: it leaves every list and cannot be run, and reinstalling its file brings it back under its old id, with every character, bank and token health played in it. The preview warns when that would replace changes made here. New custom_systems columns (origin, source_hash, deleted_at) are added on start; a system made before them is its own origin. Checked on a copy of a real database: nothing else changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…that a reinstall undoes
A published system exports as one readable JSON file with a cover: name, author, version, the CITY_NET version it came from, license, and its origin, who the system is across servers. A file is read on the server as untrusted input: capped in size, checked like the editor's own work, text kept as text, and it never carries characters or sheets.
Installing is a preview that changes nothing, then new, update or keep both. An update only replaces a copy nobody has changed here, and never a system made here; keep both gives the copy its own id and origin, so the two never collide. Never a merge. A file with problems installs as a draft to fix, never as something a game can run.
Deleting now hides a system instead of removing it: it leaves every list and cannot be run, and reinstalling its file brings it back under its old id, with every character, bank and token health played in it. The preview warns when that would replace changes made here.
New custom_systems columns (origin, source_hash, deleted_at) are added on start; a system made before them is its own origin. Checked on a copy of a real database: nothing else changes.
Summary
Test plan
Pre-merge checklist
Code quality:
Version & Release:
frontend/package.jsonversiondocker-compose.ymlAPP_VERSIONCHANGELOG.mdwith release notesBefore merging to main:
Related issues