@solidxai/core 0.1.11-beta.12 → 0.1.11-beta.14

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.
Files changed (105) hide show
  1. package/.claude/settings.local.json +16 -0
  2. package/CLAUDE.md +26 -0
  3. package/dist/controllers/media.controller.js +0 -2
  4. package/dist/controllers/media.controller.js.map +1 -1
  5. package/dist/helpers/environment.helper.d.ts +0 -1
  6. package/dist/helpers/environment.helper.d.ts.map +1 -1
  7. package/dist/helpers/environment.helper.js +0 -4
  8. package/dist/helpers/environment.helper.js.map +1 -1
  9. package/dist/helpers/model-metadata-helper.service.d.ts +1 -2
  10. package/dist/helpers/model-metadata-helper.service.d.ts.map +1 -1
  11. package/dist/helpers/model-metadata-helper.service.js +2 -6
  12. package/dist/helpers/model-metadata-helper.service.js.map +1 -1
  13. package/dist/helpers/solid-registry.d.ts +1 -2
  14. package/dist/helpers/solid-registry.d.ts.map +1 -1
  15. package/dist/helpers/solid-registry.js.map +1 -1
  16. package/dist/index.d.ts +0 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +0 -1
  19. package/dist/index.js.map +1 -1
  20. package/dist/repository/scheduled-job.repository.d.ts +2 -2
  21. package/dist/repository/scheduled-job.repository.d.ts.map +1 -1
  22. package/dist/repository/scheduled-job.repository.js +3 -6
  23. package/dist/repository/scheduled-job.repository.js.map +1 -1
  24. package/dist/repository/security-rule.repository.d.ts +2 -2
  25. package/dist/repository/security-rule.repository.d.ts.map +1 -1
  26. package/dist/repository/security-rule.repository.js +3 -6
  27. package/dist/repository/security-rule.repository.js.map +1 -1
  28. package/dist/seeders/seed-data/solid-core-metadata.json +62 -33
  29. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.d.ts.map +1 -1
  30. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.js +5 -7
  31. package/dist/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.js.map +1 -1
  32. package/dist/services/crud-helper.service.d.ts.map +1 -1
  33. package/dist/services/crud-helper.service.js +7 -0
  34. package/dist/services/crud-helper.service.js.map +1 -1
  35. package/dist/services/model-metadata.service.d.ts.map +1 -1
  36. package/dist/services/model-metadata.service.js +0 -16
  37. package/dist/services/model-metadata.service.js.map +1 -1
  38. package/dist/services/module-metadata.service.d.ts.map +1 -1
  39. package/dist/services/module-metadata.service.js +0 -28
  40. package/dist/services/module-metadata.service.js.map +1 -1
  41. package/dist/subscribers/audit.subscriber.d.ts.map +1 -1
  42. package/dist/subscribers/audit.subscriber.js +2 -8
  43. package/dist/subscribers/audit.subscriber.js.map +1 -1
  44. package/dist/subscribers/computed-entity-field.subscriber.d.ts +0 -8
  45. package/dist/subscribers/computed-entity-field.subscriber.d.ts.map +1 -1
  46. package/dist/subscribers/computed-entity-field.subscriber.js +3 -36
  47. package/dist/subscribers/computed-entity-field.subscriber.js.map +1 -1
  48. package/dist/subscribers/created-by-updated-by.subscriber.d.ts.map +1 -1
  49. package/dist/subscribers/created-by-updated-by.subscriber.js.map +1 -1
  50. package/dist/subscribers/field-metadata.subscriber.d.ts.map +1 -1
  51. package/dist/subscribers/field-metadata.subscriber.js.map +1 -1
  52. package/dist/subscribers/scheduled-job.subscriber.d.ts.map +1 -1
  53. package/dist/subscribers/scheduled-job.subscriber.js +2 -3
  54. package/dist/subscribers/scheduled-job.subscriber.js.map +1 -1
  55. package/dist/subscribers/security-rule.subscriber.d.ts.map +1 -1
  56. package/dist/subscribers/security-rule.subscriber.js +3 -5
  57. package/dist/subscribers/security-rule.subscriber.js.map +1 -1
  58. package/package.json +1 -1
  59. package/src/controllers/media.controller.ts +1 -1
  60. package/src/helpers/environment.helper.ts +0 -11
  61. package/src/helpers/model-metadata-helper.service.ts +2 -7
  62. package/src/helpers/solid-registry.ts +1 -7
  63. package/src/index.ts +0 -1
  64. package/src/repository/scheduled-job.repository.ts +4 -10
  65. package/src/repository/security-rule.repository.ts +4 -10
  66. package/src/seeders/seed-data/solid-core-metadata.json +62 -33
  67. package/src/services/1.js +6 -0
  68. package/src/services/computed-fields/entity/alpha-num-external-id-computed-field-provider.ts +5 -11
  69. package/src/services/crud-helper.service.ts +7 -0
  70. package/src/services/model-metadata.service.ts +0 -22
  71. package/src/services/module-metadata.service.ts +0 -36
  72. package/src/subscribers/audit.subscriber.ts +2 -11
  73. package/src/subscribers/computed-entity-field.subscriber.ts +6 -63
  74. package/src/subscribers/created-by-updated-by.subscriber.ts +0 -3
  75. package/src/subscribers/field-metadata.subscriber.ts +0 -3
  76. package/src/subscribers/scheduled-job.subscriber.ts +2 -3
  77. package/src/subscribers/security-rule.subscriber.ts +3 -8
  78. package/dist/helpers/nodemon-heartbeat.d.ts +0 -5
  79. package/dist/helpers/nodemon-heartbeat.d.ts.map +0 -1
  80. package/dist/helpers/nodemon-heartbeat.js +0 -67
  81. package/dist/helpers/nodemon-heartbeat.js.map +0 -1
  82. package/dist-tests/api/authenticate.spec.js +0 -119
  83. package/dist-tests/api/authenticate.spec.js.map +0 -1
  84. package/dist-tests/api/crud-service.findOne.cityMaster.spec.js +0 -97
  85. package/dist-tests/api/crud-service.findOne.cityMaster.spec.js.map +0 -1
  86. package/dist-tests/api/ping.spec.js +0 -21
  87. package/dist-tests/api/ping.spec.js.map +0 -1
  88. package/dist-tests/helpers/auth.js +0 -41
  89. package/dist-tests/helpers/auth.js.map +0 -1
  90. package/dist-tests/helpers/env.js +0 -11
  91. package/dist-tests/helpers/env.js.map +0 -1
  92. package/docs/agent-hub-grooming.md +0 -301
  93. package/docs/dashboards/AGENTIC_DASHBOARD_IMPLEMENTATION_PLAN.md +0 -438
  94. package/docs/dashboards/dashboard-curl-smoke-tests.txt +0 -146
  95. package/docs/dashboards/delete-legacy-dashboard-metadata.sql +0 -172
  96. package/docs/datasource-introspection-ddl-analysis.md +0 -326
  97. package/docs/datasource-introspection-implementation-plan.md +0 -306
  98. package/docs/grouping-enhancements.md +0 -89
  99. package/docs/java-spring/README.md +0 -3
  100. package/docs/java-spring/solid-core-module-deep-dive-report.md +0 -1317
  101. package/docs/module-package-import-handoff.md +0 -691
  102. package/docs/seed-changes.md +0 -65
  103. package/docs/test-data-workflow.md +0 -200
  104. package/docs/type-declaration-import-issue.md +0 -24
  105. package/src/helpers/nodemon-heartbeat.ts +0 -59
