From 3f8610ad622b39dbb3d4d698affa5177d1feed74 Mon Sep 17 00:00:00 2001 From: Matthew Paver <30728931+MatthewPaver@users.noreply.github.com> Date: Wed, 28 Oct 2026 13:21:29 +0000 Subject: [PATCH 1/3] fix(ui): plain schedule terms, one example entry and finding-first review - Explain jargon on first use and keep it consistent: schedule files (XER), links between tasks, spare time before the finish moves (float), and the person or board who approves changes. - One name for the example entry everywhere: "Try the example project" in the header, hero and closing section; the guide is "Try the example project with a guide". - In a review, "Review the first finding" is the primary action until a finding is opened; then "Record the decision" becomes primary. - Headings are one plain statement each and fit two lines at 1440, 768 and 390; the "+73 days" label is set in ink with a blue arrow. - Pressed feedback on buttons (none under reduced motion), tabular figures, named form fields, 12px floor on review cards. - GMPP explorer keeps its page and gains a top link to the schedule change review. - Asset and browser tests and DESIGN.md updated for the new copy. Co-Authored-By: Claude Opus 5.5 --- DESIGN.md | 4 +- Processing/tests/browser_change_assurance.py | 21 ++++-- Processing/tests/browser_product_landing.py | 8 +-- Processing/tests/test_xer_review_assets.py | 4 +- docs/change-assurance.html | 55 +++++++------- docs/change-assurance.js | 76 ++++++++++++-------- docs/index.html | 1 + docs/product-landing.css | 13 +++- docs/product-landing.js | 10 +-- docs/styles.css | 4 ++ docs/walkthrough.js | 14 ++-- 11 files changed, 125 insertions(+), 85 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 21ba9b7..8573ff9 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -110,10 +110,10 @@ Moderately rounded controls and fields sit within larger rounded evidence and de ## Components -- **Actions:** cobalt primary buttons, white text, restrained background hover; secondary actions use white or transparent backgrounds and blue text. Keyboard focus uses a 3px cobalt outline with 4px offset. Disabled buttons retain their disabled behaviour and reduced opacity. +- **Actions:** cobalt primary buttons, white text, restrained background hover; secondary actions use white or transparent backgrounds and blue text. Keyboard focus uses a 3px cobalt outline with 4px offset. Disabled buttons retain their disabled behaviour and reduced opacity. Pressed buttons scale to 0.98 over 100ms, with no scale under reduced motion. One name for the example entry everywhere: “Try the example project”. In a review, “Review the first finding” is the primary action until a finding has been opened; then “Record the decision” becomes primary. - **Navigation:** native header links preserve real destinations. Active review links use cobalt text and a bottom rule with aria-current. Landing navigation switches to Reviews, Decisions and Follow-up within the operating journey. - **Evidence selectors:** selected state uses pale blue, cobalt text and a labelled selected/pressed state. Findings retain title, explanation and source context. -- **Evidence panels:** tonal backgrounds lead with the practical finding, dates, quoted narrative and a separately labelled review question. The finish example states the schedule/update contradiction in its heading. The review finding uses “The finish moved N days. The update needs clarification.” while retaining the exact narrative as evidence. Review provenance sits in “Source files and check time”; exact source identity and fields remain in “Inspect source files and fields”, alongside activity or relationship evidence disclosures. File names can wrap. +- **Evidence panels:** tonal backgrounds lead with the practical finding, dates, quoted narrative and a separately labelled review question. The finish example states the schedule/update contradiction in its heading. The review finding uses “The finish moved N days and the update needs clarifying” while retaining the exact narrative as evidence. Explain schedule terms in plain words on first use: “schedule files (XER)”, “links between tasks”, “spare time before the finish moves (float)”, “the person or board who approves changes”. Figure labels such as “+73 days” use ink; only the arrow uses the series blue. Review provenance sits in “Source files and check time”; exact source identity and fields remain in “Inspect source files and fields”, alongside activity or relationship evidence disclosures. File names can wrap. - **Inputs and decisions:** white fields on tonal panels, visible labels and thin borders. Owner and rationale remain required; conditional decisions retain condition, owner and due date. Persistent errors include recovery guidance. - **Preview and walkthrough:** the clearly labelled synthetic preview reads the real comparison engine. Factual questions are fixed independently of narrative matching. Replay explicitly draws the finish relationship over 700ms; evidence changes use bounded 180ms transitions. No looping motion. Reduced motion removes animation and replay while retaining facts and relationships. Walkthrough records remain disposable and isolated from ordinary decisions. diff --git a/Processing/tests/browser_change_assurance.py b/Processing/tests/browser_change_assurance.py index 05b8061..a53fb59 100644 --- a/Processing/tests/browser_change_assurance.py +++ b/Processing/tests/browser_change_assurance.py @@ -25,8 +25,10 @@ def run_desktop(browser): page.wait_for_load_state("networkidle") assert page.locator("[data-view-link]").count() == 3 - assert page.get_by_role("heading", name="The schedule changed. Did the update explain it?").is_visible() - page.get_by_role("button", name="Try the example project").click() + assert page.get_by_role("heading", name="Check the schedule against the update").is_visible() + # One name for the example entry everywhere: header, hero and closing section. + assert page.get_by_role("button", name="Try the example project", exact=True).count() == 3 + page.locator("#loadAssuranceDemo").click() page.locator("#readinessWorkspace").wait_for(state="visible") readiness_status = page.locator("#readinessStatus").inner_text() assert readiness_status.casefold() == "needs evidence before decision", readiness_status @@ -38,8 +40,13 @@ def run_desktop(browser): assert page.locator("#evidenceSummary .evidence-fact").count() == 6 assert not sidecar_requests, sidecar_requests page.screenshot(path=str(SCREENSHOTS / "change-assurance-overview.png"), full_page=False) + # Before any finding is opened, reviewing it is the primary action; then recording the decision is. + assert "assurance-primary" in page.locator("#reviewFirstFinding").get_attribute("class") + assert "assurance-primary" not in page.locator("#showDecisionForm").get_attribute("class") page.locator("[data-finding='1']").click() assert "constraint" in page.locator("#findingEvidence").inner_text().lower() + assert page.locator("#reviewFirstFinding").is_hidden() + assert "assurance-primary" in page.locator("#showDecisionForm").get_attribute("class") page.get_by_role("button", name="Draft questions for the team").click() page.locator("#requestPanel").wait_for(state="visible") @@ -48,7 +55,7 @@ def run_desktop(browser): page.get_by_role("button", name="Save evidence request").click() assert page.evaluate("JSON.parse(localStorage.getItem('projectlens:evidence-requests:v1')).length") == 1 - page.get_by_role("button", name="Record human decision").click() + page.get_by_role("button", name="Record the decision").click() page.locator("#decisionPanel").wait_for(state="visible") # Supplemental context must never force the reviewer to dismiss unrelated examples. assert page.locator("#decisionForm button[type='submit']").is_enabled() @@ -112,7 +119,7 @@ def run_desktop(browser): page.goto(BASE_URL) page.wait_for_load_state("networkidle") - page.get_by_role("button", name="Try the example project").click() + page.locator("#loadAssuranceDemo").click() page.locator("#readinessWorkspace").wait_for(state="visible") page.evaluate("document.querySelector('#readinessWorkspace').scrollIntoView()") page.screenshot(path=str(SCREENSHOTS / "change-assurance-overview.png"), full_page=False) @@ -127,7 +134,7 @@ def run_mobile(browser): page.wait_for_load_state("networkidle") assert page.evaluate("document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1") assert page.locator("[data-view-link]").count() == 3 - page.get_by_role("button", name="Try the example project").click() + page.locator("#loadAssuranceDemo").click() page.locator("#readinessWorkspace").wait_for(state="visible") assert page.locator("#blockerList .blocker").count() == 3 assert page.evaluate("document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1") @@ -177,7 +184,7 @@ def run_recovery(browser): page.get_by_role("button", name="Check decision readiness").click() page.locator("#readinessWorkspace").wait_for(state="visible") page.locator("[data-finding='2']").click() - assert "Relationship field evidence (5)" in page.locator("#findingEvidence").inner_text() + assert "Task link field evidence (5)" in page.locator("#findingEvidence").inner_text() assert page.locator("#findingEvidence li").count() == 5 assert "Type:" in page.locator("#findingEvidence").inner_text() page.once("dialog", lambda dialog: dialog.accept()) @@ -187,7 +194,7 @@ def run_recovery(browser): page.locator("#assuranceNarrative").fill((ROOT / "docs/demo/riverside-narrative.txt").read_text()) page.get_by_role("button", name="Check decision readiness").click() page.locator("#readinessWorkspace").wait_for(state="visible") - page.get_by_role("button", name="Record human decision").click() + page.get_by_role("button", name="Record the decision").click() page.get_by_label("Approve with conditions").check() page.locator("#decisionOwner").fill("Review Chair") page.locator("#decisionRationale").fill("Accept only with owned follow-up.") diff --git a/Processing/tests/browser_product_landing.py b/Processing/tests/browser_product_landing.py index e3e7e3b..e26e7e6 100644 --- a/Processing/tests/browser_product_landing.py +++ b/Processing/tests/browser_product_landing.py @@ -25,8 +25,8 @@ def landing(browser): page.on("pageerror", lambda error: errors.append(str(error))) page.on("request", lambda request: requests.append((request.method, request.url))) loaded(page) - expect(page.locator("#productTitle")).to_have_text("The schedule changed.Did the update explain it?") - expect(page.locator("#exampleTitle")).to_have_text("The finish moves by 73 days. The update says unchanged.") + expect(page.locator("#productTitle")).to_have_text("Check the schedule against the update") + expect(page.locator("#exampleTitle")).to_have_text("The finish moves 73 days but the update says unchanged") expect(page.locator("#exampleComparison")).to_contain_text("15 Dec 2027") expect(page.locator("#exampleComparison")).to_contain_text("26 Feb 2028") assert page.evaluate("localStorage.getItem('projectlens:change-decisions:v1')") is None @@ -37,7 +37,7 @@ def landing(browser): page.locator("#example-finish").focus() page.keyboard.press("ArrowDown") expect(page.locator("#example-constraints")).to_be_focused() - expect(page.locator("#exampleTitle")).to_have_text("3 activities have changed constraints.") + expect(page.locator("#exampleTitle")).to_have_text("3 activities have changed fixed dates (constraints)") page.locator("#exampleInspect").click() expect(page.locator("#exampleSource tbody tr")).to_have_count(3) expect(page.locator("#exampleSource")).to_contain_text("TASK") @@ -76,7 +76,7 @@ def semantic_regressions(browser): assert (review["movement"], review["constraints"], review["relationships"], review["float"]) == (73, 3, 5, 9) assert len(review["findings"]) >= 4 assert any("constraint changes" in row["title"] for row in review["findings"]) - assert any("relationship signatures" in row["title"] for row in review["findings"]) + assert any("links between tasks" in row["title"] for row in review["findings"]) assert any(row["type"] == "Float loss" for row in review["findings"]) assert any(row["type"] == "Ownership gap" for row in result[0]["findings"]) assert not any(row["type"] == "Contradiction" for row in result[1]["findings"]) diff --git a/Processing/tests/test_xer_review_assets.py b/Processing/tests/test_xer_review_assets.py index 1c6508b..99f60c2 100644 --- a/Processing/tests/test_xer_review_assets.py +++ b/Processing/tests/test_xer_review_assets.py @@ -86,7 +86,9 @@ def test_change_assurance_exposes_one_simple_decision_workflow(): script = (DOCS / "change-assurance.js").read_text(encoding="utf-8") stylesheet = (DOCS / "change-assurance.css").read_text(encoding="utf-8") - assert "The schedule changed." in page + assert "Check the schedule against the update" in page + assert "Try the example project" in page and "Open demo" not in page + assert "Review the first finding" in page assert "Bring the update" in page assert "Inspect what changed" in page assert "Keep the decision" in page diff --git a/docs/change-assurance.html b/docs/change-assurance.html index 6e0fe88..f23a994 100644 --- a/docs/change-assurance.html +++ b/docs/change-assurance.html @@ -30,7 +30,7 @@ How it works Method GitHub - +