fluxy-bot 0.2.22 → 0.2.24

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/bin/cli.js CHANGED
@@ -284,6 +284,7 @@ async function init() {
284
284
  'Installing cloudflared',
285
285
  'Starting server',
286
286
  'Connecting tunnel',
287
+ 'Preparing dashboard',
287
288
  ];
288
289
 
289
290
  const stepper = new Stepper(steps);
@@ -310,6 +311,17 @@ async function init() {
310
311
  const { child, tunnelUrl, relayUrl } = result;
311
312
  stepper.advance();
312
313
 
314
+ // Warm up Vite by fetching pages (triggers dep pre-bundling)
315
+ const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8'));
316
+ const localUrl = `http://localhost:${config.port}`;
317
+ try {
318
+ await Promise.all([
319
+ fetch(localUrl + '/').then(r => r.text()),
320
+ fetch(localUrl + '/fluxy/onboard.html').then(r => r.text()),
321
+ ]);
322
+ } catch {}
323
+ stepper.advance();
324
+
313
325
  stepper.finish();
314
326
  finalMessage(tunnelUrl, relayUrl);
315
327
 
@@ -330,7 +342,7 @@ async function start() {
330
342
 
331
343
  banner();
332
344
 
333
- const steps = ['Loading config', 'Starting server', 'Connecting tunnel'];
345
+ const steps = ['Loading config', 'Starting server', 'Connecting tunnel', 'Preparing dashboard'];
334
346
  const stepper = new Stepper(steps);
335
347
  stepper.start();
336
348
 
@@ -349,6 +361,17 @@ async function start() {
349
361
  const { child, tunnelUrl, relayUrl } = result;
350
362
  stepper.advance();
351
363
 
364
+ // Warm up Vite by fetching pages (triggers dep pre-bundling)
365
+ const cfg = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf-8'));
366
+ const local = `http://localhost:${cfg.port}`;
367
+ try {
368
+ await Promise.all([
369
+ fetch(local + '/').then(r => r.text()),
370
+ fetch(local + '/fluxy/onboard.html').then(r => r.text()),
371
+ ]);
372
+ } catch {}
373
+ stepper.advance();
374
+
352
375
  stepper.finish();
353
376
  finalMessage(tunnelUrl, relayUrl);
354
377
 
@@ -2,7 +2,6 @@ import { useState, useEffect } from 'react';
2
2
  import ErrorBoundary from './components/ErrorBoundary';
3
3
  import DashboardLayout from './components/Layout/DashboardLayout';
4
4
  import DashboardPage from './components/Dashboard/DashboardPage';
5
- import OnboardWizard from './components/Onboard/OnboardWizard';
6
5
 
7
6
  function DashboardError() {
8
7
  return (
@@ -56,6 +55,8 @@ export default function App() {
56
55
  setRebuildState('error');
57
56
  setBuildError(e.data.error || 'Build failed');
58
57
  setTimeout(() => setRebuildState('idle'), 5000);
58
+ } else if (e.data?.type === 'fluxy:onboard-complete') {
59
+ setShowOnboard(false);
59
60
  } else if (e.data?.type === 'fluxy:hmr-update') {
60
61
  console.log('[dashboard] File changed — reloading...');
61
62
  // Preserve widget open state so chat isn't disrupted
@@ -73,10 +74,6 @@ export default function App() {
73
74
  };
74
75
  }, []);
75
76
 
76
- const handleOnboardComplete = () => {
77
- setShowOnboard(false);
78
- };
79
-
80
77
  return (
81
78
  <>
82
79
  <ErrorBoundary fallback={<DashboardError />}>
@@ -85,7 +82,12 @@ export default function App() {
85
82
  </DashboardLayout>
86
83
  </ErrorBoundary>
87
84
 
88
- {showOnboard && <OnboardWizard onComplete={handleOnboardComplete} />}
85
+ {showOnboard && (
86
+ <iframe
87
+ src="/fluxy/onboard.html"
88
+ style={{ position: 'fixed', inset: 0, width: '100vw', height: '100dvh', border: 'none', zIndex: 200 }}
89
+ />
90
+ )}
89
91
 
90
92
  {rebuildState !== 'idle' && (
91
93
  <div className="fixed inset-0 z-[49] flex flex-col items-center justify-center bg-background/90">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "description": "Self-hosted AI bot — run your own AI assistant from anywhere",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import OnboardWizard from './OnboardWizard';
4
+ import './src/styles/globals.css';
5
+
6
+ function App() {
7
+ const handleComplete = () => {
8
+ // Notify the parent (dashboard) that onboarding is done
9
+ window.parent?.postMessage({ type: 'fluxy:onboard-complete' }, '*');
10
+ };
11
+
12
+ return <OnboardWizard onComplete={handleComplete} />;
13
+ }
14
+
15
+ ReactDOM.createRoot(document.getElementById('root')!).render(
16
+ <React.StrictMode>
17
+ <App />
18
+ </React.StrictMode>,
19
+ );
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=resizes-content" />
6
+ <title>Fluxy Setup</title>
7
+ </head>
8
+ <body class="bg-background text-foreground">
9
+ <div id="root"></div>
10
+ <script type="module" src="/onboard-main.tsx"></script>
11
+ </body>
12
+ </html>
@@ -13,7 +13,10 @@ export default defineConfig({
13
13
  outDir: '../../dist-fluxy',
14
14
  emptyOutDir: true,
15
15
  rollupOptions: {
16
- input: path.resolve(__dirname, 'supervisor/chat/fluxy.html'),
16
+ input: {
17
+ fluxy: path.resolve(__dirname, 'supervisor/chat/fluxy.html'),
18
+ onboard: path.resolve(__dirname, 'supervisor/chat/onboard.html'),
19
+ },
17
20
  },
18
21
  },
19
22
  optimizeDeps: {