Files
a.williamson d353c5001e Data seeding, filter overhaul, UI scaling fixes, sanitized AlarmAnalysis copy
Data & simulation:
- simulation_tags.json: re-prioritize 10 tags to Medium so all four
  priorities appear in live data (backfilled journal history to match)
- SimHarness probe P2: ack-user/includeData ground truth + filtered-bundle
  verification against the live journal

Data layer (PrimeControls.calc/alarms):
- filters now drive every metric: queryStatus rows (Active Now/Unacked/
  Standing) filtered via calc.apply_status_filters; event_count counts only
  filtered instances (per-instance n_events); dropdown options enumerate
  unfiltered data so choices never collapse
- build_bundle refactored into _assemble(); when filters are active an
  unfiltered mirror is attached as bundle.overview - the Overview tab stays
  a plant-wide summary while all other consumers bind filtered sections
- _fetch_journal now honors includeData (required for ackUserName; without
  it ack attribution is always None); enabled for journal rows + source
  detail so Top Ack Users and the Ack By column populate

FilterBar/Dashboard:
- root-cause fix: bidirectional bindings never wrote dropdown selections
  back to session props, so filters silently did nothing; Apply now pulls
  values directly from the sibling controls, Clear resets both
- multi-select dropdowns cap at 280px and wrap chips; filter bar row is
  auto-height so wrapped chips push tabs down instead of overlapping
- filter bar hidden on the Overview tab (not applicable there)

UI scaling:
- Header: Prime logo added; KpiCard compacted to fit the 71px KPI row
  (basis-95% overflow fix, chip hugs text, embeds clipped) - no scrollbars
- Overview timeline: thinned x labels (minDistance 140), labels anchored
  below the axis, smaller legend markers
- Bad Actors focus chip shows the full source string with the clear X
- popup repeaters (Daily Activity, ScoreBars) no longer overflow
  (useDefaultViewWidth/Height off, taller strip); 5px table cell padding

Tooling/tests:
- lint_project.py: accept propConfig params.* as param declarations
  (Designer saves strip null params entries)
- tests: 31 -> 34 (status-filter semantics, overview mirror, filtered
  event counts)
- .gitignore: runtime churn (valueStore.idb, local-system-properties,
  migration logs, thumbnails, .schemas)

New project: AlarmAnalysis - submission copy of PrimeBAT with client-visible
Prime Controls branding removed (logo, subtitle, project title, shift report
heading); PrimeControls organizational namespaces retained per spec.

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

331 lines
8.4 KiB
JSON

{
"custom": {},
"events": {
"system": {
"onStartup": {
"config": {
"script": "\tq = self.session.custom.PrimeControls.query\n\tif not q.startMs or q.startMs == 0:\n\t\tnow = system.date.toMillis(system.date.now())\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"
},
{
"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": "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"
},
{
"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"
}
}