Skip to content

RustCMS v0.14.0

Choose a tag to compare

@irisvn irisvn released this 23 Nov 17:02

RustCMS v0.14.0. Install: https://irisvn.github.io/RustCMS/ (guide, install scripts).

Built from irisvn/RustCMS-Core v0.14.0.

— 2026-11-23

Security

  • lettre 0.11.24 (RUSTSEC-2026-0560 to 0564: STARTTLS response injection,
    missing dot-stuffing after a bare CR or LF, panics on an EHLO reply or a
    display name with CR/LF, quoted local parts sent to another address) and url
    2.5.9 (RUSTSEC-2026-0592, stack overflow in Url::origin()); both newer
    than two weeks, as security exceptions. cargo deny ignores
    RUSTSEC-2026-0543 (chrono is unmaintained; no vulnerability, needed by
    SeaORM).

Added

  • Option labels in table columns (vocabulary 20; contributed by @giangittb112000, as are the date formats, the image
    viewer, the color tokens and media collections below): TextColumn/BadgeColumn show the label of each value,
    declared with TableColumn::options([(value, label), …]) or taken from the form's select or checkbox list of
    the same field (never for belongs_to fields); .raw() keeps the values. Labels are translated (and listed
    by missing translations); colors, sorting, search, filters and exports still use the values. ColumnSchema
    gains options. A badge column holding a list draws one badge per value. The dashboard's recent records use
    the column's labels.

  • Date formats (vocabulary 21): TableColumn::date_format(pattern) and Entry::date_format(pattern) (text
    entries) show dates and times with a pattern (yyyy yy MMMM MMM MM M dd d EEEE EEE HH H hh h mm ss a z, text
    in single quotes, at most 64 characters), in the user's language and, for instants, time zone;
    AdminProvider::date_format/datetime_format set the panel's patterns for date and date-time fields without
    one, and for history, queue, schedule and export times. Patterns are checked at boot (fields, a time on a
    date, a zone on a local date-time, computed values and rows). ColumnSchema and EntrySchema gain
    format; the panel's configuration dateFormat/dateTimeFormat. Without any pattern, nothing changes.
    Demo: the posts list writes publication times with a pattern.

  • Image viewer (vocabulary 22): a click on an image opens it over the page, in forms (file uploads), view pages
    (MediaEntry, rich text images), the Media page and its records, and the media picker (a magnifier beside
    each image: a click still chooses). Zoom (buttons, wheel, double click, pinch, pan), the place's other images
    (arrows, ← →, a counter), the file's name, alt text, dimensions and size (looked up in the media library when
    only the id is known) and a download; Escape, the close button or a click outside close it, Escape never
    closing the dialog under it. MediaEntry::preview(false) and FileUpload .preview(false) keep a field's
    images still; EntrySchema and MediaSchema gain preview (sent only when false). New admin-ui dependency
    yet-another-react-lightbox 3.33.0 (MIT; static stylesheets, styles set through the CSSOM: the CSP is unchanged),
    loaded with its styles the first time a viewer opens.

  • Color tokens (theme API version 1, names only added): popover, selected, overlay, input,
    subtle-foreground, secondary-foreground, success-foreground, warning-foreground, info and
    info-foreground, hover colors (primary-hover, secondary-hover, destructive-hover) and soft pairs
    (destructive/success/warning/info/gray -soft and -soft-foreground); hover and soft colors follow
    their color through color-mix unless set (hover darker in light mode and lighter in dark mode, away from
    the text on it, so it never lowers contrast; solid buttons also show a faint ring on hover). The badge color info (BadgeColumn::color, TextEntry::color,
    the SDK's Badge, whose color prop is now typed). A theme or runtime branding that brings a text pair under
    4.5:1 logs a warning (pair, mode, ratio; once per change for the branding); the boot never stops for it.

  • Media collections (vocabulary 23): AdminProvider::media_collection(name, label) declares a collection of the
    media library, Field::collection(name) (media, media list and rich text fields) and
    SettingField::collection(name) (media settings) put the files uploaded through them into it. Uploads take an
    optional collection part (a declared name, else 422); the Media page gains a Collection column and filter
    (with Unassigned) and uploads into the collection it is filtered on; the picker opens on the field's
    collection, with every file, each collection and the unassigned files a choice away; the media record's form
    moves a file to another collection (rights of a rename; media hooks see it). Collections only sort and filter:
    scope and references ignore them. Without a declared collection nothing changes. InputSchema gains
    collection, PanelResponse mediaCollections, MediaItem collection. Framework migration
    m20261202_000023_add_collection_to_media (nullable media.collection and an index on it with created_at;
    its down drops both). Demo: post covers, post content and branding collections; LMS: news covers.

  • SelectFilter::none(label): a last choice for records without a value (nullable columns), sent as ~none
    in the in list and matched as IS NULL (FilterSchema.none).

  • Repeaters, second round (vocabularies 24 and 25, ADR 0044; contributed by @giangittb112000, reworked after
    review; its nested relationship repeaters, validate_rows, shown_when_fn, required_fn and form/rules
    are not in this release; options_fn and reactions on relationship rows are, below):

    • Conditions on relationship repeaters (their own shown_when, or a layout's): a hidden repeater keeps its
      rows; a change sent for it is admitted and shape-checked, then ignored; min_items does not apply while
      hidden; clear_when_hidden is refused on it.
    • Conditions in rows of both kinds of repeater: when_root(name) reads the record's form (a settings page's
      fields), when_parent(name) the enclosing row of a nested JSON repeater (Scope). Relationship rows that
      declare conditions follow them (the panel evaluates them too); rows declaring none keep the child form's
      conditions, as in 0.13.
    • Filtered has-many relations: Relation::where_null(field) / where_eq(field, value) (where_eq on
      boolean, integer, UUID and date fields) restrict the relation's section, counts, repeater and view-page
      rows, and set their values on records created through it (before required and conditions are checked).
      Users who may not read every filtered field do not get the relation (404 on its routes, 403 on a repeater
      change, no count column, no minimum to meet); users who may not write them on create get no New (403). A
      hook removing or changing a filtered value is a 500. Several repeaters may edit one child resource through
      relations that cannot share a row. RelationSchema gains fixed.
    • Repeater::table(): rows as table rows from md (RepeaterSchema.layout).
    • RepeatableEntry::relationship(): a has-many relation's records on the view page, through its list,
      at most limit(n) (100) rows; the default view page shows relationship repeaters this way
      (EntrySchema.rows).
    • Files, documents and record selects in rows: JSON rows take file uploads (.accept, .max_size,
      .multiple(n), .collection on the input) and rich editors (.nodes), settings rows too; relationship
      rows take the child's media, rich text and belongs_to fields. A write's media references (fields, JSON
      rows at any depth, relationship rows after the child's hooks) are checked once, last, in batches of 500
      ids, at most 2,000 distinct (new code too_many_media), errors at the row's path. Rich editors in rows
      show a compact toolbar (InputSchema.toolbar), .full() for the full one; table rows refuse file
      uploads and rich editors. View pages show JSON rows' files and documents (MediaEntry, RichTextEntry).
    • [admin] repeater_rows (default 50, 1 to 500): the most rows of one parent a relationship repeater reads
      and reorders, and the most entries of each part of its change (RepeaterRelationship.rowLimit); relation
      lists page up to it.
    • Demo: categories are their posts or a link (migration m20261119_000001_add_layout_to_categories), posts
      edited as a table and shown on the view page, a "Drafts" section (where_eq("published", false)), footer
      links take an icon. LMS: quiz questions with options (where_null("blank_id"), an image and an
      explanation each) or blanks (migrations m20261119_000006_create_quiz_tables,
      m20261120_000007_add_media_to_quiz_options), courses enroll learners in their form.
  • Options computed on the server (vocabulary 26, ADR 0044 part E; contributed by @giangittb112000, redesigned
    after review): SelectInput::options_fn(f) / CheckboxList::options_fn(f) with .depends_on([...])
    (required) and .options_timeout(d) (5 s, at most 30) compute a resource form's options from its state
    (readable values only). New route POST form/options (authorized as form/react, sharing its bucket and
    turns; answers checked: at most 500 options and 64 KiB, canonical, no value twice; failed keeps the declared
    options); InputSchema.optionsFrom; the panel asks when the form opens and when a dependency changes
    (debounced, latest answer only). Saves that could change the input run it again before the transaction, with
    no lock held, after a committed-receipt replay check, then check under the lock that the dependencies the
    user may read did not change (409 stale) and that the value is among the options (not_option; checkbox
    lists keep their shape); new form error options_failed. Never decided by a value the user cannot read.
    Imports retry stale and options_failed rows. Refused at boot in rows, on settings pages and action forms,
    on belongs_to and encrypted fields, on children of relationship repeaters, and on a field with two inputs.
    SelectOption is at the crate root.

  • Form reactions on relationship rows (vocabulary 27, ADR 0044 part D; contributed by @giangittb112000,
    redesigned after review): a top-level relationship repeater may declare .reacts(); FormState::relation_rows
    gives its rows (StateRow, by tagged identity RowId::Key / RowId::Ref, at most [admin] repeater_rows,
    readable fields only); FormPatch::add_relation_row (add_relation_row_as with a ref),
    update_relation_row, remove_relation_row and flag_relation_row are kept only when the user could make
    the change: stored rows read for the user (scope, parent, the relation's filters, view policy; update and
    delete allowed per record), fields readable and writable for the operation, never the parent key, a filter
    or the order column, addable/deletable/min_items/max_items honoured, hidden row inputs dropped
    (the repeater's condition mode over authorized values), keyed patches dropped on a parent create. Nothing
    is written; saves are unchanged. Demo: a category's new published post without a title gets one.

Changed

  • Panel colors (dark mode first): every text pair reaches WCAG AA and input borders and focus rings 3:1, in both
    modes (checked by the E2E suite). Dark: main buttons light grey instead of white, menus and dialogs lighter
    than the page and a darker backdrop. Both modes: secondary buttons and switches stand apart from cards, darker
    input borders and focus ring, selected table rows marked, visible hover colors. Disabled buttons, inputs,
    menu items and tabs change color instead of fading (opacity). Checkboxes and radios are drawn by the panel
    (the browser's ignored dark mode). Badges and notices use soft pairs; primary badges are solid (the
    default primary is neutral: a pale one read as gray). A row's primary action is an outline button. The dark
    tokens are written once in admin-ui/src/index.css. popover follows card (a step lighter in dark mode) and
    secondary-foreground follows foreground, so existing themes keep their look there; borders of inputs,
    checkboxes and outline buttons now use the new input token (darker than border, for 3:1): a theme that set
    border for them sets input too. Demo: tags of kind topic are info.
  • The exports list shows times in the panel's language (it used the browser's).
  • The light muted-foreground is #63636c (was #6b6b74), so muted text reaches 4.5:1 on selected rows too.
    The contrast warning for themes and brandings also judges pairs whose color follows a token the
    application set (gray-soft follows muted, secondary-foreground follows foreground), and
    foreground/muted, muted-foreground on popover and selected, destructive on background and
    popover.
  • A select whose stored value is no longer among its options (a media collection no longer declared) shows
    that value, disabled, rather than a blank choice.
  • The image viewer loads on first use; if that fails (a deploy replaced the file, the network dropped) the
    viewer closes and the page under it, with its unsaved values, stays (until a reload, opening it again does
    the same).
  • The SDK Badge's color lists the panel's colors and still accepts any string (gray).
  • media::entity::Model (and its ActiveModel) gains collection: application code that builds one with a
    struct literal adds collection: None (or Set(None)), as for alt in 0.10.1. MediaItem, InputSchema,
    FilterSchema and PanelResponse gain fields too.
  • Relationship repeaters (ADR 0044): at most [admin] repeater_rows rows (default 50) read, reordered and
    sent per part of a change, where 0.13 read 100, took 100 entries per part and reordered 1,000 (too_many_rows
    now reads "has more than {max} rows ([admin] repeater_rows)"). The default view page shows their rows. A
    child's hook that adds media to a row no longer fails (500): the row's media are checked with the parent's,
    last, so a row's after_save may run before that check (outside work goes through jobs dispatched in the
    transaction). Condition's leaves gain scope (code building or matching them by hand adds it; when,
    Condition::all/any are unchanged); ListQuery gains a hidden relation_filters;
    DynResource::counted_by takes the relation's filters and field_locks_media_or_secret is
    field_is_encrypted.
  • FormPatch gains four variants (relationship row patches): an exhaustive match needs arms for them.
    DynResource gains hidden methods (form_options, computes_options, row reactions). An update
    carrying an idempotency key whose first run committed is now answered from its receipt before its input is
    checked, as creates are.
  • An upload with a part other than file and collection is refused with "must be one part named file,
    with at most one collection" (code file_part, as before; only its message changed). New code
    media_collection.
  • Table columns whose field has a select or checkbox list with options in the form now show its labels instead
    of the values; .raw() keeps the values.
  • Values of TableColumn::color are compared in canonical wire form, as a select's options, on every column:
    on an i64 or a decimal column they are strings (.color("2", …), "02" is read as "2"), UUIDs lowercase,
    instants in UTC; a JSON integer on an i64 or decimal column is read as that string (.color(2, …) now
    matches; a select's options too). A value the column cannot hold refuses to boot: a number on a text column, a string on an i32 or
    boolean column, a value finer than the column keeps. Such colors never matched.

Deprecated

  • MediaEntry::gallery(): images open in the viewer by default (.preview(false) turns it off); the schema no
    longer sends gallery.