* feat(database): format AI field text output as rich text
AI fields with text output can store rich text, reusing the rich long
text editor without mentions or images. New AI fields default to it in
the create form; existing fields, API clients and old imports stay
plain. Rich fields add a one-line formatting instruction to the prompt.
Also:
- forward row-modal edits of AI fields, which were never saved
- keep image markdown as literal text when images are off, instead of
reducing it to its alt text and losing the URL on save
- escape user file image references as `![alt]\[name]` so a reference
nested in another's alt text can't stay live
- return 400 instead of 500 when a PATCH would make a primary field
rich text
Closes#6220
* fix: preserve reference image URLs in rich text
Defined Markdown image tokens carry their destination and title separately
from the raw reference marker. Keep that data as self-contained literal
inline text when image nodes are disabled, and align the preview behavior.
Add parser, AI row persistence, and browser regressions while preserving
internal file references and the existing inline-image path.
* fix: handle AI field changes during generation
* fix(database): guard grid against missing and stale cell values
Grouped rows now get newly created fields, sorts treat a missing or null cell
as empty, and rich text cells tolerate a value of the previous field type.
Rows in collapsed groups resolve their group from the section key.
* fix(database): address review findings on grid cell guards
Key an undefined group value like null so pathFromKey can parse it, remove
deleted rows from collapsed groups, and sort present-but-undefined cells and
empty multiple select or collaborator formulas as empty.
* refactor(database): drop empty value for formula types that cannot be sorted
Multiple select and collaborator formulas cannot be sorted or grouped by, so a missing cell never reaches their sort.
* fix(database): sort zero in array formulas as a value
The element check treated 0 as missing, so [0] tied with [] and with other numbers.
* fix(database): keep grouped row caches shared and sort null cells as empty
addField now reuses one copy per row, so an edit reaches both sectionRows and
absoluteRows. The sort wrapper also replaces null cells.
* fix: use TipTap Markdown for rich text fields
* fix: escape markdown at line starts only and skip saves without edits
* perf: skip the preview markdown round-trip when no empty paragraphs are possible
* fix: address feedback; add docs
* fix: copilot feedback
* fix: copy one cell, paste in edit mode in another one
* feat: add configurable max length for text-based field values
Add BASEROW_MAX_FIELD_TEXT_LENGTH (default 500000), enforced at the serializer and in the frontend for single line text, long text, URL and AI fields. Existing longer values remain readable; only new writes over the limit are rejected.
Implements #5688
* fix: address review feedback for max text length
- Fix rich text editor modal crashing on expand: guard
FieldRichTextModal.serializeToMarkdown() while the editor is
unmounted during the open transition.
- Surface the max-length error inside the expanded modal (Alert
banner) and block closing while the value is over the limit.
- Fall back to the default limit in the frontend when the runtime
config is missing or non-numeric instead of silently disabling it.
- Improve the error message to show how many characters are over the
limit (Max N chars (-x)).
- Avoid a settings crash when BASEROW_MAX_FIELD_TEXT_LENGTH is set to
an empty string.
- Add frontend tests for the rich text modal and the validation.