Commit f4aee81
feat(spec): blueprint dashboard widget
* feat(spec): blueprint dashboard widget `condition` slot (threshold/status filter)
A widget whose title restricts WHICH records it counts — "库存低于10的备件预警",
"overdue work orders", "金额超过 2000" — has no way to say so: the `measure`/
`groupBy` slots choose the NUMBER and the axis, not the row set. So the builder
emits a plain count and a "low stock" card counts EVERY part.
Add an optional `condition {field, op, value}` (op ∈ lt|lte|gt|gte|eq|ne) to the
blueprint widget — lenient + strict variants — that the builder compiles to the
framework widget's presentation-scope `filter` (runtimeFilter). Kept to a single
comparison so the model emits it reliably and a bad guess can be dropped rather
than producing an empty card.
Pairs with the cloud dashboardBody mapping + prompt guidance (separate PR).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* test(spec): cover widget `condition` in strict mirror + refresh api-surface
The strict SolutionBlueprintStrictSchema makes every widget key required-present
(nullable for optionality), so the new `condition` slot must appear in the strict
widget fixtures — one null, one a real {field,op,value}. Regenerate api-surface.json
to register the new BlueprintWidgetCondition export.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>condition slot (threshold/status filter) (#2381)1 parent ce0b4f6 commit f4aee81
3 files changed
Lines changed: 28 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1731 | 1731 | | |
1732 | 1732 | | |
1733 | 1733 | | |
| 1734 | + | |
| 1735 | + | |
1734 | 1736 | | |
1735 | 1737 | | |
1736 | 1738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | | - | |
| 227 | + | |
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | | - | |
| 235 | + | |
| 236 | + | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
66 | 79 | | |
67 | 80 | | |
68 | 81 | | |
| |||
76 | 89 | | |
77 | 90 | | |
78 | 91 | | |
| 92 | + | |
| 93 | + | |
79 | 94 | | |
80 | 95 | | |
81 | 96 | | |
| |||
205 | 220 | | |
206 | 221 | | |
207 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
208 | 229 | | |
209 | 230 | | |
210 | 231 | | |
| |||
0 commit comments