Skip to content

feat(spec,objectql,platform-objects): ADR-0029 D7 setup app navigation contributions#1436

Merged
os-zhuang merged 3 commits into
mainfrom
claude/adr-0029-d7-setup-nav-contributions
Jun 1, 2026
Merged

feat(spec,objectql,platform-objects): ADR-0029 D7 setup app navigation contributions#1436
os-zhuang merged 3 commits into
mainfrom
claude/adr-0029-d7-setup-nav-contributions

Conversation

@os-zhuang
Copy link
Copy Markdown
Contributor

Implements ADR-0029 D7 — the navigation-contribution mechanism that lets the setup admin 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 the platform-objects monolith with its objects.

The mechanism (UI-layer analog of object own/extend)

  • @objectstack/specNavigationContributionSchema ({ app, group?, priority, items }, using the real NavigationItemSchema) + an optional navigationContributions field on the manifest. Chosen over reviving the vestigial, never-consumed contributes.menus.
  • @objectstack/objectqlSchemaRegistry.registerAppNavContribution() stores contributions; getApp / getAllApps lazily merge them into the target app's navigation tree 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 wires manifest.navigationContributions during 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 to SETUP_NAV_CONTRIBUTIONS.
  • @objectstack/plugin-auth — registers SETUP_NAV_CONTRIBUTIONS alongside the Setup app it already owns.
  • @objectstack/plugin-webhooks — contributes its Webhooks / Webhook Deliveries entries into the Setup group_integrations slot (it owns sys_webhook / sys_webhook_delivery from 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 / requiredPermissions frontend 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): green
  • Tests: spec 128, objectql 61 (incl. 7 new D7 tests), platform-objects 78 (incl. shell + contributions tests), plugin-webhooks 45, plugin-auth 85 — all green
  • Repo-wide check: no other package asserts on the static Setup nav items.

Follow-ups (per ADR-0029)

  • As each remaining K2 domain (jobs/email/audit/...) moves to its plugin, its Setup entries move out of SETUP_NAV_CONTRIBUTIONS into that plugin the same way.
  • Generalizing app-extension to arbitrary (non-setup) apps remains a tracked follow-up.

https://claude.ai/code/session_01Tv6F1Ub6bhCedrx3r8sZM4


Generated by Claude Code

…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
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 1, 2026 4:38am

Request Review

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
@github-actions github-actions Bot added the size/l label Jun 1, 2026
@os-zhuang os-zhuang marked this pull request as ready for review June 1, 2026 04:33
…tup-nav-contributions

# Conflicts:
#	packages/platform-objects/src/apps/setup.app.ts
@os-zhuang os-zhuang merged commit c72daad into main Jun 1, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:ui size/l tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants