Skip to content

ObjectCalendar's standalone object fetch never injects $expand — same empty-ref read objectui#6419 removed from ObjectView #6453

Description

@claude

Surfaced while implementing objectui#6419 (ObjectView's non-grid fetch never injecting $expand). Filed separately: different package, and this one affects the standalone calendar rather than the six views ObjectView hosts.

The defect

ObjectCalendar carries the identical shape objectui#6419 removed from ObjectView — a render-body ref write, read by a fetch effect that omits the schema from its dependency list:

packages/plugin-calendar/src/ObjectCalendar.tsx:242 objectSchemaRef.current = objectSchema;
:283 const expand = buildExpandFields(objectSchemaRef.current?.fields);

The effect's dependency list is

}, [hasExternalData, dataConfig, dataSource, hasInlineData, schema.filter, schema.sort, refreshKey]);

objectSchema is not in it, and it is resolved by a separate effect. So on the one run this effect makes, objectSchemaRef.current is still null, buildExpandFields returns [], and the object provider's query goes out with no $expand; nothing re-runs the effect when the schema lands.

Scope — narrower than it looks

A calendar hosted by ObjectView or ListView receives its rows as data from the parent and never reaches this path, so objectui#6419's fix already covers that composition. What is left is the standaloneobject-calendar with dataConfig.provider === 'object': its lookup / master_detail / user / tree fields render from raw foreign-key ids.

Evidence class

Read from source, not measured — the instrumented run behind objectui#6419 exercised ObjectView, not this component. Whoever picks this up should measure it here before adopting a shape, exactly as objectui#6419 was required to: this effect's dependency set is again different (dataConfig, hasInlineData, schema.filter, schema.sort), so neither the kanban's numbers (objectui#6271) nor ObjectView's transfer.

Prior art for the fix

objectui#6271 (ObjectKanban) and objectui#6419 (ObjectView) both replaced the ref with a settled-and-keyed resolution — { key, def } | null — that GATES the record query. The part worth carrying over is that the gate is on the read having settled, not on a truthy schema: an adapter exposing no getObjectSchema, or a read that threw, must still fetch, or the view is empty forever.

Generated by Claude Code


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions