Commit 8d88229
committed
feat(admin): the budget lever and the trend lines on the insights page (issue #181)
The page that prices everything now shows the one dial the operator
can actually turn, and trends read as lines.
- BUDGET PANEL, second from the top beside the headline spend:
reserved-vs-cap facts for the day/week/month job-slot windows and
the daily token counter, a decorative meter bar only when both
numbers are known (fill clamped at the track; overflow is the
WORD's job), the soft-hold band as an amber tick, and the lever
named. An overlay-unset cap is unknown/off with no bar and no
percentage; an unreachable queue leaves caps as facts plus a
banner; states are computed assembler-side with the worker's own
windowState (and the old token rule, >= cap) and ride the payload
as words the page never derives. readBudget gains the token
counter as a fourth plain GET and a synchronous junk-URL parse
guard (the readSchedulers failFast posture -- without it every
canned not-a-url test invocation burns the 2.5s timeout); GET-only
doctrine intact, CONST-BUDGET-BEFORE-TOKENS.
- LINE CHARTS: per-flow daily spend as SMALL MULTIPLES (one panel
per top flow, one shared dollar scale, identity carried by the
panel title -- the palette has one non-reserved data hue and
dashes already mean estimated), segments dashed wherever an
estimated day touches, floors marked, gap days on the baseline;
plus a cumulative mini-chart with its OWN scale under the daily
columns (a running total dwarfs daily bars; a second axis on one
plot is the dual-axis lie), demoted permanently from its first
estimated day, end-labelled with the running typed total.
- foldCosts gains dailyByFlow: the composite (day,flow) fold at the
loop buildDaily and buildByFlow already walk separately, gap-padded
per flow over the SHARED span, flowLabelOf extracted so the two
flow folds cannot drift.
Specs in the same PR: REQ-INSIGHTS-HTML-EXPORT gains clauses (g)/(h)
and the content list; REQ-SPEND-CAPS-MULTI-WINDOW,
REQ-TOKEN-ACCOUNTING-AND-CAPS, REQ-COST-ANALYTICS,
CONST-BUDGET-BEFORE-TOKENS, DES-ADMIN-VIA-PI-EXTENSION all UNCHANGED,
checked; DES-COST-FOLD-BY-SCAN amended for the series.
Suite green in the CI posture: 2192 tests, 0 skipped, live Valkey.
Headless-Chrome screenshot inspected: budget rows, soft-hold word and
tick, unknown-cap row barless, demoted cumulative, four multiples on
one scale.
Signed-off-by: Rob Boerman <robboerman@live.nl>1 parent 1e4e244 commit 8d88229
10 files changed
Lines changed: 742 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| |||
296 | 299 | | |
297 | 300 | | |
298 | 301 | | |
299 | | - | |
300 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
301 | 350 | | |
302 | 351 | | |
303 | 352 | | |
304 | | - | |
| 353 | + | |
305 | 354 | | |
306 | 355 | | |
307 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
| |||
1094 | 1097 | | |
1095 | 1098 | | |
1096 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1097 | 1149 | | |
1098 | 1150 | | |
1099 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
1100 | 1155 | | |
1101 | | - | |
| 1156 | + | |
1102 | 1157 | | |
1103 | 1158 | | |
1104 | 1159 | | |
| |||
1113 | 1168 | | |
1114 | 1169 | | |
1115 | 1170 | | |
1116 | | - | |
| 1171 | + | |
1117 | 1172 | | |
1118 | 1173 | | |
1119 | 1174 | | |
| |||
0 commit comments