@fluxy-chat/create-fluxy-chat 0.5.5 → 0.5.6

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/CHANGELOG.md CHANGED
@@ -1,12 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## [0.5.4] - 2026-08-19
3
+ ## [0.5.6] - 2026-08-19
4
+
5
+ ### Changed
6
+
7
+ - Hosted `full` template opens a local onboarding tour first. Clerk sign-in is the last step, then you land on a simple chat (same UI primitives as the console). Open a second tab to try realtime. Dashboard is a separate button, not the first screen.
4
8
 
5
9
  ### Fixed
6
10
 
7
- - Add `zustand` to `full` template dependencies so `pnpm install` gets everything without manual intervention.
8
- - Fix `FluxyRealtimeProvider` usage: pass `workerUrl` + `authTokenProvider` instead of non-existent `client` prop (fixes "disconnected" state and message sending).
9
- - Restyle full template UI to match FluxyChat dark theme (indigo/emerald palette, proper message bubbles, live/disconnected badge).
11
+ - Pin Vite to `@fluxy-chat/ui/dist/index.js` and force `@fluxy-chat/sdk@0.6.2` so `pnpm install` + `pnpm dev` work without extra setup.
12
+ - Depend on `@fluxy-chat/ui@^0.1.3` (valid package exports).
10
13
 
11
14
  ## [0.5.5] - 2026-08-19
12
15
 
@@ -16,6 +19,14 @@
16
19
  - Hosted `full` template uses the same chat UI primitives as FluxyChat (message bubbles/composer/status) to match dashboard/rooms/onboarding styling.
17
20
  - Remove fuorvianti "dash" UI artifacts and wire message sending through the same chat path as the dashboard.
18
21
 
22
+ ## [0.5.4] - 2026-08-19
23
+
24
+ ### Fixed
25
+
26
+ - Add `zustand` to `full` template dependencies so `pnpm install` gets everything without manual intervention.
27
+ - Fix `FluxyRealtimeProvider` usage: pass `workerUrl` + `authTokenProvider` instead of non-existent `client` prop (fixes "disconnected" state and message sending).
28
+ - Restyle full template UI to match FluxyChat dark theme (indigo/emerald palette, proper message bubbles, live/disconnected badge).
29
+
19
30
  ## [0.5.3] - 2026-08-19
20
31
 
21
32
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluxy-chat/create-fluxy-chat",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "description": "Scaffold a new FluxyChat bot project with a single command",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,10 +1,10 @@
1
1
  # FluxyChat full stack starter
2
2
 
3
- Chat + AI agent in a Vite app. Hosted mode signs you in with Clerk (same as the console), then creates your project and assistant room.
3
+ Chat + AI agent in a Vite app. Hosted mode starts with a short local tour, then Clerk, then your own room.
4
4
 
5
5
  ## Quick start
6
6
 
7
- **Hosted (Clerk, no wrangler):**
7
+ **Hosted (no wrangler):**
8
8
 
9
9
  ```bash
10
10
  npx @fluxy-chat/create-fluxy-chat@latest my-app --mode hosted -y
@@ -14,7 +14,7 @@ pnpm setup:hosted
14
14
  pnpm dev
15
15
  ```
16
16
 
17
- The app opens on localhost. Click Continue with FluxyChat, sign in, then you land in your own room (not the public playground).
17
+ Localhost opens a 3-step tour. Last step is sign in. After Clerk you come back to a simple chat. Open a second tab to try realtime. Use Open dashboard for rooms and agents.
18
18
 
19
19
  **Local worker:**
20
20
 
@@ -40,7 +40,7 @@ pnpm dev
40
40
 
41
41
  `.env` from `pnpm setup:hosted` only needs worker and console URLs. Member JWT, room, and agent come from Clerk after sign in.
42
42
 
43
- Open console: [fluxychat.com/onboarding](https://fluxychat.com/onboarding)
43
+ Dashboard: [fluxychat.com/dashboard](https://fluxychat.com/dashboard)
44
44
 
45
45
  ## Learn more
46
46
 
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@fluxy-chat/react": "^0.1.1",
18
18
  "@fluxy-chat/sdk": "^0.6.2",
19
- "@fluxy-chat/ui": "^0.1.2",
19
+ "@fluxy-chat/ui": "^0.1.3",
20
20
  "class-variance-authority": "^0.7.1",
21
21
  "clsx": "^2.1.1",
22
22
  "lucide-react": "^0.511.0",
@@ -35,5 +35,11 @@
35
35
  "tailwindcss": "^3.4.17",
36
36
  "typescript": "^5.6.0",
37
37
  "vite": "^6.0.0"
38
+ },
39
+ "pnpm": {
40
+ "overrides": {
41
+ "@fluxy-chat/sdk": "0.6.2",
42
+ "@fluxy-chat/react>@fluxy-chat/sdk": "0.6.2"
43
+ }
38
44
  }
39
45
  }
