@kb-labs/studio-app 0.6.0 → 2.8.0
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/index.html +1 -0
- package/dist/main.1d68e922.js +522 -0
- package/dist/main.1d68e922.js.map +1 -0
- package/dist/main.80b70197.css +2 -0
- package/dist/main.80b70197.css.map +1 -0
- package/dist/mf-manifest.json +241 -0
- package/dist/mf-stats.json +271 -0
- package/package.json +56 -39
- package/server.js +68 -0
- package/.env.example +0 -10
- package/UI-KIT-COMPONENTS.md +0 -783
- package/UI-KIT-PLAN.md +0 -326
- package/eslint-rules/no-direct-antd-import.js +0 -151
- package/eslint.config.ts +0 -27
- package/index.html +0 -17
- package/postcss.config.js +0 -7
- package/public/favicon.ico +0 -0
- package/rspack.config.mjs +0 -118
- package/src/App.tsx +0 -46
- package/src/components/devtools/devtools-log-feed.module.css +0 -165
- package/src/components/devtools/devtools-log-feed.tsx +0 -300
- package/src/components/devtools/devtools-panel.module.css +0 -121
- package/src/components/devtools/devtools-panel.tsx +0 -115
- package/src/components/empty-state.tsx +0 -28
- package/src/components/error-boundary.tsx +0 -210
- package/src/components/health-banner.module.css +0 -103
- package/src/components/health-banner.tsx +0 -134
- package/src/components/health-indicator.tsx +0 -12
- package/src/components/page-header.tsx +0 -49
- package/src/components/page-transition.tsx +0 -24
- package/src/components/role-switcher.tsx +0 -148
- package/src/components/run-badge.tsx +0 -13
- package/src/components/ui/icons.tsx +0 -509
- package/src/components/ui/index.ts +0 -25
- package/src/components/ui/kb-config-provider.tsx +0 -130
- package/src/components/ui/kb-header.module.css +0 -51
- package/src/components/ui/kb-header.tsx +0 -112
- package/src/components/ui/kb-notification-bell.module.css +0 -103
- package/src/components/ui/kb-notification-bell.tsx +0 -199
- package/src/components/ui/kb-page-layout.tsx +0 -66
- package/src/components/ui/kb-quick-search.module.css +0 -86
- package/src/components/ui/kb-quick-search.tsx +0 -196
- package/src/components/ui/kb-sidebar.module.css +0 -47
- package/src/components/ui/kb-sidebar.tsx +0 -196
- package/src/components/ui/kb-stat-card.module.css +0 -21
- package/src/components/ui/kb-stat-card.tsx +0 -22
- package/src/components/ui/kb-stat-grid.tsx +0 -22
- package/src/components/ui/kb-status-bar.module.css +0 -49
- package/src/components/ui/kb-status-bar.tsx +0 -145
- package/src/components/ui/kb-system-health-indicator.tsx +0 -229
- package/src/components/ui/kb-theme-toggle.tsx +0 -42
- package/src/components/ui/theme-adapter.ts +0 -812
- package/src/components/ui/theme-transition-overlay.tsx +0 -70
- package/src/components/ui/utils.ts +0 -6
- package/src/components/widget-error-boundary.tsx +0 -172
- package/src/config/env.ts +0 -5
- package/src/config/feature-flags.ts +0 -482
- package/src/config/studio.config.schema.ts +0 -88
- package/src/config/studio.config.ts +0 -84
- package/src/env.d.ts +0 -23
- package/src/hooks/use-command-palette.ts +0 -6
- package/src/hooks/use-devtools-store.ts +0 -25
- package/src/hooks/use-feature-flags.ts +0 -101
- package/src/index.css +0 -10
- package/src/layouts/dashboard-grid.tsx +0 -122
- package/src/layouts/index.ts +0 -12
- package/src/layouts/two-pane.tsx +0 -134
- package/src/main.tsx +0 -15
- package/src/modules/analytics/components/analytics-daily-stats-chart.tsx +0 -257
- package/src/modules/analytics/components/analytics-date-range-picker.tsx +0 -121
- package/src/modules/analytics/pages/analytics-cache-page.tsx +0 -285
- package/src/modules/analytics/pages/analytics-embeddings-page.tsx +0 -274
- package/src/modules/analytics/pages/analytics-events-page.tsx +0 -425
- package/src/modules/analytics/pages/analytics-llm-page.tsx +0 -434
- package/src/modules/analytics/pages/analytics-overview-page.tsx +0 -336
- package/src/modules/analytics/pages/analytics-page.tsx +0 -20
- package/src/modules/analytics/pages/analytics-storage-page.tsx +0 -344
- package/src/modules/analytics/pages/analytics-vectorstore-page.tsx +0 -279
- package/src/modules/analytics/routes/index.tsx +0 -133
- package/src/modules/analytics/utils/formatters.test.ts +0 -148
- package/src/modules/analytics/utils/formatters.ts +0 -100
- package/src/modules/auth/pages/login-page.module.css +0 -113
- package/src/modules/auth/pages/login-page.tsx +0 -80
- package/src/modules/auth/routes/index.tsx +0 -24
- package/src/modules/dashboard/components/ActivityTimelineWidget.tsx +0 -199
- package/src/modules/dashboard/components/AiInsightsWidget.tsx +0 -358
- package/src/modules/dashboard/components/AnimatedMetricCard.css +0 -88
- package/src/modules/dashboard/components/AnimatedMetricCard.tsx +0 -125
- package/src/modules/dashboard/components/HeroMetricCard.css +0 -114
- package/src/modules/dashboard/components/HeroMetricCard.tsx +0 -152
- package/src/modules/dashboard/components/HeroMetricsWidget.tsx +0 -146
- package/src/modules/dashboard/components/SystemResourcesWidget.tsx +0 -197
- package/src/modules/dashboard/components/dashboard-empty.tsx +0 -22
- package/src/modules/dashboard/components/dashboard-kpis-widget.tsx +0 -59
- package/src/modules/dashboard/components/dashboard-kpis.tsx +0 -13
- package/src/modules/dashboard/components/dashboard-latency-percentiles-widget.tsx +0 -85
- package/src/modules/dashboard/components/dashboard-metrics-widget.tsx +0 -78
- package/src/modules/dashboard/components/dashboard-plugins-widget.tsx +0 -67
- package/src/modules/dashboard/components/dashboard-requests-widget.tsx +0 -62
- package/src/modules/dashboard/layouts/dashboard-layout.tsx +0 -16
- package/src/modules/dashboard/pages/ai-insights-page.tsx +0 -563
- package/src/modules/dashboard/pages/dashboard-animations.css +0 -317
- package/src/modules/dashboard/pages/dashboard-page.tsx +0 -13
- package/src/modules/dashboard/routes/index.tsx +0 -70
- package/src/modules/observability/pages/devkit-page.tsx +0 -263
- package/src/modules/observability/pages/incident-detail-page.tsx +0 -571
- package/src/modules/observability/pages/incidents-page.tsx +0 -370
- package/src/modules/observability/pages/log-detail-page.tsx +0 -508
- package/src/modules/observability/pages/logs-page.tsx +0 -1129
- package/src/modules/observability/pages/prometheus-metrics-page.tsx +0 -486
- package/src/modules/observability/pages/state-broker-page.tsx +0 -229
- package/src/modules/observability/pages/system-events-page.tsx +0 -255
- package/src/modules/observability/routes/index.tsx +0 -133
- package/src/modules/plugins/components/marketplace-card.tsx +0 -153
- package/src/modules/plugins/components/plugin-ai-assistant-modal.tsx +0 -374
- package/src/modules/plugins/components/plugin-card.tsx +0 -136
- package/src/modules/plugins/components/plugin-detail/capabilities-summary.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/cli-commands-table.tsx +0 -101
- package/src/modules/plugins/components/plugin-detail/index.ts +0 -7
- package/src/modules/plugins/components/plugin-detail/jobs-table.tsx +0 -64
- package/src/modules/plugins/components/plugin-detail/permissions/env-permissions.tsx +0 -30
- package/src/modules/plugins/components/plugin-detail/permissions/filesystem-permissions.tsx +0 -68
- package/src/modules/plugins/components/plugin-detail/permissions/index.ts +0 -6
- package/src/modules/plugins/components/plugin-detail/permissions/network-permissions.tsx +0 -43
- package/src/modules/plugins/components/plugin-detail/permissions/platform-services.tsx +0 -242
- package/src/modules/plugins/components/plugin-detail/permissions/resource-quotas.tsx +0 -96
- package/src/modules/plugins/components/plugin-detail/permissions/shell-permissions.tsx +0 -55
- package/src/modules/plugins/components/plugin-detail/permissions-view.tsx +0 -47
- package/src/modules/plugins/components/plugin-detail/plugin-header.tsx +0 -169
- package/src/modules/plugins/components/plugin-detail/rest-routes-table.tsx +0 -159
- package/src/modules/plugins/components/plugin-detail/workflows-table.tsx +0 -40
- package/src/modules/plugins/components/plugin-grid.tsx +0 -20
- package/src/modules/plugins/components/plugin-table.tsx +0 -178
- package/src/modules/plugins/pages/marketplace-page.tsx +0 -200
- package/src/modules/plugins/pages/plugin-detail-page.tsx +0 -1145
- package/src/modules/plugins/routes/index.tsx +0 -48
- package/src/modules/plugins/utils/index.ts +0 -1
- package/src/modules/plugins/utils/schema-helpers.ts +0 -21
- package/src/modules/settings/components/api-routes-viewer.tsx +0 -415
- package/src/modules/settings/components/appearance-settings.tsx +0 -200
- package/src/modules/settings/components/configuration-settings.tsx +0 -321
- package/src/modules/settings/components/data-privacy-settings.tsx +0 -111
- package/src/modules/settings/components/experimental-settings.tsx +0 -243
- package/src/modules/settings/components/navigation-settings.tsx +0 -198
- package/src/modules/settings/components/notifications-settings.tsx +0 -40
- package/src/modules/settings/pages/settings-page.tsx +0 -298
- package/src/modules/settings/routes/index.tsx +0 -47
- package/src/pages/README-assistant.md +0 -91
- package/src/pages/login-page.tsx +0 -177
- package/src/pages/not-found-page.tsx +0 -85
- package/src/providers/auth-provider.tsx +0 -40
- package/src/providers/command-palette-provider.tsx +0 -193
- package/src/providers/data-sources-provider.tsx +0 -27
- package/src/providers/devtools-provider.tsx +0 -72
- package/src/providers/navigation-items-provider.tsx +0 -38
- package/src/providers/registry-v2-provider.tsx +0 -93
- package/src/providers/settings-provider.tsx +0 -158
- package/src/router.tsx +0 -302
- package/src/routes/helpers.tsx +0 -25
- package/src/routes/plugin-page-v2.tsx +0 -52
- package/src/routes/types.ts +0 -18
- package/src/styles/antd-overrides.css +0 -211
- package/src/styles/base.css +0 -190
- package/src/styles/settings.css +0 -75
- package/src/styles/variables.css +0 -94
- package/src/utils/analytics.ts +0 -183
- package/src/utils/apply-navigation-categories.ts +0 -83
- package/src/utils/commands.ts +0 -252
- package/src/utils/export.ts +0 -174
- package/src/utils/format-date.ts +0 -166
- package/src/utils/logger.ts +0 -110
- package/tailwind.config.ts +0 -13
- package/tsconfig.json +0 -13
- package/vitest-setup.ts +0 -1
- /package/{public → dist}/favicon.svg +0 -0
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Sun, Moon, Monitor } from 'lucide-react';
|
|
3
|
-
import type { ThemeMode } from './kb-config-provider';
|
|
4
|
-
|
|
5
|
-
export interface ThemeTransitionOverlayProps {
|
|
6
|
-
show: boolean;
|
|
7
|
-
theme: ThemeMode;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const themeConfig = {
|
|
11
|
-
light: { icon: Sun, label: 'Light Mode' },
|
|
12
|
-
dark: { icon: Moon, label: 'Dark Mode' },
|
|
13
|
-
auto: { icon: Monitor, label: 'Auto Mode' },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function ThemeTransitionOverlay({ show, theme }: ThemeTransitionOverlayProps) {
|
|
17
|
-
const { icon: Icon, label } = themeConfig[theme];
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
className="theme-transition-overlay"
|
|
22
|
-
style={{
|
|
23
|
-
position: 'fixed',
|
|
24
|
-
top: 0,
|
|
25
|
-
left: 0,
|
|
26
|
-
width: '100vw',
|
|
27
|
-
height: '100vh',
|
|
28
|
-
backgroundColor: 'var(--bg-primary)',
|
|
29
|
-
display: 'flex',
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
zIndex: 9999,
|
|
33
|
-
transform: show ? 'translateY(0)' : 'translateY(-100%)',
|
|
34
|
-
transition: 'transform 300ms cubic-bezier(0.4, 0, 0.2, 1), background-color 150ms ease-in-out, color 150ms ease-in-out',
|
|
35
|
-
pointerEvents: show ? 'auto' : 'none',
|
|
36
|
-
}}
|
|
37
|
-
>
|
|
38
|
-
<div
|
|
39
|
-
style={{
|
|
40
|
-
display: 'flex',
|
|
41
|
-
flexDirection: 'column',
|
|
42
|
-
alignItems: 'center',
|
|
43
|
-
gap: 16,
|
|
44
|
-
opacity: show ? 1 : 0,
|
|
45
|
-
transition: 'opacity 200ms ease-in-out',
|
|
46
|
-
transitionDelay: show ? '100ms' : '0ms',
|
|
47
|
-
}}
|
|
48
|
-
>
|
|
49
|
-
<Icon
|
|
50
|
-
size={48}
|
|
51
|
-
strokeWidth={1.5}
|
|
52
|
-
style={{
|
|
53
|
-
color: 'var(--text-primary)',
|
|
54
|
-
transition: 'color 150ms ease-in-out',
|
|
55
|
-
}}
|
|
56
|
-
/>
|
|
57
|
-
<div
|
|
58
|
-
style={{
|
|
59
|
-
fontSize: '18px',
|
|
60
|
-
fontWeight: 500,
|
|
61
|
-
color: 'var(--text-primary)',
|
|
62
|
-
transition: 'color 150ms ease-in-out',
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
Switching to {label}...
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module @kb-labs/studio-app/components/widget-error-boundary
|
|
3
|
-
* Error Boundary for widget isolation — keeps one widget crash from affecting the rest of the page.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import { UIButton, UITypographyText, UITag } from '@kb-labs/studio-ui-kit';
|
|
8
|
-
import { AlertTriangle, ChevronDown, ChevronUp, RotateCcw } from 'lucide-react';
|
|
9
|
-
import { trackWidgetEvent } from '../utils/analytics';
|
|
10
|
-
|
|
11
|
-
export interface WidgetErrorBoundaryProps {
|
|
12
|
-
widgetId?: string;
|
|
13
|
-
pluginId?: string;
|
|
14
|
-
children: React.ReactNode;
|
|
15
|
-
fallback?: React.ComponentType<{ error: Error; resetError: () => void }>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
interface State {
|
|
19
|
-
hasError: boolean;
|
|
20
|
-
error: Error | null;
|
|
21
|
-
detailsOpen: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export class WidgetErrorBoundary extends React.Component<WidgetErrorBoundaryProps, State> {
|
|
25
|
-
constructor(props: WidgetErrorBoundaryProps) {
|
|
26
|
-
super(props);
|
|
27
|
-
this.state = { hasError: false, error: null, detailsOpen: false };
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static getDerivedStateFromError(error: Error): Partial<State> {
|
|
31
|
-
return { hasError: true, error };
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
override componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {
|
|
35
|
-
if (this.props.widgetId && this.props.pluginId) {
|
|
36
|
-
trackWidgetEvent('error', {
|
|
37
|
-
widgetId: this.props.widgetId,
|
|
38
|
-
pluginId: this.props.pluginId,
|
|
39
|
-
code: error.message,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
console.error('[WidgetErrorBoundary]', error, errorInfo);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
resetError = (): void => {
|
|
46
|
-
this.setState({ hasError: false, error: null, detailsOpen: false });
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
toggleDetails = (): void => {
|
|
50
|
-
this.setState((s) => ({ detailsOpen: !s.detailsOpen }));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
override render(): React.ReactNode {
|
|
54
|
-
if (!this.state.hasError || !this.state.error) {
|
|
55
|
-
return this.props.children;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (this.props.fallback) {
|
|
59
|
-
const Fallback = this.props.fallback;
|
|
60
|
-
return <Fallback error={this.state.error} resetError={this.resetError} />;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const { error, detailsOpen } = this.state;
|
|
64
|
-
const { widgetId, pluginId } = this.props;
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<div style={{
|
|
68
|
-
height: '100%',
|
|
69
|
-
minHeight: 120,
|
|
70
|
-
border: '1px solid var(--border-primary)',
|
|
71
|
-
borderRadius: 8,
|
|
72
|
-
display: 'flex',
|
|
73
|
-
flexDirection: 'column',
|
|
74
|
-
padding: '12px 14px',
|
|
75
|
-
gap: 6,
|
|
76
|
-
backgroundColor: 'var(--bg-secondary)',
|
|
77
|
-
overflow: 'hidden',
|
|
78
|
-
}}>
|
|
79
|
-
{/* Header row */}
|
|
80
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
|
81
|
-
<AlertTriangle size={14} style={{ color: 'var(--error)', flexShrink: 0 }} />
|
|
82
|
-
<UITypographyText strong style={{ fontSize: 13 }}>Widget error</UITypographyText>
|
|
83
|
-
</div>
|
|
84
|
-
|
|
85
|
-
{/* Context */}
|
|
86
|
-
{(pluginId || widgetId) && (
|
|
87
|
-
<UITypographyText type="secondary" style={{ fontSize: 11, fontFamily: 'monospace' }}>
|
|
88
|
-
{[pluginId, widgetId].filter(Boolean).join(' › ')}
|
|
89
|
-
</UITypographyText>
|
|
90
|
-
)}
|
|
91
|
-
|
|
92
|
-
{/* Message — truncated */}
|
|
93
|
-
<UITypographyText
|
|
94
|
-
type="secondary"
|
|
95
|
-
style={{
|
|
96
|
-
fontSize: 12,
|
|
97
|
-
display: '-webkit-box',
|
|
98
|
-
WebkitLineClamp: 2,
|
|
99
|
-
WebkitBoxOrient: 'vertical',
|
|
100
|
-
overflow: 'hidden',
|
|
101
|
-
}}
|
|
102
|
-
>
|
|
103
|
-
{error.message || 'Unknown error'}
|
|
104
|
-
</UITypographyText>
|
|
105
|
-
|
|
106
|
-
{/* Actions */}
|
|
107
|
-
<div style={{ display: 'flex', gap: 6, marginTop: 2 }}>
|
|
108
|
-
<UIButton size="small" icon={<RotateCcw size={11} />} onClick={this.resetError}>
|
|
109
|
-
Retry
|
|
110
|
-
</UIButton>
|
|
111
|
-
<button
|
|
112
|
-
onClick={this.toggleDetails}
|
|
113
|
-
style={{
|
|
114
|
-
display: 'flex',
|
|
115
|
-
alignItems: 'center',
|
|
116
|
-
gap: 3,
|
|
117
|
-
background: 'none',
|
|
118
|
-
border: 'none',
|
|
119
|
-
padding: 0,
|
|
120
|
-
cursor: 'pointer',
|
|
121
|
-
color: 'var(--text-tertiary)',
|
|
122
|
-
fontSize: 11,
|
|
123
|
-
}}
|
|
124
|
-
>
|
|
125
|
-
{detailsOpen ? <ChevronUp size={11} /> : <ChevronDown size={11} />}
|
|
126
|
-
Details
|
|
127
|
-
</button>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
{/* Expandable details */}
|
|
131
|
-
{detailsOpen && (
|
|
132
|
-
<div style={{
|
|
133
|
-
marginTop: 4,
|
|
134
|
-
border: '1px solid var(--border-primary)',
|
|
135
|
-
borderRadius: 4,
|
|
136
|
-
overflow: 'hidden',
|
|
137
|
-
}}>
|
|
138
|
-
<div style={{
|
|
139
|
-
padding: '6px 8px',
|
|
140
|
-
borderBottom: error.stack ? '1px solid var(--border-primary)' : undefined,
|
|
141
|
-
display: 'flex',
|
|
142
|
-
alignItems: 'center',
|
|
143
|
-
gap: 6,
|
|
144
|
-
}}>
|
|
145
|
-
<UITag variant="error" style={{ margin: 0, fontSize: 10 }}>{error.name}</UITag>
|
|
146
|
-
</div>
|
|
147
|
-
{error.stack && (
|
|
148
|
-
<div style={{
|
|
149
|
-
padding: '6px 8px',
|
|
150
|
-
maxHeight: 120,
|
|
151
|
-
overflowY: 'auto',
|
|
152
|
-
background: 'var(--bg-tertiary)',
|
|
153
|
-
}}>
|
|
154
|
-
<pre style={{
|
|
155
|
-
margin: 0,
|
|
156
|
-
fontFamily: 'monospace',
|
|
157
|
-
fontSize: 10,
|
|
158
|
-
lineHeight: 1.5,
|
|
159
|
-
color: 'var(--text-secondary)',
|
|
160
|
-
whiteSpace: 'pre-wrap',
|
|
161
|
-
wordBreak: 'break-word',
|
|
162
|
-
}}>
|
|
163
|
-
{error.stack}
|
|
164
|
-
</pre>
|
|
165
|
-
</div>
|
|
166
|
-
)}
|
|
167
|
-
</div>
|
|
168
|
-
)}
|
|
169
|
-
</div>
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
}
|