File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ async function ensureKernel(): Promise<ObjectKernel> {
104104 } ) , 'turso' ) ) ;
105105 await kernel . use ( new AppPlugin ( studioConfig ) ) ;
106106
107+ // SetupPlugin must load BEFORE other plugins that contribute navigation items
108+ // so that the setupNav service is available during their init() phase
109+ await kernel . use ( new SetupPlugin ( ) ) ;
110+
107111 // Auth plugin — uses better-auth for real authentication
108112 // Prefer VERCEL_PROJECT_PRODUCTION_URL (stable across deployments)
109113 // over VERCEL_URL (unique per deployment, causes origin mismatch).
@@ -129,7 +133,6 @@ async function ensureKernel(): Promise<ObjectKernel> {
129133 await kernel . use ( new AIServicePlugin ( ) ) ;
130134 await kernel . use ( new AutomationServicePlugin ( ) ) ;
131135 await kernel . use ( new AnalyticsServicePlugin ( ) ) ;
132- await kernel . use ( new SetupPlugin ( ) ) ;
133136
134137 // Broker shim — bridges HttpDispatcher → ObjectQL engine
135138 ( kernel as any ) . broker = createBrokerShim ( kernel ) ;
Original file line number Diff line number Diff line change @@ -82,12 +82,14 @@ export async function createKernel(options: KernelOptions) {
8282 }
8383
8484 // Register services and plugins
85+ // SetupPlugin must load BEFORE other plugins that contribute navigation items
86+ // so that the setupNav service is available during their init() phase
87+ await kernel . use ( new SetupPlugin ( ) ) ;
8588 await kernel . use ( new FeedServicePlugin ( ) ) ;
8689 await kernel . use ( new MetadataPlugin ( { watch : false } ) ) ;
8790 await kernel . use ( new AIServicePlugin ( ) ) ;
8891 await kernel . use ( new AutomationServicePlugin ( ) ) ;
8992 await kernel . use ( new AnalyticsServicePlugin ( ) ) ;
90- await kernel . use ( new SetupPlugin ( ) ) ;
9193
9294 // Protocol service is registered automatically by ObjectQLPlugin.init()
9395 // via ObjectStackProtocolImplementation (which uses SchemaRegistry internally).
You can’t perform that action at this time.
0 commit comments