@@ -17,6 +17,19 @@ const SUGGESTED_PROMPTS = [
17
17
  "What can this assistant do?",
18
18
  ];
19
19
 
20
+ function consoleOrigin(): string {
21
+ return consoleUrl.replace(/\/$/, "");
22
+ }
23
+
24
+ function clerkAuthHref(): string {
25
+ const returnTo = typeof window !== "undefined" ? window.location.origin : "http://localhost:5173";
26
+ return `${consoleOrigin()}/cli-auth?redirect_uri=${encodeURIComponent(returnTo)}`;
27
+ }
28
+
29
+ function dashboardHref(): string {
30
+ return `${consoleOrigin()}/dashboard`;
31
+ }
32
+
20
33
  function sessionFromEnv(): CliSession | null {
21
34
  if (!envWorkerUrl || !envJwt || !envRoomId) return null;
22
35
  return {
@@ -30,31 +43,73 @@ function sessionFromEnv(): CliSession | null {
30
43
  };
31
44
  }
32
45
 
33
- function SignInGate() {
34
- const returnTo = typeof window !== "undefined" ? window.location.origin : "http://localhost:5173";
35
- const href = `${consoleUrl.replace(/\/$/, "")}/cli-auth?redirect_uri=${encodeURIComponent(returnTo)}`;
46
+ function Brand() {
47
+ return (
48
+ <div className="brand">
49
+ <img src={`${consoleOrigin()}/fluxychat-icon.svg`} alt="" width={28} height={28} />
50
+ <span>FluxyChat</span>
51
+ </div>
52
+ );
53
+ }
54
+
55
+ const TOUR_STEPS = [
56
+ {
57
+ title: "You already have an app",
58
+ body: "This folder is a real Vite chat app. After a short sign-in we create your project and a private room. No public playground.",
59
+ },
60
+ {
61
+ title: "Realtime is the point",
62
+ body: "After you are in, open this same URL in a second tab. Send a message in one window and watch it land in the other.",
63
+ },
64
+ {
65
+ title: "Then the console",
66
+ body: "Sign in is required: that is what creates (or reuses) your project and assistant room. After that the two-tab demo works. The dashboard is a separate button once you are in chat.",
67
+ },
68
+ ] as const;
69
+
70
+ function LocalOnboarding() {
71
+ const [step, setStep] = useState(0);
72
+ const last = step === TOUR_STEPS.length - 1;
73
+ const current = TOUR_STEPS[step];
36
74
 
37
75
  return (
38
76
  <main className="app-shell">
39
77
  <header className="topbar">
40
- <div className="brand">
41
- <img src={`${consoleUrl.replace(/\/$/, "")}/fluxychat-icon.svg`} alt="" width={28} height={28} />
42
- <span>FluxyChat</span>
43
- </div>
78
+ <Brand />
79
+ <span className="meta">
80
+ {step + 1} / {TOUR_STEPS.length}
81
+ </span>
44
82
  </header>
45
- <div className="signin-card">
46
- <p className="eyebrow">Local starter</p>
47
- <h1>Sign in to open your room</h1>
48
- <p>
49
- Use the same Clerk account as the console. We create your project and
50
- assistant room, then you chat here.
51
- </p>
52
- <a className="btn-primary" href={href}>
53
- Continue with FluxyChat
54
- </a>
55
- <p className="fine-print">
56
- Opens {consoleUrl.replace(/^https?:\/\//, "")} for sign in, then returns to this app.
57
- </p>
83
+ <div className="onboard">
84
+ <div className="dots" aria-hidden>
85
+ {TOUR_STEPS.map((_, i) => (
86
+ <span key={i} className={`dot-step ${i === step ? "active" : ""}`} />
87
+ ))}
88
+ </div>
89
+ <p className="eyebrow">Quick start</p>
90
+ <h1>{current.title}</h1>
91
+ <p>{current.body}</p>
92
+ <div className="onboard-actions">
93
+ {step > 0 ? (
94
+ <button type="button" className="btn-ghost" onClick={() => setStep((s) => s - 1)}>
95
+ Back
96
+ </button>
97
+ ) : null}
98
+ {last ? (
99
+ <a className="btn-primary" href={clerkAuthHref()}>
100
+ Sign in or create account
101
+ </a>
102
+ ) : (
103
+ <button type="button" className="btn-primary" onClick={() => setStep((s) => s + 1)}>
104
+ Continue
105
+ </button>
106
+ )}
107
+ </div>
108
+ {last ? (
109
+ <p className="fine-print">
110
+ Clerk on fluxychat.com, then back here with your room ready.
111
+ </p>
112
+ ) : null}
58
113
  </div>
59
114
  </main>
60
115
  );
@@ -73,9 +128,9 @@ function ChatRoom({ session }: { session: CliSession }) {
73
128
 
74
129
  async function onSend(content: string) {
75
130
  setError(null);
76
- const mentionsAgent = content.toLowerCase().includes(
77
- (session.agentHandle || "@assistant").replace(/^@/, "").toLowerCase(),
78
- );
131
+ const mentionsAgent = content
132
+ .toLowerCase()
133
+ .includes((session.agentHandle || "@assistant").replace(/^@/, "").toLowerCase());
79
134
  try {
80
135
  if (mentionsAgent && session.agentId) {
81
136
  await invokeAgent(content, { agentId: session.agentId });
@@ -95,7 +150,7 @@ function ChatRoom({ session }: { session: CliSession }) {
95
150
  <span className="font-medium text-foreground">
96
151
  {connected ? "Connected" : connectionState.status}
97
152
  </span>
98
- <span className="text-muted-foreground" {session.roomId}</span>
153
+ <span className="text-muted-foreground"> · {session.roomId}</span>
99
154
  </span>
100
155
  </div>
101
156
 
@@ -141,19 +196,16 @@ function ChatRoom({ session }: { session: CliSession }) {
141
196
  export function App() {
142
197
  const session = useMemo(() => loadCliSession() ?? sessionFromEnv(), []);
143
198
 
144
- if (!session) return <SignInGate />;
199
+ if (!session) return <LocalOnboarding />;
145
200
 
146
201
  return (
147
202
  <main className="app-shell">
148
203
  <header className="topbar">
149
- <div className="brand">
150
- <img src={`${consoleUrl.replace(/\/$/, "")}/fluxychat-icon.svg`} alt="" width={28} height={28} />
151
- <span>FluxyChat</span>
152
- </div>
204
+ <Brand />
153
205
  <nav className="top-links">
154
- <span className="meta">{session.projectName || session.projectId || "project"}</span>
155
- <a href={`${consoleUrl.replace(/\/$/, "")}/onboarding?from=cli`} target="_blank" rel="noreferrer">
156
- Open console
206
+ <span className="meta">{session.projectName || session.projectId || "your room"}</span>
207
+ <a href={dashboardHref()} target="_blank" rel="noreferrer">
208
+ Open dashboard
157
209
  </a>
158
210
  </nav>
159
211
  </header>
@@ -166,13 +218,17 @@ export function App() {
166
218
  <ChatRoom session={session} />
167
219
  </FluxyRealtimeProvider>
168
220
  <aside className="side">
221
+ <section>
222
+ <h2>Try this</h2>
223
+ <ul>
224
+ <li>Open a second tab on this same URL</li>
225
+ <li>Send a message in one tab. It should appear in the other.</li>
226
+ <li>Mention the agent to get a reply</li>
227
+ </ul>
228
+ </section>
169
229
  <section>
170
230
  <h2>Project</h2>
171
231
  <dl>
172
- <div>
173
- <dt>ID</dt>
174
- <dd>{session.projectId || "—"}</dd>
175
- </div>
176
232
  <div>
177
233
  <dt>Room</dt>
178
234
  <dd>{session.roomId}</dd>
@@ -184,16 +240,11 @@ export function App() {
184
240
  </dl>
185
241
  </section>
186
242
  <section>
187
- <h2>Next</h2>
188
- <ul>
189
- <li>Send a message, or mention the agent to invoke it</li>
190
- <li>Open a second tab on this URL for realtime</li>
191
- <li>
192
- <a href={`${consoleUrl.replace(/\/$/, "")}/onboarding?from=cli`} target="_blank" rel="noreferrer">
193
- Continue onboarding in the console
194
- </a>
195
- </li>
196
- </ul>
243
+ <h2>Console</h2>
244
+ <p className="side-copy">Rooms, agents, and settings live in the dashboard.</p>
245
+ <a className="btn-primary side-btn" href={dashboardHref()} target="_blank" rel="noreferrer">
246
+ Open dashboard
247
+ </a>
197
248
  </section>
198
249
  </aside>
199
250
  </div>
@@ -76,14 +76,14 @@ body {
76
76
  }
77
77
 
78
78
  .top-links a,
79
- .side a {
79
+ .side a:not(.btn-primary) {
80
80
  color: var(--fluxy-cta-color);
81
81
  font-weight: 500;
82
82
  text-decoration: none;
83
83
  }
84
84
 
85
85
  .top-links a:hover,
86
- .side a:hover {
86
+ .side a:not(.btn-primary):hover {
87
87
  text-decoration: underline;
88
88
  }
89
89
 
@@ -226,6 +226,78 @@ body {
226
226
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
227
227
  }
228
228
 
229
+ .onboard {
230
+ margin: auto;
231
+ max-width: 520px;
232
+ width: calc(100% - 32px);
233
+ background: var(--surface-card);
234
+ border: 1px solid var(--border);
235
+ border-radius: 16px;
236
+ padding: 32px;
237
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
238
+ }
239
+
240
+ .onboard h1 {
241
+ margin: 0 0 8px;
242
+ font-size: 24px;
243
+ }
244
+
245
+ .onboard p {
246
+ color: var(--text-muted);
247
+ font-size: 15px;
248
+ line-height: 1.55;
249
+ }
250
+
251
+ .dots {
252
+ display: flex;
253
+ gap: 6px;
254
+ margin-bottom: 16px;
255
+ }
256
+
257
+ .dot-step {
258
+ width: 8px;
259
+ height: 8px;
260
+ border-radius: 99px;
261
+ background: var(--border);
262
+ }
263
+
264
+ .dot-step.active {
265
+ background: var(--fluxy-cta-color);
266
+ width: 22px;
267
+ }
268
+
269
+ .onboard-actions {
270
+ display: flex;
271
+ align-items: center;
272
+ gap: 10px;
273
+ margin-top: 20px;
274
+ }
275
+
276
+ .btn-ghost {
277
+ border: 1px solid var(--border);
278
+ background: transparent;
279
+ color: var(--foreground);
280
+ border-radius: 10px;
281
+ padding: 10px 16px;
282
+ font-weight: 600;
283
+ font-size: 14px;
284
+ cursor: pointer;
285
+ }
286
+
287
+ .btn-primary.side-btn {
288
+ margin-top: 10px;
289
+ width: 100%;
290
+ justify-content: center;
291
+ box-sizing: border-box;
292
+ }
293
+
294
+ .side-copy {
295
+ margin: 0;
296
+ font-size: 13px;
297
+ color: var(--text-muted);
298
+ line-height: 1.45;
299
+ }
300
+
229
301
  .eyebrow {
230
302
  font-size: 11px;
231
303
  font-weight: 650;
@@ -248,14 +320,19 @@ body {
248
320
 
249
321
  .btn-primary {
250
322
  display: inline-flex;
251
- margin-top: 16px;
323
+ align-items: center;
324
+ justify-content: center;
325
+ margin-top: 0;
252
326
  background: var(--fluxy-cta-color);
253
327
  color: #fff;
328
+ border: none;
254
329
  border-radius: 10px;
255
330
  padding: 10px 16px;
256
331
  font-weight: 600;
257
332
  font-size: 14px;
258
333
  text-decoration: none;
334
+ cursor: pointer;
335
+ font-family: inherit;
259
336
  }
260
337
 
261
338
  .btn-primary:hover {
@@ -3,5 +3,12 @@ import react from "@vitejs/plugin-react";
3
3
 
4
4
  export default defineConfig({
5
5
  plugins: [react()],
6
+ resolve: {
7
+ alias: {
8
+ // @fluxy-chat/ui currently ships an entrypoint Vite cannot resolve reliably.
9
+ // Pin to dist js to keep template apps booting consistently.
10
+ "@fluxy-chat/ui": "@fluxy-chat/ui/dist/index.js",
11
+ },
12
+ },
6
13
  server: { port: 5173, open: true },
7
14
  });