One build, fourteen apps: see what users made of Memory Tin

Documentation

Locks

Documentation menu

Locks are how you keep what your app needs where it needs it. They are read only from your catalog and your default documents. A lock field inside a stored, synced or AI-proposed layout is ignored.

Part locks

Lock Effect
.none Anything goes.
.required Must stay present and visible (its containers can't be hidden either). May move. May swap only to its declared alternatives.
.fixed Can't move (same parent, same position), hide, resize or swap, and takes no content options.

Set the lock on the component (register(..., lock:)) or on a node of the default document (.container(..., lock: .required)).

A container that held a locked part in the default document keeps its kind, so the screen's own structure can't overlap, page away or squeeze the part. A required part never moves into a pager, overlay, row or sideways scroll, and a fixed part never ends up inside a row, grid, pager or overlay it was not in before.

Mark at least these required: the account-deletion entry, subscription price and duration, Restore Purchases, and any consent controls.

Option and style locks

  • Content options: required values must stay in a subset (Terms and Privacy may be reordered, never removed); locked: true keeps an option at its default.
  • Style: each component's style policy (spec.style) lists the properties it allows and its text-size range, so legal text can't shrink or fade. Anything else is refused as style_locked. Per-part colours are checked for WCAG contrast against the background the part sits on: 4.5:1 for text, 3:1 for muted text and icons.

Entries you mark required stay reachable, fixed slots can't be edited, and the start screen can only be one you allow. Refusals come back as nav_required_hidden, nav_lost, nav_unreachable, nav_fixed_slot and nav_start_not_allowed.

Theme rules

Themes are checked against the contrast pairs you declare: text on background, text on surfaces, and pairs you name yourself, such as the selected price row. A theme with unreadable text is refused (theme_contrast), values outside your ranges are refused (theme_out_of_range), and parts you mark as required to stay visible can't be made invisible (theme_required_invisible).

Where locks are enforced

The same rules run in every place a design can come from: edit mode, a stored file on the device, a restore from history, a design switch, sync, the API and the AI. Locks are checked on the device and again on the server; a write that breaks one is refused with HTTP 422 and the issue codes.

In the Memory Tin limits run, 40 stored-document attacks, 19 edit-mode attacks and 8 AI attack prompts in each of 5 editors were all refused or repaired, with a reason.