You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(dev-dx): hot-reload new objects end to end, persistent dev-admin hint, doctor container/nav refs (#3108)
Three P2s from the 15.1 third-party evaluation, all reproduced against a
real create-objectstack scaffold and re-verified fixed on the same
project with this branch's runtime.
1. Hot-added objects (os dev watch) were dead until restart. The
artifact reload path calls MetadataManager.register(), which fires no
subscribe() watchers — ObjectQL's registry bridge never saw the new
object, tables only ever came from the boot-time sync, and seeds only
from the boot-time bundle. Now:
- metadata: the metadata:reloaded payload carries the freshly parsed
artifact collections (seeds have no name and never enter the
manager — the payload is the only channel)
- objectql: the reload hook ingests payload object definitions into
the SchemaRegistry (mirroring the subscribe handler, provenance
preserved) and re-runs the idempotent schema sync, serialized,
honoring skipSchemaSync
- runtime: a dev-gated, single-tenant hot-reload seeder loads seeds
for first-seen objects only — an already-loaded (possibly
user-edited) dataset is never re-upserted mid-run
- cli: the watch recompile line calls out new objects explicitly
2. Dev admin credentials vanished after the first boot. os dev uses a
persistent DB, so the seed (and the banner hint keyed off it) only
fired on the seeding boot, and the login page had no signal at all.
maybeSeedDevAdmin now re-arms the hint whenever the seed account
still verifies against the default password (better-auth native
password.verify), and getPublicConfig() exposes a dev-only
devSeedAdmin field for the Console login page (objectui side ships
separately). Hint disappears the boot after the password changes —
verified live in all three states.
3. os doctor reported objects bound via defineView containers
(list/listViews/form/formViews data.object, subform childObject,
lookup form fields) and app navigation (objectName, nested children,
areas) as 'defined but not referenced'. The collector now walks the
canonical shapes plus flow node config.object/objectName; the dead
agent.objects read is gone and findOrphanViews descends into
containers. Stock CLI on the probe project flags 3/3 objects; patched
flags only the genuinely unreferenced one.
Tests: cli 524, plugin-auth 460, objectql 905, runtime 544,
metadata 260 — all green.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Dev-loop DX fixes from the 15.1 third-party evaluation (P2 batch):
10
+
11
+
-**Hot-added objects are now queryable without a restart.** Adding a `*.object.ts` under `os dev` used to recompile "green" while every query answered `no such table` (or `not registered`) until a manual restart: the artifact reload never notified the ObjectQL registry, tables were only created at boot, and seeds only loaded from the boot-time bundle. The `metadata:reloaded` payload now carries the parsed artifact; ObjectQL ingests the object definitions and re-runs the idempotent schema sync (same `skipSchemaSync` opt-out as boot), and the runtime loads seeds for first-seen objects (dev, single-tenant). `os dev` also prints `✚ new object(s): …` on recompile.
12
+
-**Dev admin credentials stay visible.** The `os dev` startup banner only showed `admin@objectos.ai / admin123` on the boot that actually seeded it; with the persistent default DB every later boot hid it, and the Console login page never knew it existed. The hint now re-arms on every dev boot for as long as the account still verifies against the default password, and `GET /api/v1/auth/config` exposes a dev-gated `devSeedAdmin` field (never present outside `NODE_ENV=development`) so the login page can show it.
13
+
-**`os doctor` reference analysis understands current metadata shapes.** Objects bound through `defineView` containers (`list`/`listViews`/`form`/`formViews` → `data.object`, subform `childObject`, lookup form fields) and app navigation (`objectName`, nested `children`, `areas`) were reported as "defined but not referenced". The collector now walks the canonical shapes (plus flow node `config.object`/`objectName`) and the orphan-view check descends into containers.
0 commit comments