From b44afa7672541f2c525058c218ddc87162aea0fc Mon Sep 17 00:00:00 2001 From: "n.siegfried" Date: Wed, 19 Aug 2026 13:05:56 -0700 Subject: [PATCH] T9.4 - S7: one sample-data affordance, confirmed, and fenced off the project Four affordances under three names became ONE: "Load sample data", on the creator's toolbar, at the far end of two separators from the live actions (New / Duplicate), pushed right with its own gap. It confirms through the T7.9 dialog, naming exactly what it does - and what it does not: "This page only: nothing is written to the project unless you then save." The probe verifies the fence the way the done-when demands - against a REAL project, reading the server's SOP and work-package list before and after and asserting byte-identical. Gone: the wizard's header "Load sample" (the dangerous one: it filled the state completeSOP() pushes to the LIVE project, one click, no confirm, no undo - reconciled with D1 exactly as the task records: the creator's control is the survivor, the wizard copy goes), the creator's split Sample SOP / Load example pair (now internals behind the one entry point), and the empty-state context bar's third button (its text now points at the toolbar control). The location/material "Load sample values" buttons stay: they fill a PASTE BOX that acts only through an explicit, dry-runnable import - a different thing, stated in the code. Probes re-pointed with reasons in place: frame_check's D1 toolbar list names the consolidated control; validation_check's sample-driven toast checks became the-affordance-is-gone checks (and its stale showAnalytics drive, orphaned by T7.10, became a the-duplicate-stays-gone check). Verification (each probe run alone): NEW tests/sample_check.py 10/10. Regressions: validation_check 77/77, frame_check 38/38, kitting_check 26/26, export_check 20/20, sections_check 95/95. Items: S7 (D1 reconciliation honored) Co-Authored-By: Claude Fable 5 --- docs/reference/file-map.md | 1 + html/work-package-suite-app.js | 95 ++---------------- html/work-package-suite.html | 1 - html/wp-creation-app.js | 16 +++- html/wp-creation-index.html | 15 +-- tests/frame_check.py | 4 +- tests/sample_check.py | 169 +++++++++++++++++++++++++++++++++ tests/validation_check.py | 67 ++++--------- 8 files changed, 221 insertions(+), 147 deletions(-) create mode 100644 tests/sample_check.py diff --git a/docs/reference/file-map.md b/docs/reference/file-map.md index 463c5ac..5871c2a 100644 --- a/docs/reference/file-map.md +++ b/docs/reference/file-map.md @@ -300,6 +300,7 @@ Wave 9 adds these: ```bash python tests/export_check.py # CR-008/CR-017 - export walk + hours guard 20 checks +python tests/sample_check.py # S7 - one sample affordance, confirmed+fenced 10 checks ``` **Three probes were re-pointed at `T7.1`.** `sections_check.py` 5b drove the live diff --git a/html/work-package-suite-app.js b/html/work-package-suite-app.js index 74b14df..74a5e31 100644 --- a/html/work-package-suite-app.js +++ b/html/work-package-suite-app.js @@ -391,95 +391,14 @@ function initializeWPTypes(){ } // ── LOAD SAMPLE DATA ────────────────────────────────────────────────────────── -// This page's sample is the sample SOP. It used to reach into the frame and call -// the creator's loadExample() when the WP tab was open; the creator is its own -// page since T7.1 and carries its own sample controls in its toolbar (D1), so -// there is nothing to reach into and nothing to duplicate here. -// -// S7 still counts more sample affordances than it should. T9.4 reduces them; this -// task only stops one of them pretending to belong to a document it is not in. -function loadSampleData(){ - if(currentTool && currentTool !== 'sop'){ - wizardToast('The work package sample is on the Work Package Creation page, in its toolbar.', - {role: 'status'}); - return; - } - // Populate Step 1 - document.getElementById('proj_name').value = 'MICRON_PH1_CUP_HPM_FMCS INSTALL'; - document.getElementById('proj_number').value = '26-67-008'; - document.getElementById('proj_client').value = 'Micron Technology, Inc.'; - document.getElementById('proj_division').value = 'Semiconductor'; - document.getElementById('proj_site').value = 'Boise, ID — Fab 7'; +// Removed at T9.4 (S7). This was the affordance one click from live project +// data: it filled the wizard state that completeSOP() pushes to the PROJECT, +// with no confirm and no undo. The suite's one sample control lives on the +// creator's toolbar, where it fills that page only. The location and material +// list steps keep their "Load sample values" buttons - those fill a PASTE BOX +// that acts only through an explicit, dry-runnable Import, which is a +// different thing from loading sample data into a live configuration. - // Populate Step 2. The leadership slots are account pickers now, so the sample's - // fictional names can't be "selected" — setting .value on a