@schandlergarcia/sf-web-components 1.9.60 → 1.9.61
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.
|
@@ -17,14 +17,16 @@ These rules apply ONLY when building the Engine Travel Command Center dashboard
|
|
|
17
17
|
The Engine dashboard uses a **strict 4-phase build process.** You MUST complete each phase fully before starting the next:
|
|
18
18
|
|
|
19
19
|
1. **Phase 1: Layout** — Complete layout structure (header, map, glass KPI overlays, flight strip) + data panel placeholders ONLY
|
|
20
|
-
2. **Phase 2: Components + Sample Data** — Replace data panel placeholders with real library components + sample data
|
|
20
|
+
2. **Phase 2: Components + Sample Data** — Replace data panel placeholders with real library components + sample data AND add map data
|
|
21
21
|
- **CRITICAL:** Sample data file already exists at `src/data/engine-sample-data.js`
|
|
22
22
|
- **DO NOT create a new data file** — just import from the existing one
|
|
23
|
-
- Import dashboard-ready derivatives (MAP_MARKERS, TRAVELER_CARDS, ESCALATION_CARDS,
|
|
23
|
+
- Import dashboard-ready derivatives (MAP_MARKERS, MAP_ARCS, MAP_OVERLAYS, TRAVELER_CARDS, ESCALATION_CARDS, MONTHLY_SPEND)
|
|
24
24
|
- DO NOT define sample data inline in the dashboard — causes file truncation
|
|
25
|
-
- **FOLLOW THE EXACT CODE EXAMPLES in PRD Section
|
|
26
|
-
-
|
|
27
|
-
-
|
|
25
|
+
- **FOLLOW THE EXACT CODE EXAMPLES in PRD Section 7 (map) and Section 8c/8d (panels)** - copy the code blocks as shown
|
|
26
|
+
- **Map data:** Add markers, arcs, overlays to GeoMap to show where travelers are (see PRD Section 7)
|
|
27
|
+
- **Panel titles:** "Disruptions", "Active Travelers", "Escalations", "Travel Spend"
|
|
28
|
+
- **Escalations panel:** ActivityCard must be wrapped in BaseCard for visible card styling
|
|
29
|
+
- **Chart:** Line chart showing monthly spend trend (see PRD Section 8d code block for exact options)
|
|
28
30
|
- **DO NOT run validation or dev server** — phase is complete after wiring files
|
|
29
31
|
3. **Phase 3: Real Data** — Connect to Salesforce, keep UI identical to Phase 2
|
|
30
32
|
4. **Phase 4: Agent** — Add Eva ChatBar integration
|
|
@@ -85,7 +85,7 @@ export default function EngineDashboard() {
|
|
|
85
85
|
</div>
|
|
86
86
|
</div>
|
|
87
87
|
|
|
88
|
-
{/* Row 2: Escalations (1/2) +
|
|
88
|
+
{/* Row 2: Escalations (1/2) + Monthly Spend Chart (1/2) */}
|
|
89
89
|
<div className="grid grid-cols-1 items-start gap-4 lg:grid-cols-2">
|
|
90
90
|
<BaseCard>
|
|
91
91
|
<div className="flex h-48 items-center justify-center text-slate-400">
|
|
@@ -94,7 +94,7 @@ export default function EngineDashboard() {
|
|
|
94
94
|
</BaseCard>
|
|
95
95
|
<BaseCard>
|
|
96
96
|
<div className="flex h-48 items-center justify-center text-slate-400">
|
|
97
|
-
|
|
97
|
+
Travel Spend Panel
|
|
98
98
|
</div>
|
|
99
99
|
</BaseCard>
|
|
100
100
|
</div>
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ 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.61] - 2026-04-01
|
|
9
|
+
|
|
10
|
+
### Updated
|
|
11
|
+
- **Synced latest .a4drules and PRD from reactapp4** - Pulled latest documentation updates
|
|
12
|
+
- All `.a4drules/features/` files updated
|
|
13
|
+
- All `.a4drules/skills/` files updated
|
|
14
|
+
- All `.a4drules/troubleshooting/` files updated
|
|
15
|
+
- Root `.a4drules/*.md` files updated
|
|
16
|
+
- `data/engine-command-center-prd.md` updated to latest version
|
|
17
|
+
|
|
8
18
|
## [1.9.60] - 2026-04-01
|
|
9
19
|
|
|
10
20
|
### Updated
|
|
@@ -99,8 +99,8 @@ This dashboard uses the **visualization-hero** layout. The live flight map is th
|
|
|
99
99
|
│ └────────────────┘ └────────────────────────────┘ │ ↕
|
|
100
100
|
│ │ ↕
|
|
101
101
|
│ ┌─── 1/2 ───────┐ ┌─── 1/2 ────────────────────┐ │ ↕
|
|
102
|
-
│ │ Escalations │ │
|
|
103
|
-
│ │ (ActivityCard) │ │ (ChartCard + D3Chart)
|
|
102
|
+
│ │ Escalations │ │ Travel Spend (Monthly) │ │ ↕
|
|
103
|
+
│ │ (ActivityCard) │ │ (ChartCard + D3Chart line) │ │ ↕
|
|
104
104
|
│ └────────────────┘ └────────────────────────────┘ │ ↕
|
|
105
105
|
└─────────────────────────────────────────────────────────────┘
|
|
106
106
|
```
|
|
@@ -215,20 +215,26 @@ The `ChatBar` replaces any FAB or sliding panel. It opens inline as a command pa
|
|
|
215
215
|
|
|
216
216
|
**Component:** `GeoMap` (from `@/components/library`)
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
**Phase 1:** Render GeoMap with NO data props (no markers/arcs/overlays)
|
|
219
|
+
**Phase 2:** Add markers, arcs, and overlays from sample data to show where travelers are
|
|
220
|
+
|
|
221
|
+
```tsx
|
|
222
|
+
import { MAP_MARKERS, MAP_ARCS, MAP_OVERLAYS } from "@/data/engine-sample-data";
|
|
223
|
+
|
|
224
|
+
// Phase 2 - with map data
|
|
219
225
|
<GeoMap
|
|
220
226
|
width={960}
|
|
221
227
|
height={520}
|
|
222
228
|
theme={mode === "dark" ? "dark" : "light"}
|
|
223
|
-
markers={
|
|
224
|
-
arcs={
|
|
225
|
-
overlays={
|
|
229
|
+
markers={useDataSource({ sample: MAP_MARKERS, live: [] })}
|
|
230
|
+
arcs={useDataSource({ sample: MAP_ARCS, live: [] })}
|
|
231
|
+
overlays={useDataSource({ sample: MAP_OVERLAYS, live: [] })}
|
|
226
232
|
zoomable
|
|
227
233
|
className="h-full w-full"
|
|
228
234
|
/>
|
|
229
235
|
```
|
|
230
236
|
|
|
231
|
-
**Markers:** One per city (origin and destination). Each marker: `{ id, lon, lat, label, active: true }`.
|
|
237
|
+
**Markers:** One per city (origin and destination). Each marker: `{ id, lon, lat, label, active: true }`. Shows where travelers are located.
|
|
232
238
|
|
|
233
239
|
**Arcs:** One per active flight route. Each arc: `{ id, from: [lon, lat], to: [lon, lat], progress: 0–1 }`. Set `danger: true` on disrupted routes (delayed 60+ min or grounded). The `progress` value places an animated pulsing dot showing the flight's current position along the great circle arc.
|
|
234
240
|
|
|
@@ -273,17 +279,19 @@ Each traveler row:
|
|
|
273
279
|
|
|
274
280
|
### 8c. Escalations (1/2 width)
|
|
275
281
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
**Data source:** Import `ESCALATION_CARDS` from sample data (alias of `EVA_ACTIONS`)
|
|
282
|
+
**CRITICAL: ActivityCard has no card styling by default. Must wrap in BaseCard for visible card background.**
|
|
279
283
|
|
|
280
284
|
```tsx
|
|
281
|
-
<
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
+
<BaseCard>
|
|
286
|
+
<ActivityCard
|
|
287
|
+
title="Escalations"
|
|
288
|
+
actions={useDataSource({ sample: ESCALATION_CARDS, live: [] })}
|
|
289
|
+
/>
|
|
290
|
+
</BaseCard>
|
|
285
291
|
```
|
|
286
292
|
|
|
293
|
+
**Data source:** Import `ESCALATION_CARDS` from sample data (alias of `EVA_ACTIONS`)
|
|
294
|
+
|
|
287
295
|
Each escalation has:
|
|
288
296
|
- Title (issue description)
|
|
289
297
|
- Subtitle (details + context)
|
|
@@ -295,28 +303,32 @@ Examples from sample data:
|
|
|
295
303
|
- "Monitoring weather delay for Elena Rodriguez" - subtitle: "AF 99 · CDG arrival delayed 45 min · No action yet" (status: working)
|
|
296
304
|
- "Rebooked cancelled flight for Sarah Chen" - subtitle: "LH 431 → LH 433 · Same fare class" (status: complete)
|
|
297
305
|
|
|
298
|
-
### 8d.
|
|
306
|
+
### 8d. Monthly Spend Trend (1/2 width)
|
|
299
307
|
|
|
300
|
-
`ChartCard` wrapping a `D3Chart` with `D3ChartTemplates.
|
|
308
|
+
`ChartCard` wrapping a `D3Chart` with `D3ChartTemplates.lineChart`.
|
|
301
309
|
|
|
302
310
|
**CRITICAL: Use this exact code structure:**
|
|
303
311
|
|
|
304
312
|
```tsx
|
|
305
313
|
<ChartCard
|
|
306
|
-
title="
|
|
307
|
-
subtitle="
|
|
314
|
+
title="Travel Spend"
|
|
315
|
+
subtitle="Monthly trend (6 months)"
|
|
308
316
|
chart={
|
|
309
317
|
<D3Chart
|
|
310
|
-
data={
|
|
311
|
-
renderChart={D3ChartTemplates.
|
|
318
|
+
data={useDataSource({ sample: MONTHLY_SPEND, live: [] })}
|
|
319
|
+
renderChart={D3ChartTemplates.lineChart}
|
|
312
320
|
options={{
|
|
313
|
-
xKey: "
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
321
|
+
xKey: "month",
|
|
322
|
+
yKey: "amount",
|
|
323
|
+
color: "#5BC8C8",
|
|
324
|
+
lineWidth: 3,
|
|
325
|
+
showDots: true,
|
|
326
|
+
dotRadius: 4,
|
|
327
|
+
showArea: true,
|
|
328
|
+
areaOpacity: 0.1,
|
|
329
|
+
margin: { top: 20, right: 20, bottom: 40, left: 60 },
|
|
319
330
|
showGrid: true,
|
|
331
|
+
formatY: (d) => `$${(d / 1000).toFixed(0)}K`,
|
|
320
332
|
}}
|
|
321
333
|
responsive
|
|
322
334
|
height={320}
|
|
@@ -325,16 +337,21 @@ Examples from sample data:
|
|
|
325
337
|
/>
|
|
326
338
|
```
|
|
327
339
|
|
|
340
|
+
**Data source:** Import `MONTHLY_SPEND` from sample data
|
|
341
|
+
|
|
328
342
|
**Requirements:**
|
|
329
|
-
- X-axis:
|
|
330
|
-
- Y-axis:
|
|
331
|
-
- Height: 320px
|
|
332
|
-
-
|
|
333
|
-
-
|
|
334
|
-
-
|
|
343
|
+
- X-axis: month names (Oct through Mar)
|
|
344
|
+
- Y-axis: spend amount formatted as $XXK
|
|
345
|
+
- Height: 320px
|
|
346
|
+
- Line color: Engine teal (#5BC8C8)
|
|
347
|
+
- Line width: 3px
|
|
348
|
+
- Show dots at data points (radius: 4)
|
|
349
|
+
- Show filled area under line (opacity: 0.1)
|
|
335
350
|
- responsive={true}
|
|
336
351
|
|
|
337
|
-
**
|
|
352
|
+
**Why this chart:** Shows spend trends over time so travel managers can spot anomalies, budget overruns, or seasonal patterns. Actionable data for financial planning.
|
|
353
|
+
|
|
354
|
+
**That's it!** Only 4 panels total: Disruptions, Active Travelers, Escalations, and Monthly Spend Trend.
|
|
338
355
|
|
|
339
356
|
---
|
|
340
357
|
|
|
@@ -406,9 +423,7 @@ Mandatory on every element. The dashboard must work in both light and dark mode
|
|
|
406
423
|
|
|
407
424
|
**Escalation** — `id`, `title`, `subtitle`, `status` (complete | working | pending), `timestamp`
|
|
408
425
|
|
|
409
|
-
**Monthly Spend** — `{
|
|
410
|
-
|
|
411
|
-
**Destination Chart** — `{ x: city, travelers: count }` array
|
|
426
|
+
**Monthly Spend** — `{ month: string, amount: number }` array. Six months of travel spend data (Oct through Mar). Amounts in dollars, typically $98K-$156K range.
|
|
412
427
|
|
|
413
428
|
**Sample data:** 8–10 travelers, 8 flights, 4 disruptions, 8 bookings, 5 policy items, 8 escalations, 6 months of spend. All deterministic (no `Math.random()`). Include realistic names, routes, dollar amounts, and a mix of all status types.
|
|
414
429
|
|
|
@@ -432,7 +447,9 @@ Mandatory on every element. The dashboard must work in both light and dark mode
|
|
|
432
447
|
|
|
433
448
|
> **Skills:** command-center-builder, command-center-project, component-library
|
|
434
449
|
>
|
|
435
|
-
> Replace placeholders with library components. Import data from the pre-existing `src/data/engine-sample-data.js` file. Build the 4 data panels from section 8: Disruptions, Active Travelers, Escalations, and
|
|
450
|
+
> Replace placeholders with library components. Import data from the pre-existing `src/data/engine-sample-data.js` file. Build the 4 data panels from section 8: Disruptions, Active Travelers, Escalations, and Monthly Spend Trend chart. Follow the EXACT code examples in section 8 - copy the code blocks exactly as shown.
|
|
451
|
+
>
|
|
452
|
+
> **Add map data:** Import MAP_MARKERS, MAP_ARCS, MAP_OVERLAYS from sample data and pass to GeoMap component (see Section 7). The map should show where travelers are with markers for cities, arcs for flight routes, and overlays for disruptions.
|
|
436
453
|
|
|
437
454
|
---
|
|
438
455
|
|
package/package.json
CHANGED