Skip to content

Commit 3d37f2c

Browse files
committed
refactor: unify sidebar navigation and enhance metadata browsing
- Updated GlobalSidebar to serve as the single navigation shell for all authenticated routes, including package workspaces. - Simplified route checks to always render GlobalSidebar, removing the need for package-scoped AppSidebar. - Introduced MetadataBrowser component to replace DeveloperOverview, providing a comprehensive view of metadata items with search functionality. - Removed unnecessary state management and effects related to package selection in environment routes. - Enhanced code readability and maintainability by restructuring components and reducing complexity.
1 parent 0c329df commit 3d37f2c

13 files changed

Lines changed: 19 additions & 2 deletions

File tree

apps/studio/src/hooks/usePackages.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ export function usePackages() {
2020
try {
2121
const result = await client.packages.list();
2222
const all: InstalledPackage[] = result?.packages || [];
23-
// Filter out the root dev-workspace — it's the monorepo aggregator, not a real package
24-
const items = all.filter((p) => p.manifest?.version !== '0.0.0' && p.manifest?.id !== 'dev-workspace');
23+
// Filter out dev-workspace (monorepo aggregator) and platform-scoped packages (runtime-global, not env-installable)
24+
const items = all.filter(
25+
(p) =>
26+
p.manifest?.version !== '0.0.0' &&
27+
p.manifest?.id !== 'dev-workspace' &&
28+
(p.manifest as any)?.scope !== 'platform',
29+
);
2530
console.log('[App] Fetched packages:', items.map((p) => p.manifest?.name || p.manifest?.id));
2631
if (mounted && items.length > 0) {
2732
setPackages(items);

packages/metadata/src/plugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export class MetadataPlugin implements Plugin {
5757
name: 'Metadata',
5858
version: '1.0.0',
5959
type: 'plugin',
60+
scope: 'platform',
6061
namespace: 'sys',
6162
objects: [SysMetadataObject, SysMetadataHistoryObject],
6263
});

packages/plugins/driver-memory/objectstack.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const MemoryDriverPlugin: ObjectStackManifest = {
1313
name: 'In-Memory Driver',
1414
version: '1.0.0',
1515
type: 'driver',
16+
scope: 'platform',
1617
description: 'A reference specification implementation of the DriverInterface using in-memory arrays. Suitable for testing and development.',
1718

1819
configuration: {

packages/plugins/plugin-audit/src/audit-plugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export class AuditPlugin implements Plugin {
2222
name: 'Audit',
2323
version: '1.0.0',
2424
type: 'plugin',
25+
scope: 'platform',
2526
namespace: 'sys',
2627
objects: [SysAuditLog],
2728
});

packages/plugins/plugin-auth/objectstack.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default defineStack({
1515
namespace: 'auth',
1616
version: '3.0.1',
1717
type: 'plugin',
18+
scope: 'platform',
1819
name: 'Authentication & Identity Plugin',
1920
description: 'Core authentication objects for ObjectStack (User, Session, Account, Verification)',
2021
},

packages/plugins/plugin-auth/src/auth-plugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export class AuthPlugin implements Plugin {
102102
name: 'System',
103103
version: '1.0.0',
104104
type: 'plugin',
105+
scope: 'platform',
105106
namespace: 'sys',
106107
objects: [
107108
SysUser, SysSession, SysAccount, SysVerification,

packages/plugins/plugin-hono-server/objectstack.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const HonoServerPlugin: ObjectStackManifest = {
1313
name: 'Hono Server Adapter',
1414
version: '1.0.0',
1515
type: 'adapter',
16+
scope: 'platform',
1617
description: 'HTTP server adapter using Hono framework. Exposes ObjectStack Runtime Protocol via REST API endpoints.',
1718

1819
configuration: {

packages/plugins/plugin-msw/objectstack.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const MSWPlugin: ObjectStackManifest = {
1313
name: 'Mock Service Worker Plugin',
1414
version: '1.0.0',
1515
type: 'plugin',
16+
scope: 'platform',
1617
description: 'MSW (Mock Service Worker) integration for testing and development. Provides browser-based API mocking using ObjectStack runtime protocol.',
1718

1819
configuration: {

packages/plugins/plugin-security/src/security-plugin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class SecurityPlugin implements Plugin {
4444
name: 'Security',
4545
version: '1.0.0',
4646
type: 'plugin',
47+
scope: 'platform',
4748
namespace: 'sys',
4849
objects: [SysRole, SysPermissionSet],
4950
});

packages/plugins/plugin-setup/objectstack.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default defineStack({
1515
namespace: 'setup',
1616
version: '3.3.1',
1717
type: 'plugin',
18+
scope: 'platform',
1819
name: 'Platform Setup Plugin',
1920
description: 'Owns and composes the platform Setup App with area-based navigation contributed by other plugins',
2021
},

0 commit comments

Comments
 (0)