@dxos/plugin-debug 0.8.1-main.ae460ac → 0.8.1-staging.31c3ee1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{DebugApp-LQHFFK3Y.mjs → DebugApp-7PFYN52J.mjs} +30 -23
- package/dist/lib/browser/{DebugApp-LQHFFK3Y.mjs.map → DebugApp-7PFYN52J.mjs.map} +4 -4
- package/dist/lib/browser/{SpaceGenerator-SPEJBGP7.mjs → SpaceGenerator-NBOQZ4JF.mjs} +12 -12
- package/dist/lib/browser/SpaceGenerator-NBOQZ4JF.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-ALFPRSAR.mjs +570 -0
- package/dist/lib/browser/app-graph-builder-ALFPRSAR.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EF3UVAVI.mjs → chunk-RORUXVAC.mjs} +1 -1
- package/dist/lib/browser/chunk-RORUXVAC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-Y4ZZEHUN.mjs → chunk-TCEHALD4.mjs} +3 -3
- package/dist/lib/browser/chunk-TCEHALD4.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +10 -25
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-context-TCD3MNIT.mjs → react-context-ZRLN5KUI.mjs} +2 -2
- package/dist/lib/browser/{react-surface-GLOHHHOD.mjs → react-surface-MXXLOQYV.mjs} +137 -45
- package/dist/lib/browser/react-surface-MXXLOQYV.mjs.map +7 -0
- package/dist/lib/browser/{settings-XWFV3P44.mjs → settings-AP74NCXH.mjs} +6 -8
- package/dist/lib/browser/{settings-XWFV3P44.mjs.map → settings-AP74NCXH.mjs.map} +3 -3
- package/dist/types/src/DebugPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings.d.ts.map +1 -1
- package/dist/types/src/components/Container.d.ts +2 -2
- package/dist/types/src/components/Container.d.ts.map +1 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts +2 -1
- package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
- package/dist/types/src/components/DebugSettings.d.ts +2 -1
- package/dist/types/src/components/DebugSettings.d.ts.map +1 -1
- package/dist/types/src/components/DebugStatus.d.ts +2 -1
- package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts +2 -1
- package/dist/types/src/components/SpaceGenerator/SchemaTable.d.ts.map +1 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts +2 -1
- package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
- package/dist/types/src/components/Wireframe.d.ts +2 -1
- package/dist/types/src/components/Wireframe.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -9
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +2 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +2 -1
- package/dist/types/src/types.d.ts.map +1 -1
- package/package.json +50 -49
- package/src/DebugPlugin.tsx +1 -14
- package/src/capabilities/app-graph-builder.ts +330 -311
- package/src/capabilities/react-surface.tsx +102 -42
- package/src/capabilities/settings.ts +1 -3
- package/src/components/DebugSettings.tsx +0 -3
- package/src/components/SpaceGenerator/ObjectGenerator.tsx +1 -1
- package/src/components/SpaceGenerator/SchemaTable.tsx +1 -1
- package/src/components/SpaceGenerator/SpaceGenerator.tsx +3 -9
- package/src/components/index.ts +0 -1
- package/src/meta.ts +2 -2
- package/src/translations.ts +4 -2
- package/src/types.ts +2 -1
- package/dist/lib/browser/DebugSpace-EBJYT5JG.mjs +0 -277
- package/dist/lib/browser/DebugSpace-EBJYT5JG.mjs.map +0 -7
- package/dist/lib/browser/SpaceGenerator-SPEJBGP7.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-5STXPSZJ.mjs +0 -547
- package/dist/lib/browser/app-graph-builder-5STXPSZJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-EF3UVAVI.mjs.map +0 -7
- package/dist/lib/browser/chunk-GSJS3HEM.mjs +0 -15
- package/dist/lib/browser/chunk-GSJS3HEM.mjs.map +0 -7
- package/dist/lib/browser/chunk-Y4ZZEHUN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-GLOHHHOD.mjs.map +0 -7
- package/dist/types/src/components/DebugSpace/DebugSpace.d.ts +0 -8
- package/dist/types/src/components/DebugSpace/DebugSpace.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/DebugSpace.stories.d.ts +0 -6
- package/dist/types/src/components/DebugSpace/DebugSpace.stories.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts +0 -14
- package/dist/types/src/components/DebugSpace/ObjectCreator.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/ObjectCreator.stories.d.ts +0 -6
- package/dist/types/src/components/DebugSpace/ObjectCreator.stories.d.ts.map +0 -1
- package/dist/types/src/components/DebugSpace/index.d.ts +0 -3
- package/dist/types/src/components/DebugSpace/index.d.ts.map +0 -1
- package/src/components/DebugSpace/DebugSpace.stories.tsx +0 -46
- package/src/components/DebugSpace/DebugSpace.tsx +0 -183
- package/src/components/DebugSpace/ObjectCreator.stories.tsx +0 -51
- package/src/components/DebugSpace/ObjectCreator.tsx +0 -100
- package/src/components/DebugSpace/index.ts +0 -7
- /package/dist/lib/browser/{react-context-TCD3MNIT.mjs.map → react-context-ZRLN5KUI.mjs.map} +0 -0
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { pipe } from 'effect';
|
|
5
6
|
import React, { useCallback } from 'react';
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
Capabilities,
|
|
10
|
+
chain,
|
|
9
11
|
contributes,
|
|
10
12
|
createIntent,
|
|
11
13
|
createSurface,
|
|
12
14
|
LayoutAction,
|
|
15
|
+
useCapability,
|
|
13
16
|
type PluginsContext,
|
|
14
17
|
} from '@dxos/app-framework';
|
|
15
18
|
import {
|
|
@@ -31,15 +34,18 @@ import {
|
|
|
31
34
|
StoragePanel,
|
|
32
35
|
SwarmPanel,
|
|
33
36
|
TracingPanel,
|
|
34
|
-
DashboardPanel,
|
|
35
37
|
EdgeDashboardPanel,
|
|
36
|
-
SearchPanel,
|
|
37
38
|
AutomergePanel,
|
|
38
39
|
WorkflowPanel,
|
|
39
40
|
QueuesPanel,
|
|
41
|
+
InvocationTracePanel,
|
|
42
|
+
TestingPanel,
|
|
40
43
|
} from '@dxos/devtools';
|
|
41
44
|
import { SettingsStore } from '@dxos/local-storage';
|
|
45
|
+
import { log } from '@dxos/log';
|
|
46
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
42
47
|
import { Graph } from '@dxos/plugin-graph';
|
|
48
|
+
import { ScriptAction } from '@dxos/plugin-script/types';
|
|
43
49
|
import { SpaceAction, CollectionType } from '@dxos/plugin-space/types';
|
|
44
50
|
import {
|
|
45
51
|
SpaceState,
|
|
@@ -48,17 +54,10 @@ import {
|
|
|
48
54
|
type ReactiveEchoObject,
|
|
49
55
|
type ReactiveObject,
|
|
50
56
|
type Space,
|
|
57
|
+
parseId,
|
|
51
58
|
} from '@dxos/react-client/echo';
|
|
52
59
|
|
|
53
|
-
import {
|
|
54
|
-
DebugApp,
|
|
55
|
-
DebugObjectPanel,
|
|
56
|
-
DebugSettings,
|
|
57
|
-
DebugSpace,
|
|
58
|
-
DebugStatus,
|
|
59
|
-
SpaceGenerator,
|
|
60
|
-
Wireframe,
|
|
61
|
-
} from '../components';
|
|
60
|
+
import { DebugApp, DebugObjectPanel, DebugSettings, DebugStatus, SpaceGenerator, Wireframe } from '../components';
|
|
62
61
|
import { DEBUG_PLUGIN } from '../meta';
|
|
63
62
|
import { type DebugSettingsProps, Devtools } from '../types';
|
|
64
63
|
|
|
@@ -74,10 +73,19 @@ type GraphDebug = {
|
|
|
74
73
|
const isSpaceDebug = (data: any): data is SpaceDebug => data?.type === `${DEBUG_PLUGIN}/space` && isSpace(data.space);
|
|
75
74
|
const isGraphDebug = (data: any): data is GraphDebug => data?.graph instanceof Graph;
|
|
76
75
|
|
|
76
|
+
// TODO(wittjosiah): Factor out?
|
|
77
|
+
const useCurrentSpace = () => {
|
|
78
|
+
const layout = useCapability(Capabilities.Layout);
|
|
79
|
+
const client = useCapability(ClientCapabilities.Client);
|
|
80
|
+
const { spaceId } = parseId(layout.workspace);
|
|
81
|
+
const space = spaceId ? client.spaces.get(spaceId) : undefined;
|
|
82
|
+
return space;
|
|
83
|
+
};
|
|
84
|
+
|
|
77
85
|
export default (context: PluginsContext) =>
|
|
78
86
|
contributes(Capabilities.ReactSurface, [
|
|
79
87
|
createSurface({
|
|
80
|
-
id: `${DEBUG_PLUGIN}/settings`,
|
|
88
|
+
id: `${DEBUG_PLUGIN}/plugin-settings`,
|
|
81
89
|
role: 'article',
|
|
82
90
|
filter: (data): data is { subject: SettingsStore<DebugSettingsProps> } =>
|
|
83
91
|
data.subject instanceof SettingsStore && data.subject.prefix === DEBUG_PLUGIN,
|
|
@@ -109,12 +117,7 @@ export default (context: PluginsContext) =>
|
|
|
109
117
|
[data.subject.space],
|
|
110
118
|
);
|
|
111
119
|
|
|
112
|
-
|
|
113
|
-
return deprecated ? (
|
|
114
|
-
<DebugSpace space={data.subject.space} onAddObjects={handleCreateObject} />
|
|
115
|
-
) : (
|
|
116
|
-
<SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />
|
|
117
|
-
);
|
|
120
|
+
return <SpaceGenerator space={data.subject.space} onCreateObjects={handleCreateObject} />;
|
|
118
121
|
},
|
|
119
122
|
}),
|
|
120
123
|
createSurface({
|
|
@@ -138,10 +141,11 @@ export default (context: PluginsContext) =>
|
|
|
138
141
|
),
|
|
139
142
|
}),
|
|
140
143
|
createSurface({
|
|
141
|
-
id: `${DEBUG_PLUGIN}/
|
|
142
|
-
role: '
|
|
143
|
-
filter: (data): data is {
|
|
144
|
-
|
|
144
|
+
id: `${DEBUG_PLUGIN}/object-debug`,
|
|
145
|
+
role: 'article',
|
|
146
|
+
filter: (data): data is { companionTo: ReactiveEchoObject<any> } =>
|
|
147
|
+
data.subject === 'debug' && isEchoObject(data.companionTo),
|
|
148
|
+
component: ({ data }) => <DebugObjectPanel object={data.companionTo} />,
|
|
145
149
|
}),
|
|
146
150
|
createSurface({
|
|
147
151
|
id: `${DEBUG_PLUGIN}/status`,
|
|
@@ -157,7 +161,7 @@ export default (context: PluginsContext) =>
|
|
|
157
161
|
id: `${DEBUG_PLUGIN}/client/config`,
|
|
158
162
|
role: 'article',
|
|
159
163
|
filter: (data): data is any => data.subject === Devtools.Client.Config,
|
|
160
|
-
component: () => <ConfigPanel />,
|
|
164
|
+
component: () => <ConfigPanel vaultSelector={false} />,
|
|
161
165
|
}),
|
|
162
166
|
createSurface({
|
|
163
167
|
id: `${DEBUG_PLUGIN}/client/storage`,
|
|
@@ -205,7 +209,10 @@ export default (context: PluginsContext) =>
|
|
|
205
209
|
id: `${DEBUG_PLUGIN}/halo/credentials`,
|
|
206
210
|
role: 'article',
|
|
207
211
|
filter: (data): data is any => data.subject === Devtools.Halo.Credentials,
|
|
208
|
-
component: () =>
|
|
212
|
+
component: () => {
|
|
213
|
+
const space = useCurrentSpace();
|
|
214
|
+
return <CredentialsPanel space={space} />;
|
|
215
|
+
},
|
|
209
216
|
}),
|
|
210
217
|
createSurface({
|
|
211
218
|
id: `${DEBUG_PLUGIN}/echo/spaces`,
|
|
@@ -225,31 +232,41 @@ export default (context: PluginsContext) =>
|
|
|
225
232
|
role: 'article',
|
|
226
233
|
filter: (data): data is any => data.subject === Devtools.Echo.Space,
|
|
227
234
|
component: () => {
|
|
235
|
+
const space = useCurrentSpace();
|
|
228
236
|
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
229
237
|
const handleSelect = useCallback(
|
|
230
238
|
() => dispatch(createIntent(LayoutAction.Open, { part: 'main', subject: [Devtools.Echo.Feeds] })),
|
|
231
239
|
[dispatch],
|
|
232
240
|
);
|
|
233
|
-
return <SpaceInfoPanel onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;
|
|
241
|
+
return <SpaceInfoPanel space={space} onSelectFeed={handleSelect} onSelectPipeline={handleSelect} />;
|
|
234
242
|
},
|
|
235
243
|
}),
|
|
236
244
|
createSurface({
|
|
237
245
|
id: `${DEBUG_PLUGIN}/echo/feeds`,
|
|
238
246
|
role: 'article',
|
|
239
247
|
filter: (data): data is any => data.subject === Devtools.Echo.Feeds,
|
|
240
|
-
component: () =>
|
|
248
|
+
component: () => {
|
|
249
|
+
const space = useCurrentSpace();
|
|
250
|
+
return <FeedsPanel space={space} />;
|
|
251
|
+
},
|
|
241
252
|
}),
|
|
242
253
|
createSurface({
|
|
243
254
|
id: `${DEBUG_PLUGIN}/echo/objects`,
|
|
244
255
|
role: 'article',
|
|
245
256
|
filter: (data): data is any => data.subject === Devtools.Echo.Objects,
|
|
246
|
-
component: () =>
|
|
257
|
+
component: () => {
|
|
258
|
+
const space = useCurrentSpace();
|
|
259
|
+
return <ObjectsPanel space={space} />;
|
|
260
|
+
},
|
|
247
261
|
}),
|
|
248
262
|
createSurface({
|
|
249
263
|
id: `${DEBUG_PLUGIN}/echo/automerge`,
|
|
250
264
|
role: 'article',
|
|
251
265
|
filter: (data): data is any => data.subject === Devtools.Echo.Automerge,
|
|
252
|
-
component: () =>
|
|
266
|
+
component: () => {
|
|
267
|
+
const space = useCurrentSpace();
|
|
268
|
+
return <AutomergePanel space={space} />;
|
|
269
|
+
},
|
|
253
270
|
}),
|
|
254
271
|
createSurface({
|
|
255
272
|
id: `${DEBUG_PLUGIN}/echo/queues`,
|
|
@@ -261,7 +278,10 @@ export default (context: PluginsContext) =>
|
|
|
261
278
|
id: `${DEBUG_PLUGIN}/echo/members`,
|
|
262
279
|
role: 'article',
|
|
263
280
|
filter: (data): data is any => data.subject === Devtools.Echo.Members,
|
|
264
|
-
component: () =>
|
|
281
|
+
component: () => {
|
|
282
|
+
const space = useCurrentSpace();
|
|
283
|
+
return <MembersPanel space={space} />;
|
|
284
|
+
},
|
|
265
285
|
}),
|
|
266
286
|
createSurface({
|
|
267
287
|
id: `${DEBUG_PLUGIN}/echo/metadata`,
|
|
@@ -285,30 +305,70 @@ export default (context: PluginsContext) =>
|
|
|
285
305
|
id: `${DEBUG_PLUGIN}/mesh/network`,
|
|
286
306
|
role: 'article',
|
|
287
307
|
filter: (data): data is any => data.subject === Devtools.Mesh.Network,
|
|
288
|
-
component: () =>
|
|
308
|
+
component: () => {
|
|
309
|
+
const space = useCurrentSpace();
|
|
310
|
+
return <NetworkPanel space={space} />;
|
|
311
|
+
},
|
|
289
312
|
}),
|
|
313
|
+
// TODO(wittjosiah): Remove?
|
|
314
|
+
// createSurface({
|
|
315
|
+
// id: `${DEBUG_PLUGIN}/agent/dashboard`,
|
|
316
|
+
// role: 'article',
|
|
317
|
+
// filter: (data): data is any => data.subject === Devtools.Agent.Dashboard,
|
|
318
|
+
// component: () => <DashboardPanel />,
|
|
319
|
+
// }),
|
|
290
320
|
createSurface({
|
|
291
|
-
id: `${DEBUG_PLUGIN}/
|
|
321
|
+
id: `${DEBUG_PLUGIN}/edge/dashboard`,
|
|
292
322
|
role: 'article',
|
|
293
|
-
filter: (data): data is any => data.subject === Devtools.
|
|
294
|
-
component: () => <
|
|
323
|
+
filter: (data): data is any => data.subject === Devtools.Edge.Dashboard,
|
|
324
|
+
component: () => <EdgeDashboardPanel />,
|
|
295
325
|
}),
|
|
296
326
|
createSurface({
|
|
297
|
-
id: `${DEBUG_PLUGIN}/
|
|
327
|
+
id: `${DEBUG_PLUGIN}/edge/workflows`,
|
|
298
328
|
role: 'article',
|
|
299
|
-
filter: (data): data is any => data.subject === Devtools.
|
|
300
|
-
component: () =>
|
|
329
|
+
filter: (data): data is any => data.subject === Devtools.Edge.Workflows,
|
|
330
|
+
component: () => {
|
|
331
|
+
const space = useCurrentSpace();
|
|
332
|
+
return <WorkflowPanel space={space} />;
|
|
333
|
+
},
|
|
301
334
|
}),
|
|
302
335
|
createSurface({
|
|
303
|
-
id: `${DEBUG_PLUGIN}/edge/
|
|
336
|
+
id: `${DEBUG_PLUGIN}/edge/traces`,
|
|
304
337
|
role: 'article',
|
|
305
|
-
filter: (data): data is any => data.subject === Devtools.Edge.
|
|
306
|
-
component: () =>
|
|
338
|
+
filter: (data): data is any => data.subject === Devtools.Edge.Traces,
|
|
339
|
+
component: () => {
|
|
340
|
+
const space = useCurrentSpace();
|
|
341
|
+
return <InvocationTracePanel space={space} />;
|
|
342
|
+
},
|
|
307
343
|
}),
|
|
308
344
|
createSurface({
|
|
309
|
-
id: `${DEBUG_PLUGIN}/edge/
|
|
345
|
+
id: `${DEBUG_PLUGIN}/edge/testing`,
|
|
310
346
|
role: 'article',
|
|
311
|
-
filter: (data): data is any => data.subject === Devtools.Edge.
|
|
312
|
-
component: () =>
|
|
347
|
+
filter: (data): data is any => data.subject === Devtools.Edge.Testing,
|
|
348
|
+
component: () => {
|
|
349
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
350
|
+
const onSpaceCreate = useCallback(
|
|
351
|
+
async (space: Space) => {
|
|
352
|
+
await space.waitUntilReady();
|
|
353
|
+
await dispatch(createIntent(SpaceAction.Migrate, { space }));
|
|
354
|
+
await space.db.flush();
|
|
355
|
+
},
|
|
356
|
+
[dispatch],
|
|
357
|
+
);
|
|
358
|
+
const onScriptPluginOpen = useCallback(
|
|
359
|
+
async (space: Space) => {
|
|
360
|
+
await space.waitUntilReady();
|
|
361
|
+
const result = await dispatch(
|
|
362
|
+
pipe(createIntent(ScriptAction.Create, { space }), chain(SpaceAction.AddObject, { target: space })),
|
|
363
|
+
);
|
|
364
|
+
log.info('script created', { result });
|
|
365
|
+
await dispatch(
|
|
366
|
+
createIntent(LayoutAction.Open, { part: 'main', subject: [`${space.id}:${result.data?.object.id}`] }),
|
|
367
|
+
);
|
|
368
|
+
},
|
|
369
|
+
[dispatch],
|
|
370
|
+
);
|
|
371
|
+
return <TestingPanel onSpaceCreate={onSpaceCreate} onScriptPluginOpen={onScriptPluginOpen} />;
|
|
372
|
+
},
|
|
313
373
|
}),
|
|
314
374
|
]);
|
|
@@ -9,9 +9,7 @@ import { DEBUG_PLUGIN } from '../meta';
|
|
|
9
9
|
import { type DebugSettingsProps, DebugSettingsSchema } from '../types';
|
|
10
10
|
|
|
11
11
|
export default () => {
|
|
12
|
-
const settings = create<DebugSettingsProps>({
|
|
13
|
-
debug: true,
|
|
14
|
-
});
|
|
12
|
+
const settings = create<DebugSettingsProps>({});
|
|
15
13
|
|
|
16
14
|
return contributes(Capabilities.Settings, { schema: DebugSettingsSchema, prefix: DEBUG_PLUGIN, value: settings });
|
|
17
15
|
};
|
|
@@ -78,9 +78,6 @@ export const DebugSettings = ({ settings }: { settings: DebugSettingsProps }) =>
|
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
80
|
<DeprecatedFormContainer>
|
|
81
|
-
<DeprecatedFormInput label={t('settings show debug panel')}>
|
|
82
|
-
<Input.Switch checked={settings.debug} onCheckedChange={(checked) => (settings.debug = !!checked)} />
|
|
83
|
-
</DeprecatedFormInput>
|
|
84
81
|
<DeprecatedFormInput label={t('settings wireframe')}>
|
|
85
82
|
<Input.Switch checked={settings.wireframe} onCheckedChange={(checked) => (settings.wireframe = !!checked)} />
|
|
86
83
|
</DeprecatedFormInput>
|
|
@@ -150,7 +150,7 @@ export const createGenerator = <T extends BaseObject>(type: TypedObject<T>): Obj
|
|
|
150
150
|
(await space.db.schemaRegistry.register([type]))[0];
|
|
151
151
|
|
|
152
152
|
// Create objects.
|
|
153
|
-
const generate = createAsyncGenerator(generator, schema.
|
|
153
|
+
const generate = createAsyncGenerator(generator, schema.snapshot, { db: space.db });
|
|
154
154
|
const objects = await generate.createObjects(n);
|
|
155
155
|
|
|
156
156
|
// Find or create table and view.
|
|
@@ -15,7 +15,7 @@ export type SchemaTableProps = {
|
|
|
15
15
|
|
|
16
16
|
export const SchemaTable = ({ types, objects = {}, label, onClick }: SchemaTableProps) => {
|
|
17
17
|
return (
|
|
18
|
-
<div className='grid grid-cols-[1fr_80px_40px] gap-1 overflow-
|
|
18
|
+
<div className='grid grid-cols-[1fr_80px_40px] gap-1 overflow-none'>
|
|
19
19
|
<div className='grid grid-cols-subgrid col-span-3'>
|
|
20
20
|
<div className='px-2 text-sm text-primary-500'>{label}</div>
|
|
21
21
|
<div className='px-2 text-xs text-subdued text-right'>count</div>
|
|
@@ -34,13 +34,7 @@ export const SpaceGenerator = ({ space, onCreateObjects }: SpaceGeneratorProps)
|
|
|
34
34
|
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
35
35
|
const client = useClient();
|
|
36
36
|
const staticTypes = [DocumentType, DiagramType, SheetType, ComputeGraph]; // TODO(burdon): Make extensible.
|
|
37
|
-
const mutableTypes = [
|
|
38
|
-
Testing.OrgType,
|
|
39
|
-
Testing.ProjectType,
|
|
40
|
-
Testing.ContactType,
|
|
41
|
-
Testing.EmailType,
|
|
42
|
-
Testing.MessageType,
|
|
43
|
-
];
|
|
37
|
+
const mutableTypes = [Testing.Org, Testing.Project, Testing.Contact, Testing.Message];
|
|
44
38
|
const [count, setCount] = useState(1);
|
|
45
39
|
const [info, setInfo] = useState<any>({});
|
|
46
40
|
|
|
@@ -118,7 +112,7 @@ export const SpaceGenerator = ({ space, onCreateObjects }: SpaceGeneratorProps)
|
|
|
118
112
|
const parts = schema.typename.split('/');
|
|
119
113
|
const name = parts[parts.length - 1];
|
|
120
114
|
const table = create(TableType, { name, threads: [] });
|
|
121
|
-
await initializeTable({ space, table,
|
|
115
|
+
await initializeTable({ client, space, table, typename: schema.typename });
|
|
122
116
|
await dispatch(createIntent(SpaceAction.AddObject, { target: space, object: table }));
|
|
123
117
|
return table;
|
|
124
118
|
}),
|
|
@@ -145,7 +139,7 @@ export const SpaceGenerator = ({ space, onCreateObjects }: SpaceGeneratorProps)
|
|
|
145
139
|
}, []);
|
|
146
140
|
|
|
147
141
|
return (
|
|
148
|
-
<div role='none' className='flex flex-col divide-y divide-separator'>
|
|
142
|
+
<div role='none' className='flex flex-col divide-y divide-separator overflow-y-auto'>
|
|
149
143
|
<Toolbar.Root classNames='p-1'>
|
|
150
144
|
<IconButton icon='ph--arrow-clockwise--regular' iconOnly label='Refresh' onClick={updateInfo} />
|
|
151
145
|
<IconButton
|
package/src/components/index.ts
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { lazy } from 'react';
|
|
6
6
|
|
|
7
7
|
export const DebugApp = lazy(() => import('./DebugApp'));
|
|
8
|
-
export const DebugSpace = lazy(() => import('./DebugSpace'));
|
|
9
8
|
export const SpaceGenerator = lazy(() => import('./SpaceGenerator'));
|
|
10
9
|
|
|
11
10
|
export * from './DebugObjectPanel';
|
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type PluginMeta } from '@dxos/app-framework';
|
|
|
6
6
|
|
|
7
7
|
export const DEBUG_PLUGIN = 'dxos.org/plugin/debug';
|
|
8
8
|
|
|
9
|
-
export const meta = {
|
|
9
|
+
export const meta: PluginMeta = {
|
|
10
10
|
id: DEBUG_PLUGIN,
|
|
11
11
|
name: 'Debug',
|
|
12
12
|
description:
|
|
@@ -15,4 +15,4 @@ export const meta = {
|
|
|
15
15
|
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug',
|
|
16
16
|
tags: ['experimental'],
|
|
17
17
|
screenshots: ['https://dxos.network/plugin-details-debug-dark.png'],
|
|
18
|
-
}
|
|
18
|
+
};
|
package/src/translations.ts
CHANGED
|
@@ -51,15 +51,17 @@ export default [
|
|
|
51
51
|
'queues label': 'Queues',
|
|
52
52
|
'members label': 'Members',
|
|
53
53
|
'metadata label': 'Metadata',
|
|
54
|
-
'mesh label': '
|
|
54
|
+
'mesh label': 'MESH',
|
|
55
55
|
'signal label': 'Signal',
|
|
56
56
|
'swarm label': 'Swarm',
|
|
57
57
|
'network label': 'Network',
|
|
58
58
|
'agent label': 'Agent',
|
|
59
59
|
'dashboard label': 'Dashboard',
|
|
60
60
|
'search label': 'Search',
|
|
61
|
-
'edge label': '
|
|
61
|
+
'edge label': 'EDGE',
|
|
62
62
|
'workflows label': 'Workflows',
|
|
63
|
+
'traces label': 'Traces',
|
|
64
|
+
'testing label': 'Testing',
|
|
63
65
|
},
|
|
64
66
|
},
|
|
65
67
|
},
|
package/src/types.ts
CHANGED
|
@@ -21,7 +21,6 @@ export const DebugContext: Context<DebugContextType> = createContext<DebugContex
|
|
|
21
21
|
|
|
22
22
|
export const DebugSettingsSchema = S.mutable(
|
|
23
23
|
S.Struct({
|
|
24
|
-
debug: S.optional(S.Boolean),
|
|
25
24
|
wireframe: S.optional(S.Boolean),
|
|
26
25
|
}),
|
|
27
26
|
);
|
|
@@ -78,5 +77,7 @@ export namespace Devtools {
|
|
|
78
77
|
export const id = `${Devtools.id}.edge`;
|
|
79
78
|
export const Dashboard = `${Devtools.Edge.id}.dashboard`;
|
|
80
79
|
export const Workflows = `${Devtools.Edge.id}.workflows`;
|
|
80
|
+
export const Traces = `${Devtools.Edge.id}.traces`;
|
|
81
|
+
export const Testing = `${Devtools.Edge.id}.testing`;
|
|
81
82
|
}
|
|
82
83
|
}
|