@@ -1,438 +0,0 @@
1
- # Agentic Dashboard Implementation Plan
2
-
3
- ## 1. Scope and Goals
4
-
5
- ### 1.1 Outcome
6
- - [ ] Build a new generic, metadata-driven dashboard framework across `solid-core-module` and `solid-core-ui`.
7
- - [ ] Replace all legacy dashboard implementation code (backend + frontend) with the new architecture.
8
- - [ ] Support existing configured data sources and optional model metadata integration.
9
- - [ ] Provide a clean extension architecture so teams/agents can add new dashboard widgets consistently.
10
-
11
- ### 1.2 Core Principles
12
- - [ ] Metadata first: dashboards, variables, widgets, filters, and layout defaults are defined in module metadata JSON.
13
- - [ ] Provider driven: each widget resolves data through a common backend provider contract.
14
- - [ ] UI abstraction: widget rendering uses a typed extension registry entry (`DashboardWidget`) instead of hard-coded branches.
15
- - [ ] User personalization: per-user layout is persisted and merged over metadata defaults.
16
-
17
- ---
18
-
19
- ## 2. Reference Patterns to Mirror
20
-
21
- ### 2.1 Backend provider registration and resolution pattern
22
- - [x] Follow existing pattern used by:
23
- - `src/services/computed-fields/entity/sequence-num-computed-field-provider.ts`
24
- - `src/services/selection-providers/list-of-values-selection-providers.service.ts`
25
- - `src/services/solid-introspect.service.ts`
26
- - `src/helpers/solid-registry.ts`
27
- - [x] Keep flow: `decorator -> introspection -> registry -> resolver service -> controller endpoint`.
28
-
29
- ### 2.2 Frontend extension pattern
30
- - [ ] Mirror existing extension architecture in:
31
- - `solid-core-ui/src/helpers/registry.ts`
32
- - `solid-core-ui/src/types/extension-registry.ts`
33
- - [ ] Add a dedicated extension component type for dashboard widgets.
34
-
35
- ---
36
-
37
- ## 3. Legacy Dashboard Decommission (Must happen first)
38
-
39
- ### 3.1 Backend legacy removal inventory
40
- - [x] Remove legacy dashboard entities:
41
- - `dashboard.entity.ts`, `dashboard-variable.entity.ts`, `dashboard-question.entity.ts`, `dashboard-question-sql-dataset-config.entity.ts`, `dashboard-layout.entity.ts`.
42
- - [x] Remove legacy controllers/services/repositories/mappers/subscribers/decorators:
43
- - `dashboard*.controller.ts`
44
- - `dashboard*.service.ts`
45
- - `dashboard*.repository.ts`
46
- - `dashboard-mapper.ts`
47
- - `dashboard*.subscriber.ts`
48
- - `dashboard-selection-provider.decorator.ts`
49
- - `dashboard-question-data-provider.decorator.ts`
50
- - [x] Remove old dashboard-specific selection providers and question-data providers currently tied to the old model.
51
- - [x] Remove old exports from `src/index.ts`, `src/interfaces.ts`, and any DTO references.
52
- - [x] Remove all old dashboard wiring from `src/solid-core.module.ts` (imports, entities, providers, controllers).
53
-
54
- ### 3.2 Frontend legacy removal inventory
55
- - [x] Remove old dashboard API slices:
56
- - `dashboardApi.ts`, `dashboardQuestionApi.ts`, `dashboardLayoutApi.ts`.
57
- - [x] Remove old dashboard components and route page:
58
- - `components/core/dashboard/*`
59
- - `routes/pages/admin/core/DashboardPage.tsx` (legacy implementation).
60
- - [x] Remove old dashboard extension handlers/widgets under `components/core/extension/solid-core/dashboard*`.
61
- - [x] Remove old store wiring from `redux/store/defaultStoreConfig.ts`.
62
- - [x] Remove stale assets only used by old dashboard implementation.
63
-
64
- ### 3.3 Metadata cleanup
65
- - [x] Remove old dashboard-related testing permissions (legacy controller methods) from module metadata examples.
66
- - [x] Update seed metadata (`solid-core-metadata.json`) to remove old dashboard management models/actions/views.
67
-
68
- ---
69
-
70
- ## 4. New Metadata Schema Design
71
-
72
- ### 4.1 Module metadata structure
73
- - [x] Introduce/replace `dashboards` section schema in module metadata (similar placement as `testing` section).
74
- - [x] Define top-level dashboard fields:
75
- - `name`, `displayName`, `description`, `routeName`, `menu`, `variables`, `widgets`, `defaultLayout`, `permissions`.
76
- - [x] Define variable schema:
77
- - `name`, `label`, `type`, `required`, `defaultValue`, `operators`, `selectionConfig`, `visibilityRules`.
78
- - [x] Define widget schema:
79
- - `name`, `title`, `type`, `dataProvider`, `providerContext`, `visualization`, `layoutRef`, `refreshPolicy`.
80
- - [x] Define layout schema:
81
- - Grid cell contract compatible with Gridstack (`x`, `y`, `w`, `h`, min/max constraints, responsive overrides).
82
-
83
- ### 4.2 Validation + compatibility
84
- - [ ] Add runtime validation for dashboard metadata schema (clear error messages for malformed config).
85
- - [x] Introduce schema versioning (`dashboardSchemaVersion`) for future migrations.
86
- - [ ] Add backward-compat guard (disable old schema loading explicitly and log actionable migration hints).
87
-
88
- ### 4.3 ADR-001: Dashboard definition source of truth
89
- - [x] **Decision**:
90
- - dashboard definitions remain in module metadata JSON under root-level `dashboards` (peer of `actions`, `menus`, `roles`, `users`, etc.)
91
- - seed only dashboard navigation metadata (`actions`, `menus`)
92
- - do not persist dashboard definitions in dedicated dashboard DB tables
93
- - persist only user-specific layout overrides in the new user layout table.
94
- - [x] **Context**:
95
- - legacy dashboard persistence model has been removed
96
- - new dashboard framework is explicitly metadata-driven
97
- - we need a single source of truth with git versioning and no JSON-vs-DB drift.
98
- - [x] **Consequences**:
99
- - simpler rollout and migrations for v1
100
- - dashboard updates ship through metadata changes
101
- - runtime must always resolve dashboard definition from module metadata
102
- - no CRUD for dashboard definitions in DB for v1.
103
- - [x] **Alternatives considered (rejected for v1)**:
104
- - persist full dashboard definitions in DB tables
105
- - hybrid model where DB can override JSON definitions.
106
-
107
- ### 4.4 ADR-002: Dashboard layout persistence implementation pattern
108
- - [x] **Decision**:
109
- - do not hand-code dashboard layout entity/repository/service in `solid-core-module` source
110
- - define dashboard layout persistence model in module metadata JSON
111
- - generate entity/service/controller artifacts through solid-core metadata code generation flow.
112
- - [x] **Context**:
113
- - project prefers metadata-first model management for framework-owned models
114
- - generated artifacts keep persistence layer consistent with standard solid-core patterns.
115
- - [x] **Consequences**:
116
- - layout persistence endpoint behavior can be stub/fallback until generated model artifacts are available
117
- - consuming projects can regenerate cleanly from metadata without custom table code drift.
118
-
119
- ---
120
-
121
- ## 5. Backend Architecture (solid-core-module)
122
-
123
- ### 5.1 New provider contracts
124
- - [x] Create new interface:
125
- - `IDashboardWidgetDataProvider<TContext, TResponse>` with methods:
126
- - `name()`
127
- - `help()`
128
- - `getData(widgetDefinition, runtimeContext): Promise<TResponse>`
129
- - [x] Optionally split provider contracts:
130
- - widget data provider
131
- - variable options provider (if dynamic filter options are needed separately)
132
- - [x] Define standard response envelope for all widget providers:
133
- - `meta` (widget name/provider/version/time)
134
- - `data` (typed payload)
135
- - `uiHints` (optional rendering hints)
136
-
137
- ### 5.2 Decorator + registry + introspection
138
- - [x] Add new decorator for widget data providers (parallel to existing provider decorators).
139
- - [x] Extend `SolidIntrospectService` to auto-register dashboard widget data providers.
140
- - [x] Extend `SolidRegistry` with:
141
- - register/get/list methods for widget providers.
142
- - [x] Keep naming resolution strategy consistent with existing providers.
143
-
144
- ### 5.3 Dashboard runtime service layer
145
- - [x] Add new dashboard runtime service:
146
- - resolves dashboard metadata by module + dashboard name
147
- - resolves dashboard variables and validated filter input
148
- - resolves widget provider instance per widget
149
- - executes provider and aggregates response
150
- - [x] Add expression/filter resolver for dashboard variables (provider-level filter utility for date/queue/stage/messageBroker).
151
- - [ ] Add secure execution guardrails:
152
- - provider allowlist
153
- - parameterized SQL only
154
- - timeout + row limits + payload size limits
155
-
156
- ### 5.4 New controller endpoints
157
- - [x] Add `DashboardController` (new runtime controller, not CRUD dashboard model controller).
158
- - [x] Proposed endpoints:
159
- - `GET /dashboard/:module/:dashboardName/definition`
160
- - `POST /dashboard/:module/:dashboardName/widgets/:widgetName/data`
161
- - `POST /dashboard/:module/:dashboardName/data` (batch widget fetch)
162
- - `GET /dashboard/:module/:dashboardName/variable-options/:variableName`
163
- - `GET /dashboard/:module/:dashboardName/layout` (resolved default + user override)
164
- - `PUT /dashboard/:module/:dashboardName/layout` (save user layout)
165
- - [x] Add Swagger + permission mapping for new endpoints.
166
-
167
- ### 5.5 User layout persistence model
168
- - [x] Add metadata model for personalized layout (and generate entity/service using solid-core code generation):
169
- - `dashboardName` (string/user key reference to metadata dashboard)
170
- - `layoutJson` (long text / json)
171
- - `user` (many-to-one with `User`)
172
- - `module` (many-to-one with `Module`, resolved using `moduleUserKey` from dashboard metadata context)
173
- - [x] Add unique index:
174
- - `(user_id, module_id, dashboard_name)`.
175
- - [x] Add repository/service methods and runtime integration:
176
- - `getUserLayout()`
177
- - `upsertUserLayout()`
178
- - `resetToDefault()`
179
- - wired into `GET/PUT /dashboard/:module/:dashboardName/layout`.
180
-
181
- ---
182
-
183
- ## 6. Frontend Architecture (solid-core-ui)
184
-
185
- ### 6.1 Extension system for dashboard widgets
186
- - [x] Add new extension component type in `extension-registry.ts`:
187
- - `dashboardWidget`.
188
- - [x] Add typed widget props contract (single source of truth for all dashboard widgets), e.g.:
189
- - widget metadata
190
- - resolved variables
191
- - loading/error state
192
- - normalized provider response
193
- - callbacks (refresh, open details, export).
194
- - [x] Register default widgets via `registry.ts` using the new extension type.
195
-
196
- ### 6.2 Dashboard runtime UI
197
- - [x] Create new generic dashboard route/page:
198
- - `/admin/dashboard/:dashboardName` or `/admin/core/:moduleName/dashboard/:dashboardName` (finalize one canonical route).
199
- - [x] Build page structure:
200
- - dynamic header
201
- - metadata-driven variable filter bar
202
- - widget grid body
203
- - save/reset layout actions.
204
- - [x] Resolve dashboard via new backend definition endpoint.
205
-
206
- ### 6.3 Layout engine integration
207
- - [x] Standardize on Gridstack for drag/drop/resize (metadata layout to Gridstack contract adapter).
208
- - [x] Create layout adapter:
209
- - metadata default layout -> Gridstack nodes
210
- - Gridstack save format -> persisted `layoutJson`.
211
- - [x] Persist user changes through new layout endpoints.
212
- - [ ] Add responsive behavior and conflict handling for missing/renamed widgets.
213
-
214
- ### 6.4 Widget rendering pipeline
215
- - [x] Implement widget host container that:
216
- - resolves widget extension component by type/name
217
- - fetches provider data
218
- - handles loading/empty/error states consistently
219
- - supports per-widget refresh intervals.
220
- - [ ] Implement first-party default widgets (KPI, line/bar/pie, table, meter/progress).
221
- - [x] Ensure each widget reads dashboard variables as input params.
222
-
223
- ### 6.5 State and API slices
224
- - [x] Add new RTK Query slices for dashboard runtime endpoints.
225
- - [x] Remove legacy dashboard slices from store config.
226
- - [ ] Add cache keys by `module + dashboard + variable hash + widget`.
227
-
228
- ---
229
-
230
- ## 7. Charting Library Recommendation
231
-
232
- ### 7.1 Recommended baseline
233
- - [x] Use **Apache ECharts** as the default charting engine abstraction for v1.
234
-
235
- ### 7.2 Why ECharts
236
- - [x] Broad chart coverage (20+ types and combinable series).
237
- - [x] Strong visual quality out of the box, plus deep customization.
238
- - [x] Apache-2.0 license (friendly for framework redistribution/use).
239
- - [x] Handles large datasets and supports Canvas/SVG rendering modes.
240
-
241
- ### 7.3 UI abstraction requirement
242
- - [x] Do not couple widget contracts directly to ECharts option schema.
243
- - [ ] Add a renderer adapter layer:
244
- - `chartRenderer: "echarts"` (v1)
245
- - future pluggable renderers without metadata breaking changes.
246
-
247
- ---
248
-
249
- ## 8. Menu, Routes, and Metadata Navigation
250
-
251
- ### 8.1 Metadata-driven menu/action integration
252
- - [x] Add metadata authoring convention for dashboard menu/action pairs:
253
- - action type `custom`
254
- - route template resolved to canonical dashboard route.
255
- - [ ] Update backend menu path generation rules if needed for dashboard route parameters.
256
-
257
- ### 8.2 Permission model
258
- - [ ] Define dashboard runtime permissions at dashboard definition and endpoint level.
259
- - [ ] Update testing metadata generation to include new runtime controller permissions.
260
-
261
- ---
262
-
263
- ## 9. Migration and Rollout Strategy
264
-
265
- ### 9.1 Phase rollout
266
- - [x] Phase A: remove legacy code and compile cleanly.
267
- - [x] Phase B: introduce new backend runtime + metadata schema + provider set for queue-health reference dashboard.
268
- - [x] Phase C: introduce UI runtime + Gridstack + ECharts adapter + baseline widgets.
269
- - [x] Phase D: add user layout persistence and menu integration.
270
- - [ ] Phase E: documentation, sample module metadata, agent reference implementation.
271
-
272
- ### 9.2 Data/config migration
273
- - [ ] Provide migration script or one-time converter for old dashboard JSON to new metadata schema (where feasible).
274
- - [ ] Explicitly document non-migratable legacy constructs and fallback behavior.
275
-
276
- ---
277
-
278
- ## 10. Testing and Quality Gates
279
-
280
- ### 10.1 Backend tests
281
- - [ ] Unit tests for provider registry resolution, schema validation, and controller contract.
282
- - [ ] Integration tests for dashboard definition load, widget data batch response, variable option resolution, layout upsert/load.
283
- - [ ] Security tests for SQL/provider guardrails.
284
-
285
- ### 10.2 Frontend tests
286
- - [ ] Component tests for dynamic filter rendering from metadata.
287
- - [ ] Widget host tests for loading/error/retry states.
288
- - [ ] Layout persistence tests (save/load/reset).
289
- - [ ] Route/menu rendering tests for dashboard navigation.
290
-
291
- ### 10.3 End-to-end smoke
292
- - [x] Seed one reference dashboard in sample metadata.
293
- - [ ] Validate: open dashboard -> apply filters -> render widgets -> drag/resize -> save layout -> reload persistence.
294
-
295
- ---
296
-
297
- ## 11. Documentation and Developer Experience
298
-
299
- ### 11.1 Framework docs
300
- - [x] Add “Dashboard Metadata Authoring Guide”.
301
- - [x] Add “Build a Custom Dashboard Widget Provider” guide.
302
- - [x] Add “Frontend Dashboard Widget extension contract” guide.
303
-
304
- ### 11.2 Agent-ready templates
305
- - [x] Add reference widget provider template files.
306
- - [x] Add reference dashboard metadata JSON template.
307
- - [x] Add checklist for creating a new widget end-to-end.
308
-
309
- ### 11.3 Reference Implementation (Later): 100% Custom Queue Widget
310
- - [x] Add a queue-focused custom RI widget: `QueueSlaHeatmapWidget`.
311
- - [x] Add paired backend data provider: `MqDashboardQueueSlaHeatmapProvider` (provider-driven data fetch remains mandatory).
312
- - [x] Define RI provider output contract:
313
- - `xCategories` (hour/day buckets)
314
- - `yCategories` (queue names)
315
- - `points` (`[xIndex, yIndex, metricValue]` heatmap tuples)
316
- - optional legend thresholds and tooltip fields.
317
- - [x] Add metadata example showing explicit UI override:
318
- - `widgetComponentName: "QueueSlaHeatmapWidget"` (or `ui.componentName` equivalent).
319
- - [x] Document rendering precedence:
320
- - if custom dashboard widget component is registered, use it.
321
- - otherwise use framework default dashboard widgets (KPI/Line/Bar/Pie/Table) via ECharts mapper.
322
- - [x] Use this RI as canonical example for "backend provider required, custom frontend rendering optional."
323
-
324
- ---
325
-
326
- ## 12. Agent Project Enablement (Skills and Tooling)
327
-
328
- ### 12.1 Agent capability goals
329
- - [ ] Enable agents to discover dashboard definitions, variables, widgets, and layout metadata quickly.
330
- - [ ] Enable agents to generate new dashboard/widget scaffolds that conform to framework contracts.
331
- - [ ] Enable agents to validate dashboard metadata and provider wiring before runtime.
332
- - [ ] Enable agents to troubleshoot dashboard rendering/data issues with structured diagnostics.
333
-
334
- ### 12.2 New/updated skill surfaces
335
- - [ ] Add a dedicated agent skill guide for dashboard implementation:
336
- - metadata authoring (`dashboards`, `variables`, `widgets`, `defaultLayout`)
337
- - backend provider scaffolding (`IDashboardWidgetDataProvider`)
338
- - frontend widget extension scaffolding (`dashboardWidget` type)
339
- - menu/action/route integration pattern.
340
- - [ ] Add cookbook-style examples in the skill:
341
- - create dashboard from scratch
342
- - add a new widget type
343
- - add variable-driven filtering
344
- - persist and reset user layout.
345
- - [ ] Add anti-patterns and guardrails section:
346
- - avoid hard-coded UI branches per widget
347
- - enforce provider response contract
348
- - enforce parameterized SQL and payload limits.
349
-
350
- ### 12.3 Tooling opportunities (optional but recommended)
351
- - [ ] Add CLI-style helper commands (or MCP handlers) for:
352
- - scaffold dashboard metadata block
353
- - scaffold backend widget provider class
354
- - scaffold frontend dashboard widget component
355
- - run dashboard metadata validation.
356
- - [ ] Add validation utility callable by agents:
357
- - checks metadata schema compliance
358
- - checks referenced providers/widgets/routes exist
359
- - checks layout schema compatibility.
360
- - [ ] Add introspection/debug endpoint(s) for agents:
361
- - list registered dashboard widget providers
362
- - preview resolved dashboard definition
363
- - dry-run widget data contract output.
364
-
365
- ### 12.4 Agent integration with existing project tooling
366
- - [ ] Extend existing MCP handler ecosystem to support dashboard-specific actions:
367
- - create dashboard
368
- - add widget to dashboard
369
- - add variable to dashboard
370
- - regenerate menu/action links for dashboard routes.
371
- - [ ] Ensure handler outputs are idempotent and metadata-safe (no duplicate entries, deterministic updates).
372
- - [ ] Add structured result payloads so agents can chain operations reliably.
373
-
374
- ### 12.5 Agent quality and safety checks
375
- - [ ] Add preflight checks agents must run before patch generation:
376
- - schema validation
377
- - provider registration check
378
- - permission mapping check
379
- - route resolution check.
380
- - [ ] Add post-change verification checklist for agents:
381
- - metadata compiles/loads
382
- - widget provider resolves in registry
383
- - UI widget mounts with mocked data
384
- - layout save/load roundtrip works.
385
- - [ ] Add fail-fast diagnostics format:
386
- - missing provider
387
- - invalid widget type
388
- - malformed layout
389
- - variable expression mismatch.
390
-
391
- ### 12.6 Agent adoption rollout
392
- - [ ] Phase 1: publish the dashboard skill + templates with one golden-path example.
393
- - [ ] Phase 2: add scaffold + validation tools for fast and safe agent output.
394
- - [ ] Phase 3: add advanced capabilities (migration assistant, dashboard linting, widget contract tests).
395
- - [ ] Track adoption metrics:
396
- - time to create new dashboard
397
- - first-pass success rate
398
- - number of manual fixes after agent-generated changes.
399
-
400
- ---
401
-
402
- ## 13. Immediate Execution Checklist (Sprint-1 Proposal)
403
-
404
- - [x] Finalize canonical route format (`/admin/core/:module/dashboard/:dashboardName` vs `/admin/dashboard/:dashboardName`).
405
- - [x] Freeze new metadata schema draft (`dashboards.variables.widgets.layout`).
406
- - [x] Delete legacy dashboard code paths in `solid-core-module`.
407
- - [x] Delete legacy dashboard code paths in `solid-core-ui`.
408
- - [x] Add new provider decorator + registry wiring + introspection.
409
- - [x] Add new runtime controller + definition/data endpoints.
410
- - [x] Add dashboard layout metadata model and run code generation for persistence service/entity.
411
- - [x] Add UI dashboard page scaffold with metadata header + variable bar.
412
- - [x] Add Gridstack integration adapter and persist layout flow.
413
- - [x] Add ECharts renderer adapter + first 2 widgets (KPI + Bar/Line).
414
- - [ ] Add one sample dashboard metadata entry in `solid-library-management` as reference.
415
-
416
- ---
417
-
418
- ## 14. External Library Notes (validated May 30, 2026)
419
-
420
- - [ ] ECharts official feature/license references:
421
- - https://echarts.apache.org/
422
- - https://echarts.apache.org/en/feature.html
423
- - https://echarts.apache.org/faq
424
- - [ ] Gridstack docs/releases references:
425
- - https://gridstackjs.com/
426
- - https://gridstackjs.com/doc/html/classes/GridStack.html
427
- - https://github.com/gridstack/gridstack.js/releases
428
-
429
-
430
-
431
-
432
-
433
- ## 15. Harish Notes
434
- - [x] documentation cleanup
435
- - [x] Permissions
436
- - [ ] Caching
437
- - [x] Issues around re-rendering widgets when layout is changed
438
- - [x] Sample custom ui widget implementation
@@ -1,146 +0,0 @@
1
- # Dashboard Runtime Smoke Test CURLs
2
- # Purpose: quick re-test suite for queue-health dashboard endpoints.
3
- # Auth note: TOKEN should be a JWT access token generated by /iam/authenticate.
4
-
5
- # ----------------------------------------------------------------------------
6
- # Setup
7
- # ----------------------------------------------------------------------------
8
- export BASE_URL="http://localhost:9000/api"
9
- export TOKEN="<PASTE_JWT_HERE>"
10
-
11
- # Optional: verify token works.
12
- curl -s "$BASE_URL/iam/me" \
13
- -H "Authorization: Bearer $TOKEN" | jq
14
-
15
- # ----------------------------------------------------------------------------
16
- # 1) Dashboard Definition
17
- # Expected: 200 + dashboard metadata in .data
18
- # ----------------------------------------------------------------------------
19
- curl -s "$BASE_URL/dashboard/solid-core/queue-health/definition" \
20
- -H "Authorization: Bearer $TOKEN" | jq
21
-
22
- # ----------------------------------------------------------------------------
23
- # 2) Dashboard Variable Options (dynamic/static)
24
- # Expected: 200 + array in .data
25
- # ----------------------------------------------------------------------------
26
-
27
- # queueName (dynamic provider)
28
- curl -s "$BASE_URL/dashboard/solid-core/queue-health/variable-options/queueName?limit=20&offset=0&query=" \
29
- -H "Authorization: Bearer $TOKEN" | jq
30
-
31
- # messageBroker (dynamic provider)
32
- curl -s "$BASE_URL/dashboard/solid-core/queue-health/variable-options/messageBroker?limit=20&offset=0&query=" \
33
- -H "Authorization: Bearer $TOKEN" | jq
34
-
35
- # stage (static selection)
36
- curl -s "$BASE_URL/dashboard/solid-core/queue-health/variable-options/stage" \
37
- -H "Authorization: Bearer $TOKEN" | jq
38
-
39
- # ----------------------------------------------------------------------------
40
- # 3) Single Widget Data Endpoints
41
- # Expected: success envelope with .data.meta + .data.data
42
- # ----------------------------------------------------------------------------
43
-
44
- # KPI: total messages
45
- curl -s -X POST "$BASE_URL/dashboard/solid-core/queue-health/widgets/kpi-total-messages/data" \
46
- -H "Authorization: Bearer $TOKEN" \
47
- -H "Content-Type: application/json" \
48
- -d '{
49
- "variables": {
50
- "date": { "preset": "last_7_days" }
51
- }
52
- }' | jq
53
-
54
- # Line chart: messages over time
55
- curl -s -X POST "$BASE_URL/dashboard/solid-core/queue-health/widgets/chart-messages-over-time/data" \
56
- -H "Authorization: Bearer $TOKEN" \
57
- -H "Content-Type: application/json" \
58
- -d '{
59
- "variables": {
60
- "date": { "preset": "last_30_days" },
61
- "stage": ["succeeded", "failed"]
62
- }
63
- }' | jq
64
-
65
- # Table: recent failures
66
- curl -s -X POST "$BASE_URL/dashboard/solid-core/queue-health/widgets/table-recent-failures/data" \
67
- -H "Authorization: Bearer $TOKEN" \
68
- -H "Content-Type: application/json" \
69
- -d '{
70
- "variables": {
71
- "date": { "preset": "last_30_days" }
72
- }
73
- }' | jq
74
-
75
- # ----------------------------------------------------------------------------
76
- # 4) Batch Widget Data (subset)
77
- # Expected: .data.widgets[] with provider-backed results
78
- # ----------------------------------------------------------------------------
79
- curl -s -X POST "$BASE_URL/dashboard/solid-core/queue-health/data" \
80
- -H "Authorization: Bearer $TOKEN" \
81
- -H "Content-Type: application/json" \
82
- -d '{
83
- "widgetNames": [
84
- "kpi-total-messages",
85
- "kpi-failed-messages",
86
- "kpi-success-rate",
87
- "chart-stage-distribution"
88
- ],
89
- "variables": {
90
- "date": { "preset": "last_7_days" }
91
- }
92
- }' | jq
93
-
94
- # ----------------------------------------------------------------------------
95
- # 5) Batch Widget Data (all widgets)
96
- # Expected: all configured widgets execute in one call
97
- # ----------------------------------------------------------------------------
98
- curl -s -X POST "$BASE_URL/dashboard/solid-core/queue-health/data" \
99
- -H "Authorization: Bearer $TOKEN" \
100
- -H "Content-Type: application/json" \
101
- -d '{
102
- "variables": {
103
- "date": { "preset": "last_30_days" }
104
- }
105
- }' | jq
106
-
107
- # ----------------------------------------------------------------------------
108
- # 6) Layout Endpoints
109
- # Expected:
110
- # - GET returns defaultLayout and optional userLayout
111
- # - PUT stores user layout once dashboardUserLayout generated model is available
112
- # ----------------------------------------------------------------------------
113
-
114
- # Read layout
115
- curl -s "$BASE_URL/dashboard/solid-core/queue-health/layout" \
116
- -H "Authorization: Bearer $TOKEN" | jq
117
-
118
- # Save layout
119
- curl -s -X PUT "$BASE_URL/dashboard/solid-core/queue-health/layout" \
120
- -H "Authorization: Bearer $TOKEN" \
121
- -H "Content-Type: application/json" \
122
- -d '{
123
- "layoutJson": {
124
- "engine": "gridstack",
125
- "columns": 12,
126
- "items": [
127
- { "widgetId": "kpi-total-messages", "x": 0, "y": 0, "w": 3, "h": 2 }
128
- ]
129
- }
130
- }' | jq
131
-
132
- # ----------------------------------------------------------------------------
133
- # 7) Useful validation snippets
134
- # ----------------------------------------------------------------------------
135
-
136
- # Show only provider names from all-widgets batch response
137
- curl -s -X POST "$BASE_URL/dashboard/solid-core/queue-health/data" \
138
- -H "Authorization: Bearer $TOKEN" \
139
- -H "Content-Type: application/json" \
140
- -d '{"variables":{"date":{"preset":"last_30_days"}}}' | jq '.data.widgets[].meta.providerName'
141
-
142
- # Show only recent failure record sample
143
- curl -s -X POST "$BASE_URL/dashboard/solid-core/queue-health/widgets/table-recent-failures/data" \
144
- -H "Authorization: Bearer $TOKEN" \
145
- -H "Content-Type: application/json" \
146
- -d '{"variables":{"date":{"preset":"last_30_days"}}}' | jq '.data.data.records[0]'