Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

repeater is wide in the form but narrow in the form designer — the two read the same set with different spellings #4256

Closed

Description

@yinlianghui

Found by the spelling sweep for #4250 (the richtext / rich-text gap across four layout sets); filed unassigned per Prime Directive #10. Not fixed there: it is a different type family, and the sweep's own criterion says it is not the same defect — see "Why this is not #4250" below.

The asymmetry

WIDE_FIELD_TYPES (both packages/plugin-detail/src/autoLayout.ts and packages/plugin-form/src/autoLayout.ts) is matched RAW and carries two spellings per type: the bare @objectstack/spec FieldType name, and the field: widget id that mapFieldTypeToFormType produces. For the embedded-array-of-rows type those two are spelled differently:

packages/fields/src/field-type-alias.ts
  repeater: 'field:grid', // embedded array of rows

The sets carry grid and field:grid. They do not carry repeater. So:

caller what it passes result
the real form (resolveColSpan, FormField.type) field:grid — already mapped wide, spans the row
ObjectFormDesigner.tsx:158 String(entry.def.type ?? 'text') — the RAW object field type repeater misses the set, renders narrow

ObjectFormDesigner says in its own comment that it is mirroring the real form ("Mirror the real form: wide widgets (textarea/markdown/...) take the whole row"), which is exactly the property that does not hold for a repeater field.

Why this is not #4250

#4250's defect is a member the spec REJECTS: FieldSchema.safeParse({type: 'rich-text'}) fails, so that member could never match anything. grid is different — it is a sanctioned objectui-local key (GridFieldMetadata in packages/types/src/field-types.ts), and packages/plugin-detail/src/__tests__/inlineEditTypeCoverage.test.tsx names it explicitly as one of "the form-only keys (owner, object, grid, geolocation, the widget-hint pickers)". So grid is not a misspelling to drop; repeater is simply a second, spec-spelled way into the same widget that the bare half of the set never learned.

The mechanical sweep run for #4250 confirms the split: of 21 field-type-keyed Sets across plugin-detail / plugin-form / app-shell, the only members that are declared spec typo-aliases with the canonical spelling MISSING were the four rich_text / rich-text ones #4250 fixes. repeater is not in that class, which is why it was left out rather than ridden along.

Impact

Cosmetic and confined to the Studio form designer's preview: a sub-table field is laid out narrow there and full-width in the form it is previewing. No data is lost, no runtime form is wrong. Filed as an observation rather than a defect for that reason — grade it in triage.

Suggested shape

Add repeater beside grid in both WIDE_FIELD_TYPES. #4250 lands a derived pin in each package (autoLayout.wideSpelling.test.ts) asserting that the set's spec-facing surface is EXACTLY textarea / markdown / html / richtext, and its comment already names this issue as the reason repeater is excluded — so that pin is where the decision gets recorded, and it will go red (by name) when this one is taken, which is the intended behaviour.


Generated by Claude Code

Activity

  1. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    Contributor

    Findings triage (first grade): HOLD as finding.

    • Premise verified on origin/main @ b954120: WIDE_FIELD_TYPES in packages/plugin-form/src/autoLayout.ts carries field:grid (:61) and grid (:66) but zero repeater hits (counter-probed by the grid hits in the same file — the scanner sees the set). The designer's raw-type read misses the spec spelling exactly as filed.
    • Why hold: cosmetic and confined to the Studio form designer's preview — the runtime form lays out correctly; no data or behavior is wrong. Classic observation class.
    • Promotion note: one-line fix (add repeater beside grid in both sets) + the filer notes ui#4250's derived pin (autoLayout.wideSpelling.test.ts) names this issue and will go red by name when taken — so this is a cheap sweep-mate for whichever dev next touches the wide-set family rather than a standalone dispatch. If ui#4250's PR is still open, riding it as a named scope extension is the maintainer's call, not a rider by default.
    • Dedup: correctly split from ui#4250 (spec-rejected spellings vs a sanctioned second spelling); no other open card names WIDE_FIELD_TYPES.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. os-zhuang commented on Aug 17, 2026

    @os-zhuang
    Contributor

    Concentrate round (state transition, no re-grade): finding → pm:on-hold, executing the standing HOLD verdict (2026-08-11): cosmetic, confined to the Studio form designer's preview; the runtime form is correct. The fix stays a cheap sweep-mate — one line (repeater beside grid in both WIDE_FIELD_TYPES) plus flipping the #4250 pin that names this issue by design.

    Restart-when: a dispatch declares a file surface touching packages/plugin-detail/src/autoLayout.ts or packages/plugin-form/src/autoLayout.ts (the wide-set family) — attach this as a declared rider then. Pre-check at that moment: confirm #4250's derived pin (autoLayout.wideSpelling.test.ts) is on main and update it rather than working around it.

    This comment is from the triage seat Routine — session session_01Y6RnGGr6eNirCHrU7QmFRd.


    Generated by Claude Code

  3. os-zhuang commented on Aug 21, 2026

    @os-zhuang
    Contributor

    Retriage verdict (triage seat, session session_01ERczFBibS2qeu9qP31yEh8, 2026-08-21): closing as completed — discharged by PR #5532 (MERGED 09:19Z), and the pm:retriage flag is resolved with it.

    Basis, per the dissent comment's three points, each verified now:

    1. Symptom gone on main: Form designer emits the namespaced FormField.type spelling #5532 normalizes the producer (ObjectFormDesigner emits the namespaced spelling via toFormFieldType), so repeater resolves to the wide field:grid widget — with a dedicated repeater full-row regression pin, and reverse verification showing exactly that one case red when the fix is reverted. Neither WIDE_FIELD_TYPES set was touched; The richtext type is spelled three ways across four layout/column sets, and the spec spells it none of them #4250's derived pin stays green, un-flipped.
    2. This card's Suggested shape is dead: adding repeater to the bare half is consumer widening, ruled against on [plugin-form] fullscreenLongText 盖章面收裸 textarea 却不收裸 markdown/html/richtext,而这三个裸拼法照样解析到 RichTextField #4838 (2026-08-19, 「全部接受」— "every tolerant consumer entry entrenches the fork this ruling ends"). It must not be dispatched from here; closing prevents that.
    3. Residuals are tracked elsewhere: the tolerant-fallback retirement is Tighten renderFieldComponent's bare-name field: fallback — the consumer half the #4838 ruling scheduled #5535 (queued today), the WIDE_FIELD_TYPES dual-spelling tolerance and its untrue justifying comment are WIDE_FIELD_TYPES' bare half is now justified by a comment that is no longer true — and plugin-detail's copy of that comment was never true #5536 (finding pool). Nothing left for this card to carry.

    Hold-release note: the recorded Restart-when (a dispatch touching either autoLayout.ts) was never met and is not being exercised — this is a close-as-fixed on verified current main (origin/main post-#5532), not a release back to queue. Both state labels removed on close. Reopening is free if the designer regresses.


    Generated by Claude Code

  4. removed
    pm:retriageQuestion for triage, answered each fire; coexists with the standing pm:* label; no dispatch
    on Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions