docs: report evaluation evidence task
This commit is contained in:
@@ -0,0 +1,95 @@
|
|||||||
|
# Task 1 Report: Evaluation Evidence Projection And Scene
|
||||||
|
|
||||||
|
## Changed Files
|
||||||
|
|
||||||
|
- `web/apps/console/src/presentation/evaluation/evaluation-evidence.ts`
|
||||||
|
- `web/apps/console/src/presentation/evaluation/evaluation-evidence.test.ts`
|
||||||
|
- `web/apps/console/src/presentation/evaluation/EvaluationEvidenceScene.tsx`
|
||||||
|
- `web/apps/console/src/presentation/evaluation/EvaluationEvidenceScene.test.tsx`
|
||||||
|
- `web/apps/console/src/presentation/presentation.css`
|
||||||
|
|
||||||
|
The scene is intentionally delivered as the requested standalone presentation component. No storyboard or scene-router files were changed; the task brief restricted production changes to the listed files.
|
||||||
|
|
||||||
|
## TDD Evidence
|
||||||
|
|
||||||
|
Projection RED:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pnpm --dir web --filter @lda/console test -- src/presentation/evaluation/evaluation-evidence.test.ts
|
||||||
|
FAIL: Failed to resolve import "./evaluation-evidence.js"; file does not exist.
|
||||||
|
Test Files 1 failed; Tests no tests
|
||||||
|
```
|
||||||
|
|
||||||
|
Projection GREEN:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pnpm --dir web --filter @lda/console test -- src/presentation/evaluation/evaluation-evidence.test.ts
|
||||||
|
Test Files 1 passed; Tests 3 passed
|
||||||
|
```
|
||||||
|
|
||||||
|
Scene RED:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pnpm --dir web --filter @lda/console test -- src/presentation/evaluation/EvaluationEvidenceScene.test.tsx
|
||||||
|
FAIL: Failed to resolve import "./EvaluationEvidenceScene.js"; file does not exist.
|
||||||
|
Test Files 1 failed; Tests no tests
|
||||||
|
```
|
||||||
|
|
||||||
|
Scene GREEN:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pnpm --dir web --filter @lda/console test -- src/presentation/evaluation/EvaluationEvidenceScene.test.tsx
|
||||||
|
Test Files 1 passed; Tests 5 passed
|
||||||
|
```
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
- Combined Task 1 tests: `2` files passed, `8` tests passed.
|
||||||
|
- Console typecheck: `pnpm --dir web --filter @lda/console typecheck` passed.
|
||||||
|
- Presentation CSS test: `1` file passed, `1` test passed.
|
||||||
|
- Production build: `pnpm --dir web --filter @lda/console build` succeeded; 730 modules transformed.
|
||||||
|
- `git diff --check` passed with no whitespace errors.
|
||||||
|
- The scene tests verify all three beat attributes, exact counts, audit rows, exact validity boundary, all six labels, and six decorative SVG icons.
|
||||||
|
|
||||||
|
## Deviations
|
||||||
|
|
||||||
|
- The scene board uses `role="group"` explicitly because the required accessible role is not the implicit role of a labelled section.
|
||||||
|
- A one-line icon-map prop typing adjustment was needed for the installed Lucide type definitions; it does not change the public interface or rendered output.
|
||||||
|
|
||||||
|
## Concerns
|
||||||
|
|
||||||
|
- Vite reports the existing production bundle-size warning for chunks larger than 500 kB. The build still exits successfully; this Task 1 change does not introduce a bundle-splitting decision.
|
||||||
|
|
||||||
|
## Self-Review
|
||||||
|
|
||||||
|
- All factual values and wording in the brief are centralized in `evaluation-evidence.ts` and asserted verbatim.
|
||||||
|
- The serialized evidence model contains no percentage, success-rate, leaderboard, or superiority vocabulary.
|
||||||
|
- Finding icons are decorative with `aria-hidden="true"`; labels remain visible text.
|
||||||
|
- The board keeps every block rendered for every beat and changes emphasis through `data-evaluation-beat`.
|
||||||
|
- The 1080px media query wraps the cohort into a single column and stacks audit content; the existing reduced-motion rules cover the 180ms transitions.
|
||||||
|
- Writes remain limited to Task 1 files and this required report.
|
||||||
|
|
||||||
|
## Review Fixes
|
||||||
|
|
||||||
|
CSS contract RED:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pnpm --dir web --filter @lda/console test -- src/presentation/presentation-css.test.ts
|
||||||
|
Test Files 1 failed; Tests 1 failed
|
||||||
|
Expected the 1080px audit-row rule to match grid-template-columns: 1fr;
|
||||||
|
Received grid-template-columns: 1fr auto 1fr;
|
||||||
|
```
|
||||||
|
|
||||||
|
CSS contract GREEN:
|
||||||
|
|
||||||
|
```text
|
||||||
|
pnpm --dir web --filter @lda/console test -- src/presentation/presentation-css.test.ts
|
||||||
|
Test Files 1 passed; Tests 2 passed
|
||||||
|
```
|
||||||
|
|
||||||
|
Review-fix verification:
|
||||||
|
|
||||||
|
- Focused Task 1 suites: `2` files passed, `8` tests passed.
|
||||||
|
- Console typecheck: `pnpm --dir web --filter @lda/console typecheck` passed.
|
||||||
|
- `git diff --check` passed.
|
||||||
|
- Added exact `cohortFactors` assertions, documented unknown-beat fallback, stacked audit rows at 1080px, and removed the unused opacity transition.
|
||||||
@@ -19,6 +19,7 @@ const findingIcons: Record<EvaluationFindingIcon, FC<LucideProps>> = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const EvaluationEvidenceScene: FC<EvaluationEvidenceSceneProps> = ({ scene, beat }) => {
|
export const EvaluationEvidenceScene: FC<EvaluationEvidenceSceneProps> = ({ scene, beat }) => {
|
||||||
|
// Unknown beat ids keep the evidence board visible rather than dropping the scene.
|
||||||
const beatId = isEvaluationBeatId(beat.id) ? beat.id : "cohort";
|
const beatId = isEvaluationBeatId(beat.id) ? beat.id : "cohort";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -3,6 +3,12 @@ import { evaluationEvidence, isEvaluationBeatId } from "./evaluation-evidence.js
|
|||||||
|
|
||||||
describe("evaluationEvidence", () => {
|
describe("evaluationEvidence", () => {
|
||||||
it("preserves the exact audited trial projection", () => {
|
it("preserves the exact audited trial projection", () => {
|
||||||
|
expect(evaluationEvidence.cohortFactors).toEqual([
|
||||||
|
{ value: "2", label: "challenges" },
|
||||||
|
{ value: "2", label: "hosted models" },
|
||||||
|
{ value: "3", label: "profiles" },
|
||||||
|
{ value: "3", label: "waves" },
|
||||||
|
]);
|
||||||
expect(evaluationEvidence.totalTrials).toBe(36);
|
expect(evaluationEvidence.totalTrials).toBe(36);
|
||||||
expect(evaluationEvidence.outcomes).toEqual([
|
expect(evaluationEvidence.outcomes).toEqual([
|
||||||
{ value: 27, label: "clean product-path passes", kind: "pass" },
|
{ value: 27, label: "clean product-path passes", kind: "pass" },
|
||||||
|
|||||||
@@ -15,4 +15,10 @@ describe("presentation.css", () => {
|
|||||||
expect(css).toContain(".presentation-stage__primary::-webkit-scrollbar");
|
expect(css).toContain(".presentation-stage__primary::-webkit-scrollbar");
|
||||||
expect(css).toContain("display: none");
|
expect(css).toContain("display: none");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("stacks evaluation audit rows at the 1080px container breakpoint", () => {
|
||||||
|
const breakpointBlock = css.match(/@media \(max-width: 1080px\) \{(?<body>[\s\S]*?)\n\}/)?.groups?.body;
|
||||||
|
|
||||||
|
expect(breakpointBlock).toMatch(/\.evaluation-board__audit-row\s*\{\s*grid-template-columns: 1fr;/);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
.evaluation-board__audit,
|
.evaluation-board__audit,
|
||||||
.evaluation-board__findings,
|
.evaluation-board__findings,
|
||||||
.evaluation-board__boundary {
|
.evaluation-board__boundary {
|
||||||
transition: opacity 180ms ease, transform 180ms ease;
|
transition: transform 180ms ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.evaluation-board[data-evaluation-beat="cohort"] .evaluation-board__cohort,
|
.evaluation-board[data-evaluation-beat="cohort"] .evaluation-board__cohort,
|
||||||
@@ -221,7 +221,7 @@
|
|||||||
.evaluation-board__cohort { border-right: 0; }
|
.evaluation-board__cohort { border-right: 0; }
|
||||||
.evaluation-board__outcomes,
|
.evaluation-board__outcomes,
|
||||||
.evaluation-board__findings { grid-column: auto; }
|
.evaluation-board__findings { grid-column: auto; }
|
||||||
.evaluation-board__audit-row { grid-template-columns: 1fr auto 1fr; }
|
.evaluation-board__audit-row { grid-template-columns: 1fr; }
|
||||||
}
|
}
|
||||||
|
|
||||||
.stage-caption__eyebrow {
|
.stage-caption__eyebrow {
|
||||||
|
|||||||
Reference in New Issue
Block a user