This commit is contained in:
gsinghpal
2026-04-27 09:41:46 -04:00
parent f51976cb08
commit 66cfe5f97f
8 changed files with 348 additions and 161 deletions

View File

@@ -1206,6 +1206,28 @@ class FpShopfloorController(http.Controller):
c.get('date_deadline_iso') or FAR_FUTURE,
c.get('id') or 0,
))
# Cap urgency_pulse to top 3 critical cards per column
# (v19.0.24.10.0). With 267+ overdue cards across the board,
# 267 simultaneous infinite CSS keyframe animations were
# hammering the compositor and causing drag-drop stutter.
# Top 3 per column = ~30 active animations max, plenty
# visible, and the static red border on the card still
# signals "this one needs attention" for the rest.
critical_kept = 0
for c in cards:
if c.get('urgency_pulse'):
if critical_kept < 3:
critical_kept += 1
else:
c['urgency_pulse'] = False
# Flag every critical card so the template can apply a
# plain class instead of relying on the `:has()` CSS
# selector — `:has()` re-evaluates on every layout pass
# and was the real reason 56 second freezes happened
# during drag-drop on a busy board (v19.0.24.11.0).
c['is_urgent'] = c.get('urgency_band') in (
'hot', 'overdue', 'bake_risk',
)
# ---- Column order = recipe flow (v19.0.24.8.0) -------------------
# Old code ordered work centres by their `sequence, code, name`