D12 - the productivity factor, on the dashboard (was BL-023)
Nick's decision: 'find a spot on the dashboard.' The spot: an eighth metric
card beside Est./Actual hrs - actual/estimated to two decimals, green at or
under 1.0, red over. Both hour fields are optional (CR-017), so with nothing
to divide the card shows an em dash rather than vanishing: a metric that
disappears reads as 'no such measure', not 'nothing logged yet'. Server sums
(B4), the same m.est_hours/actual_hours its neighbours already render - zero
new fetches, and the card stays inside the block the metrics-failure path
skips, so an outage still shows the error panel and no cards.
aggregates_check gains the pin (16 -> 17): the card must equal the quotient
of the SERVER's sums, or the em dash when either sum is zero - derived, not
hardcoded. Backlog entry corrected in passing where it credited
/api/projects/{id}/summary with hour sums it never carried.
Items: D12 (decisions-2026-08-20.md), CR-017 read, B4 discipline.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3777,6 +3777,17 @@ function renderDashboard(){
|
||||
${card('Overdue', overdue, overdue?'dm-red':'', 'overdue')}
|
||||
${card('Est. hrs', Math.round(estH))}
|
||||
${card('Actual hrs', Math.round(actH))}
|
||||
${(()=>{
|
||||
// D12 (was BL-023): the productivity factor - actual against estimated,
|
||||
// the measure CR-017's tracking exists to enable. At or under 1.0 the
|
||||
// work beat the estimate (green); over it (red). Both hour fields are
|
||||
// optional, so with nothing to divide the card shows an em dash rather
|
||||
// than vanishing - a metric that disappears reads as "no such measure",
|
||||
// not "nothing logged yet". Server sums (B4), same as its neighbours.
|
||||
const pf = (estH > 0 && actH > 0) ? actH / estH : null;
|
||||
return card('Productivity (act/est)', pf === null ? '—' : pf.toFixed(2),
|
||||
pf === null ? '' : (pf <= 1 ? 'dm-green' : 'dm-red'));
|
||||
})()}
|
||||
</div>`;
|
||||
|
||||
// status + discipline breakdown chips (status chips also filter the board)
|
||||
|
||||
Reference in New Issue
Block a user