diff --git a/docs/reference/baseline/admin-1440.png b/docs/reference/baseline/admin-1440.png index da50651..2746893 100644 Binary files a/docs/reference/baseline/admin-1440.png and b/docs/reference/baseline/admin-1440.png differ diff --git a/docs/reference/baseline/admin-390.png b/docs/reference/baseline/admin-390.png index e87eac1..d5c9738 100644 Binary files a/docs/reference/baseline/admin-390.png and b/docs/reference/baseline/admin-390.png differ diff --git a/docs/reference/baseline/creator-1440.png b/docs/reference/baseline/creator-1440.png index 97da56d..8b0840e 100644 Binary files a/docs/reference/baseline/creator-1440.png and b/docs/reference/baseline/creator-1440.png differ diff --git a/docs/reference/baseline/creator-390.png b/docs/reference/baseline/creator-390.png index 7f8b12a..8593b18 100644 Binary files a/docs/reference/baseline/creator-390.png and b/docs/reference/baseline/creator-390.png differ diff --git a/docs/reference/baseline/sop-1440.png b/docs/reference/baseline/sop-1440.png index 49fdcca..9127e3d 100644 Binary files a/docs/reference/baseline/sop-1440.png and b/docs/reference/baseline/sop-1440.png differ diff --git a/docs/reference/baseline/sop-390.png b/docs/reference/baseline/sop-390.png index d4adcb2..eb011d6 100644 Binary files a/docs/reference/baseline/sop-390.png and b/docs/reference/baseline/sop-390.png differ diff --git a/docs/reference/file-map.md b/docs/reference/file-map.md index 54e6428..b8da100 100644 --- a/docs/reference/file-map.md +++ b/docs/reference/file-map.md @@ -283,7 +283,9 @@ python tests/triage_check.py # A6 - the sidebar answers the stand-up python tests/qa_gate_check.py # CR-014/D2/D9/D10 - QA gate + capture sink 41 checks python tests/files_check.py # CR-007/D8 - drawings upload + real offline 36 checks python tests/sticky_bar_check.py # B6 - save reachable on every wizard step 12 checks -python tests/usage_check.py # D5 - one analytics core, admin report 15 checks +# tests/usage_check.py (D5) removed at T11.6 - it tested the per-browser +# analytics core and admin report, both retired in favour of CR-019's +# server-side Activity & usage card (see docs/waves/decisions-2026-09-17.md). python tests/creator_dialogs_check.py # S1 creator - 0 natives, errors at fields 20 checks ``` diff --git a/docs/waves/wave-11.md b/docs/waves/wave-11.md index 6a8d656..2e0b91b 100644 --- a/docs/waves/wave-11.md +++ b/docs/waves/wave-11.md @@ -192,13 +192,37 @@ records before deciding — do not assume from this file alone). **Do not:** leave the old panel in place "just in case." Two activity reports showing two different numbers is worse than one. +**Decision (2026-09-23):** `wp-usage.js` is removed, not kept — it had no +reader left once the admin panel above it was removed (the "download the +full event log" button lived only in that panel), and per the original +decision record it was never reliably tied to a real identity, so it was +never a candidate source for the new report either. The file itself and its +three ` diff --git a/html/admin.js b/html/admin.js index e1a5934..4ba4f33 100644 --- a/html/admin.js +++ b/html/admin.js @@ -25,7 +25,6 @@ function reveal(){ loadComments(); loadAudit(); loadActivity(); - loadUsage(); } function showDenied(){ document.getElementById('admin-denied').style.display=''; @@ -754,48 +753,6 @@ async function loadNotifications(){ '').join('')+''; } -// ── usage logs (read from this browser's localStorage) ────────────────────────── -// D5 / T7.10: the report for BOTH tools' recorded usage, in the one place an -// operator-facing readout belongs - behind the same admin gate as this whole -// page (gateByRole() below shows nothing else either). Data comes from -// wp-usage.js, the single implementation; the keys predate the move, so -// everything recorded before it is still here. -function loadUsage(){ - const box = document.getElementById('usage-admin'); - if(!box) return; - const tools = [ - ['Work package creator', WPUsage.KEYS.creator, 'wp-iwp-usage'], - ['SOP wizard', WPUsage.KEYS.wizard, 'wp-suite-usage'], - ]; - let html = ''; - tools.forEach(([label, key, prefix]) => { - const evs = (WPUsage.load(key).events) || []; - html += '

' + uesc(label) + '

