Commit 0d74a64
committed
GUARANTEE both passes always run + generic fallback for any unmatched industry
User feedback: after onboarding, the edit form was still showing empty fields
because the pipeline was conditional. Three fixes layered:
1. PASS 2 (gap-fill) + PASS 3 (Google search) now ALWAYS run in full mode —
not gated on whether previous passes left fields empty. Even if pass 1
filled everything, Google search runs to enrich with reviews / competitor
mentions / customer language that homepage content never has.
- Light mode (the user-toggleable cheap path) still skips both passes for
~70% cost reduction.
- Status banner now reads "AI pass 2 — gap-fill" and "AI pass 3 — Google
search" so the user sees both firing.
2. Industry-fallback now has a GENERIC_FALLBACK template that fires when no
keyword matches the brand's industry. Previously: industry "cricket
equipment manufacturer" → no template match → industry-fallback silently
filled nothing. Now: generic-but-non-empty defaults always fill the form.
Cross-check is never blank.
3. BrandBrainForm "Fill empty with AI" button now runs the FULL 4-pass
pipeline (subpages + AI extraction + Google search augmentation +
industry fallback) instead of just one pass. So users editing an existing
half-empty brain get the same quality as fresh onboarding.
The auto-search inside fillEmptyWithAi merges into pass-1 result before
the final setBrain — preserving user's already-typed values via
mergeFillEmpty's fill-empty-only semantics.
The auto-search pass merge is now fill-empty-only (search results no longer
overwrite pass-1 results) so the homepage's voice wins for tone / messaging
and the search adds only what was missing (competitors, reviews, audience
language).1 parent 62aec3a commit 0d74a64
3 files changed
Lines changed: 137 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
356 | 359 | | |
357 | | - | |
358 | | - | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
362 | | - | |
363 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
364 | 369 | | |
365 | 370 | | |
366 | 371 | | |
| |||
401 | 406 | | |
402 | 407 | | |
403 | 408 | | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
409 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
410 | 419 | | |
411 | | - | |
412 | | - | |
413 | | - | |
| 420 | + | |
414 | 421 | | |
415 | 422 | | |
416 | 423 | | |
417 | 424 | | |
418 | | - | |
| 425 | + | |
419 | 426 | | |
420 | 427 | | |
421 | 428 | | |
| |||
428 | 435 | | |
429 | 436 | | |
430 | 437 | | |
431 | | - | |
| 438 | + | |
432 | 439 | | |
433 | 440 | | |
434 | 441 | | |
| |||
440 | 447 | | |
441 | 448 | | |
442 | 449 | | |
443 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
444 | 454 | | |
445 | 455 | | |
446 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
201 | 210 | | |
202 | 211 | | |
203 | 212 | | |
| |||
207 | 216 | | |
208 | 217 | | |
209 | 218 | | |
| 219 | + | |
210 | 220 | | |
211 | 221 | | |
212 | | - | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
229 | 239 | | |
230 | 240 | | |
231 | 241 | | |
232 | | - | |
233 | | - | |
| 242 | + | |
234 | 243 | | |
235 | | - | |
236 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
237 | 286 | | |
238 | 287 | | |
239 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
4 | 32 | | |
5 | 33 | | |
6 | 34 | | |
| |||
58 | 86 | | |
59 | 87 | | |
60 | 88 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 89 | + | |
| 90 | + | |
65 | 91 | | |
66 | | - | |
67 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
68 | 106 | | |
69 | 107 | | |
70 | 108 | | |
| |||
92 | 130 | | |
93 | 131 | | |
94 | 132 | | |
95 | | - | |
| 133 | + | |
96 | 134 | | |
0 commit comments