Sync theme asset binaries and list content changes#4
Closed
mikel wants to merge 1 commit into
Closed
Conversation
theme pull downloads asset files into assets/; theme push hash-diffs them against the server theme, uploads new or changed binaries through the media upload flow, and registers them on the draft content change. sc change list shows the store's content changes so drafts can be resumed from any machine.
This was referenced Jun 19, 2026
Author
|
Superseded by #6 — the CLI agent-platform work collapsed into one PR off develop. Reopen if anything was missed. |
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.
Dependencies & PR Stack
This is a chain of PRs on the CLI:
develop
└ feature/content-api-alignment (#3)
└ feature/theme-assets-and-changes (#4) (this PR)
└ feature/theme-diff (#5)
Server side (core-gem): consumes the Store Management REST API from the gem chain, https://github.com/GetStoreConnect/core-gem/pull/8062 through #8072.
Summary
Stacked on #3. Completes the git-native theme workflow from the store-go-live audit: asset binaries now round-trip, and drafts are discoverable from any machine.
Theme assets
sc theme pulldownloads each asset binary intoassets/<key>(slash-aware keys become subdirectories) alongside the existingassets.json. Download failures warn on stderr and skip rather than failing the pull, keeping--jsonstdout clean.sc theme pushhash-diffs localassets/files (SHA-256) against the server theme'scontent_hashvalues, uploads only new/changed binaries through the media upload flow (POST /api/v1/media/upload_url→ multipart to Cloudinary →secure_url), and registers them on the draft via the content change PATCHassetsarray. Unchanged binaries are never re-uploaded.api.ThemeAssetaligned to the server contract:key(wasfilename) +content_hash.Draft resume
sc change list [--status draft|review|approved|published]consumingGET /api/v1/content_changes— partners and teammates can find and resume drafts from any machine. Table output for humans,--jsonfor automation.Server counterpart: core-gem#8068 (asset staging endpoint + hash fields on theme GET), stacked on core-gem#8066.
Tests
httptest coverage for upload_url, the multipart upload (params + file field assertions),
ContentChanges.List, the PATCH body including assets, and pure-function hash-diff selection.make fmt && make test && make buildall green across all packages.