Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Compare a project update with its schedules, inspect what changed, and record th

**For:** project managers, project controls reviewers and planners checking a submitted update against two Primavera P6 schedule exports.

**Start here:** [Try ProjectLens](https://matthewpaver.github.io/ProjectLens/change-assurance.html) — no install or account.
**Start here:** [Try ProjectLens](https://matthewpaver.github.io/ProjectLens/change-assurance.html). No install or account needed.

1. Select **Try the Northstar example**. Its finish moves by 73 days while the update says unchanged.
2. Inspect the source fields and review questions. Three findings are prioritised; all five remain available.
Expand Down
2 changes: 1 addition & 1 deletion docs/change-assurance.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ <h3>Similar cases from public records</h3>
<div class="register-heading"><h1>Decision register</h1><p>This demo stores decision records in this browser only.</p></div>
<div class="register-actions">
<button class="assurance-secondary" id="exportDecisions" type="button">Export record</button>
<small>Copies the recorded decisions — date, verdict, owner, rationale and conditions — as plain text for your own register.</small>
<small>Copies the recorded decisions (date, verdict, owner, rationale and conditions) as plain text for your own register.</small>
</div>
<div class="export-fallback" id="exportFallback" hidden>
<label for="exportFallbackText"><span>Clipboard unavailable. Select and copy the record below.</span>
Expand Down
15 changes: 10 additions & 5 deletions docs/change-assurance.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function renderReview(review, restoredContext = null) {
$("#narrativeRevision").open = false;
const ready = review.blockers.length === 0;
const topBlockers = review.blockers.slice(0, 3);
$("#reviewName").textContent = review.current.project.name;
$("#reviewName").textContent = displayProjectName(review.current.project.name);
$("#reviewEvidenceVersion").textContent = `${evidenceVersion(review)} · checked ${new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }).format(new Date(review.generatedAt))}`;
$("#readinessCard").classList.toggle("ready", ready);
$("#readinessStatus").textContent = ready ? "Human review still required" : "Needs evidence before decision";
Expand Down Expand Up @@ -650,10 +650,8 @@ async function loadDemo() {
$$(".assurance-file").forEach(card => card.classList.add("loaded"));
$("#runAssuranceReview").disabled = false;
$("#intakeMessage").textContent = "Northstar demo pack loaded. Checking readiness…";
// show step 1 (intake) so the demo path matches the flow diagram, then auto-run
$("#packIntake").hidden = false;
$("#readinessWorkspace").hidden = true;
$("#packIntake").scrollIntoView({ behavior: matchMedia("(prefers-reduced-motion: reduce)").matches ? "instant" : "smooth", block: "start" });
// Go straight to the review. Scrolling to the intake first raced the review's own scroll
// and left visitors past the summary and the decision button.
const previous = parseXer(previousText, assuranceState.files.previous.name);
const current = parseXer(currentText, assuranceState.files.current.name);
const review = analyseReview(previous, current, narrative);
Expand Down Expand Up @@ -958,6 +956,13 @@ function showError(message) {
moveTo(error);
}

// XER project names are often all capitals. Show those in normal case so the heading reads as a name.
function displayProjectName(name) {
const text = String(name || "");
if (/[a-z]/.test(text) || !/[A-Z]/.test(text)) return text;
return text.toLowerCase().replace(/\b([a-z])/g, letter => letter.toUpperCase());
}

function moveTo(element) {
if (!element) return;
if (!element.hasAttribute("tabindex")) element.setAttribute("tabindex", "-1");
Expand Down
Loading