feat(planning): complete verified explanations and trace delivery (#46)

Implement plan explanations, original decision traces, calendar replay, and worker counterfactual analysis. Preserve incomplete checkpoints and conflict reasons, with accessible navigation and localized comparison details.

Keep planning outcomes independent of tracing and bound worker delivery with receiver acknowledgements. Retain complete candidate history while releasing temporary buffers and benchmark references.

Validated with 201 tests, app/spec type checks, lint, production build, baseline outcome comparisons, and repeated loaded browser measurements. Document performance and remaining limits.
This commit is contained in:
nessar committed 2026-10-03 16:26:56 +02:00
1 parent 0ce33cc9d6
commit 01c87d1e44
20 files changed
+7625 -1001

No files matched your search

+16
View File
@@ -119,10 +119,16 @@
"next": "Next placement",
"last": "Last placement",
"remaining": "Unused days in the final plan",
"balanceRemaining": "remaining",
"counterfactual": "Date alternatives",
"counterfactualLoading": "Analyzing every date in the horizon…",
"counterfactualReady": "Date alternatives are ready.",
"counterfactualError": "Date alternatives could not be calculated.",
"retryCounterfactual": "Retry date analysis",
"historicalEligibilityLoading": "Checking which dates this leave could use…",
"historicalEligibilityReady": "Original date eligibility is ready.",
"historicalEligibilityError": "Original date eligibility could not be checked.",
"retryHistoricalEligibility": "Retry date eligibility check",
"eligible": "Eligible",
"ineligible": "Ineligible",
"historical": "Original search status",
@@ -140,6 +146,7 @@
"outsideHorizon": "Context date outside the planning horizon",
"traceTitle": "Advanced: original decision trace",
"traceLoading": "The plan is ready; its decision trace is still loading…",
"traceReady": "The plan is ready and its decision trace has loaded.",
"traceUnavailable": "No decision trace is available for this result.",
"phases": "Trace phases",
"firstPhase": "First phase",
@@ -200,6 +207,7 @@
"leaveUsed": "This date uses 1 day from {balance}.",
"expires": "Use this balance by",
"linkedRules": "Linked rules:",
"atRiskContribution": "Protects leave at risk of expiry.",
"impact": "What this day changes",
"impactHelp": "Compare the whole plan with and without this day of leave. All other leave dates stay the same; only changed totals are shown.",
"criterion": "Across your plan",
@@ -218,6 +226,10 @@
"withCandidate": "With this candidate",
"comparisonUnavailable": "The comparison for the original date is unavailable, so the change cannot be shown.",
"objectives": {
"obligation-validity": {
"label": "Unmet obligations",
"help": "Number of required obligations left unsatisfied. A valid plan has zero."
},
"unplaced-at-risk": {
"label": "Leave left at risk of expiry",
"help": "Unused days expiring within the planning period. Fewer is better."
@@ -282,6 +294,10 @@
"expires": "Expires on",
"criteria": "The planner’s priorities",
"criteriaHelp": "Read from top to bottom: the first difference takes priority. Select a criterion to see how it is calculated.",
"traceImpactTitle": "Full-plan effect of this branch",
"traceImpactHelp": "These values compare the complete state before and after this branch. They show its impact; they do not explain why the planner chose it.",
"traceStageTitle": "Actual stage comparison",
"traceStageHelp": "These raw values were compared at this decision; the first difference explains the candidate’s status. The full-plan table below shows the effect after this choice.",
"firstDifference": "First difference",
"higher": "Higher is better",
"lower": "Lower is better",