You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cms mode: primo dev --author cms deletes site content files from disk (recovered twice from .primo/trash) #1241
While running primo dev --author cms against a local workspace, site content was deleted from disk twice in one session. Deleted from both test sites in the workspace:
pages/
page-types/
site/
most of blocks/
Files were moved to .primo/trash/ with names of the form <ISO8601>_<Site Name>_<path with __ separators>, which is the only reason they were recoverable. The workspace is not a git repo. Recovery: copy the newest trash entry per unique path back into place, skipping destinations that already exist.
Possible causes to investigate
CMS→file sync treating "absent in CMS" as "delete from disk" (i.e. the CMS DB was missing the content, and sync propagated that as deletions rather than as a desync to flag)
Deletion may be intended in cms mode, in which case the real bug is the absence of any warning/confirmation before destructive sync
Possibly triggered by mode-switching during the session (files → cms → files)
Possible precondition rather than coincidence: an empty sites/coffee-shop/page-types/default/head.svelte was hand-created and then deleted shortly before the first loss
Open questions
Is deletion of disk files reachable in a normal cms-mode workflow, or only via mode-switching?
Is there any warning path at all today?
Does the trash naming carry enough information to script recovery reliably?
Reproduction notes
⚠️ The affected workspace was reproducibly destroyed by this command — do not run it against a workspace you care about. Any investigation should use a copy of the workspace.
Discovered during verification of #1233 (browse mode).
Activity