Skip to content

Journal: a postcard saves the text an export gives back, and a blank tag no longer blocks backups - #37

Merged
davd-gzl merged 2 commits into
mainfrom
fix-postcard-composer
Sep 30, 2026
Merged

davd-gzl merged 2 commits into
mainfrom
fix-postcard-composer

Conversation

@davd-gzl

Copy link
Copy Markdown
Collaborator

A postcard tag typed as a lone - makes every JSON backup and every sync fail with a tag cannot be empty, until that tag is removed by hand. The new postcard composer stores its title, text, folder, captions and tags as typed, while the file format cleans each one on export, so a tag that cleans down to nothing fails validation and anything carrying a control character or a direction override comes back changed after a backup or a sync.

The composer now stores the cleaned values, with the same function and length limits the file format applies, so a backup gives back what was saved. A tag that cleans away is never added. An export also drops such a tag before it validates, so a device that already holds one still backs up and syncs.

The composer also reports photo problems again, as the previous one did: an image it cannot read shows a message, and picking more photos than a postcard holds says how many were added.

Stories saved before this change keep the text they were stored with.

…eports photo errors

The composer stored title, text, folder, tags and captions as typed, while the
portable-file schema sanitizes them on export and import. A control character,
a bidi override or a leading formula character came back changed from the first
export or sync, and a tag that sanitizes to nothing ("-") made every export
fail validation. Picking photos also lost the old composer's toasts: an
unreadable image failed silently and photos past the per-postcard limit were
dropped without a word.
…sync

A postcard saved by the composer before it cleaned tags can hold one such as
"-" or a lone bidi mark. The schema rejects a tag that sanitizes to nothing, so
buildFile's self-validation threw and every backup and sync of that device
failed. Drop such tags before validating, as empty photo arrays already are.
@davd-gzl
davd-gzl merged commit 628ebae into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant