@schandlergarcia/sf-web-components 1.9.87 → 2.0.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/.a4drules/features/command-center-dashboard-rule.md +1 -1
- package/.a4drules/skills/command-center-builder/SKILL.md +33 -36
- package/.a4drules/skills/command-center-builder/getting-started.md +64 -104
- package/.a4drules/skills/command-center-builder/improved-build-process.md +28 -34
- package/.a4drules/skills/command-center-guide/SKILL.md +9 -9
- package/.a4drules/skills/command-center-project/SKILL.md +4 -5
- package/.a4drules/skills/component-library/SKILL.md +8 -10
- package/.a4drules/skills/component-library/card-components.md +3 -3
- package/.a4drules/skills/component-library/chat-data.md +4 -6
- package/.a4drules/troubleshooting/codegen-overwrites-types.md +21 -162
- package/.a4drules/troubleshooting/graphql-introspection-failure.md +13 -264
- package/.a4drules/validation-requirements.md +3 -5
- package/.a4drules/webapp-data.md +1 -1
- package/CHANGELOG.md +30 -0
- package/CLAUDE.md +19 -39
- package/dist/components/library/cards/ActivityCard.js +9 -9
- package/dist/components/library/cards/ActivityCard.js.map +1 -1
- package/dist/styles/base.css +112 -27
- package/dist/styles/global.css +15 -30
- package/package.json +2 -3
- package/scripts/postinstall.mjs +39 -178
- package/scripts/reset-command-center.sh +67 -406
- package/scripts/validate-dashboard.sh +4 -4
- package/src/components/library/cards/ActivityCard.jsx +2 -2
- package/src/styles/base.css +223 -0
- package/src/styles/global.css +223 -0
- package/src/templates/config/vite.config.ts.template +0 -18
- package/.a4drules/features/engine-dashboard-rule.md +0 -63
- package/.a4drules/features/phase2-data-pattern.md +0 -15
- package/assets/images/engine_logo.png +0 -0
- package/data/README.md +0 -202
- package/data/USAGE.md +0 -81
- package/data/agentApiConfig.ts +0 -36
- package/data/copy-to-webapp.sh +0 -61
- package/data/engine-command-center-prd.md +0 -575
- package/data/engine-live-data.js +0 -135
- package/data/engine-sample-data.js +0 -378
- package/data/schema.graphql +0 -292
- package/data/useEngineLiveData.ts +0 -49
- package/data/useEvaAgent.ts +0 -288
- package/scripts/generate-schema-from-sample.mjs +0 -370
|
@@ -27,6 +27,7 @@ else
|
|
|
27
27
|
fi
|
|
28
28
|
|
|
29
29
|
cd "$ROOT"
|
|
30
|
+
ROOT_ABS="$(cd "$ROOT" && pwd)"
|
|
30
31
|
|
|
31
32
|
echo ""
|
|
32
33
|
echo "╔════════════════════════════════════════════════╗"
|
|
@@ -397,417 +398,92 @@ echo "→ Cleaning caches…"
|
|
|
397
398
|
rm -rf node_modules/.vite 2>/dev/null && echo " ✓ Cleared Vite cache" || true
|
|
398
399
|
echo ""
|
|
399
400
|
|
|
400
|
-
# ── 9. Restore
|
|
401
|
+
# ── 9. Restore neutral global.css ────────────────────────────────────────────
|
|
401
402
|
|
|
402
|
-
# Ensure src/styles directory exists
|
|
403
403
|
mkdir -p src/styles
|
|
404
404
|
|
|
405
405
|
GLOBAL_CSS="src/styles/global.css"
|
|
406
|
-
echo "→ Restoring
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
#root {
|
|
415
|
-
@apply min-h-screen;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
body {
|
|
419
|
-
@apply antialiased bg-white;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
@import 'tw-animate-css';
|
|
424
|
-
@import 'shadcn/tailwind.css';
|
|
425
|
-
|
|
426
|
-
@custom-variant dark (&:is(.dark *));
|
|
427
|
-
|
|
428
|
-
@source "../components/library";
|
|
429
|
-
@source "../components/pages";
|
|
430
|
-
|
|
431
|
-
@theme inline {
|
|
432
|
-
--color-background: var(--background);
|
|
433
|
-
--color-foreground: var(--foreground);
|
|
434
|
-
--color-card: var(--card);
|
|
435
|
-
--color-card-foreground: var(--card-foreground);
|
|
436
|
-
--color-popover: var(--popover);
|
|
437
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
438
|
-
--color-primary: var(--primary);
|
|
439
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
440
|
-
--color-secondary: var(--secondary);
|
|
441
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
442
|
-
--color-muted: var(--muted);
|
|
443
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
444
|
-
--color-accent: var(--accent);
|
|
445
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
446
|
-
--color-destructive: var(--destructive);
|
|
447
|
-
--color-destructive-foreground: var(--destructive-foreground);
|
|
448
|
-
--color-border: var(--border);
|
|
449
|
-
--color-input: var(--input);
|
|
450
|
-
--color-ring: var(--ring);
|
|
451
|
-
--color-chart-1: var(--chart-1);
|
|
452
|
-
--color-chart-2: var(--chart-2);
|
|
453
|
-
--color-chart-3: var(--chart-3);
|
|
454
|
-
--color-chart-4: var(--chart-4);
|
|
455
|
-
--color-chart-5: var(--chart-5);
|
|
456
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
457
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
458
|
-
--radius-lg: var(--radius);
|
|
459
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
460
|
-
--color-sidebar: var(--sidebar);
|
|
461
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
462
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
463
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
464
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
465
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
466
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
467
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
468
|
-
|
|
469
|
-
/* Engine brand palette */
|
|
470
|
-
--color-engine-black: #111111;
|
|
471
|
-
--color-engine-teal: #5BC8C8;
|
|
472
|
-
--color-engine-green: #3DAB5F;
|
|
473
|
-
--color-engine-coral: #FF5722;
|
|
474
|
-
--color-engine-orange: #F59E0B;
|
|
475
|
-
--color-engine-savings: #16A34A;
|
|
476
|
-
--color-engine-bg: #F7F8FA;
|
|
477
|
-
--color-engine-border: #E5E7EB;
|
|
478
|
-
--color-engine-text: #111111;
|
|
479
|
-
--color-engine-muted: #6B7280;
|
|
480
|
-
--color-engine-label: #9CA3AF;
|
|
481
|
-
|
|
482
|
-
/* Engine teal brand palette */
|
|
483
|
-
--color-brand-50: #ECFDF9;
|
|
484
|
-
--color-brand-100: #D1FAF0;
|
|
485
|
-
--color-brand-200: #A7F3E1;
|
|
486
|
-
--color-brand-300: #6EE7C8;
|
|
487
|
-
--color-brand-400: #34D3AB;
|
|
488
|
-
--color-brand-500: #5BC8C8;
|
|
489
|
-
--color-brand-600: #0D9488;
|
|
490
|
-
--color-brand-700: #0F766E;
|
|
491
|
-
--color-brand-800: #115E59;
|
|
492
|
-
--color-brand-900: #134E4A;
|
|
493
|
-
--color-brand-950: #042F2E;
|
|
494
|
-
|
|
495
|
-
--font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
|
|
496
|
-
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
|
|
497
|
-
|
|
498
|
-
/* Engine border radius tokens */
|
|
499
|
-
--radius-pill: 9999px;
|
|
500
|
-
--radius-card: 10px;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
:root {
|
|
504
|
-
--radius: 0.625rem;
|
|
505
|
-
--background: oklch(1 0 0);
|
|
506
|
-
--foreground: oklch(0.145 0 0);
|
|
507
|
-
--card: oklch(1 0 0);
|
|
508
|
-
--card-foreground: oklch(0.145 0 0);
|
|
509
|
-
--popover: oklch(1 0 0);
|
|
510
|
-
--popover-foreground: oklch(0.145 0 0);
|
|
511
|
-
--primary: oklch(0.205 0 0);
|
|
512
|
-
--primary-foreground: oklch(0.985 0 0);
|
|
513
|
-
--secondary: oklch(0.97 0 0);
|
|
514
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
515
|
-
--muted: oklch(0.97 0 0);
|
|
516
|
-
--muted-foreground: oklch(0.556 0 0);
|
|
517
|
-
--accent: oklch(0.97 0 0);
|
|
518
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
519
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
520
|
-
--border: oklch(0.922 0 0);
|
|
521
|
-
--input: oklch(0.922 0 0);
|
|
522
|
-
--ring: oklch(0.708 0 0);
|
|
523
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
524
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
525
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
526
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
527
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
528
|
-
--sidebar: oklch(0.985 0 0);
|
|
529
|
-
--sidebar-foreground: oklch(0.145 0 0);
|
|
530
|
-
--sidebar-primary: oklch(0.205 0 0);
|
|
531
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
532
|
-
--sidebar-accent: oklch(0.97 0 0);
|
|
533
|
-
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
534
|
-
--sidebar-border: oklch(0.922 0 0);
|
|
535
|
-
--sidebar-ring: oklch(0.708 0 0);
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
.dark {
|
|
539
|
-
--background: oklch(0.145 0 0);
|
|
540
|
-
--foreground: oklch(0.985 0 0);
|
|
541
|
-
--card: oklch(0.205 0 0);
|
|
542
|
-
--card-foreground: oklch(0.985 0 0);
|
|
543
|
-
--popover: oklch(0.205 0 0);
|
|
544
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
545
|
-
--primary: oklch(0.922 0 0);
|
|
546
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
547
|
-
--secondary: oklch(0.269 0 0);
|
|
548
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
549
|
-
--muted: oklch(0.269 0 0);
|
|
550
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
551
|
-
--accent: oklch(0.269 0 0);
|
|
552
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
553
|
-
--destructive: oklch(0.704 0.191 22.216);
|
|
554
|
-
--border: oklch(1 0 0 / 10%);
|
|
555
|
-
--input: oklch(1 0 0 / 15%);
|
|
556
|
-
--ring: oklch(0.556 0 0);
|
|
557
|
-
--chart-1: oklch(0.488 0.243 264.376);
|
|
558
|
-
--chart-2: oklch(0.696 0.17 162.48);
|
|
559
|
-
--chart-3: oklch(0.769 0.188 70.08);
|
|
560
|
-
--chart-4: oklch(0.627 0.265 303.9);
|
|
561
|
-
--chart-5: oklch(0.645 0.246 16.439);
|
|
562
|
-
--sidebar: oklch(0.205 0 0);
|
|
563
|
-
--sidebar-foreground: oklch(0.985 0 0);
|
|
564
|
-
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
565
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
566
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
567
|
-
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
568
|
-
--sidebar-border: oklch(1 0 0 / 10%);
|
|
569
|
-
--sidebar-ring: oklch(0.556 0 0);
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
@layer base {
|
|
573
|
-
* {
|
|
574
|
-
@apply border-border outline-ring/50;
|
|
575
|
-
}
|
|
576
|
-
body {
|
|
577
|
-
@apply bg-background text-foreground;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
/*
|
|
582
|
-
* Restore HeroUI theme variables inside the Command Center scope.
|
|
583
|
-
* shadcn redefines --muted, --accent, --accent-foreground with different
|
|
584
|
-
* semantics (bg colors vs text colors). This scope restores HeroUI's values
|
|
585
|
-
* so HeroUI components render correctly.
|
|
586
|
-
*/
|
|
587
|
-
.heroui-scope {
|
|
588
|
-
/* Engine HeroUI theme overrides */
|
|
589
|
-
--primary: #000000;
|
|
590
|
-
--primary-foreground: oklch(0.9911 0 0);
|
|
591
|
-
--secondary: #5BC8C8;
|
|
592
|
-
--secondary-foreground: oklch(0.2103 0.0059 285.89);
|
|
593
|
-
--success: #16A34A;
|
|
594
|
-
--success-foreground: oklch(0.9911 0 0);
|
|
595
|
-
--warning: #F59E0B;
|
|
596
|
-
--warning-foreground: oklch(0.2103 0.0059 285.89);
|
|
597
|
-
--danger: #FF5722;
|
|
598
|
-
--danger-foreground: oklch(0.9911 0 0);
|
|
599
|
-
|
|
600
|
-
--muted: oklch(0.5517 0.0138 285.94);
|
|
601
|
-
--accent: oklch(0.6204 0.195 253.83);
|
|
602
|
-
--accent-foreground: oklch(0.9911 0 0);
|
|
603
|
-
--background: oklch(0.9702 0 0);
|
|
604
|
-
--foreground: oklch(0.2103 0.0059 285.89);
|
|
605
|
-
--default: oklch(94% 0.001 286.375);
|
|
606
|
-
--default-foreground: oklch(0.2103 0.0059 285.89);
|
|
607
|
-
--border: oklch(90% 0.004 286.32);
|
|
608
|
-
--separator: oklch(92% 0.004 286.32);
|
|
609
|
-
--segment: oklch(100% 0 0);
|
|
610
|
-
--segment-foreground: oklch(0.2103 0.0059 285.89);
|
|
611
|
-
--surface: oklch(100% 0 0);
|
|
612
|
-
--surface-foreground: oklch(0.2103 0.0059 285.89);
|
|
613
|
-
--overlay: oklch(100% 0 0);
|
|
614
|
-
--overlay-foreground: oklch(0.2103 0.0059 285.89);
|
|
615
|
-
--focus: oklch(0.6204 0.195 253.83);
|
|
616
|
-
--link: oklch(0.2103 0.0059 285.89);
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
.dark .heroui-scope,
|
|
620
|
-
.heroui-scope.dark {
|
|
621
|
-
--muted: oklch(70.5% 0.015 286.067);
|
|
622
|
-
--background: oklch(12% 0.005 285.823);
|
|
623
|
-
--foreground: oklch(0.9911 0 0);
|
|
624
|
-
--default: oklch(27.4% 0.006 286.033);
|
|
625
|
-
--default-foreground: oklch(0.9911 0 0);
|
|
626
|
-
--border: oklch(28% 0.006 286.033);
|
|
627
|
-
--separator: oklch(25% 0.006 286.033);
|
|
628
|
-
--segment: oklch(0.3964 0.01 285.93);
|
|
629
|
-
--segment-foreground: oklch(0.9911 0 0);
|
|
630
|
-
--surface: oklch(0.2103 0.0059 285.89);
|
|
631
|
-
--surface-foreground: oklch(0.9911 0 0);
|
|
632
|
-
--overlay: oklch(0.2103 0.0059 285.89);
|
|
633
|
-
--overlay-foreground: oklch(0.9911 0 0);
|
|
634
|
-
--warning: oklch(0.8203 0.1388 76.34);
|
|
635
|
-
--warning-foreground: oklch(0.2103 0.0059 285.89);
|
|
636
|
-
--danger: oklch(0.594 0.1967 24.63);
|
|
637
|
-
--danger-foreground: oklch(0.9911 0 0);
|
|
638
|
-
--focus: oklch(0.6204 0.195 253.83);
|
|
639
|
-
--link: oklch(0.9911 0 0);
|
|
640
|
-
}
|
|
641
|
-
GLOBAL_CSS_EOF
|
|
642
|
-
|
|
643
|
-
echo " ✓ Engine branding restored"
|
|
644
|
-
echo ""
|
|
645
|
-
|
|
646
|
-
# ── 10. Restore Engine sample data and schema ──────────────────────────────
|
|
647
|
-
|
|
648
|
-
# Ensure src/data directory exists
|
|
649
|
-
mkdir -p src/data
|
|
650
|
-
|
|
651
|
-
ENGINE_DATA="src/data/engine-sample-data.js"
|
|
652
|
-
echo "→ Restoring ${ENGINE_DATA}..."
|
|
653
|
-
|
|
654
|
-
# Detect package location
|
|
655
|
-
if [ -d "node_modules/@schandlergarcia/sf-web-components/data" ]; then
|
|
656
|
-
PKG="node_modules/@schandlergarcia/sf-web-components"
|
|
657
|
-
PACKAGE_DATA="$PKG/data/engine-sample-data.js"
|
|
658
|
-
PACKAGE_LIVE_DATA="$PKG/data/engine-live-data.js"
|
|
659
|
-
PACKAGE_LIVE_HOOK="$PKG/data/useEngineLiveData.ts"
|
|
660
|
-
PACKAGE_SCHEMA="$PKG/data/schema.graphql"
|
|
661
|
-
PACKAGE_EVA_HOOK="$PKG/data/useEvaAgent.ts"
|
|
662
|
-
PACKAGE_AGENT_CONFIG="$PKG/data/agentApiConfig.ts"
|
|
663
|
-
PACKAGE_DATA_STRATEGY="$PKG/src/templates/lib/dataStrategy.ts.template"
|
|
664
|
-
elif [ -f "$SCRIPT_DIR/../data/engine-sample-data.js" ]; then
|
|
665
|
-
# Running from package source
|
|
666
|
-
PACKAGE_DATA="$SCRIPT_DIR/../data/engine-sample-data.js"
|
|
667
|
-
PACKAGE_LIVE_DATA="$SCRIPT_DIR/../data/engine-live-data.js"
|
|
668
|
-
PACKAGE_LIVE_HOOK="$SCRIPT_DIR/../data/useEngineLiveData.ts"
|
|
669
|
-
PACKAGE_SCHEMA="$SCRIPT_DIR/../data/schema.graphql"
|
|
670
|
-
PACKAGE_EVA_HOOK="$SCRIPT_DIR/../data/useEvaAgent.ts"
|
|
671
|
-
PACKAGE_AGENT_CONFIG="$SCRIPT_DIR/../data/agentApiConfig.ts"
|
|
672
|
-
PACKAGE_DATA_STRATEGY="$SCRIPT_DIR/../src/templates/lib/dataStrategy.ts.template"
|
|
673
|
-
else
|
|
674
|
-
echo " ⚠ Could not find engine-sample-data.js in package"
|
|
675
|
-
PACKAGE_DATA=""
|
|
676
|
-
PACKAGE_LIVE_DATA=""
|
|
677
|
-
PACKAGE_LIVE_HOOK=""
|
|
678
|
-
PACKAGE_SCHEMA=""
|
|
679
|
-
PACKAGE_EVA_HOOK=""
|
|
680
|
-
PACKAGE_AGENT_CONFIG=""
|
|
681
|
-
PACKAGE_DATA_STRATEGY=""
|
|
682
|
-
fi
|
|
683
|
-
|
|
684
|
-
if [ -n "$PACKAGE_DATA" ] && [ -f "$PACKAGE_DATA" ]; then
|
|
685
|
-
cp "$PACKAGE_DATA" "$ENGINE_DATA"
|
|
686
|
-
echo " ✓ Engine sample data restored"
|
|
687
|
-
else
|
|
688
|
-
echo " ⚠ Skipped sample data (package data not found)"
|
|
406
|
+
echo "→ Restoring ${GLOBAL_CSS}..."
|
|
407
|
+
|
|
408
|
+
# Detect package location for global.css
|
|
409
|
+
PACKAGE_CSS=""
|
|
410
|
+
if [ -f "node_modules/@schandlergarcia/sf-web-components/src/styles/global.css" ]; then
|
|
411
|
+
PACKAGE_CSS="node_modules/@schandlergarcia/sf-web-components/src/styles/global.css"
|
|
412
|
+
elif [ -f "$SCRIPT_DIR/../src/styles/global.css" ]; then
|
|
413
|
+
PACKAGE_CSS="$SCRIPT_DIR/../src/styles/global.css"
|
|
689
414
|
fi
|
|
690
415
|
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
echo "
|
|
694
|
-
|
|
695
|
-
if [ -n "$PACKAGE_SCHEMA" ] && [ -f "$PACKAGE_SCHEMA" ]; then
|
|
696
|
-
cp "$PACKAGE_SCHEMA" "$SCHEMA_FILE"
|
|
697
|
-
echo " ✓ GraphQL schema restored (pre-built from sample data)"
|
|
416
|
+
if [ -n "$PACKAGE_CSS" ] && [ -f "$PACKAGE_CSS" ]; then
|
|
417
|
+
cp "$PACKAGE_CSS" "$GLOBAL_CSS"
|
|
418
|
+
echo " ✓ Theme restored from package"
|
|
698
419
|
else
|
|
699
|
-
echo " ⚠ Skipped
|
|
700
|
-
fi
|
|
701
|
-
|
|
702
|
-
# Restore engine-live-data.js
|
|
703
|
-
ENGINE_LIVE_DATA="src/data/engine-live-data.js"
|
|
704
|
-
echo "→ Restoring ${ENGINE_LIVE_DATA}..."
|
|
705
|
-
|
|
706
|
-
if [ -n "$PACKAGE_LIVE_DATA" ] && [ -f "$PACKAGE_LIVE_DATA" ]; then
|
|
707
|
-
cp "$PACKAGE_LIVE_DATA" "$ENGINE_LIVE_DATA"
|
|
708
|
-
echo " ✓ Engine live data restored"
|
|
709
|
-
else
|
|
710
|
-
echo " ⚠ Skipped live data (package data not found)"
|
|
711
|
-
fi
|
|
712
|
-
|
|
713
|
-
# Restore useEngineLiveData.ts
|
|
714
|
-
mkdir -p src/hooks
|
|
715
|
-
LIVE_HOOK="src/hooks/useEngineLiveData.ts"
|
|
716
|
-
echo "→ Restoring ${LIVE_HOOK}..."
|
|
717
|
-
|
|
718
|
-
if [ -n "$PACKAGE_LIVE_HOOK" ] && [ -f "$PACKAGE_LIVE_HOOK" ]; then
|
|
719
|
-
cp "$PACKAGE_LIVE_HOOK" "$LIVE_HOOK"
|
|
720
|
-
echo " ✓ Live data hook restored"
|
|
721
|
-
else
|
|
722
|
-
echo " ⚠ Skipped live data hook (package hook not found)"
|
|
723
|
-
fi
|
|
724
|
-
|
|
725
|
-
# Restore useEvaAgent.ts (Agentforce Agent API hook)
|
|
726
|
-
EVA_HOOK="src/hooks/useEvaAgent.ts"
|
|
727
|
-
echo "→ Restoring ${EVA_HOOK}..."
|
|
728
|
-
|
|
729
|
-
if [ -n "$PACKAGE_EVA_HOOK" ] && [ -f "$PACKAGE_EVA_HOOK" ]; then
|
|
730
|
-
cp "$PACKAGE_EVA_HOOK" "$EVA_HOOK"
|
|
731
|
-
echo " ✓ Eva agent hook restored"
|
|
732
|
-
else
|
|
733
|
-
echo " ⚠ Skipped Eva agent hook (package hook not found)"
|
|
420
|
+
echo " ⚠ Skipped global.css (package CSS not found)"
|
|
734
421
|
fi
|
|
422
|
+
echo ""
|
|
735
423
|
|
|
736
|
-
#
|
|
737
|
-
mkdir -p src/config
|
|
738
|
-
AGENT_CONFIG="src/config/agentApi.ts"
|
|
739
|
-
echo "→ Restoring ${AGENT_CONFIG}..."
|
|
424
|
+
# ── 10. Restore dataStrategy.ts ─────────────────────────────────────────────
|
|
740
425
|
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
426
|
+
PACKAGE_DATA_STRATEGY=""
|
|
427
|
+
if [ -f "node_modules/@schandlergarcia/sf-web-components/src/templates/lib/dataStrategy.ts.template" ]; then
|
|
428
|
+
PACKAGE_DATA_STRATEGY="node_modules/@schandlergarcia/sf-web-components/src/templates/lib/dataStrategy.ts.template"
|
|
429
|
+
elif [ -f "$SCRIPT_DIR/../src/templates/lib/dataStrategy.ts.template" ]; then
|
|
430
|
+
PACKAGE_DATA_STRATEGY="$SCRIPT_DIR/../src/templates/lib/dataStrategy.ts.template"
|
|
746
431
|
fi
|
|
747
432
|
|
|
748
|
-
# Restore dataStrategy.ts (reset ENABLE_SAMPLE_DATA_CACHE back to true)
|
|
749
433
|
DATA_STRATEGY="src/lib/dataStrategy.ts"
|
|
750
434
|
echo "→ Restoring ${DATA_STRATEGY}..."
|
|
751
435
|
|
|
752
436
|
if [ -n "$PACKAGE_DATA_STRATEGY" ] && [ -f "$PACKAGE_DATA_STRATEGY" ]; then
|
|
437
|
+
mkdir -p src/lib
|
|
753
438
|
cp "$PACKAGE_DATA_STRATEGY" "$DATA_STRATEGY"
|
|
754
439
|
echo " ✓ Data strategy restored (ENABLE_SAMPLE_DATA_CACHE = true)"
|
|
755
440
|
else
|
|
756
441
|
echo " ⚠ Skipped data strategy (package template not found)"
|
|
757
442
|
fi
|
|
443
|
+
echo ""
|
|
758
444
|
|
|
759
|
-
# Restore
|
|
760
|
-
PRD_FILE="engine-command-center-prd.md"
|
|
761
|
-
echo "→ Restoring ${PRD_FILE}..."
|
|
445
|
+
# ── 11. Restore .a4drules to project root ────────────────────────────────────
|
|
762
446
|
|
|
763
|
-
|
|
764
|
-
if [ -d "node_modules/@schandlergarcia/sf-web-components/data" ]; then
|
|
765
|
-
PACKAGE_PRD="node_modules/@schandlergarcia/sf-web-components/data/engine-command-center-prd.md"
|
|
766
|
-
elif [ -f "$SCRIPT_DIR/../data/engine-command-center-prd.md" ]; then
|
|
767
|
-
# Running from package source
|
|
768
|
-
PACKAGE_PRD="$SCRIPT_DIR/../data/engine-command-center-prd.md"
|
|
769
|
-
else
|
|
770
|
-
PACKAGE_PRD=""
|
|
771
|
-
fi
|
|
447
|
+
echo "→ Restoring AI assistant rules (.a4drules)..."
|
|
772
448
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
449
|
+
PACKAGE_A4D=""
|
|
450
|
+
if [ -d "node_modules/@schandlergarcia/sf-web-components/.a4drules" ]; then
|
|
451
|
+
PACKAGE_A4D="node_modules/@schandlergarcia/sf-web-components/.a4drules"
|
|
452
|
+
elif [ -d "$SCRIPT_DIR/../.a4drules" ]; then
|
|
453
|
+
PACKAGE_A4D="$SCRIPT_DIR/../.a4drules"
|
|
778
454
|
fi
|
|
779
455
|
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
PACKAGE_LOGO="node_modules/@schandlergarcia/sf-web-components/assets/images/engine_logo.png"
|
|
788
|
-
elif [ -f "$SCRIPT_DIR/../assets/images/engine_logo.png" ]; then
|
|
789
|
-
# Running from package source
|
|
790
|
-
PACKAGE_LOGO="$SCRIPT_DIR/../assets/images/engine_logo.png"
|
|
791
|
-
else
|
|
792
|
-
PACKAGE_LOGO=""
|
|
793
|
-
fi
|
|
456
|
+
if [ -n "$PACKAGE_A4D" ]; then
|
|
457
|
+
PROJECT_ROOT=""
|
|
458
|
+
if [[ "$ROOT_ABS" == */force-app/main/default/* ]]; then
|
|
459
|
+
PROJECT_ROOT="${ROOT_ABS%%/force-app/main/default/*}"
|
|
460
|
+
else
|
|
461
|
+
PROJECT_ROOT="$ROOT/.."
|
|
462
|
+
fi
|
|
794
463
|
|
|
795
|
-
if [ -n "$
|
|
796
|
-
|
|
797
|
-
|
|
464
|
+
if [ -n "$PROJECT_ROOT" ] && [ -d "$PROJECT_ROOT" ]; then
|
|
465
|
+
TARGET_A4D="$PROJECT_ROOT/.a4drules"
|
|
466
|
+
a4d_copied=0
|
|
467
|
+
|
|
468
|
+
while IFS= read -r src_file; do
|
|
469
|
+
rel="${src_file#$PACKAGE_A4D/}"
|
|
470
|
+
dst="$TARGET_A4D/$rel"
|
|
471
|
+
mkdir -p "$(dirname "$dst")"
|
|
472
|
+
cp -f "$src_file" "$dst"
|
|
473
|
+
a4d_copied=$((a4d_copied + 1))
|
|
474
|
+
done < <(find "$PACKAGE_A4D" -name "*.md" -type f)
|
|
475
|
+
|
|
476
|
+
echo " ✓ Restored $a4d_copied rule files to $TARGET_A4D"
|
|
477
|
+
fi
|
|
798
478
|
else
|
|
799
|
-
echo " ⚠ Skipped
|
|
479
|
+
echo " ⚠ Skipped .a4drules (package rules not found)"
|
|
800
480
|
fi
|
|
481
|
+
echo ""
|
|
801
482
|
|
|
802
|
-
# ── Clean Salesforce metadata created during the
|
|
483
|
+
# ── 12. Clean Salesforce metadata created during the build ───────────────────
|
|
803
484
|
|
|
804
485
|
SFDX_DEFAULT=""
|
|
805
486
|
|
|
806
|
-
# The webapp lives inside force-app/main/default/uiBundles/..., so extract
|
|
807
|
-
# the SFDX default directory from our own path first. Only fall back to
|
|
808
|
-
# searching child directories if the pattern doesn't match (standalone app).
|
|
809
|
-
ROOT_ABS="$(cd "$ROOT" && pwd)"
|
|
810
|
-
|
|
811
487
|
if [[ "$ROOT_ABS" == */force-app/main/default/* ]]; then
|
|
812
488
|
SFDX_DEFAULT="${ROOT_ABS%%/force-app/main/default/*}/force-app/main/default"
|
|
813
489
|
fi
|
|
@@ -815,34 +491,23 @@ fi
|
|
|
815
491
|
if [ -n "$SFDX_DEFAULT" ]; then
|
|
816
492
|
metadata_cleaned=0
|
|
817
493
|
|
|
818
|
-
# Remove Apex classes (.cls and .cls-meta.xml)
|
|
819
|
-
KEEP_CLASSES=("TCC_TravelMetricsController")
|
|
494
|
+
# Remove Apex classes (.cls and .cls-meta.xml)
|
|
820
495
|
CLASSES_DIR="$SFDX_DEFAULT/classes"
|
|
821
496
|
if [ -d "$CLASSES_DIR" ]; then
|
|
822
497
|
cls_removed=0
|
|
823
498
|
for f in "$CLASSES_DIR"/*.cls "$CLASSES_DIR"/*.cls-meta.xml; do
|
|
824
499
|
[ -f "$f" ] || continue
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
for keep in "${KEEP_CLASSES[@]}"; do
|
|
828
|
-
if [[ "$base" == "$keep".cls || "$base" == "$keep".cls-meta.xml ]]; then
|
|
829
|
-
skip=true
|
|
830
|
-
break
|
|
831
|
-
fi
|
|
832
|
-
done
|
|
833
|
-
if [ "$skip" = false ]; then
|
|
834
|
-
[ "$metadata_cleaned" -eq 0 ] && [ "$cls_removed" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
835
|
-
rm "$f"
|
|
836
|
-
cls_removed=$((cls_removed + 1))
|
|
837
|
-
fi
|
|
500
|
+
rm "$f"
|
|
501
|
+
cls_removed=$((cls_removed + 1))
|
|
838
502
|
done
|
|
839
503
|
if [ "$cls_removed" -gt 0 ]; then
|
|
840
|
-
|
|
504
|
+
[ "$metadata_cleaned" -eq 0 ] && echo "→ Cleaning Salesforce metadata…"
|
|
505
|
+
echo " ✓ Removed $cls_removed Apex class files"
|
|
841
506
|
metadata_cleaned=1
|
|
842
507
|
fi
|
|
843
508
|
fi
|
|
844
509
|
|
|
845
|
-
# Remove platform event directories
|
|
510
|
+
# Remove platform event directories
|
|
846
511
|
OBJECTS_DIR="$SFDX_DEFAULT/objects"
|
|
847
512
|
if [ -d "$OBJECTS_DIR" ]; then
|
|
848
513
|
for evt_dir in "$OBJECTS_DIR"/*__e; do
|
|
@@ -864,23 +529,19 @@ echo "╔═══════════════════════
|
|
|
864
529
|
echo "║ ✓ Reset complete! ║"
|
|
865
530
|
echo "║ ║"
|
|
866
531
|
echo "║ Restored: ║"
|
|
867
|
-
echo "║ •
|
|
868
|
-
echo "║ •
|
|
869
|
-
echo "║ • Live data hook (useEngineLiveData.ts) ║"
|
|
870
|
-
echo "║ • Eva agent hook (useEvaAgent.ts) ║"
|
|
871
|
-
echo "║ • Agent API config (src/config/agentApi.ts)║"
|
|
872
|
-
echo "║ • Data strategy (ENABLE_SAMPLE_DATA_CACHE) ║"
|
|
873
|
-
echo "║ • GraphQL schema + PRD + logo ║"
|
|
532
|
+
echo "║ • Theme (global.css) ║"
|
|
533
|
+
echo "║ • Data strategy (sample data cache) ║"
|
|
874
534
|
echo "║ • Component library + theme providers ║"
|
|
535
|
+
echo "║ • AI assistant rules (.a4drules) ║"
|
|
875
536
|
echo "║ ║"
|
|
876
537
|
echo "║ Cleaned: ║"
|
|
877
|
-
echo "║ •
|
|
878
|
-
echo "║ •
|
|
538
|
+
echo "║ • Custom dashboard pages ║"
|
|
539
|
+
echo "║ • Apex classes (if SFDX project) ║"
|
|
540
|
+
echo "║ • Platform events (if SFDX project) ║"
|
|
879
541
|
echo "║ ║"
|
|
880
542
|
echo "║ Layout: ║"
|
|
881
543
|
echo "║ / → Home (search page) ║"
|
|
882
|
-
echo "║ /
|
|
883
|
-
echo "║ Nav bar on Home + Search pages only ║"
|
|
544
|
+
echo "║ /accounts → Account search ║"
|
|
884
545
|
echo "║ ║"
|
|
885
546
|
echo "║ Start building: ║"
|
|
886
547
|
echo "║ npm run dev ║"
|
|
@@ -14,7 +14,7 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
14
14
|
cd "$ROOT"
|
|
15
15
|
|
|
16
16
|
PAGES_DIR="src/components/pages"
|
|
17
|
-
|
|
17
|
+
CUSTOM_DIR="src/components/custom"
|
|
18
18
|
ERRORS=0
|
|
19
19
|
WARNINGS=0
|
|
20
20
|
|
|
@@ -43,9 +43,9 @@ echo ""
|
|
|
43
43
|
|
|
44
44
|
# ── 2. Find all dashboard files to scan ──────────────────────────────────────
|
|
45
45
|
|
|
46
|
-
# Collect all .jsx/.tsx in pages/ and
|
|
46
|
+
# Collect all .jsx/.tsx in pages/ and custom/ dirs (excluding BlankDashboard, HelloWorld, CommandCenter)
|
|
47
47
|
SCAN_FILES=()
|
|
48
|
-
for dir in "$PAGES_DIR" "$
|
|
48
|
+
for dir in "$PAGES_DIR" "$CUSTOM_DIR" "src/pages"; do
|
|
49
49
|
if [ -d "$dir" ]; then
|
|
50
50
|
while IFS= read -r f; do
|
|
51
51
|
base=$(basename "$f")
|
|
@@ -231,7 +231,7 @@ echo "── File extensions (dashboard pages should be .jsx) ──"
|
|
|
231
231
|
for f in "${SCAN_FILES[@]}"; do
|
|
232
232
|
base=$(basename "$f")
|
|
233
233
|
|
|
234
|
-
if [[ "$f" == *.tsx ]] && [[ "$f" == *components/pages* || "$f" == *components/
|
|
234
|
+
if [[ "$f" == *.tsx ]] && [[ "$f" == *components/pages* || "$f" == *components/custom* ]]; then
|
|
235
235
|
yellow "$base: dashboard component uses .tsx — convention is .jsx"
|
|
236
236
|
WARNINGS=$((WARNINGS + 1))
|
|
237
237
|
fi
|
|
@@ -23,9 +23,9 @@ function ActionItem({ action }) {
|
|
|
23
23
|
<s.Icon className={`mt-0.5 h-4 w-4 shrink-0 ${s.color} ${s.spin ? "animate-spin" : ""}`} />
|
|
24
24
|
<div className="min-w-0">
|
|
25
25
|
<div className="text-xs font-medium text-slate-700 dark:text-slate-200">{action.title ?? action.action}</div>
|
|
26
|
-
{(action.subtitle ?? action.
|
|
26
|
+
{(action.subtitle ?? action.description ?? action.timestamp ?? action.startedAt) && (
|
|
27
27
|
<div className="mt-0.5 text-[10px] text-slate-400">
|
|
28
|
-
{[action.subtitle, action.
|
|
28
|
+
{[action.subtitle, action.description, action.timestamp ?? action.startedAt].filter(Boolean).join(" · ")}
|
|
29
29
|
</div>
|
|
30
30
|
)}
|
|
31
31
|
</div>
|