Skip to content

plugin-view object-view: showRefresh is a declared, documented, defaulted designer input that nothing reads #5567

Description

@os-sales

Observation-class finding, measured while proving the reference surface empty for the handleRefresh deletion. Refs #4568. Not fixed there — that card's file surface is ObjectView.tsx + tests + a changeset, and this key lives in index.tsx and is authorable surface, so removing or wiring it is a decision rather than a mechanical cleanup.

What was measured

packages/plugin-view/src/index.tsx registers object-view with showRefresh as a designer input and a default:

81: { name: 'showRefresh', type: 'boolean', label: 'Show Refresh Button' },
94: showRefresh: true,

It is also documented as a working toggle for this component:

  • content/docs/api/schema-reference.md:871 (in the object-view example) and :914 — "Toggle toolbar features."
  • content/docs/plugins/plugin-view.mdx:77

But ObjectView never reads it. Repo-wide, showRefresh has zero readers inside packages/plugin-view/:

$ git grep -n "showRefresh" -- packages/plugin-view/
packages/plugin-view/src/index.tsx:81: { name: 'showRefresh', ... }
packages/plugin-view/src/index.tsx:94: showRefresh: true,

Nor is it forwarded. OBJECT_VIEW_DECLARED_FORWARDED_KEYS (ObjectView.tsx:453) is exactly four keys, and showRefresh is not among them:

exportconstOBJECT_VIEW_DECLARED_FORWARDED_KEYS=['data','filterableFields','navigation','searchableFields',]asconst;

So an author who writes showRefresh: false on an object-view node gets no effect — the key is accepted, documented, defaulted to true, and inert.

Where the key IS live

showRefresh is genuinely read one package over, in packages/plugin-list/src/ListView.tsx — derived from userActions.refresh at :796 and gating a real toolbar Refresh button at :3080. It is also declared in @object-ui/types (crud.ts:355, objectql.ts:1487, and both zod contracts). The key is real; its declaration on object-view is what nothing honours.

Prior art

docs/audits/2026-07-objectview-detailview-schema.md:113 already recorded this and proposed a disposition:

showRefresh | Three producers ... and a designer input at plugin-view/src/index.tsx:81; zero readers in ObjectView.tsx. | Drop the local field. The affordance is real and the spec already has it — UserActionsConfigSchema.refresh (view.zod.ts:353). If the refresh button is wanted, wire it to userActions.refresh rather than resurrecting a key nothing reads.

Note the three producers the audit names still set it (app-shell/src/views/ObjectView.tsx:2192, metadata-admin/previews/ViewPreview.tsx:136, plugin-view/src/index.tsx:94), so dropping the declaration means auditing those writes too.

Why it is worth a line

This is the "declared but not enforced" shape that makes AI-authored metadata hard to get right: the designer offers the input, the docs describe it, the default asserts a value, and the renderer ignores all three. Filing so it is not re-discovered; disposition (drop the local field vs. wire it to userActions.refresh) is a decision, not a cleanup.


Generated by Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions