Skip to content

feat(apps): split platform apps into one-app packages (ADR-0048)#1813

Merged
xuyushun441-sys merged 5 commits into
mainfrom
feat/adr-0048-split-platform-apps
Jun 13, 2026
Merged

feat(apps): split platform apps into one-app packages (ADR-0048)#1813
xuyushun441-sys merged 5 commits into
mainfrom
feat/adr-0048-split-platform-apps

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Draft — the final commit is boot-critical and needs a live os dev / os serve boot to verify before merge.

Implements ADR-0048 "one app per package" for the platform's bundled apps: plugin-auth shipped three apps (setup/studio/account) under one package id, which made /apps/<packageId> ambiguous (the blocker that browser-verification surfaced). This splits them into their own one-app packages so package-id routing (option A, PR objectstack-ai/objectui#1693) can resume.

Commits

  1. scaffold @objectstack/studio (packages/apps/studio, ns studio) — boot-neutral
  2. scaffold @objectstack/setup (packages/apps/setup, ns setup, carries SETUP_NAV_CONTRIBUTIONS) — boot-neutral
  3. reclaim @objectstack/account for the console Account app (packages/apps/account, ns account); delete the deprecated standalone account-portal SPA (apps/account) — boot-neutral
  4. ⚠️ boot-critical switch: drop apps/navigationContributions from plugin-auth's manifest; register the three new packages in dev-plugin.ts + serve.ts after AuthPlugin; declare workspace deps.

Conventions

  • New home: packages/apps/* (added to pnpm workspace globs). apps/* (top-level) is for standalone SPAs and isn't reused.
  • Each package = 1 npm = 1 ObjectStack manifest = 1 app, distinct id com.objectstack.{studio,setup,account} + namespace; depends on plugin-auth for the objects it navigates.
  • All three added to the changeset fixed group with changeset entries.
  • AppSchemas still live in @objectstack/platform-objects/apps (new packages import them); moving the definitions in is a later non-behavioral cleanup.

Verification

  • ✅ All packages build (tsup CJS/ESM/DTS); plugin-dev + cli typecheck clean; plugin-auth (114) + platform-objects (55) tests pass.
  • NOT runtime-boot-verified — needs os dev (and os serve) to confirm the platform boots and /apps/setup, /apps/studio, /apps/account each resolve. That's why this is a draft.

Follow-ups

  • After boot-verify + merge: resume objectui#1693 (package-id routing + docs /apps/:packageId/docs/:name).
  • Optional: move the *.app.ts definitions (+ studio/setup i18n) into the new packages and drop the transitional platform-objects dependency.

🤖 Generated with Claude Code

os-zhuang and others added 4 commits June 13, 2026 14:27
…neutral)

ADR-0048 "one app per package": Studio becomes its own ObjectStack package
(`com.objectstack.studio`, namespace `studio`) so `/apps/<packageId>` resolves
unambiguously instead of being lost inside plugin-auth's multi-app manifest.

This commit is intentionally boot-neutral:
- New package `packages/apps/studio` with a thin `StudioAppPlugin` that registers
  the Studio manifest; STUDIO_APP is still imported from platform-objects
  (transitional) and the package is NOT yet wired into the dev/serve plugin set.
- Adds `packages/apps/*` to the pnpm workspace globs and `@objectstack/studio`
  to the changeset fixed group.

Boot path (dev-plugin/serve.ts) and plugin-auth's manifest are untouched, so
`os dev`/`os serve` behaviour is unchanged. The boot-path switch (wire the new
package, drop the app from plugin-auth, move the AppSchema in) lands separately
so it can be verified against a live boot.

Builds clean (tsup CJS/ESM/DTS).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eutral)

Mirrors @objectstack/studio: Setup becomes its own package
(`com.objectstack.setup`, namespace `setup`) carrying SETUP_APP and its baseline
SETUP_NAV_CONTRIBUTIONS. Boot-neutral (transitional import from platform-objects;
not yet wired into dev/serve). Added to the changeset fixed group. Builds clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…p dead SPA (ADR-0048)

Removes the deprecated standalone account-portal SPA (apps/account) and reclaims
the @objectstack/account name for the console Account app as its own package
(`com.objectstack.account`, namespace `account`). Boot-neutral skeleton (mirrors
studio/setup): thin AccountAppPlugin, transitional import from platform-objects,
not yet wired into dev/serve. CLI's vestigial workspace dep now resolves to the
reclaimed package (no code imported the old SPA). Builds clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…op from plugin-auth (ADR-0048)

⚠️ BOOT-CRITICAL — verify with a live `os dev` (and `os serve`) boot before merge.

Completes the ADR-0048 app split:
- plugin-auth's manifest no longer registers `apps: [SETUP_APP, STUDIO_APP,
  ACCOUNT_APP]` nor `navigationContributions: SETUP_NAV_CONTRIBUTIONS`; it keeps
  only the auth objects + their detail pages.
- dev-plugin.ts and cli `serve.ts` now register the three new app packages
  (best-effort dynamic import, skipped if not installed) right after AuthPlugin,
  so each app publishes under its own package id (com.objectstack.{setup,studio,
  account}) and `/apps/<packageId>` resolves unambiguously.
- plugin-dev + cli declare the three app packages as workspace deps.

The AppSchemas still physically live in @objectstack/platform-objects/apps
(the new packages import them); moving the definitions in is a later non-behavioral
cleanup. Verified statically: all packages build, plugin-dev/cli typecheck clean,
plugin-auth (114) + platform-objects (55) tests pass. NOT runtime-boot-verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 13, 2026 10:11am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file tooling size/xl labels Jun 13, 2026
…ge id (ADR-0048)

Live `os dev` boot surfaced: `Dependency 'com.objectstack.plugin-auth' not found
for plugin 'com.objectstack.setup'`. The kernel matches plugin `dependencies` by
plugin NAME — AuthPlugin's name is `com.objectstack.auth`, while its package id is
`com.objectstack.plugin-auth`. Point the class-level dependency at the plugin name
(`com.objectstack.auth`); the manifest-level dependency stays the package id.

Adds packages/cli/src/adr-0048-app-split.test.ts: boots a real ObjectQL engine,
runs each app plugin's start(), asserts setup/studio/account register under their
own package ids and coexist.

VERIFIED end-to-end: `os dev` (app-showcase) boots clean and /api/v1/meta/app
reports setup→com.objectstack.setup, studio→com.objectstack.studio,
account→com.objectstack.account (previously all com.objectstack.plugin-auth).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the tests label Jun 13, 2026
@xuyushun441-sys
xuyushun441-sys marked this pull request as ready for review June 13, 2026 10:09
@xuyushun441-sys

Copy link
Copy Markdown
Contributor Author

Boot-verified end-to-end (no longer just static).

1. Live os dev boot (app-showcase, fresh instance): platform boots clean, /api/v1/meta/app now reports each app under its own package id:

  • setupcom.objectstack.setup
  • studiocom.objectstack.studio
  • accountcom.objectstack.account

(Previously all three were com.objectstack.plugin-auth.) The multi-app-package ambiguity is gone.

2. Bug caught & fixed by the boot: the first boot failed with Dependency 'com.objectstack.plugin-auth' not found for plugin 'com.objectstack.setup' — the kernel matches plugin dependencies by plugin name (com.objectstack.auth), not package id. Fixed in the class-level dependency (manifest-level dep stays the package id). Re-boot is clean.

3. Integration test (packages/cli/src/adr-0048-app-split.test.ts, 4/4): real ObjectQL engine + real app-plugin start() → each registers under its own package id, all three coexist, distinct namespaces, recorded as installed packages.

4. Static: all packages build (tsup CJS/ESM/DTS); plugin-dev + cli typecheck clean; plugin-auth (114) + platform-objects (55) tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation size/xl tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants