@schandlergarcia/sf-web-components 1.9.66 → 1.9.67
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/skills/command-center-builder/SKILL.md +19 -19
- package/.a4drules/skills/command-center-guide/SKILL.md +33 -23
- package/.a4drules/skills/command-center-project/SKILL.md +5 -3
- package/.a4drules/skills/component-library/SKILL.md +6 -3
- package/CHANGELOG.md +12 -5
- package/data/engine-command-center-prd.md +5 -15
- package/package.json +1 -1
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: command-center-builder
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Conventions and patterns for building the Engine Travel Command Center
|
|
5
|
+
dashboard and other command center pages. Covers layout patterns
|
|
6
|
+
(visualization-hero, grid), component selection (MetricCard, ChartCard,
|
|
7
|
+
GeoMap, ListCard, ActivityCard), dark mode, brand colors, styling, and
|
|
8
|
+
wiring dashboards into the app. Use when scaffolding, building, or editing
|
|
9
|
+
any dashboard page in this project.
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
# Command Center Builder Rules
|
|
11
13
|
|
|
12
14
|
These rules apply when building dashboards rendered by `CommandCenter.tsx`. For full component API details, read the **component-library** skill.
|
|
13
15
|
|
|
14
|
-
##
|
|
16
|
+
## Core Conventions
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
The following conventions apply to all dashboard development in this project.
|
|
17
19
|
|
|
18
20
|
Before writing any code, read `.a4drules/features/pre-code-checklist.md` and verify all requirements. The most common mistakes are:
|
|
19
21
|
- Creating `.jsx` instead of `.tsx` files
|
|
@@ -21,7 +23,7 @@ Before writing any code, read `.a4drules/features/pre-code-checklist.md` and ver
|
|
|
21
23
|
- Using forbidden colors (`text-white`, `bg-black`)
|
|
22
24
|
- Hand-rolling HTML cards instead of using library components
|
|
23
25
|
|
|
24
|
-
1. **
|
|
26
|
+
1. **Write `.tsx` files** in `src/pages/` and update `CommandCenter.tsx` to import the dashboard. This is a TypeScript project — all React components use `.tsx` extension.
|
|
25
27
|
|
|
26
28
|
2. **Use ONLY library components** from `@/components/library` for all cards, charts, tables, lists, and feeds. The library has 30+ components — there is no reason to hand-roll HTML. See the component table below.
|
|
27
29
|
|
|
@@ -33,11 +35,9 @@ Before writing any code, read `.a4drules/features/pre-code-checklist.md` and ver
|
|
|
33
35
|
|
|
34
36
|
6. **Never `npm install` Salesforce packages.** The `@salesforce/*` packages are platform-provided via broken symlinks. They are stubbed in `src/stubs/` and aliased in `vite.config.ts`. Do not try to install them — they don't exist on npm. If you see a TypeScript error about `@salesforce/vite-plugin-webapp-experimental`, ignore it — the build still succeeds via `vite build` (the `tsc` error is in `vite.config.ts` which is handled separately by `tsconfig.node.json`).
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
## Use Library Components — Not Hand-Rolled HTML Cards
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
**This is the #1 mistake.** The component library (`@/components/library`) provides pre-built, themed, dark-mode-ready cards for every common dashboard need. You MUST use them instead of writing raw `<div>` cards with custom classes.
|
|
40
|
+
The component library (`@/components/library`) provides pre-built, themed, dark-mode-ready cards for every common dashboard need. Use them instead of writing raw `<div>` cards with custom classes.
|
|
41
41
|
|
|
42
42
|
### Before writing ANY card-like UI, check this table:
|
|
43
43
|
|
|
@@ -53,7 +53,7 @@ If your output violates any of these 6 rules, it will be rejected and you will n
|
|
|
53
53
|
| Text summary | `NarrativeSummary` / `SectionCard` | `<div>` with headings and paragraphs |
|
|
54
54
|
| Alert / callout | `CalloutCard` | Custom banner div |
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
Every visible section of a dashboard should be a library component. If you're writing `<div className="bg-white border rounded-[10px] shadow-sm p-6">` with content inside, that's a hand-rolled card — use a library component instead.
|
|
57
57
|
|
|
58
58
|
### Correct example:
|
|
59
59
|
|
|
@@ -99,9 +99,9 @@ import { MetricCard, ListCard, ActivityCard, WidgetCard } from "@/components/lib
|
|
|
99
99
|
</div>
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
## Images
|
|
102
|
+
## Images
|
|
103
103
|
|
|
104
|
-
The
|
|
104
|
+
The company logo is at `src/assets/images/engine_logo.png`. Import it as a module and use it where a logo is needed (nav header, branding, etc.).
|
|
105
105
|
|
|
106
106
|
```jsx
|
|
107
107
|
import engineLogo from "@/assets/images/engine_logo.png";
|
|
@@ -123,7 +123,7 @@ import engineLogo from "@/assets/images/engine_logo.png";
|
|
|
123
123
|
<div className="w-8 h-8 bg-black rounded" /> // placeholder box instead of logo
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
## No Dashboard-Level Navigation
|
|
126
|
+
## No Dashboard-Level Navigation
|
|
127
127
|
|
|
128
128
|
Dashboard pages must NOT include their own `<nav>`, header bar, or top navigation of any kind. Navigation is handled by `appLayout.tsx`. The dashboard renders inside the app shell — adding a nav inside the dashboard creates a duplicate header, which is the most visually obvious mistake.
|
|
129
129
|
|
|
@@ -152,7 +152,7 @@ Splitting a dashboard into 5 tab "pages" (Overview, Travelers, Spend, Policy, Ev
|
|
|
152
152
|
|
|
153
153
|
### Wiring a new dashboard (REQUIRED STEPS)
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
All three steps are required for the dashboard to render:
|
|
156
156
|
|
|
157
157
|
**Step 1:** Create the dashboard file in `src/pages/` (NOT `src/components/pages/`):
|
|
158
158
|
```tsx
|
|
@@ -346,7 +346,7 @@ Defined in `global.css` (`--color-brand-*` and `--color-engine-*`), available as
|
|
|
346
346
|
|
|
347
347
|
Canonical: `"operational"`, `"degraded"`, `"outage"`, `"maintenance"`. Always show color + text label.
|
|
348
348
|
|
|
349
|
-
## Dark Mode
|
|
349
|
+
## Dark Mode
|
|
350
350
|
|
|
351
351
|
Every visible element needs both light and dark styles. Library components handle this automatically — which is another reason to use them.
|
|
352
352
|
|
|
@@ -429,9 +429,9 @@ Use `ChatBar` (command palette, ⌘K) for dashboards. `ChatPanel` for full-page
|
|
|
429
429
|
|
|
430
430
|
`searchable` when 10+ rows (unless `FilterBar` handles search). `sortable` on comparable columns. `paginated` when 10+ rows. Use built-in column `type` before custom `render`.
|
|
431
431
|
|
|
432
|
-
## Charts & Visualizations
|
|
432
|
+
## Charts & Visualizations
|
|
433
433
|
|
|
434
|
-
|
|
434
|
+
All charts, graphs, maps, and visualizations use the library's charting components. Never use Recharts, Chart.js, Nivo, or any third-party charting library. Never hand-roll SVG, canvas, or custom chart markup. The ONLY charting tools allowed are `D3Chart` (via `D3ChartTemplates` or a custom `renderChart` function) and `GeoMap`.
|
|
435
435
|
|
|
436
436
|
| Visualization | MUST use | NEVER do |
|
|
437
437
|
|--------------|----------|----------|
|
|
@@ -1,36 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: command-center-guide
|
|
3
|
-
description:
|
|
3
|
+
description: >-
|
|
4
|
+
Overview of the development workflow for the Engine Travel Command Center
|
|
5
|
+
and other command center dashboards. Maps tasks to the right skills:
|
|
6
|
+
component-library for API reference, command-center-builder for layout
|
|
7
|
+
and conventions, command-center-project for file structure and routing.
|
|
8
|
+
Also covers Salesforce GraphQL data integration and Agentforce agent setup.
|
|
4
9
|
---
|
|
5
10
|
|
|
6
11
|
# Command Center Development Guide
|
|
7
12
|
|
|
8
|
-
##
|
|
13
|
+
## Engine Travel Command Center
|
|
9
14
|
|
|
10
|
-
|
|
15
|
+
The product spec is in `engine-command-center-prd.md` at the React app root (`force-app/main/default/uiBundles/reactcursor1/`). It defines the layout, components, data model, and brand tokens for the dashboard.
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|-------|------|---------------|
|
|
14
|
-
| 1 | `phase-1-layout.md` | Header, hero map, glass overlays, placeholder panels |
|
|
15
|
-
| 2 | `phase-2-components.md` | Library components + sample data |
|
|
16
|
-
| 3 | `phase-3-live-data.md` | GraphQL hooks + live Salesforce data |
|
|
17
|
-
| 4 | `phase-4-agent.md` | Eva ChatBar + Salesforce signals |
|
|
17
|
+
Sample data is pre-built in `src/data/engine-sample-data.js` with dashboard-ready exports.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## Skills
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
| Skill | What it covers |
|
|
22
|
+
|-------|---------------|
|
|
23
|
+
| **component-library** | Component API reference — props, data shapes, import patterns |
|
|
24
|
+
| **command-center-builder** | Dashboard conventions — layout, styling, component selection, dark mode |
|
|
25
|
+
| **command-center-project** | Project structure — routing, file locations, tech stack, wiring |
|
|
26
|
+
| **outer-app** | Outer app — navigation, shadcn/ui, non-dashboard pages |
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|-------|-------------|
|
|
25
|
-
| `component-library/SKILL.md` | Looking up component props or choosing which component to use |
|
|
26
|
-
| `command-center-project/SKILL.md` | Understanding project structure, routing, tech stack |
|
|
27
|
-
| `outer-app/SKILL.md` | Working on the app shell, navigation, or non-dashboard pages |
|
|
28
|
+
## Workflow
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
1. Read the PRD (`engine-command-center-prd.md`) for what to build
|
|
31
|
+
2. Reference **component-library** for component APIs
|
|
32
|
+
3. Follow **command-center-builder** conventions for layout and styling
|
|
33
|
+
4. Reference **command-center-project** for file locations and wiring
|
|
30
34
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
## Salesforce Data Integration
|
|
36
|
+
|
|
37
|
+
For live data, use these global skills:
|
|
38
|
+
- **exploring-webapp-graphql-schema** — Look up objects and fields in `schema.graphql`
|
|
39
|
+
- **generating-webapp-graphql-read-query** — Generate typed GraphQL queries
|
|
40
|
+
- **using-webapp-graphql** — Create data hooks with `{ data, loading, error }`
|
|
41
|
+
|
|
42
|
+
## Agentforce Integration
|
|
43
|
+
|
|
44
|
+
For AI agent features, use:
|
|
45
|
+
- **managing-webapp-agentforce-conversation-client** — Full Agentforce setup
|
|
46
|
+
- **component-library** (`chat-data.md`) — ChatBar component API
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: command-center-project
|
|
3
3
|
description: >-
|
|
4
|
-
Project architecture, tech stack, and conventions for the
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Project architecture, tech stack, and file conventions for the Engine Travel
|
|
5
|
+
Command Center app. Vite + React 19 + TypeScript + Tailwind CSS 4. Covers
|
|
6
|
+
project structure, route architecture, path aliases, two UI systems
|
|
7
|
+
(shadcn for outer app, component library for command center), and how
|
|
8
|
+
dashboards wire into CommandCenter.tsx and the route tree.
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# Enginebespokeapp — Project Context
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: component-library
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
API reference for the command center component library at
|
|
5
|
+
@/components/library. Documents every component (MetricCard, ChartCard,
|
|
6
|
+
D3Chart, D3ChartTemplates, GeoMap, ListCard, ActivityCard, TableCard,
|
|
7
|
+
StatusCard, WidgetCard, BaseCard, ChatBar, Avatar, UIChip, FilterBar),
|
|
8
|
+
their props, data shapes, and import patterns. Use when looking up how
|
|
9
|
+
to use a specific component or choosing which component fits a need.
|
|
7
10
|
---
|
|
8
11
|
|
|
9
12
|
# Component Library
|
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [1.9.
|
|
8
|
+
## [1.9.67] - 2026-04-01
|
|
9
9
|
|
|
10
10
|
### Fixed
|
|
11
11
|
- **6 data bugs in engine-sample-data.js**:
|
|
@@ -20,22 +20,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
20
20
|
- **PRD (engine-command-center-prd.md)**:
|
|
21
21
|
- Fixed "Sarah Chen" → "Priya Patel" in section 8c escalation example
|
|
22
22
|
- Rewrote section 13 build prompts to sound natural (removed AI coaching language)
|
|
23
|
+
- Removed "Required skills:" line from header
|
|
23
24
|
- **Simplified .a4drules documentation** - Removed redundancy, contradictions, and AI coaching language:
|
|
24
25
|
- `features/engine-dashboard-rule.md` - Rewritten as "Project Conventions" (reduced from 310 to ~65 lines)
|
|
25
26
|
- `features/command-center-dashboard-rule.md` - Rewritten as slim conventions (~30 lines)
|
|
26
27
|
- `features/pre-code-checklist.md` - Rewritten as "Quick Reference" (~25 lines, removed auto-load)
|
|
27
28
|
- `features/phase2-data-pattern.md` - Rewritten as "Sample Data" documentation (~20 lines)
|
|
28
|
-
- `skills/command-center-builder/SKILL.md` - Fixed map contradiction, removed validator contradiction, removed AI coaching language
|
|
29
|
+
- `skills/command-center-builder/SKILL.md` - Fixed map contradiction, removed validator contradiction, removed AI coaching language. Description now includes "Engine Travel Command Center", "scaffold", component names for better matching
|
|
29
30
|
- `skills/command-center-builder/page-layout.md` - Fixed map contradiction, softened wiring language
|
|
30
31
|
- `skills/command-center-builder/completion-checklist.md` - Removed validator contradiction
|
|
31
32
|
- `skills/command-center-builder/improved-build-process.md` - Rewritten as methodology description (~30 lines)
|
|
32
33
|
- `skills/command-center-builder/getting-started.md` - Removed AI coaching language
|
|
33
34
|
- `skills/command-center-builder/components-styling.md` - Removed (MANDATORY) header
|
|
34
35
|
- `skills/command-center-builder/charts-visualization.md` - Removed (MANDATORY) header
|
|
35
|
-
- `skills/command-center-project/SKILL.md` - Fixed file path contradiction (src/components/pages/ → src/pages/)
|
|
36
|
-
- `skills/command-center-guide/SKILL.md` - Reduced from 270 to ~45 lines (simplified routing guide)
|
|
36
|
+
- `skills/command-center-project/SKILL.md` - Fixed file path contradiction (src/components/pages/ → src/pages/). Description now includes "Engine Travel Command Center", tech stack keywords
|
|
37
|
+
- `skills/command-center-guide/SKILL.md` - Reduced from 270 to ~45 lines (simplified routing guide). Description improved for better matching
|
|
38
|
+
- `skills/component-library/SKILL.md` - Description now lists all key component names (MetricCard, ChartCard, GeoMap, etc.) for better matching
|
|
39
|
+
|
|
40
|
+
**Context:** Complete documentation overhaul to eliminate confusion from scattered, contradictory guidance. Removed prescriptive AI coaching language in favor of clear technical conventions. Improved skill descriptions for better discoverability.
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
## [1.9.66] - 2026-04-01
|
|
43
|
+
|
|
44
|
+
### Updated
|
|
45
|
+
- **Documentation improvements** - Initial complete sync from react-cursor-1
|
|
39
46
|
|
|
40
47
|
## [1.9.65] - 2026-04-01
|
|
41
48
|
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Product Requirements Document · TDX26 Demo Build
|
|
4
4
|
|
|
5
|
-
**Required skills:** `command-center-builder`, `command-center-project`, `component-library`, `outer-app`
|
|
6
|
-
|
|
7
5
|
---
|
|
8
6
|
|
|
9
7
|
## 1. Product Overview
|
|
@@ -431,39 +429,31 @@ Mandatory on every element. The dashboard must work in both light and dark mode
|
|
|
431
429
|
|
|
432
430
|
## 13. Build Prompts
|
|
433
431
|
|
|
434
|
-
|
|
432
|
+
Build in 4 incremental phases. Each prompt maps to one beat of the demo arc.
|
|
435
433
|
|
|
436
434
|
---
|
|
437
435
|
|
|
438
436
|
### Phase 1: Layout & Structure
|
|
439
437
|
|
|
440
|
-
>
|
|
441
|
-
>
|
|
442
|
-
> Scaffold the Engine Travel Command Center skeleton with header, hero map, glass KPI overlays, flight status strip, and 4 placeholder data panels.
|
|
438
|
+
> Scaffold the Engine Travel Command Center skeleton. Build the visualization-hero layout from section 5 with the header, hero map, glass KPI overlays, flight status strip, and placeholder cards for the data panels.
|
|
443
439
|
|
|
444
440
|
---
|
|
445
441
|
|
|
446
442
|
### Phase 2: Components & Sample Data
|
|
447
443
|
|
|
448
|
-
>
|
|
449
|
-
>
|
|
450
|
-
> Replace placeholders with library components. Import data from `src/data/engine-sample-data.js`. Add map data (markers, arcs, overlays). Build the 4 data panels: Disruptions, Active Travelers, Escalations, Monthly Spend Trend.
|
|
444
|
+
> Replace the placeholders with real components and wire up the sample data. Build the 4 data panels from section 8 — Disruptions, Active Travelers, Escalations, and Monthly Spend Trend. Add map markers, arcs, and overlays from the sample data so we can see where travelers are.
|
|
451
445
|
|
|
452
446
|
---
|
|
453
447
|
|
|
454
448
|
### Phase 3: Real Data Integration
|
|
455
449
|
|
|
456
|
-
>
|
|
457
|
-
>
|
|
458
|
-
> Connect to live Salesforce data via GraphQL. UI stays identical to Phase 2.
|
|
450
|
+
> Connect the dashboard to live Salesforce data using GraphQL. Read the sample data file to see which fields are needed, then build queries and hooks for each object. The UI should stay identical — just swap the data source.
|
|
459
451
|
|
|
460
452
|
---
|
|
461
453
|
|
|
462
454
|
### Phase 4: Agentforce Integration
|
|
463
455
|
|
|
464
|
-
>
|
|
465
|
-
>
|
|
466
|
-
> Add Eva ChatBar to header. Add Salesforce signals throughout.
|
|
456
|
+
> Add Eva to the header as a ChatBar. Add subtle Salesforce signals throughout — "View in Salesforce" links, success toasts, "Powered by Agentforce" badge.
|
|
467
457
|
|
|
468
458
|
---
|
|
469
459
|
|
package/package.json
CHANGED