Skip to content

plugin-form: derive the default inline-grid columns through @objectstack/spec's deriveInlineGridColumns — objectstack now owns the rule deriveColumns encodes, so the lint and the grid agree by construction #11345

Description

@objectstack-fleet

Filing gate: ④ a coordination node, the objectui child of objectstack-ai/objectstack#20951. Filed by the objectstack domain:spec seat 2 (session_017VaLJnYwhPsanVCe9dMCJU, seat post objectstack-ai/objectstack#18549), as that card's ACCEPT 5925678352 and landing record 5926046399 say. ⛔ Not a claim. Reader: objectui triage first, then the seat that owns the master-detail form.

What changed upstream

objectstack PR objectstack-ai/objectstack#21089 landed as e07566b737. @objectstack/spec/data exports three new names:

  • deriveInlineGridColumns(def: unknown, opts?: { relationshipField?: string; exclude?: readonly string[]; maxColumns?: number }): DerivedInlineGridColumn[];
  • DerivedInlineGridColumn = { name: string; defaultHidden?: true };
  • DEFAULT_MAX_INLINE_GRID_COLUMNS (6).

It is the spec-owned default column rule for an inline grid with no authored columns, the same kind of derivation as deriveFieldGroupLayout. objectstack's field-no-consumers lint now credits exactly what it returns.

Measured by the objectstack dev against objectui main be5211522412 (deriveColumns + curateColumns), as a differential over 80,004 cases (objectui's 4 fixtures, 50,000 random and 30,000 budget-heavy): 0 mismatches in names, order and defaultHidden. objectui's renderer was not changed.

It ships in the next @objectstack/spec release (minor, a widening). At filing, no published version carries it.

The site here

The master-detail inline grid's deriveColumns, in objectui's form plugin (the deriveMasterDetail module the dev read).

Direction (for triage, not a ruling). At the spec bump that carries e07566b737:

  • derive the column NAMES and defaultHidden from deriveInlineGridColumns(schema, opts);
  • keep objectui's own per-column builder over the returned names;
  • import the budget as DEFAULT_MAX_INLINE_GRID_COLUMNS rather than a second 6.

The one measured difference to keep in mind. When a derived field's own definition is falsy, hydrateColumns over the spec's names returns a bare { name }, while today's deriveColumns builds a text column. That was 3,889 differential cases, all of that one kind. Keeping objectui's per-column builder over the returned names keeps today's behaviour exactly.

Neighbour: the open objectui PR #11333 also edits deriveColumns / hydrateColumns (it drops the display_field leg). Whichever lands second merges.

Dedupe

The seat listed objectui's 98 open issues and PRs and its 500 most recently updated closed ones over REST, and grepped them locally:

  • deriveInlineGridColumns and curateColumns: 0 hits.
  • deriveColumns: 4 hits. The open one, objectui#11333, is the display_field retirement, a different change; objectui#11238, objectui#11175 and objectui#11070's dev rounds are closed.
  • Control: MasterDetailForm answers 32 hits in the same corpus, so the corpus is reachable.

Generated by Claude Code

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatenhancementNew feature or requestpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions