Phase 8: Project Management, find bar, presence and motion
ci / frontend (push) Successful in 43s
ci / server (push) Successful in 11m6s
ci / image (push) Successful in 38s
ci / e2e (push) Successful in 3m55s

The Project Management screen (/pm, view only) with Overview, Projects & units, Bottlenecks & aging, Hours vs target,
Quality & issues and Find jobs, the period picker, health per unit and per project, drill down, Excel (CSV) per table
and for all, and the PESCO production status report PDF with the controlled-copy stamp; every export logged as
"report exported". The find bar on every home screen: the full search set, the dropdowns, quick flags with Mine, the
flag kinds, Board and List with sorts, filters saved per browser; every filter applied by the server on the list and
the boards, with facets. Presence in packets with role, lock and revoke drop; the motion switch with reduced motion
honoured, card glides, glow and count-up; Back restores the scroll spot; sheet placement and the iPad layout pass. The
data book compared page by page with the old build and six layout differences fixed. Tests for the PM aggregates,
search, filters, presence and exports; Playwright scenarios for the PM screen, the find bar and presence at desktop and
iPad viewports. Docs updated; PLAN.md questions 38 to 42.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
2026-10-18 15:08:34 -06:00
co-authored by Claude Fable 5.1
parent 904437153d
commit 6b6db0230f
90 changed files with 10450 additions and 563 deletions
+26
View File
@@ -5,6 +5,7 @@ The colours, the page frame and the address lines are the old databook.js values
from __future__ import annotations
import math
import re
from dataclasses import dataclass, field
from datetime import UTC, date, datetime
@@ -148,6 +149,31 @@ def fmt_clock(ms: Any) -> str:
return f"{t // 3600}:{t % 3600 // 60:02d}"
def _hms(ms: Any) -> tuple[int, int, int]:
try:
t = max(0, int(ms or 0) // 1000)
except (TypeError, ValueError):
t = 0
return t // 3600, t % 3600 // 60, t % 60
def fmt_clock_hms(ms: Any) -> str:
"""Elapsed milliseconds as the old fmtClock(): HH:MM:SS, zero padded (the weld record's time recorded)."""
h, m, s = _hms(ms)
return f"{h:02d}:{m:02d}:{s:02d}"
def fmt_clock_hhmm(ms: Any) -> str:
"""Elapsed milliseconds as HH:MM, zero padded (the cover's weld time, the old fmtClock().slice(0,5))."""
h, m, _s = _hms(ms)
return f"{h:02d}:{m:02d}"
def round_half_up(x: float) -> int:
"""JavaScript's Math.round for positive numbers: 8.5 gives 9 (Python's round gives 8)."""
return math.floor(x + 0.5)
# ---------------------------------------------------------------- dates