What happens
Showcase Field Zoo record Specimen — Full: the Code Editor field (f_code, type code) holds the string
(confirmed from GET /api/v1/data/showcase_field_zoo/<id>: a string, not an object). The detail page renders it as the literal [Object].
Why
packages/fields/src/index.tsxcoerceToSafeValue (~lines 330-360): any string that starts with {/[ and ends with }/] is JSON.parsed, and the resulting object falls through to String(obj.name || obj.label || obj.externalId || obj.id || obj._id || '[Object]'). The branch exists for reference values that arrive as JSON-encoded strings ('{"externalId":"…"}'), but it runs for every text-like cell, including code (registered to TextCellRenderer, ~line 2425), textarea, text and json-as-text.
Expected
A code (and text/textarea) value is displayed as its text. The reference-string unwrapping should be scoped to reference-typed columns (lookup / master_detail / expanded values), not applied by shape to every string.
Repro
Any record whose text/code field contains a JSON object or array literal.
objectui @ 67dadd6. Found during the objectstack pin-bump dogfood (objectstack#14295).
Generated by Claude Code
What happens
Showcase Field Zoo record
Specimen — Full: the Code Editor field (f_code, typecode) holds the string(confirmed from
GET /api/v1/data/showcase_field_zoo/<id>: a string, not an object). The detail page renders it as the literal[Object].Why
packages/fields/src/index.tsxcoerceToSafeValue(~lines 330-360): any string that starts with{/[and ends with}/]isJSON.parsed, and the resulting object falls through toString(obj.name || obj.label || obj.externalId || obj.id || obj._id || '[Object]'). The branch exists for reference values that arrive as JSON-encoded strings ('{"externalId":"…"}'), but it runs for every text-like cell, includingcode(registered toTextCellRenderer, ~line 2425),textarea,textandjson-as-text.Expected
A
code(andtext/textarea) value is displayed as its text. The reference-string unwrapping should be scoped to reference-typed columns (lookup / master_detail / expanded values), not applied by shape to every string.Repro
Any record whose text/code field contains a JSON object or array literal.
objectui @ 67dadd6. Found during the objectstack pin-bump dogfood (objectstack#14295).
Generated by Claude Code