Files
a.williamson 4b07272556 Heatmap drill-down to Journal, layout fixes, healthy-plant sim mode (B grade)
Heatmap -> Journal drill-down (PrimeBAT only):
- clicking an Activations-by-hour/day cell jumps to the Journal filtered to
  that recurring day-of-week + hour (new query.filterDow/filterHour session
  props; same local-time bucketing as calc.heatmap)
- Journal shows a "Time filter: Thu 12:00-12:59" chip with an X to clear;
  filter composes with existing filters and is included in CSV export
- getJournalPage clamps out-of-range pages when a filter shrinks the set

Layout:
- filter bar moved below the tab strip so the tabs no longer shift when the
  bar hides on Overview (tab bar y verified pixel-stable across tabs)
- popup titles (AlarmDetail/EventDetail) auto-shrink their font to fit long
  source paths on one line without colliding with the state/priority chips

Alarm health -> B (score ~88):
- alarmsim gains a MODE flag: "healthy" (default) generates ~12 activations/hr
  with an 80/15/5 priority mix and no chatter/standing/fleeting/floods;
  "chaos" restores the original stress profile
- SimHarness gains a SimReset one-shot timer (disabled) that clears all sim
  tags; probe P3 reports health-grade ground truth for the 8h window
- Dashboard onStartup now re-anchors relative range presets (4h/8h/24h/7d)
  to now on session start - fixes stale Designer-baked startMs/endMs pinning
  every new session to an old window

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 09:27:47 -05:00

331 lines
8.6 KiB
JSON

{
"custom": {},
"events": {
"system": {
"onStartup": {
"config": {
"script": "\tq = self.session.custom.PrimeControls.query\n\tspans = {'4h': 4, '8h': 8, '24h': 24, '7d': 168}\n\tpreset = q.rangePreset\n\tnow = system.date.toMillis(system.date.now())\n\tif preset in spans:\n\t\t# relative presets re-anchor to now on every session start\n\t\tq.endMs = now\n\t\tq.startMs = now - spans[preset] * 3600 * 1000\n\telif not q.startMs or q.startMs == 0:\n\t\tq.endMs = now\n\t\tq.startMs = now - 8 * 3600 * 1000\n\t\tq.rangePreset = '8h'"
},
"scope": "G",
"type": "script"
}
}
},
"params": {},
"propConfig": {
"custom.bundle": {
"binding": {
"config": {
"expression": "{session.custom.PrimeControls.query.refreshToken} + '|' + {session.custom.PrimeControls.query.startMs} + '|' + {session.custom.PrimeControls.query.endMs}"
},
"transforms": [
{
"code": "\tq = self.session.custom.PrimeControls.query\n\tif not q.startMs or not q.endMs:\n\t\treturn None\n\treturn PrimeControls.alarms.getDashboardBundle(q.startMs, q.endMs, {'priorities': list(q.priorities), 'areas': list(q.areas), 'states': list(q.states), 'search': q.search})",
"type": "script"
}
],
"type": "expr"
}
}
},
"props": {
"defaultSize": {
"height": 900,
"width": 1600
}
},
"root": {
"children": [
{
"meta": {
"name": "header"
},
"position": {
"basis": "150px",
"shrink": 0
},
"propConfig": {
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
}
},
"props": {
"path": "PrimeControls/Shell/Header"
},
"type": "ia.display.view"
},
{
"children": [
{
"meta": {
"name": "tabBtn0"
},
"position": {
"basis": "140px",
"shrink": 0
},
"props": {
"params": {
"index": 0,
"title": "Overview"
},
"path": "PrimeControls/Components/TabButton"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "tabBtn1"
},
"position": {
"basis": "140px",
"shrink": 0
},
"props": {
"params": {
"index": 1,
"title": "Analysis"
},
"path": "PrimeControls/Components/TabButton"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "tabBtn2"
},
"position": {
"basis": "140px",
"shrink": 0
},
"props": {
"params": {
"index": 2,
"title": "Bad Actors"
},
"path": "PrimeControls/Components/TabButton"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "tabBtn3"
},
"position": {
"basis": "140px",
"shrink": 0
},
"props": {
"params": {
"index": 3,
"title": "Journal"
},
"path": "PrimeControls/Components/TabButton"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "tabBar"
},
"position": {
"basis": "42px",
"shrink": 0
},
"props": {
"style": {
"borderBottomColor": "var(--neutral-40)",
"borderBottomStyle": "solid",
"borderBottomWidth": "1px"
}
},
"type": "ia.container.flex"
},
{
"meta": {
"name": "filterBar"
},
"position": {
"basis": "auto",
"shrink": 0
},
"propConfig": {
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
},
"position.display": {
"binding": {
"config": {
"expression": "{session.custom.PrimeControls.ui.selectedTab} != 0"
},
"type": "expr"
}
}
},
"props": {
"path": "PrimeControls/Shell/FilterBar",
"style": {
"minHeight": "56px"
}
},
"type": "ia.display.view"
},
{
"children": [
{
"meta": {
"name": "tabOverview"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{session.custom.PrimeControls.ui.selectedTab} = 0"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
}
},
"props": {
"path": "PrimeControls/Tabs/Overview"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "tabAnalysis"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{session.custom.PrimeControls.ui.selectedTab} = 1"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
}
},
"props": {
"path": "PrimeControls/Tabs/Analysis"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "tabBadActors"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{session.custom.PrimeControls.ui.selectedTab} = 2"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
}
},
"props": {
"path": "PrimeControls/Tabs/BadActors"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "tabJournal"
},
"position": {
"grow": 1
},
"propConfig": {
"position.display": {
"binding": {
"config": {
"expression": "{session.custom.PrimeControls.ui.selectedTab} = 3"
},
"type": "expr"
}
},
"props.params.bundle": {
"binding": {
"config": {
"path": "view.custom.bundle"
},
"type": "property"
}
}
},
"props": {
"path": "PrimeControls/Tabs/Journal"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "tabContent"
},
"position": {
"grow": 1
},
"props": {
"direction": "column"
},
"type": "ia.container.flex"
}
],
"meta": {
"name": "root"
},
"props": {
"direction": "column",
"style": {
"classes": "PrimeControls/PageBg",
"gap": "10px"
}
},
"type": "ia.container.flex"
}
}