TotalApp Docs

Production Counters

Real-time shop-floor KPI dashboard tracking target, actual, scrap, and OEE metrics with 5-second auto-refresh.

Quick Start

1. Select Date
2. Pick Active Shift
3. View Live KPIs
4. Monitor Work Orders
5. Export if Needed
  1. Navigate to Manufacturing → Production Counters from the sidebar.
  2. Use the date picker in the filter bar to select the production date (defaults to today).
  3. Click a shift pill (Day Shift, Evening Shift, or Night Shift) to select the shift. Only active shifts appear.
  4. The dashboard loads immediately — KPI tiles, OEE bars, hourly chart, and work-orders table all populate from the dispatch logs for that date/shift combination.
  5. Data auto-refreshes every 5 seconds. The green pulse dot in the header confirms the refresh is running.
  6. Click Export to download a JSON snapshot of the current summary.
  7. Click Shifts to open Shift Definitions and configure start/end times, break minutes, or active status.

Auto-Refresh

The screen polls fetchProductionSummary(date, shiftId) every 5 seconds without a full page reload. If you need an immediate refresh, click the Refresh button in the toolbar — it triggers a full reload of both the summary and the shift list.

KPI Tiles

The four headline tiles at the top of the dashboard summarise production performance for the selected shift and date.

Tile Value Colour logic Sub-label
Target Qty Sum of all work-order target quantities for this shift Always neutral Today / Shift
Produced Sum of all produced quantities from dispatch logs Green % of target achieved
Produced (below target) Amber % of target achieved
Scrap Sum of all scrap quantities from dispatch logs Red when > 5% of produced % scrap rate
OEE Availability × Performance × Quality / 100 Green ≥ 85%, Amber ≥ 70%, Red < 70% A:x% P:x% Q:x%

OEE Breakdown

Below the KPI tiles, three animated progress bars show the individual components of OEE — each with its own colour-coded value and description.

Component Formula Description
Availability (Planned minutes − Downtime) ÷ Planned minutes × 100 Planned minutes = shift duration − break minutes (default 480 − break)
Performance min(100, Produced ÷ Target × 100) Capped at 100% — cannot exceed target artificially
Quality Produced ÷ (Produced + Scrap) × 100 Good-parts ratio — 100% when there is no scrap
OEE A × P × Q ÷ 10 000 World-class target: ≥ 85%

Tip

Downtime minutes are accumulated from the Dispatch Logs attached to each work order. To reduce downtime in OEE calculations, log downtime events accurately in the Shop Floor Monitor screen.

Hourly Production Chart

The SVG bar chart divides the shift into 8 hourly buckets. The hour labels are anchored to the selected shift's start time — so Day Shift (06:00) shows 06:00–13:00, Evening Shift (14:00) shows 14:00–21:00, and Night Shift (22:00) shows 22:00–05:00.

  • Target bars (indigo dashed outline) — the expected output per hour.
  • Actual bars (solid fill) — green when at or above target, amber when ≥ 80% of target, red when below 80%.
  • Hour labels automatically shift when you select a different shift — no manual reconfiguration needed.

Work Orders in Progress

The table at the bottom lists every work order scheduled for the selected shift. Each row shows real-time progress computed from dispatch logs.

Column Description
Work OrderWork order number in monospace font
Target QtyPlanned quantity for this work order in this shift
ProducedTotal produced units from dispatch logs
RemainingTarget − Produced (floored at 0)
ProgressAnimated bar + percentage; green ≥ 85%, amber ≥ 70%, red below 70%
DowntimeAccumulated downtime in minutes from all dispatch logs for this WO
StatusOn Track when progress ≥ 80%; ⚠ Behind Schedule otherwise

When no work orders are scheduled for the selected shift and date, the table shows an empty state message. This is expected for future dates or inactive shifts.

Shift Management

Click the Shifts button in the header to open the Shift Definitions modal. You can configure up to three built-in shifts.

Field Description
Shift nameRead-only — Day Shift, Evening Shift, Night Shift
ActiveCheckbox — inactive shifts are hidden from the shift filter pills on the main screen
StartShift start time in HH:MM (24-hour format)
EndShift end time in HH:MM (24-hour format)
Break (min)Total break minutes — subtracted from planned duration when computing Availability

Active Shift Auto-Reset

If you deactivate the currently-selected shift and save, the dashboard automatically switches to the first remaining active shift. The inactive shift is also removed from the shift filter pills so it cannot be accidentally re-selected.

Changes are saved to the tenant-scoped manufacturing-counters.json file and persist across page refreshes and sessions.

Exporting Production Data

Click Export in the header toolbar to download the current production summary as a JSON file. The Export button is disabled while the data is still loading.

File contents

  • exportedAt — ISO 8601 timestamp of when the export was triggered
  • date — the selected production date (YYYY-MM-DD)
  • shift — full shift definition object (id, name, start, end, break, active)
  • summary — complete ProductionSummary including all KPIs, OEE components, individual work-order counters, and the hourly chart data array

Filename format

production-summary-YYYY-MM-DD-shift_id.json — for example production-summary-2026-06-19-shift_day.json

Snapshot Behaviour

The export captures the state of the summary at the moment you click the button. If you want the freshest data, click Refresh first, then Export.

Appearance

Production Counters supports both TotalApp screen styles, switchable from Settings → Appearance → Screen Style.

Style Look When to use
Workstation (default) Dark terminal glass — blurred panels, primary borders, ghost buttons Internal operations teams, shop-floor monitors on dark displays
Enterprise Light corporate — white cards, slate borders, filled buttons Client-facing dashboards, printed reports, management review sessions

Both the main screen and the Shift Definitions modal switch together — no manual per-modal configuration is needed.

AI Assistant

Click the vertical AI Assistant tab on the right edge of the screen (or the Sparkles toggle) to open a chat panel over the dashboard. Production Counters is a live shift dashboard, not a record-editing table — the assistant is scoped to dashboard-style capabilities only. It narrates and explains the current shift's target/produced/scrap quantities, the live OEE breakdown (Availability, Performance, Quality), and the list of work orders currently behind schedule with their downtime minutes. It never edits, creates, or deletes production data, work orders, or shift records.

  • Executive summary — a plain-language readout of the current shift's standing: whether the shift is on track to hit target, and why, grounded in the actual target/produced/scrap numbers and OEE breakdown on screen.
  • Root cause & anomaly detection — when scrap rate or an OEE sub-metric looks off, or specific work orders are behind schedule, the assistant explains which factor is driving it and names the affected work order(s) by number.
  • Recommendations — turns an observed weak spot into a concrete, quantified suggestion (e.g. reassigning a line, investigating a downtime cause), referencing the actual numbers rather than generic advice.

Every reply can be saved with the Save as Report button, which stores it in My Reports. The panel respects the Writer Engine selected in Settings → Agentic (Local CLI, Hosted API, Local LLM, or Ollama) — Ollama and other local/in-browser engines run entirely on your own machine and never proxy through the server.

FAQ

Why are no work orders showing in the table?
The table only shows work orders that have a Production Target entry for the selected date and shift. If no targets have been scheduled for that combination, the table shows an empty state. Check Production Scheduling to ensure targets are assigned to the correct date and shift.
Why is the OEE showing 100% / unusually high?
If no dispatch logs exist for the shift yet, both produced and scrap are zero, so Quality = 100% and Performance = 100%. Only Availability will be less than 100% if downtime is logged. Once actual production is recorded in the Dispatch module, OEE will reflect real performance.
How does downtime get into the counters?
Downtime minutes are read from the Dispatch Logs table — the same logs that record produced and scrap quantities. Each dispatch log entry has a downtimeMinutes field. Logs are typically created by the Shop Floor Monitor screen when an operator records a production event.
Can I deactivate a shift without losing its data?
Yes. Deactivating a shift hides it from the shift filter pills and prevents it from being selected, but does not delete the shift definition or any historical data associated with it. You can reactivate the shift at any time from Shift Definitions.
Does the auto-refresh pause when I'm not looking at the screen?
The auto-refresh timer runs as long as the Production Counters screen is mounted in the DOM. If you navigate away in TotalApp (the screen is hidden with display:none rather than unmounted), the timer continues to fire but results are stored silently in state — the display updates instantly when you return to the screen.
The hourly chart always shows 06:00 — is that a bug?
In earlier versions, the hour labels were hardcoded to start at 06:00. This is now fixed — the chart anchors its hour labels to the selected shift's Start time. If you see incorrect labels, make sure the shift's Start time is correctly configured in Shift Definitions.
What does the amber "Selected shift is inactive" notice mean?
It appears when the shift that is currently being viewed was deactivated since the last page load (for example, by another user changing settings). The screen still shows the last fetched data for that shift, but the shift no longer appears in the active pill filter. Selecting an active shift removes the notice.
Does the AI Assistant edit my production data?
No — it only narrates and explains the numbers already on screen (target/produced/scrap, OEE breakdown, work orders behind schedule). It never creates, edits, or deletes any production data, work order, or shift record. All record changes still go through Dispatch, Shift Definitions, or the relevant editing screen.
Can I keep a copy of an AI Assistant answer?
Yes. Click Save as Report on any assistant reply to store it in My Reports, so an executive summary or root-cause explanation from a specific shift can be referenced later without re-asking the assistant.