Uh oh!
There was an error while loading. Please reload this page.
fix(form+detail): single-file children stay inline grids; drop non-spec attachment (#2654, #2655) - #2656
Merged
Merged
Conversation
…ec attachment (#2654, #2655) Follow-ups to the upload-in-grid work (#2360). #2654 — file/image/avatar render a compact upload cell in the grid now, so a child object with a single such field no longer flips the smart inlineEdit default to a per-row form. resolveInlineMode splits FORM_ONLY_TYPES: truly form-only types (textarea/richtext/html/markdown/json/location/address) still tip to form alone, while file-family types only tip when several rich fields pile up (RICH_FIELD_FORM_THRESHOLD, default 2). Explicit inlineEdit still wins. #2655 — attachment is not a @objectstack/spec field type (spec media types are file/image/avatar/video/audio), so the renderer no longer models it: removed from fieldTypeToColumnType, the inline-mode heuristic, and RelatedList's auto-column SKIP_TYPES. Contract-first cleanup (AGENTS.md #0.1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H5tsBSEhsDZmdcHBvfymYC
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
) Codifies the dogfood pass that shipped #2360 as a repeatable live e2e next to the sibling showcase_invoice specs: the Receipt file field auto-derives a grid column, the cell is a real input[type=file] upload control (not a text input), uploading shows a chip, and the resolved file object persists on the line in the atomic /api/v1/batch. Live-only (needs the storage service); runs under `pnpm test:e2e:live`, not the mocked PR e2e job. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H5tsBSEhsDZmdcHBvfymYC
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 18, 2026 06:37
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two follow-ups to the upload-in-grid work (#2360 / #2585), plus a codified live-verification spec for the underlying feature.
#2654 — a single file field no longer forces a per-row form
Now that
file/image/avatarfields render a compact upload cell in the line-item grid, the smartinlineEditheuristic shouldn't push a child with one attachment column into the per-row form.resolveInlineModesplits the old catch-allFORM_ONLY_TYPESinto two tiers:FORM_ONLY_TYPES(textarea, richtext, html, markdown, rich-text, json, location, address) — a single one still tips toform(these genuinely read poorly in a grid cell).GRID_CAPABLE_RICH_TYPES(file, image, avatar) — render in-grid now, so a lone one stays agrid; they only tip toformwhen several rich fields pile up (RICH_FIELD_FORM_THRESHOLD, default 2 → a cramped row).An explicit
inlineEdit: 'grid' | 'form'still wins over the heuristic. Net effect: "attach a receipt per expense line" now defaults to the inline grid instead of the form.#2655 —
attachmentis not a spec field type → renderer stops modelling itConfirmed against
@objectstack/spec: the media field types arefile/image/avatar/video/audio— there is noattachmenttype (it appears only in a display-name hint list). No framework example declarestype: 'attachment'.Per contract-first (AGENTS.md #0.1 — don't fossilize a non-spec dialect in the renderer), removed the stray
attachmenthandling from the three renderer-side spots this issue named:fieldTypeToColumnType— dropped thecase 'attachment'(was mapping it to afilecolumn).resolveInlineMode's type set — removedattachment.RelatedListauto-columnSKIP_TYPES— removedattachment.Out of scope (other subsystems, left untouched):
DataModelDesigner,view-config-utils,InterfaceListPagealso mentionattachmentbut aren't part of these issues.live e2e — codifies the #2360 dogfood pass
Adds
e2e/live/grid-file-upload.spec.tsnext to the siblingshowcase_invoicelive specs: the Receipt file field auto-derives a grid column, the cell is a realinput[type=file]upload control (not a text input), uploading shows a chip, and the resolved file object persists on the line in the atomic/api/v1/batch. Live-only (needs the storage service + a real backend) — runs underpnpm test:e2e:live, not the mocked PR e2e job, matching how the existing live specs are gated. This turns the one-off manual verification into a repeatable, reviewed regression procedure.Tests
deriveMasterDetail.test.ts: single file/image child → grid; two file fields → form; file + textarea → form;fieldTypeToColumnType('attachment') === 'text'(no special-casing) + explicit file-family mapping coverage.@object-ui/plugin-form+@object-ui/plugin-detailsuites pass (46 files / 437 tests).turbo type-checkgreen; touched files carry no new lint errors. New live spec typechecks and is picked up byplaywright.live.config.ts.Docs updated (
content/docs/fields/grid.mdx) and a changeset added (plugin-form minor, plugin-detail patch).Closes#2654
Closes#2655
🤖 Generated with Claude Code
https://claude.ai/code/session_01H5tsBSEhsDZmdcHBvfymYC