Skip to content

Fix Setup app missing navigation by loading SetupPlugin before contributor plugins#1099

Merged
hotlong merged 2 commits intomainfrom
claude/fix-setup-app-menu-issue-another-one
Apr 9, 2026
Merged

Fix Setup app missing navigation by loading SetupPlugin before contributor plugins#1099
hotlong merged 2 commits intomainfrom
claude/fix-setup-app-menu-issue-another-one

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Apr 9, 2026

Setup app returned empty navigation areas despite plugins registering menu items via setupNav.contribute(). The service contribution pattern requires the provider plugin to initialize before consumers.

Changes

  • apps/studio/server/index.ts: Moved SetupPlugin initialization before AuthPlugin, SecurityPlugin, AuditPlugin, and AIServicePlugin
  • apps/studio/src/mocks/createKernel.ts: Applied same plugin ordering fix for test/mock environments

Context

The SetupPlugin registers a setupNav service during init() that other plugins consume to contribute navigation items:

// SetupPlugin.init()
ctx.registerService('setupNav', {
  contribute: (contribution: SetupNavContribution): void => {
    this.contributions.push(contribution);
  },
});

// AuthPlugin.init() - requires setupNav service to exist
const setupNav = ctx.getService('setupNav');
setupNav.contribute({
  areaId: 'area_administration',
  items: [{ id: 'nav_users', type: 'object', label: 'Users', objectName: 'user' }],
});

When SetupPlugin loaded last, the service didn't exist during other plugins' init() phase, causing all contributions to silently fail.

Result

Setup app now displays navigation across all areas:

  • Administration: Users, Organizations, Teams, API Keys, Sessions, Roles, Permission Sets
  • System: Audit Logs
  • AI: Conversations, Messages

Claude AI and others added 2 commits April 9, 2026 08:22
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

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

Project Deployment Actions Updated (UTC)
objectstack-play Ready Ready Preview, Comment Apr 9, 2026 8:44am
spec Ready Ready Preview, Comment Apr 9, 2026 8:44am

Request Review

@hotlong hotlong marked this pull request as ready for review April 9, 2026 08:44
Copilot AI review requested due to automatic review settings April 9, 2026 08:44
@hotlong hotlong merged commit f7be000 into main Apr 9, 2026
14 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reorders Studio kernel plugin initialization so SetupPlugin registers the setupNav service before other plugins attempt to contribute Setup navigation during their init() lifecycle, restoring non-empty Setup app navigation.

Changes:

  • Load SetupPlugin before contributor plugins in the Studio server kernel bootstrap.
  • Apply the same ordering in the Studio mock/test kernel factory, with an explanatory comment.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/studio/server/index.ts Moves SetupPlugin earlier so setupNav exists before Auth/Security/Audit/AI plugins contribute nav items.
apps/studio/src/mocks/createKernel.ts Aligns mock kernel plugin ordering with production to ensure Setup navigation contributions are captured in tests/browser mocks.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants