* 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