feat(spec,objectql,platform-objects): ADR-0029 D7 setup app navigation contributions#1436
Merged
Merged
Conversation
…n contributions
Add the UI-layer analog of object own/extend so a shared admin app can be a
thin shell while each capability plugin ships the menu for objects it owns.
- spec: NavigationContributionSchema { app, group?, priority, items } + optional
manifest.navigationContributions.
- objectql: SchemaRegistry.registerAppNavContribution() + lazy merge in
getApp/getAllApps (by group id + priority, clones the stored app so reads are
idempotent); engine wires manifest.navigationContributions on app registration.
- platform-objects: Setup app reduced to a shell of empty group anchors; its
platform-objects-owned entries moved to SETUP_NAV_CONTRIBUTIONS.
- plugin-auth: registers SETUP_NAV_CONTRIBUTIONS alongside the Setup app.
- plugin-webhooks: contributes Webhooks/Webhook Deliveries into the Setup
group_integrations slot (owns those objects per K2.a) — end-to-end cross-plugin
contribution.
Rendered Setup nav is unchanged; absent capabilities leave their slot empty.
Tests: spec 128, objectql 61 (incl 7 new D7), platform-objects 78 (incl shell +
contributions), plugin-webhooks 45, plugin-auth 85 — all green; turbo build
(10 packages incl DTS type-check) green.
https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The previous Test Core run failed only in @objectstack/driver-mongodb, where mongodb-memory-server could not download the MongoDB binary from fastdl.mongodb.org (network/infra flake) — unrelated to this PR's changes (spec/objectql/platform-objects/plugin-auth/plugin-webhooks). Local full `turbo run test` is green except for that same environmental download error. https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
…tup-nav-contributions # Conflicts: # packages/platform-objects/src/apps/setup.app.ts
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 free
to 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.
Implements ADR-0029 D7 — the navigation-contribution mechanism that lets the
setupadmin app become a thin shell while each capability plugin ships the menu for the objects it owns. This is the gap the K2.a webhooks pilot deferred, and it unblocks moving every remaining K2 domain's menu out of theplatform-objectsmonolith with its objects.The mechanism (UI-layer analog of object
own/extend)@objectstack/spec—NavigationContributionSchema({ app, group?, priority, items }, using the realNavigationItemSchema) + an optionalnavigationContributionsfield on the manifest. Chosen over reviving the vestigial, never-consumedcontributes.menus.@objectstack/objectql—SchemaRegistry.registerAppNavContribution()stores contributions;getApp/getAllAppslazily merge them into the target app'snavigationtree by group id + priority (lower first, mirroring object extenders). The stored app is cloned, so reads are idempotent and the base artifact is never mutated. The engine wiresmanifest.navigationContributionsduring app registration.@objectstack/platform-objects— the Setup app (setup.app.ts) is now a shell of empty group anchors; its entries for platform-objects-owned objects moved toSETUP_NAV_CONTRIBUTIONS.@objectstack/plugin-auth— registersSETUP_NAV_CONTRIBUTIONSalongside the Setup app it already owns.@objectstack/plugin-webhooks— contributes itsWebhooks/Webhook Deliveriesentries into the Setupgroup_integrationsslot (it ownssys_webhook/sys_webhook_deliveryfrom K2.a) — proving end-to-end cross-plugin contribution.Behavior
The rendered Setup nav is identical to the former static artifact — just assembled from its owners. An absent/disabled capability contributes nothing and its slot stays empty (in addition to the existing
requiresObject/requiredPermissionsfrontend gating). Registration order is irrelevant (merge is lazy on read).Verification
turbo build(spec + objectql + platform-objects + plugin-auth + plugin-webhooks + dep graph, incl. DTS type-check): greenFollow-ups (per ADR-0029)
SETUP_NAV_CONTRIBUTIONSinto that plugin the same way.setup) apps remains a tracked follow-up.https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4
Generated by Claude Code