Skip to content

Global: Standardize List Refresh After Mutation (addRecord/create/update/delete) Across All ObjectUI Scenarios #1126

Description

@hotlong

After thorough code analysis of the entire ObjectUI codebase, I identified this as a platform-level architectural design deficiency, not just a single bug. Here's the complete assessment:

5 Root Causes Identified

#Root CauseAffected PackagesSeverity
1No unified event-driven refresh modelDataSource.create/update/delete completes silently; no active views are notified@object-ui/types, all consumers🔴 Critical
2ListView lacks imperative refresh() APIonAddRecord is fire-and-forget, parent cannot signal re-fetchplugin-list🔴 Critical
3refreshKey not propagatedObjectView.handleFormSuccess increments its own refreshKey, but renderListView renders a ListView with an independent refreshKeyplugin-viewplugin-list🔴 Critical
4Schema-level refreshAfter not universally honored — only works in RecordDetailView actions, not in addRecord, bulk ops, lookup quick-create, etc.plugin-view, plugin-detail, plugin-list🟡 High
5Duplicated manual fetchData/setRefreshKey boilerplate — User, Org, Role, Permission pages each hand-roll their own refresh logicapps/console🟡 Medium

3-Phase Solution Proposed

PhaseScopeKey Deliverables
P0 — Immediate FixPass refreshKey through renderListViewListView + add refreshTrigger propFixes the reported bug
P1 — Imperative APIListView exposes ref.refresh() via forwardRef + useImperativeHandle; abstract useListRefresh hookAny parent can trigger refresh
P2 — Event BusDataSource.onMutation() subscription; all views auto-refresh on relevant object mutationsSalesforce/Retool/Airtable parity

Industry References

The issue includes design comparisons with:

  • Salesforce LightningrefreshApex / force:refreshView event bus
  • Retoolquery.trigger() invalidation
  • AppsmithonSuccess → listQuery.run() action chaining
  • Airtable — Optimistic insert + server-confirm sync

Metadata

Metadata

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