@schandlergarcia/sf-web-components 1.9.63 → 1.9.64
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 +20 -46
- package/.a4drules/features/engine-dashboard-rule.md +36 -288
- package/.a4drules/features/phase2-data-pattern.md +8 -159
- package/.a4drules/features/pre-code-checklist.md +16 -205
- package/.a4drules/phases/phase-1-layout.md +187 -0
- package/.a4drules/phases/phase-2-components.md +176 -0
- package/.a4drules/phases/phase-3-live-data.md +85 -0
- package/.a4drules/phases/phase-4-agent.md +73 -0
- package/.a4drules/skills/command-center-builder/SKILL.md +6 -30
- package/.a4drules/skills/command-center-builder/completion-checklist.md +3 -29
- package/.a4drules/skills/command-center-builder/improved-build-process.md +20 -331
- package/.a4drules/skills/command-center-builder/page-layout.md +4 -2
- package/.a4drules/skills/command-center-guide/SKILL.md +23 -257
- package/.a4drules/skills/command-center-project/SKILL.md +1 -1
- package/CHANGELOG.md +37 -0
- package/data/engine-command-center-prd.md +11 -13
- package/data/engine-sample-data.js +20 -8
- package/package.json +1 -1
|
@@ -1,270 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: command-center-guide
|
|
3
|
-
description: Master guide for building command center dashboards. Routes to the appropriate
|
|
3
|
+
description: Master guide for building command center dashboards. Routes to the appropriate phase file or reference skill.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Command Center Development Guide
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Quick Start
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
For the Engine Travel Command Center, use the phase files in `.a4drules/phases/`:
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
| Phase | File | What to build |
|
|
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 |
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
Each file is self-contained with a code template and exact imports. Complete phases in order.
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|------------|---------|------------|-------------|
|
|
18
|
-
| **[component-library](#component-library)** | Complete component API reference | 55 + 8 sub-files | Looking up component props, data shapes, or choosing which component to use |
|
|
19
|
-
| **[command-center-builder](#command-center-builder)** | Dashboard build rules and workflows | 46 + 6 sub-files | Building/editing dashboards, layouts, styling, validation |
|
|
20
|
-
| **[command-center-project](#command-center-project)** | Project structure and routing | 100 lines | Understanding project organization, adding new pages to routes |
|
|
21
|
-
| **[outer-app](#outer-app)** | App shell and global navigation | 61 lines | Modifying header, sidebar, global nav, or app wrapper |
|
|
21
|
+
## Reference Skills (read on demand)
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
| Skill | When to use |
|
|
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 |
|
|
25
28
|
|
|
26
|
-
|
|
29
|
+
## Decision Tree
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
| **exploring-webapp-graphql-schema** | Schema exploration, field lookup | Finding available fields on objects |
|
|
35
|
-
| **generating-webapp-graphql-read-query** | Query generation | Creating read queries |
|
|
36
|
-
| **generating-webapp-graphql-mutation-query** | Mutation generation | Creating/updating records |
|
|
37
|
-
| **managing-webapp-agentforce-conversation-client** | Agentforce chat integration | Adding Agentforce agent/chatbot |
|
|
38
|
-
| **building-webapp-react-components** | React patterns, hooks | Building custom React components |
|
|
39
|
-
| **building-webapp-data-visualization** | Charts, graphs, visualizations | Creating data visualizations |
|
|
40
|
-
|
|
41
|
-
## Decision Tree: Which Skill to Use?
|
|
42
|
-
|
|
43
|
-
Follow this decision tree to find the right skill:
|
|
44
|
-
|
|
45
|
-
### 1. Are you building or editing a dashboard page?
|
|
46
|
-
|
|
47
|
-
**YES** → Use **[command-center-builder](#command-center-builder)**
|
|
48
|
-
|
|
49
|
-
Start with [getting-started.md](../command-center-builder/getting-started.md) to understand critical requirements, then follow the workflow:
|
|
50
|
-
- Page structure & layout → [page-layout.md](../command-center-builder/page-layout.md)
|
|
51
|
-
- Choosing components → [components-styling.md](../command-center-builder/components-styling.md)
|
|
52
|
-
- Building charts → [charts-visualization.md](../command-center-builder/charts-visualization.md)
|
|
53
|
-
- Validation → [completion-checklist.md](../command-center-builder/completion-checklist.md)
|
|
54
|
-
|
|
55
|
-
**NO** → Continue to question 2
|
|
56
|
-
|
|
57
|
-
### 2. Do you need to look up a component's props or data shape?
|
|
58
|
-
|
|
59
|
-
**YES** → Use **[component-library](#component-library)**
|
|
60
|
-
|
|
61
|
-
Start with [when-to-use.md](../component-library/when-to-use.md) decision matrix, then go to the relevant detail file:
|
|
62
|
-
- Cards (MetricCard, ChartCard, TableCard, etc.) → [card-components.md](../component-library/card-components.md)
|
|
63
|
-
- Charts & visualizations → [charts.md](../component-library/charts.md)
|
|
64
|
-
- Forms & filters → [forms-filters.md](../component-library/forms-filters.md)
|
|
65
|
-
- Chat & data → [chat-data.md](../component-library/chat-data.md)
|
|
66
|
-
- Advanced components → [hero-ui.md](../component-library/hero-ui.md)
|
|
67
|
-
- Troubleshooting props → [common-mistakes.md](../component-library/common-mistakes.md)
|
|
68
|
-
|
|
69
|
-
**NO** → Continue to question 3
|
|
70
|
-
|
|
71
|
-
### 3. Are you adding a new page or modifying routes?
|
|
72
|
-
|
|
73
|
-
**YES** → Use **[command-center-project](#command-center-project)**
|
|
74
|
-
|
|
75
|
-
This skill explains:
|
|
76
|
-
- Project structure (`src/pages/`, `src/dashboards/`, etc.)
|
|
77
|
-
- How to register new pages in the router
|
|
78
|
-
- Route configuration
|
|
79
|
-
- Where different file types live
|
|
80
|
-
|
|
81
|
-
**NO** → Continue to question 4
|
|
82
|
-
|
|
83
|
-
### 4. Are you connecting to live Salesforce data?
|
|
84
|
-
|
|
85
|
-
**YES** → Use global skills: **accessing-webapp-data**, **exploring-webapp-graphql-schema**, **using-webapp-graphql**
|
|
86
|
-
|
|
87
|
-
Workflow:
|
|
88
|
-
1. Explore schema for custom objects
|
|
89
|
-
2. Write GraphQL queries with actual field names
|
|
90
|
-
3. Run codegen for TypeScript types
|
|
91
|
-
4. Create hook with useDataSource for sample/live mode switching
|
|
92
|
-
|
|
93
|
-
**NO** → Continue to question 5
|
|
94
|
-
|
|
95
|
-
### 5. Are you adding an Agentforce agent or chatbot?
|
|
96
|
-
|
|
97
|
-
**YES** → Use global skill: **managing-webapp-agentforce-conversation-client**
|
|
98
|
-
|
|
99
|
-
Or for simpler chat UI: Use **[component-library](../component-library/chat-data.md)** (ChatBar component)
|
|
100
|
-
|
|
101
|
-
**NO** → Continue to question 6
|
|
102
|
-
|
|
103
|
-
### 6. Are you modifying the app shell (header, sidebar, global nav)?
|
|
104
|
-
|
|
105
|
-
**YES** → Use **[outer-app](#outer-app)**
|
|
106
|
-
|
|
107
|
-
This skill covers:
|
|
108
|
-
- App wrapper layout
|
|
109
|
-
- Global header component
|
|
110
|
-
- Sidebar navigation
|
|
111
|
-
- Theme/dark mode toggle
|
|
112
|
-
- App-level configuration
|
|
113
|
-
|
|
114
|
-
**NO** → If none of the above, ask for clarification or check **command-center-builder** as the default.
|
|
115
|
-
|
|
116
|
-
## Common Workflows
|
|
117
|
-
|
|
118
|
-
### Workflow 1: Build a New Dashboard from Scratch
|
|
119
|
-
|
|
120
|
-
1. **[command-center-builder](../command-center-builder/getting-started.md)** — Read STOP and CRITICAL rules first
|
|
121
|
-
2. **[command-center-project](../command-center-project/SKILL.md)** — Understand where to create the page file
|
|
122
|
-
3. **[command-center-builder/page-layout.md](../command-center-builder/page-layout.md)** — Wire up the page and choose layout
|
|
123
|
-
4. **[component-library/when-to-use.md](../component-library/when-to-use.md)** — Choose components from decision matrix
|
|
124
|
-
5. **[component-library](../component-library/SKILL.md)** — Look up exact props for each component
|
|
125
|
-
6. **[command-center-builder/charts-visualization.md](../command-center-builder/charts-visualization.md)** — If using charts, follow MANDATORY rules
|
|
126
|
-
7. **[command-center-builder/completion-checklist.md](../command-center-builder/completion-checklist.md)** — Validate before reporting done
|
|
127
|
-
|
|
128
|
-
### Workflow 1b: Connect Dashboard to Live Salesforce Data
|
|
129
|
-
|
|
130
|
-
1. **accessing-webapp-data** (global) — Understand Data SDK requirements
|
|
131
|
-
2. **exploring-webapp-graphql-schema** (global) — Explore schema for custom objects (Trip__c, Flight__c, etc.)
|
|
132
|
-
3. **using-webapp-graphql** (global) — Write GraphQL queries, run codegen for types
|
|
133
|
-
4. **[component-library/chat-data.md](../component-library/chat-data.md)** — Use DataModeProvider and useDataSource hook
|
|
134
|
-
5. Create custom hook that transforms live data to match sample data shape
|
|
135
|
-
6. Add DataModeToggle to switch between sample/live modes
|
|
136
|
-
|
|
137
|
-
### Workflow 2: Add a Chart to an Existing Dashboard
|
|
138
|
-
|
|
139
|
-
1. **[command-center-builder/charts-visualization.md](../command-center-builder/charts-visualization.md)** — Read chart requirements
|
|
140
|
-
2. **[component-library/charts.md](../component-library/charts.md)** — Look up D3Chart props and templates
|
|
141
|
-
3. **[component-library/card-components.md](../component-library/card-components.md)** — Look up ChartCard wrapper props
|
|
142
|
-
4. **[command-center-builder/completion-checklist.md](../command-center-builder/completion-checklist.md)** — Validate chart implementation
|
|
143
|
-
|
|
144
|
-
### Workflow 3: Troubleshoot a Component Error
|
|
145
|
-
|
|
146
|
-
1. **[component-library/common-mistakes.md](../component-library/common-mistakes.md)** — Check "Do Not" list for common errors
|
|
147
|
-
2. **[component-library](../component-library/SKILL.md)** — Look up the component in the relevant detail file
|
|
148
|
-
3. Verify you're using exact prop names (not guessing)
|
|
149
|
-
4. Check that you imported from `@/components/library` correctly
|
|
150
|
-
|
|
151
|
-
### Workflow 4: Style or Theme a Dashboard
|
|
152
|
-
|
|
153
|
-
1. **[command-center-builder/components-styling.md](../command-center-builder/components-styling.md)** — Brand colors, semantic colors, dark mode
|
|
154
|
-
2. **[component-library/ui-primitives.md](../component-library/ui-primitives.md)** — UI primitives for styling consistency
|
|
155
|
-
3. **[command-center-builder/getting-started.md](../command-center-builder/getting-started.md)** — Image requirements
|
|
156
|
-
|
|
157
|
-
### Workflow 5: Add Global Navigation or Modify App Shell
|
|
158
|
-
|
|
159
|
-
1. **[outer-app](../outer-app/SKILL.md)** — App shell structure and header/sidebar
|
|
160
|
-
2. **[command-center-project](../command-center-project/SKILL.md)** — Router configuration if adding nav links
|
|
161
|
-
|
|
162
|
-
### Workflow 6: Add Agentforce Agent/Chatbot
|
|
163
|
-
|
|
164
|
-
1. **managing-webapp-agentforce-conversation-client** (global) — Complete integration guide
|
|
165
|
-
2. **[component-library/chat-data.md](../component-library/chat-data.md)** — For ChatBar component (simpler alternative)
|
|
166
|
-
3. Ask user for agent ID if not already configured
|
|
167
|
-
4. Configure inline vs floating mode, styling, dimensions
|
|
168
|
-
|
|
169
|
-
## Skill Interaction Rules
|
|
170
|
-
|
|
171
|
-
### component-library vs command-center-builder
|
|
172
|
-
|
|
173
|
-
- **component-library** = WHAT (exact props, data shapes, API reference)
|
|
174
|
-
- **command-center-builder** = WHEN & HOW (which component to use, layout patterns, validation rules)
|
|
175
|
-
|
|
176
|
-
**Use both together:** command-center-builder tells you which component to use, component-library tells you how to use it.
|
|
177
|
-
|
|
178
|
-
### command-center-project vs outer-app
|
|
179
|
-
|
|
180
|
-
- **command-center-project** = Dashboard pages and routing
|
|
181
|
-
- **outer-app** = App wrapper and global navigation
|
|
182
|
-
|
|
183
|
-
**Boundary:** If it's inside `src/dashboards/` → command-center-project. If it's in `App.tsx` or global layout → outer-app.
|
|
184
|
-
|
|
185
|
-
### When to Read Multiple Skills
|
|
186
|
-
|
|
187
|
-
Some tasks require multiple skills in sequence:
|
|
188
|
-
|
|
189
|
-
- **Building a new dashboard** → command-center-builder + component-library + command-center-project
|
|
190
|
-
- **Adding a chart** → command-center-builder + component-library
|
|
191
|
-
- **Modifying navigation** → outer-app + command-center-project
|
|
192
|
-
- **Troubleshooting** → component-library (common-mistakes) first, then command-center-builder
|
|
193
|
-
|
|
194
|
-
## Critical Reminders
|
|
195
|
-
|
|
196
|
-
1. **ALWAYS start with command-center-builder/getting-started.md** before building any dashboard
|
|
197
|
-
2. **NEVER guess component prop names** — look them up in component-library
|
|
198
|
-
3. **NEVER hand-roll HTML cards** — use library components only
|
|
199
|
-
4. **ALWAYS run the completion checklist** before reporting done
|
|
200
|
-
5. **Dark mode is MANDATORY** — check all color choices support it
|
|
201
|
-
6. **Images are MANDATORY** — every dashboard needs visuals
|
|
202
|
-
|
|
203
|
-
## Feature Rule
|
|
204
|
-
|
|
205
|
-
The **command-center-dashboard-rule.md** feature provides automated validation. It checks:
|
|
206
|
-
- Component usage (library components vs hand-rolled HTML)
|
|
207
|
-
- Dark mode compliance
|
|
208
|
-
- Image presence
|
|
209
|
-
- Chart implementation
|
|
210
|
-
- Navigation structure
|
|
211
|
-
|
|
212
|
-
This rule runs automatically during validation. See [completion-checklist.md](../command-center-builder/completion-checklist.md) for details.
|
|
213
|
-
|
|
214
|
-
## File Organization Summary
|
|
215
|
-
|
|
216
|
-
All skills are split into sub-files (<300 lines each) for easier navigation:
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
.a4drules/
|
|
220
|
-
├── features/
|
|
221
|
-
│ └── command-center-dashboard-rule.md (50 lines)
|
|
222
|
-
└── skills/
|
|
223
|
-
├── command-center-guide/ ← YOU ARE HERE
|
|
224
|
-
│ └── SKILL.md (this file)
|
|
225
|
-
├── component-library/
|
|
226
|
-
│ ├── SKILL.md (55 lines - routing file)
|
|
227
|
-
│ ├── when-to-use.md (39 lines)
|
|
228
|
-
│ ├── card-components.md (253 lines)
|
|
229
|
-
│ ├── charts.md (64 lines)
|
|
230
|
-
│ ├── ui-primitives.md (92 lines)
|
|
231
|
-
│ ├── forms-filters.md (130 lines)
|
|
232
|
-
│ ├── chat-data.md (184 lines)
|
|
233
|
-
│ ├── hero-ui.md (211 lines)
|
|
234
|
-
│ └── common-mistakes.md (25 lines)
|
|
235
|
-
├── command-center-builder/
|
|
236
|
-
│ ├── SKILL.md (46 lines - routing file)
|
|
237
|
-
│ ├── getting-started.md (127 lines)
|
|
238
|
-
│ ├── page-layout.md (143 lines)
|
|
239
|
-
│ ├── components-styling.md (97 lines)
|
|
240
|
-
│ ├── data-forms-ai.md (43 lines)
|
|
241
|
-
│ ├── charts-visualization.md (136 lines)
|
|
242
|
-
│ └── completion-checklist.md (87 lines)
|
|
243
|
-
├── command-center-project/
|
|
244
|
-
│ └── SKILL.md (100 lines)
|
|
245
|
-
└── outer-app/
|
|
246
|
-
└── SKILL.md (61 lines)
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
## Quick Reference Card
|
|
250
|
-
|
|
251
|
-
| I need to... | Start here |
|
|
252
|
-
|-------------|------------|
|
|
253
|
-
| Build a new dashboard | [command-center-builder/getting-started.md](../command-center-builder/getting-started.md) |
|
|
254
|
-
| Look up a component's props | [component-library/when-to-use.md](../component-library/when-to-use.md) → relevant detail file |
|
|
255
|
-
| Add a new page to routes | [command-center-project](../command-center-project/SKILL.md) |
|
|
256
|
-
| Modify header or sidebar | [outer-app](../outer-app/SKILL.md) |
|
|
257
|
-
| Build a chart | [command-center-builder/charts-visualization.md](../command-center-builder/charts-visualization.md) |
|
|
258
|
-
| Fix a component error | [component-library/common-mistakes.md](../component-library/common-mistakes.md) |
|
|
259
|
-
| Validate before reporting done | [command-center-builder/completion-checklist.md](../command-center-builder/completion-checklist.md) |
|
|
260
|
-
| Understand project structure | [command-center-project](../command-center-project/SKILL.md) |
|
|
261
|
-
|
|
262
|
-
## Getting Help
|
|
263
|
-
|
|
264
|
-
If you're unsure which skill to use:
|
|
265
|
-
1. Start with this guide's decision tree
|
|
266
|
-
2. Check the Quick Reference Card above
|
|
267
|
-
3. When in doubt, start with **command-center-builder** for dashboard work
|
|
268
|
-
4. Use **component-library** for any component prop lookups
|
|
269
|
-
|
|
270
|
-
Remember: **Skills are split for easier navigation, not sequential reading.** Use the decision tree to jump directly to what you need.
|
|
31
|
+
1. **Building the Engine dashboard?** → Read the phase file for your current phase
|
|
32
|
+
2. **Need component API details?** → Read `component-library/SKILL.md` → relevant sub-file
|
|
33
|
+
3. **Adding routes or pages?** → Read `command-center-project/SKILL.md`
|
|
34
|
+
4. **Working on app shell/nav?** → Read `outer-app/SKILL.md`
|
|
35
|
+
5. **Connecting to live data?** → Phase 3 file + global skills: `exploring-webapp-graphql-schema`, `using-webapp-graphql`
|
|
36
|
+
6. **Adding Agentforce agent?** → Phase 4 file + global skill: `managing-webapp-agentforce-conversation-client`
|
|
@@ -79,7 +79,7 @@ Configured in both `vite.config.ts` and `tsconfig.json`:
|
|
|
79
79
|
|
|
80
80
|
## Key Conventions
|
|
81
81
|
|
|
82
|
-
- **Dashboard pages** go in `src/components/pages
|
|
82
|
+
- **Dashboard pages** go in `src/pages/` (NOT `src/components/pages/`). Wire into `CommandCenter.tsx` by importing and rendering.
|
|
83
83
|
- **Outer app pages** go in `src/pages/` or `src/features/*/pages/`. Wire into `src/routes.tsx`.
|
|
84
84
|
- **TypeScript** preferred for all code (`.tsx`/`.ts`). Core UI components converted to TypeScript. Legacy `.jsx` files being migrated.
|
|
85
85
|
- **Component library** is a vendored copy from command-center-starter — not an npm package. Changes sync manually.
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,43 @@ 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.64] - 2026-04-01
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **New phase-based build system** - Self-contained step-by-step build instructions
|
|
12
|
+
- `.a4drules/phases/phase-1-layout.md` - Layout setup with code template
|
|
13
|
+
- `.a4drules/phases/phase-2-components.md` - Component implementation with exact imports
|
|
14
|
+
- `.a4drules/phases/phase-3-live-data.md` - GraphQL integration
|
|
15
|
+
- `.a4drules/phases/phase-4-agent.md` - Eva ChatBar implementation
|
|
16
|
+
- These phase files replace the scattered instructions in multiple skill/feature files
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **6 data bugs in engine-sample-data.js**:
|
|
20
|
+
1. Added ESCALATION_CARDS alias export (was missing)
|
|
21
|
+
2. Fixed MAP_OVERLAYS city→IATA lookup (was failing silently)
|
|
22
|
+
3. Changed 2 bookings to "Pending approval" status (were showing as confirmed)
|
|
23
|
+
4. Fixed EVA_ACTIONS to produce "pending" status correctly
|
|
24
|
+
5. Fixed rebooking a05R1 contact mismatch (Sarah Chen → Priya Patel)
|
|
25
|
+
6. Updated TXL → BER throughout (Berlin airport code change)
|
|
26
|
+
|
|
27
|
+
### Updated
|
|
28
|
+
- **PRD (engine-command-center-prd.md)**:
|
|
29
|
+
- Fixed "Sarah Chen" → "Priya Patel" in section 8c escalation example
|
|
30
|
+
- Rewrote section 13 build prompts to reference new phase files
|
|
31
|
+
- **Simplified .a4drules documentation** - Removed redundancy and contradictions:
|
|
32
|
+
- `features/engine-dashboard-rule.md` - Reduced from 310 to ~65 lines (non-negotiable constraints + phase routing)
|
|
33
|
+
- `features/command-center-dashboard-rule.md` - Reduced from ~100 to ~30 lines (10 core constraints)
|
|
34
|
+
- `features/pre-code-checklist.md` - Reduced from 216 to ~25 lines (removed auto-load)
|
|
35
|
+
- `features/phase2-data-pattern.md` - Reduced from 167 to ~20 lines (redirects to phase file)
|
|
36
|
+
- `skills/command-center-builder/SKILL.md` - Fixed map layout contradiction, removed validator
|
|
37
|
+
- `skills/command-center-builder/page-layout.md` - Fixed map layout contradiction
|
|
38
|
+
- `skills/command-center-builder/completion-checklist.md` - Replaced validator "MUST run" with "DO NOT run"
|
|
39
|
+
- `skills/command-center-builder/improved-build-process.md` - Reduced from 341 to ~30 lines (redirects to phases)
|
|
40
|
+
- `skills/command-center-project/SKILL.md` - Fixed file path contradiction (src/components/pages/ → src/pages/)
|
|
41
|
+
- `skills/command-center-guide/SKILL.md` - Reduced from 270 to ~45 lines (simplified routing guide)
|
|
42
|
+
|
|
43
|
+
**Context:** The phase-based system provides self-contained, copy-paste ready build instructions that eliminate the confusion caused by scattered, contradictory guidance across multiple files. All documentation now points to the phase files as the source of truth.
|
|
44
|
+
|
|
8
45
|
## [1.9.63] - 2026-04-01
|
|
9
46
|
|
|
10
47
|
### Updated
|
|
@@ -301,7 +301,7 @@ Each escalation has:
|
|
|
301
301
|
Examples from sample data:
|
|
302
302
|
- "Processing approval for Omar Hassan" - subtitle: "Paris trip over budget · escalated to manager" (status: pending)
|
|
303
303
|
- "Monitoring weather delay for Elena Rodriguez" - subtitle: "AF 99 · CDG arrival delayed 45 min · No action yet" (status: working)
|
|
304
|
-
- "Rebooked cancelled flight for
|
|
304
|
+
- "Rebooked cancelled flight for Priya Patel" - subtitle: "LH 431 → LH 433 · Same fare class" (status: complete)
|
|
305
305
|
|
|
306
306
|
### 8d. Monthly Spend Trend (1/2 width)
|
|
307
307
|
|
|
@@ -431,41 +431,39 @@ Mandatory on every element. The dashboard must work in both light and dark mode
|
|
|
431
431
|
|
|
432
432
|
## 13. Build Prompts
|
|
433
433
|
|
|
434
|
-
**Build Methodology:** 4-phase incremental process (Layout → Components → Data → Agent).
|
|
434
|
+
**Build Methodology:** 4-phase incremental process (Layout → Components → Data → Agent). Each phase has a self-contained instruction file in `.a4drules/phases/` with code templates and exact imports.
|
|
435
435
|
|
|
436
436
|
---
|
|
437
437
|
|
|
438
438
|
### Phase 1: Layout & Structure
|
|
439
439
|
|
|
440
|
-
>
|
|
440
|
+
> Read `.a4drules/phases/phase-1-layout.md` and follow the code template.
|
|
441
441
|
>
|
|
442
|
-
> Scaffold the Engine Travel Command Center skeleton
|
|
442
|
+
> Scaffold the Engine Travel Command Center skeleton with header, hero map, glass KPI overlays, flight status strip, and 4 placeholder data panels.
|
|
443
443
|
|
|
444
444
|
---
|
|
445
445
|
|
|
446
446
|
### Phase 2: Components & Sample Data
|
|
447
447
|
|
|
448
|
-
>
|
|
448
|
+
> Read `.a4drules/phases/phase-2-components.md` and follow the instructions.
|
|
449
449
|
>
|
|
450
|
-
> Replace placeholders with library components. Import data from
|
|
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.
|
|
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.
|
|
453
451
|
|
|
454
452
|
---
|
|
455
453
|
|
|
456
454
|
### Phase 3: Real Data Integration
|
|
457
455
|
|
|
458
|
-
>
|
|
459
|
-
|
|
460
|
-
|
|
456
|
+
> Read `.a4drules/phases/phase-3-live-data.md` and follow the instructions.
|
|
457
|
+
>
|
|
458
|
+
> Connect to live Salesforce data via GraphQL. UI stays identical to Phase 2.
|
|
461
459
|
|
|
462
460
|
---
|
|
463
461
|
|
|
464
462
|
### Phase 4: Agentforce Integration
|
|
465
463
|
|
|
466
|
-
>
|
|
464
|
+
> Read `.a4drules/phases/phase-4-agent.md` and follow the instructions.
|
|
467
465
|
>
|
|
468
|
-
> Add Eva ChatBar to header. Add Salesforce signals throughout.
|
|
466
|
+
> Add Eva ChatBar to header. Add Salesforce signals throughout.
|
|
469
467
|
|
|
470
468
|
---
|
|
471
469
|
|
|
@@ -24,7 +24,7 @@ export const AIRPORTS = [
|
|
|
24
24
|
{ IATA_Code__c: "ATL", City__c: "Atlanta", Latitude__c: 33.7490, Longitude__c: -84.3880 },
|
|
25
25
|
{ IATA_Code__c: "LHR", City__c: "London", Latitude__c: 51.5074, Longitude__c: -0.1278 },
|
|
26
26
|
{ IATA_Code__c: "NRT", City__c: "Tokyo", Latitude__c: 35.6895, Longitude__c: 139.6917 },
|
|
27
|
-
{ IATA_Code__c: "
|
|
27
|
+
{ IATA_Code__c: "BER", City__c: "Berlin", Latitude__c: 52.5200, Longitude__c: 13.4050 },
|
|
28
28
|
{ IATA_Code__c: "SIN", City__c: "Singapore", Latitude__c: 1.3521, Longitude__c: 103.8198 },
|
|
29
29
|
{ IATA_Code__c: "CDG", City__c: "Paris", Latitude__c: 48.8566, Longitude__c: 2.3522 },
|
|
30
30
|
{ IATA_Code__c: "DXB", City__c: "Dubai", Latitude__c: 25.2048, Longitude__c: 55.2708 },
|
|
@@ -51,7 +51,7 @@ export const TRAVELERS = [
|
|
|
51
51
|
export const TRIPS = [
|
|
52
52
|
{ Id: "a00T1", Trip_Name__c: "Chen – London", Contact__c: "003T1", Origin_City__c: "San Francisco", Origin_Airport__c: "SFO", Destination_City__c: "London", Destination_Airport__c: "LHR", Start_Date__c: "2026-03-24", End_Date__c: "2026-03-28", Status__c: "In Progress", Total_Cost__c: 4200, In_Policy__c: true, Has_Disruption__c: false },
|
|
53
53
|
{ Id: "a00T2", Trip_Name__c: "Johnson – Tokyo", Contact__c: "003T2", Origin_City__c: "New York", Origin_Airport__c: "JFK", Destination_City__c: "Tokyo", Destination_Airport__c: "NRT", Start_Date__c: "2026-03-24", End_Date__c: "2026-03-30", Status__c: "In Progress", Total_Cost__c: 5800, In_Policy__c: true, Has_Disruption__c: false },
|
|
54
|
-
{ Id: "a00T3", Trip_Name__c: "Patel – Berlin", Contact__c: "003T3", Origin_City__c: "Chicago", Origin_Airport__c: "ORD", Destination_City__c: "Berlin", Destination_Airport__c: "
|
|
54
|
+
{ Id: "a00T3", Trip_Name__c: "Patel – Berlin", Contact__c: "003T3", Origin_City__c: "Chicago", Origin_Airport__c: "ORD", Destination_City__c: "Berlin", Destination_Airport__c: "BER", Start_Date__c: "2026-03-24", End_Date__c: "2026-03-27", Status__c: "In Progress", Total_Cost__c: 3400, In_Policy__c: false, Has_Disruption__c: true },
|
|
55
55
|
{ Id: "a00T4", Trip_Name__c: "Kim – Singapore", Contact__c: "003T4", Origin_City__c: "Los Angeles", Origin_Airport__c: "LAX", Destination_City__c: "Singapore", Destination_Airport__c: "SIN", Start_Date__c: "2026-03-25", End_Date__c: "2026-04-01", Status__c: "In Progress", Total_Cost__c: 6100, In_Policy__c: true, Has_Disruption__c: false },
|
|
56
56
|
{ Id: "a00T5", Trip_Name__c: "Rodriguez – Paris", Contact__c: "003T5", Origin_City__c: "Miami", Origin_Airport__c: "MIA", Destination_City__c: "Paris", Destination_Airport__c: "CDG", Start_Date__c: "2026-03-24", End_Date__c: "2026-03-26", Status__c: "In Progress", Total_Cost__c: 2900, In_Policy__c: true, Has_Disruption__c: true },
|
|
57
57
|
{ Id: "a00T6", Trip_Name__c: "Wright – Austin", Contact__c: "003T6", Origin_City__c: "Seattle", Origin_Airport__c: "SEA", Destination_City__c: "Austin", Destination_Airport__c: "AUS", Start_Date__c: "2026-03-24", End_Date__c: "2026-03-25", Status__c: "In Progress", Total_Cost__c: 820, In_Policy__c: true, Has_Disruption__c: false },
|
|
@@ -63,7 +63,7 @@ export const TRIPS = [
|
|
|
63
63
|
export const FLIGHTS = [
|
|
64
64
|
{ Id: "a01F1", Flight_Number__c: "BA 286", Airline__c: "British Airways", Departure_Airport__c: "SFO", Departure_City__c: "San Francisco", Departure_Longitude__c: -122.4194, Departure_Latitude__c: 37.7749, Arrival_Airport__c: "LHR", Arrival_City__c: "London", Arrival_Longitude__c: -0.1278, Arrival_Latitude__c: 51.5074, Departure_DateTime__c: "2026-03-25T22:45:00Z", Flight_Status__c: "In Air", Delay_Minutes__c: 0, Cabin_Class__c: "Business", Contact__c: "003T1" },
|
|
65
65
|
{ Id: "a01F2", Flight_Number__c: "NH 109", Airline__c: "All Nippon Airways", Departure_Airport__c: "JFK", Departure_City__c: "New York", Departure_Longitude__c: -74.0060, Departure_Latitude__c: 40.7128, Arrival_Airport__c: "NRT", Arrival_City__c: "Tokyo", Arrival_Longitude__c: 139.6917, Arrival_Latitude__c: 35.6895, Departure_DateTime__c: "2026-03-25T11:30:00Z", Flight_Status__c: "In Air", Delay_Minutes__c: 0, Cabin_Class__c: "Economy", Contact__c: "003T2" },
|
|
66
|
-
{ Id: "a01F3", Flight_Number__c: "LH 431", Airline__c: "Lufthansa", Departure_Airport__c: "ORD", Departure_City__c: "Chicago", Departure_Longitude__c: -87.6298, Departure_Latitude__c: 41.8781, Arrival_Airport__c: "
|
|
66
|
+
{ Id: "a01F3", Flight_Number__c: "LH 431", Airline__c: "Lufthansa", Departure_Airport__c: "ORD", Departure_City__c: "Chicago", Departure_Longitude__c: -87.6298, Departure_Latitude__c: 41.8781, Arrival_Airport__c: "BER", Arrival_City__c: "Berlin", Arrival_Longitude__c: 13.4050, Arrival_Latitude__c: 52.5200, Departure_DateTime__c: "2026-03-25T17:15:00Z", Flight_Status__c: "Delayed", Delay_Minutes__c: 95, Cabin_Class__c: "Economy", Contact__c: "003T3" },
|
|
67
67
|
{ Id: "a01F4", Flight_Number__c: "SQ 37", Airline__c: "Singapore Airlines", Departure_Airport__c: "LAX", Departure_City__c: "Los Angeles", Departure_Longitude__c: -118.2437, Departure_Latitude__c: 34.0522, Arrival_Airport__c: "SIN", Arrival_City__c: "Singapore", Arrival_Longitude__c: 103.8198, Arrival_Latitude__c: 1.3521, Departure_DateTime__c: "2026-03-25T23:00:00Z", Flight_Status__c: "Boarding", Delay_Minutes__c: 0, Cabin_Class__c: "Business", Contact__c: "003T4" },
|
|
68
68
|
{ Id: "a01F5", Flight_Number__c: "AF 99", Airline__c: "Air France", Departure_Airport__c: "MIA", Departure_City__c: "Miami", Departure_Longitude__c: -80.1918, Departure_Latitude__c: 25.7617, Arrival_Airport__c: "CDG", Arrival_City__c: "Paris", Arrival_Longitude__c: 2.3522, Arrival_Latitude__c: 48.8566, Departure_DateTime__c: "2026-03-25T18:20:00Z", Flight_Status__c: "Delayed", Delay_Minutes__c: 45, Cabin_Class__c: "Premium Economy", Contact__c: "003T5" },
|
|
69
69
|
{ Id: "a01F6", Flight_Number__c: "AS 670", Airline__c: "Alaska Airlines", Departure_Airport__c: "SEA", Departure_City__c: "Seattle", Departure_Longitude__c: -122.3321, Departure_Latitude__c: 47.6062, Arrival_Airport__c: "AUS", Arrival_City__c: "Austin", Arrival_Longitude__c: -97.7431, Arrival_Latitude__c: 30.2672, Departure_DateTime__c: "2026-03-25T08:05:00Z", Flight_Status__c: "Landed", Delay_Minutes__c: 0, Cabin_Class__c: "Economy", Contact__c: "003T6" },
|
|
@@ -95,17 +95,17 @@ export const DISRUPTIONS = [
|
|
|
95
95
|
export const BOOKINGS = [
|
|
96
96
|
{ Id: "a04B1", Contact__c: "003T9", Booking_Type__c: "Flight", Status__c: "Confirmed", Cost__c: 824, In_Policy__c: true, _travelerName: "Lisa Park", _destination: "Denver → Chicago", _dates: "Mar 28–30" },
|
|
97
97
|
{ Id: "a04B2", Contact__c: "003T10", Booking_Type__c: "Flight", Status__c: "Confirmed", Cost__c: 412, In_Policy__c: true, _travelerName: "Ryan Foster", _destination: "NYC → San Francisco", _dates: "Mar 29" },
|
|
98
|
-
{ Id: "a04B3", Contact__c: "003T11", Booking_Type__c: "Flight", Status__c: "
|
|
98
|
+
{ Id: "a04B3", Contact__c: "003T11", Booking_Type__c: "Flight", Status__c: "Pending approval", Cost__c: 2340, In_Policy__c: false, _travelerName: "Mei Wong", _destination: "Seattle → London", _dates: "Apr 1–5" },
|
|
99
99
|
{ Id: "a04B4", Contact__c: "003T12", Booking_Type__c: "Hotel", Status__c: "Confirmed", Cost__c: 380, In_Policy__c: true, _travelerName: "Carlos Vega", _destination: "Austin", _dates: "Apr 2–4" },
|
|
100
100
|
{ Id: "a04B5", Contact__c: "003T13", Booking_Type__c: "Flight", Status__c: "Confirmed", Cost__c: 1890, In_Policy__c: true, _travelerName: "Nina Kowalski", _destination: "Boston → Berlin", _dates: "Apr 3–7" },
|
|
101
101
|
{ Id: "a04B6", Contact__c: "003T14", Booking_Type__c: "Flight", Status__c: "Confirmed", Cost__c: 298, In_Policy__c: true, _travelerName: "Andre Williams", _destination: "LA → Miami", _dates: "Apr 5" },
|
|
102
102
|
{ Id: "a04B7", Contact__c: "003T15", Booking_Type__c: "Flight", Status__c: "Confirmed", Cost__c: 3150, In_Policy__c: false, _travelerName: "Hannah Lee", _destination: "Chicago → Tokyo", _dates: "Apr 7–12" },
|
|
103
|
-
{ Id: "a04B8", Contact__c: "003T16", Booking_Type__c: "Flight", Status__c: "
|
|
103
|
+
{ Id: "a04B8", Contact__c: "003T16", Booking_Type__c: "Flight", Status__c: "Pending approval", Cost__c: 2100, In_Policy__c: false, _travelerName: "Omar Hassan", _destination: "Denver → Paris", _dates: "Apr 8–11" },
|
|
104
104
|
];
|
|
105
105
|
|
|
106
106
|
// ─── REBOOKING ACTIONS (Eva activity) ───────────────────────────────────────
|
|
107
107
|
export const REBOOKING_ACTIONS = [
|
|
108
|
-
{ Id: "a05R1", Action_Type__c: "Manual Rebook", Status__c: "Completed", Handled_By__c: "Eva (Agent)", Contact__c: "
|
|
108
|
+
{ Id: "a05R1", Action_Type__c: "Manual Rebook", Status__c: "Completed", Handled_By__c: "Eva (Agent)", Contact__c: "003T3", Original_Flight__c: "LH 431", New_Flight__c: "LH 433", Cost_Difference__c: 0, Notes__c: "Rebooked cancelled flight for Priya Patel — LH 431 → LH 433 · Same fare class", Created_DateTime__c: "2026-03-25T14:58:00Z" },
|
|
109
109
|
{ Id: "a05R2", Action_Type__c: "Manual Rebook", Status__c: "Completed", Handled_By__c: "Eva (Agent)", Contact__c: "003T11", Original_Flight__c: null, New_Flight__c: null, Cost_Difference__c: -221, Notes__c: "Found policy-compliant hotel for Mei Wong — Hotel Adlon ($410/n) → Motel One ($189/n)", Created_DateTime__c: "2026-03-25T14:52:00Z" },
|
|
110
110
|
{ Id: "a05R3", Action_Type__c: "Escalation", Status__c: "In Progress", Handled_By__c: "Eva (Agent)", Contact__c: "003T16", Original_Flight__c: null, New_Flight__c: null, Cost_Difference__c: 0, Notes__c: "Processing approval for Omar Hassan — Paris trip over budget — escalated to manager", Created_DateTime__c: "2026-03-25T14:48:00Z" },
|
|
111
111
|
{ Id: "a05R4", Action_Type__c: "Auto-Cancel", Status__c: "Completed", Handled_By__c: "Eva (Agent)", Contact__c: "003T14", Original_Flight__c: null, New_Flight__c: null, Cost_Difference__c: 0, Notes__c: "Auto-approved Andre Williams flight — LA → Miami · $298 · Within policy", Created_DateTime__c: "2026-03-25T14:35:00Z" },
|
|
@@ -192,10 +192,15 @@ export const MAP_ARCS = FLIGHTS.map((f) => ({
|
|
|
192
192
|
}));
|
|
193
193
|
|
|
194
194
|
// ─── MAP: overlays (weather / disruption zones) ─────────────────────────────
|
|
195
|
+
const cityToAirportCode = Object.fromEntries(
|
|
196
|
+
AIRPORTS.map((a) => [a.City__c, a.IATA_Code__c])
|
|
197
|
+
);
|
|
198
|
+
|
|
195
199
|
export const MAP_OVERLAYS = DISRUPTIONS.filter(
|
|
196
200
|
(d) => d.Disruption_Type__c === "Weather Event"
|
|
197
201
|
).map((d) => {
|
|
198
|
-
const
|
|
202
|
+
const code = cityToAirportCode[d.City__c] ?? "CDG";
|
|
203
|
+
const airport = airportByCode[code];
|
|
199
204
|
return {
|
|
200
205
|
id: d.Id,
|
|
201
206
|
center: [airport?.Longitude__c ?? 2.35, airport?.Latitude__c ?? 48.86],
|
|
@@ -303,11 +308,18 @@ export const EVA_ACTIONS = REBOOKING_ACTIONS.map((r) => {
|
|
|
303
308
|
id: r.Id,
|
|
304
309
|
title: parts[0] ?? r.Notes__c,
|
|
305
310
|
subtitle: parts[1] ?? "",
|
|
306
|
-
status:
|
|
311
|
+
status:
|
|
312
|
+
r.Status__c === "Completed"
|
|
313
|
+
? "complete"
|
|
314
|
+
: r.Action_Type__c === "Escalation"
|
|
315
|
+
? "pending"
|
|
316
|
+
: "working",
|
|
307
317
|
timestamp: relativeTime(r.Created_DateTime__c),
|
|
308
318
|
};
|
|
309
319
|
});
|
|
310
320
|
|
|
321
|
+
export const ESCALATION_CARDS = EVA_ACTIONS;
|
|
322
|
+
|
|
311
323
|
// ─── BOOKING TABLE ──────────────────────────────────────────────────────────
|
|
312
324
|
export const BOOKING_ROWS = BOOKINGS.map((b) => ({
|
|
313
325
|
id: b.Id,
|
package/package.json
CHANGED