Uh oh!
There was an error while loading. Please reload this page.
fix(sdui): grid alias collision, expression user-context, record:history self-fetch - #1814
Merged
Conversation
…ory self-fetch
Four non-obvious renderer/registry gaps found while building composed SDUI
pages (see the framework app-showcase). All browser-verified on :5181.
1. `grid` shadowed by ObjectGrid (plugin-grid) — `register('grid', …, {namespace:
'view'})` had no `skipFallback`, so the bare `grid` key (the @object-ui/
components layout grid) was clobbered by ObjectGrid → `{type:'grid'}` 404'd
with "object name required". Added `skipFallback: true` so the alias only
claims `view:grid`. Layout grid + grid-cols now work in page regions.
2. Registry collision guard — `Registry.register` now warns when a namespaced
registration's bare-name fallback would overwrite a DIFFERENT component
(the silent clobber above gave no signal). +3 regression tests.
3. SchemaRenderer expression context missing the user — it built
`new ExpressionEvaluator({ data })`, ignoring the ambient host scope that
app-shell's ExpressionProvider already feeds (`user`, `app`, `features`).
Component `visible`/`visibleOn` predicates now evaluate against
`{ ...scope, current_user: scope.user, data }`, so per-user/role gating
works (`visible: "user.email == '…'"`). `current_user` aliased to `user`.
4. `record:history` always empty unless host-fed — it was stateless ("the host
fetches entries"), so a hand-authored history tab showed "No history yet".
Added a self-fetch fallback from `sys_activity` field_change events via the
record context (mirrors record:related_list), so it works dropped anywhere.
Also: `page:card` now accepts `children` (not just `body`) for consistency with
grid/flex/section/tabs. (A separate page:card-in-region prop-leak remains —
tracked separately; not addressed here.)
Full workspace suite (4021 tests) + plugin-detail/plugin-grid pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>The latest updates on your projects. Learn more about Vercel for GitHub. |
Uh oh!
There was an error while loading. Please reload this page.
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four non-obvious renderer/registry gaps found while building composed SDUI pages (the framework
app-showcaseenterprise surfaces). All browser-verified on:5181.1 —
gridshadowed by ObjectGridplugin-gridregisteredregister('grid', ObjectGridRenderer, { namespace: 'view' })withoutskipFallback, soRegistry.register's bare-name fallback clobbered the@object-ui/componentslayout grid. Result:{ type: 'grid' }404'd with "object name required for data fetching". AddedskipFallback: true→ the alias only claimsview:grid, leaving baregridas the layout container. Verified: My Work KPI row now renders in agrid-cols-3layout.2 — Registry collision guard
Registry.registernowconsole.warns when a namespaced registration's bare-name fallback would overwrite a different component (the clobber in #1 was silent). +3 regression tests.3 —
visibleexpressions had no user contextSchemaRendererbuiltnew ExpressionEvaluator({ data }), ignoring the ambient scope app-shell'sExpressionProvideralready feeds (user,app,features). Now evaluates against{ ...scope, current_user: scope.user, data }, so componentvisible/visibleOncan gate on the signed-in user.current_useraliased touser. Verified: anelementgatedvisible: "user.email == 'admin@objectos.ai'"shows for the admin; one gated to a different email stays hidden.4 —
record:historyalways empty unless host-fedIt was stateless by design ("the host fetches entries"), so a hand-authored history tab showed "No history yet". Added a self-fetch fallback from
sys_activityfield_change events via the record context (mirrorsrecord:related_list). Verified: Account 360 History tab now lists "UPDATED · Industry: Finance → Technology" after edits.Also
page:cardnow acceptschildren(not justbody) for consistency with grid/flex/section/tabs.Tests
Full workspace suite (4021) + plugin-detail (120) + plugin-grid (66) pass. Registry tests: 27 (incl. 3 new for skipFallback/collision).
A companion framework PR re-instates the showcase features these fixes unlock (grid KPIs, role-gated note, History tab).
🤖 Generated with Claude Code