Cartly v1.15 ships a fundamental change to how theme files work — and a rebuilt code editor to match. The headline: theme code now lives in the platform by default, not in your database. Your customizations stay yours; platform updates flow automatically into everything else.
The Three-Layer Resolver
Every theme file request now goes through a layered lookup:
- DB row — a fork you created by editing the file. Stored per theme install.
- Platform embed FS — the current version bundled with the platform binary.
- Boilerplate FS — legacy fallback for older files not yet in embed.
Fresh shops are lean by design: only the page graph and design tokens go into the database on install. The 14 existing theme installs were thinned during the migration — 862 stock files removed from the DB, leaving each install with only the files merchants had actually customized.
Fork-on-Write
A file is "forked" the moment you click Edit file in the code editor (or press ⌘E). Before that moment, the file is served directly from the platform embed — no copy, no DB row. After you confirm the fork modal and save, Cartly creates a DB row and records the upstream_hash of the embed version at fork time.
This means platform updates reach untouched files automatically. If we ship a better version of sections/hero.liquid and you have never edited it, the update is live on your storefront the moment the platform deploys.
Code Editor — What's New
The code editor at Admin → Online Store → Themes → Edit Code has been rebuilt around this model.
File tree badges
- Synced — stock file from the embed. No DB row. Platform updates flow in.
- Custom — you forked this file. A DB row exists. Compare or revert any time.
- New — you created this file. No embed counterpart.
Filter chips — All / Modified / Synced — let you quickly find just your customizations or scan which stock files exist.
Compare with original
Click Compare with original on any Custom file to open a Monaco diff editor inline. Left pane shows the upstream embed version; right pane shows your fork. Changed regions are highlighted; unchanged regions are collapsed (GitHub PR style). Both panes are read-only — use it for reference before deciding whether to sync or keep your version.
Upstream updated banner
When the platform ships a new embed version of a file you have forked, an amber banner appears at the top of the editor: This file has been updated upstream. You get two choices: View diff to compare the new upstream with your fork, or Sync upstream to replace your fork with the new version (this deletes your DB row and returns the file to Synced state).
Use Sync All upstream in the toolbar to bulk-handle all files with upstream changes at once.
Preview button
The toolbar now has a Preview button. It generates a signed token and opens your storefront in a new tab — showing the theme as it stands right now, including any unsaved edits in the current tab. Tokens expire in 15 minutes.
Create new section
The "Create new file" modal now has a Section type. Choosing it generates a working scaffold: full HTML structure, five typed settings (text, color, range, checkbox, image_picker), and a preset with seeded defaults. The new section is immediately available in the Visual Editor + Add panel.
Visual Editor Updates
The + Add panel now aggregates section metadata from both the DB and the platform embed. You can add stock embed sections to your page without copying their Liquid files into your shop — the fork happens only if you later open the section in the code editor and edit it.
Right-click any templates/*.json file in the code editor to get an Open in Visual Editor context action — handy for switching between code and visual modes without leaving the editor.
Developer Resources