Repository navigation
[3/3] Add authenticated project upload/download with explicit revision conflicts - #4
Merged
Merged
Conversation
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.
The browser editor can now exchange complete projects through pace_server while retaining its local save/open workflow and existing pace-editor-draft v1 format. A Project sharing panel accepts an in-memory bearer token and server URL, uploads a private project, grants/revokes reader/writer access, and downloads snapshots for an explicit open/reconciliation decision.
Updates use the ETag belonging to the downloaded/uploaded snapshot. If Alice and Bob both edit revision 1, Bob's successful upload produces revision 2; Alice gets a clear conflict and keeps her edits and original revision. Downloading the latest snapshot does not replace local work or advance the upload precondition. Alice explicitly opens it or confirms keeping local edits against that downloaded revision before uploading. There are no automatic retries, background synchronization, merges or live co-editing.
The existing model/loader is extracted unchanged into pace_editor_format for use by both the app and server. Embedded images, stable IDs, dialogue, inventory and unfinished references retain their local-file behavior. Tokens, remote IDs and ETags never enter project JSON or browser recovery; tokens clear on reload. Requests require HTTPS outside loopback, refuse redirects/cookies, limit response size to 64 MiB and time out after 30 seconds. Late responses cannot attach a revision to a newly opened document, and edits made during an upload remain open.
Companion server PR: pace-kit/pace_server#3 (schema validation, matching upload limit and explicit browser origins). CI builds the immutable server revision 66203da9bfeda679dac0669fe4eae7ced9d9e59e and starts it with an isolated temporary database/test identities for Playwright. This is the third step after the merged storage and authentication changes.
Validation passed locally:
Documentation includes setup and a two-client walkthrough and distinguishes project sharing from real-time co-editing. Core scene v1 is now available and is validated by the server, but the draft editor does not silently convert to it: core runtime preview/export remains a separate integration.