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