Commit Graph

9 Commits

Author SHA1 Message Date
3d52e0b79e perf(db): serve presses + downtime-reason texts from the shared reference cache
press_settings.presses and settings.downtime_reasons are re-read on every 12s
overview poll; route them through the kernel cached_select() TTL cache so they
stop consuming a shared-pool checkout each poll. Part of the gateway
connection-pool-saturation fix (see fastAPI/agent_docs/db-pool-relief.md).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 12:06:40 +02:00
360b049af9 fix(spa): reconnect spinner on connection loss, no demo data in prod
On a failed fetch the store now keeps the last real payload (stale > fake)
and flags `disconnected` instead of overwriting live data with bundled demo
data. Sample fallback is gated behind import.meta.env.DEV, so `vite build`
tree-shakes it out entirely (verified: no sample strings in dist).

- cold start / no data: centered reconnect spinner that keeps retrying
- data present + drop: stale data stays, header shows amber "reconnecting"
- polling retries faster (4s) while disconnected, recovers automatically
- sample.ts data moved into sampleOverview() so the module fully tree-shakes

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-09 09:20:20 +02:00
cc8a76cdef docs: README — data is wired to live MariaDB (was "currently SAMPLE")
The overview API reads live MariaDB since 2026-07-02; sample:true is only the
standalone dev fallback. Replaced the "wire it (TODO)" section with the live
column sources + resolved the notVerladen open question.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 11:14:22 +02:00
f36d3966ea chore: ignore Python bytecode (__pycache__) generated at gateway import
This repo is also a gateway page-module; the kernel imports its Python (__init__.py, api/routes.py, _db.py) at runtime, which writes __pycache__/*.pyc into the working tree. Matches the sibling temper_rejects module's .gitignore.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 10:46:01 +02:00
84253f7dcc @
feat(overview): Temperprozess rename, order-count badge, amber transit flow, brighter labels

- Rename line "Temper-Linie" → "Temperprozess" (tab title + i18n de/en)
- Per-press order display: chip row → single colored order-count badge (.ocount)
- New 5th flow colour --transit (amber) for "Auf dem Weg"; --way (cyan) reserved
  for cart/verladen; per-press amber arrows drop to the oven; header "Maschinenhalle"
- Brighter --ink-faint labels to match temper_rejects (dark #7f8b9a, light #4b586b)
- Grid width tweaks (col floor 96px, wrap max-width 1300px) + hide matrix scrollbar
- Rebuilt dist

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@
2026-07-02 20:42:54 +02:00
a24f7d2c1e feat(overview): bind whole-line board to live temper data
Replace the sample-data scaffold with real SQL, un-scoped across all
presses and scoped to one plant (PLANT_NAME env, default Cadolzburg).

- api/routes.py: press list from press_settings.presses; per-press
  good/chips from active_orders + rejects; run/stop/idle by cycle
  recency (cycles_new); stop note from downtimes + downtime_reasons;
  on-way / in-oven / finished carts + nicht-verladen from
  temper_tracking (live position derived IN SQL from planned times vs
  NOW(); reprint rows excluded so carts never double-count). Thin
  _fetch_* helpers (degrade to empty, never 500) + a pure _build_payload.
- Oven temperature omitted (no sensor feed): ovenTempC optional in the
  type, °C chip hidden in OvenBand.vue, coerced in ProductionLine.vue.
- Rebuilt dist/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 13:50:03 +02:00
bd9103c172 chore: use yarn (fleet standard) + declare vite devDependency
- Switch package manager from npm to yarn 1.22.22 (pinned via packageManager,
  matches PressV/sp-ui-kit): remove package-lock.json, add yarn.lock (v1).
- Add "vite" as an explicit devDependency. npm 7+ auto-installed it as a peer of
  @vitejs/plugin-vue / @tailwindcss/vite, which masked the missing declaration; a
  clean `yarn install` (no peer auto-install) needs it explicit or the tsc build
  fails to resolve 'vite' / 'vite/client'.
- README: npm -> yarn (+ `corepack enable`).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 09:06:20 +02:00
aa115a0b8d feat: scaffold Temper-Linie live-overview page-module (temper_overview)
Vue 3 + Vite 8 + TS + PrimeVue 4 (Nora/Industrial) + Pinia + vue-i18n SPA, served
by the SPRO gateway as a static page-module under /module/temper_overview and
embedded into Grafana via iframe.

- Ports the LOCKED design #4 "Shop-floor Schematic": one connected line
  Pressen -> (cyan) -> Ofen -> (green) -> Fertig; carts under their origin press;
  oven trays as dwell-progress bars; finished band; range picker scoping only the
  Fertig figures. Flow/order colours match PressV (fleet recognisability).
- Python page-module wrapper: register(app) mounts committed dist/ + a no-auth
  read API (GET /api/overview). Kernel DB seam in _db.py.
- Backend returns SAMPLE data; frontend falls back to bundled sample so `npm run
  dev` renders with zero backend (TODO markers point at the real temper aggregates).
- Rich README bakes in the design, contract, wiring + Grafana embedding for
  standalone development.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 20:41:04 +02:00
e1adb06815 Initial commit 2026-07-01 17:47:27 +00:00