'; - if(!evs.length){ - html += '
No usage recorded in this browser yet.
'; - return; - } - const byEvent = {}, sessions = new Set(); - let first = evs[0].ts, last = evs[0].ts; - evs.forEach(e => { - byEvent[e.event] = (byEvent[e.event]||0)+1; - if(e.session) sessions.add(e.session); - if(e.ts < first) first = e.ts; if(e.ts > last) last = e.ts; - }); - const fmt = v => v ? wpFormatDateTime(v) : '—'; - html += ''+ - ''+ - ''+ - '
Sessions'+sessions.size+'
Events'+evs.length+'
Range'+fmt(first)+' → '+fmt(last)+'
'; - html += ''; - Object.keys(byEvent).sort().forEach(k => html += ''); - html += '
EventCount
'+uesc(k)+''+byEvent[k]+'
'; - html += '
'; - }); - box.innerHTML = html; -} - // ── access control: admins only ───────────────────────────────────────────────── // auth-guard.js requires a login and sets window.WP_USER (firing 'wp-auth-ready'). // Show the console for admins; otherwise show the "Admins only" notice. diff --git a/html/work-package-suite-app.js b/html/work-package-suite-app.js index 4829511..34af900 100644 --- a/html/work-package-suite-app.js +++ b/html/work-package-suite-app.js @@ -2207,20 +2207,18 @@ function loadStepComments(){ } } -// ── USAGE ANALYTICS ───────────────────────────────────────────────────────── -// Lightweight usage analytics stored in localStorage so the tool owner can review -// engagement over time. No field VALUES are stored (field-edit events record only -// the field id), keeping captured data non-sensitive. -// D5 / T7.10: the analytics implementation lives in wp-usage.js and the report -// on the admin console. The wizard's own copy of showAnalytics() never had a -// caller here - the button lived on the creator - and once B7 dissolved the -// frame the duplicate sat in the same document as five colliding globals. -// This page only records; dwell tracking keeps its page-local state below. +// ── USAGE ANALYTICS (retired, T11.6) ──────────────────────────────────────── +// This used to write to wp-usage.js's per-browser localStorage log (D5/T7.10), +// read back by the admin console's old "Usage logs" panel. CR-019 replaced +// both with real, server-side, per-user activity (UsageEvent + the Activity & +// usage card) - see decisions-2026-09-17.md for why this per-browser data was +// never a source the new report could adopt. track() is now a no-op; kept +// (rather than deleting its handful of call sites, including the dwell-timer +// plumbing below) so this stays a one-line change instead of touching every +// caller for the same outcome. let _stepEnter = Date.now(); -function track(event, detail){ - WPUsage.track(WPUsage.KEYS.wizard, event, detail); -} +function track(event, detail){ /* retired, T11.6 — see comment above */ } function trackStepDwell(){ const ms = Date.now() - _stepEnter; if(ms > 400 && ms < 1000*60*60) track('step_dwell', {step: currentStep, ms}); diff --git a/html/work-package-suite.html b/html/work-package-suite.html index 29146de..cbd53d1 100644 --- a/html/work-package-suite.html +++ b/html/work-package-suite.html @@ -11,7 +11,6 @@ - diff --git a/html/wp-creation-app.js b/html/wp-creation-app.js index 61c3797..40f762d 100644 --- a/html/wp-creation-app.js +++ b/html/wp-creation-app.js @@ -3993,11 +3993,17 @@ function openSopModal(){ document.getElementById('sop-modal').classList.add('open'); track('view_sop'); } function closeSopModal(){ document.getElementById('sop-modal').classList.remove('open'); } -// D5 / T7.10: the analytics implementation lives in wp-usage.js - ONE copy for -// the whole suite - and its report lives on the admin console, where an -// operator-facing readout belongs. This page only records. Same key, same -// event shape: everything recorded before the move is still readable after it. -function track(event,detail){ if(devMode) return; WPUsage.track(WPUsage.KEYS.creator, event, detail); } +// CR-019 / T11.6 (2026-09-23): this used to write to wp-usage.js's per-browser +// localStorage log (D5/T7.10). Retired along with the admin console's old +// "Usage logs" panel, its only reader - real, server-side, per-user activity +// now exists (UsageEvent, the Activity & usage card, T11.1-T11.5) and this +// data was never reliably tied to a real identity anyway, so it was not a +// source the new report could adopt (decisions-2026-09-17.md). track() stays +// as a no-op rather than deleting its ~35 call sites throughout this file: +// removing every call individually is a much larger, riskier diff for the +// same outcome, and a call site here still documents the moment worth +// recording if usage analytics are ever rebuilt server-side. +function track(event,detail){ /* retired, T11.6 — see comment above */ } // ── COMMENTS ───────────────────────────────────────────────────────────────── const COMMENTS_KEY='wp_iwp_comments_v1'; diff --git a/html/wp-creation-index.html b/html/wp-creation-index.html index 6483cbf..3da788b 100644 --- a/html/wp-creation-index.html +++ b/html/wp-creation-index.html @@ -11,7 +11,6 @@ -