feat(web): simplify the teacher Evidence Desk - #8
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Simplify Huddle’s teacher-facing Evidence Desk using the accepted compact prototype as the visual north star. Every attention-queue card must make its rank for today, full priority, and confidence explicit and accessible before selection. Replace duplicated dominant/additional signal attempt tables and rule-quality internals with one teacher-friendly, deduplicated evidence list that shows the attempted skill, result, selected answer, useful misconception when available, and readable date/time/duration. Keep cause → context → evidence clear; retain concise additional-cause context and the existing provenance boundary, but remove normal-flow attempt IDs, activity hashes, ordinals, rule hashes, signal IDs, confidence math, multipliers, raw pattern dumps, and conflict-adjustment jargon. Preserve deterministic ranking, synthetic-only boundaries, exact evidence traceability, visible-open Seen acknowledgement, private reviewer flow, accessibility, and responsive behavior. Also enrich only the small fixed synthetic CSV corpus so Casey, Blake, and Avery have distinct deterministic evidence stories without adding simulator breadth or dependencies.
What Changed
Risk Assessment
✅ Low: The branch is well-bounded, and the final repair aligns authoritative documentation with the implemented visible evidence flow without leaving a source-verifiable defect.
Testing
No baseline commands were supplied. Focused automated tests, a resolved package-resolution retry, and rendered component/CSS audits all passed; browser screenshots were unavailable in this environment, so portable rendered HTML captures provide the reviewer-visible desktop and responsive UI evidence.
Evidence: Evidence Desk attention queue
/var/folders/nt/rdk7cjs538l8zphln24q2k900000gn/T/no-mistakes-evidence/01KYSS83QSE7ZVBZHKN1PJG8N7/evidence-desk-casey-report.html)Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed (5) ✅
apps/web/app/board/lib/teacher-report-view.ts:61-teacherReportViewdropstimingQuality,engagedMs, and all session records while retaining onlyelapsedMs. For valid engaged evidence, ranking may useengagedMswhile the UI displays a different elapsed duration; forgrinding.slow-session-vs-baseline, the decisive duration exists only insessions, so it disappears entirely. This contradicts “readable date/time/duration” and “Preserve … exact evidence traceability.” Preserve a teacher-readable, timing-quality-aware duration/session representation at this shared view boundary.apps/web/app/board/evidence-desk.tsx:39- Rounding the remainder after flooring minutes can render values such as 119,500 ms as1m 60s. Round total seconds first, then derive minutes and a 0–59 second remainder.README.md:143- The authoritative reviewer walkthrough still instructs users to expand exact attempt/session disclosures, while the change intentionally replaces those disclosures with one visible evidence list. Update the README and corresponding Evidence Desk contract so future reviewers and agents follow the new required interaction without reintroducing forbidden IDs and internals.🔧 Fix: Preserve timing-aware evidence and deduplicated session context
3 issues (1 error, 2 warnings) still open:
apps/web/app/board/evidence-desk.tsx:294- The repaired UI labelssessions[].startedAt/endedAtas the Work session range, but validsession_onlyimports store authoritative session bounds that never reach evidence assembly:loadCompilerSnapshotselects only the attempt timestamps and session total, andassembleEvidenceBundlesubstitutes the first contributing attempt’s times. A 30-minute session with a one-minute contributing attempt can therefore display a false one-minute range beside the correct total, contradicting “readable date/time/duration” and “Preserve … exact evidence traceability.” Carry persisted session bounds/count through the compiler/evidence boundary.apps/web/app/board/lib/teacher-report-view.ts:122- All evidence sessions are projected, includingtimingQuality: 'none'records. On that supported path the list adds an emptyWork session / Duration not recordeditem after an attempt that already reports the missing duration, often doubling the list without adding evidence. This conflicts with the required compact, teacher-friendly deduplicated view; render session cards only when genuine session aggregate context exists.specs/001-huddle-triage-board/contracts/application-interfaces.md:289- Contract alignment remains partial: it still says evidence is “progressively disclosed” and that a level can be collapsed, although context and evidence are now always visible. Describe these as ordered presentation layers and remove the obsolete collapse claim.🔧 Fix: Preserve authoritative session traceability in teacher evidence
1 error still open:
packages/signal-engine/src/engine.ts:38- “Preserve deterministic ranking … exact evidence traceability” is not met by the new optionalsessions?: LearningSession[]path: sessions reach only evidence assembly, while preflight, personal baselines, andgrinding.slow-session-vs-baselinestill divide the duplicated attempt total by accepted-attempt count. A valid 600,000 ms / 10-activity session with only two mapped attempts is therefore ranked as 300,000 ms/activity while its evidence truthfully reports 10 activities. Make sessions required at the EngineInput/RuleContext boundary and use their authoritative total/count throughout session-only baseline, preflight, and rule evaluation.🔧 Fix: Unify authoritative session timing and dashboard seconds
2 issues (1 error, 1 warning) still open:
packages/signal-engine/src/rules/grinding-session.ts:40- “Preserve deterministic ranking … exact evidence traceability” is contradicted by changing session classification to useaggregate.vendorAttemptCountwithout incrementingRULE_IMPLEMENTATION_VERSION(still3). Because behavior fingerprints hash rule versions and configuration—not implementation source—the repaired engine can produce different rankings for identical inputs under the same persisted rule/behavior fingerprint. Increment the implementation marker and update affected fingerprint expectations.packages/signal-engine/src/engine.ts:466- The new preflight rejectstotalElapsedMs === 0, although ingest, the database, and the rule contract accept any present total with a positive vendor count; baseline, rule, and evidence paths also accept zero. A valid zero-total session is therefore incorrectly reported as missing input. Define one shared usable-session-aggregate predicate at the signal-engine timing boundary usingtotalElapsedMs != null && vendorAttemptCount > 0, and use it across preflight, confidence, baseline, rule, and evidence paths.🔧 Fix: Version session behavior and centralize aggregate validity
1 warning still open:
specs/001-huddle-triage-board/quickstart.md:21- The implemented Evidence Desk has one always-visible evidence list, but this quickstart still tells reviewers to “expand exact evidence”; the authoritative current plan likewise still calls it a “progressive evidence presentation.” Update both descriptions to the ordered visible-layer interaction so manual reviewers and future agents do not expect or reintroduce the removed expand/collapse flow.🔧 Fix: Align Evidence Desk documentation with visible layers
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
node_modules/.bin/vitest run apps/web/test/evidence-desk-rendering.test.ts apps/web/test/evidence-desk-state.test.ts apps/web/test/acknowledgment-tokens.test.ts apps/web/test/report-reveal-server-action.test.ts packages/db/test/evidence-persistence.test.ts packages/db/test/operations-boundaries.test.ts packages/ingest/test/portfolio-csv.test.ts packages/signal-engine/test/determinism.test.ts packages/signal-engine/test/ranking.test.ts packages/signal-engine/test/rank-tiebreak.test.ts packages/signal-engine/test/grinding-session-engine.test.ts packages/signal-engine/test/confidence-conflict.test.ts packages/signal-engine/test/per-fired-rule-evidence.test.tsnode_modules/.bin/vitest run apps/web/test/quick-demo-access.test.ts apps/web/test/board-without-narrator.test.ts packages/application/test/evidence-reader-implementation.test.ts packages/ingest/test/synthetic-csv-v1.test.ts packages/narrator/test/no-pii.test.ts(three suites initially encountered missing unbuilt package output)node_modules/.bin/vitest --config .test-evidence/vitest-focused.config.ts run apps/web/test/board-without-narrator.test.ts apps/web/test/quick-demo-access.test.ts packages/narrator/test/no-pii.test.ts(retried successfully through a temporary source alias)node_modules/.bin/tsx .test-evidence/render-evidence-desk-proof.ts /var/folders/nt/rdk7cjs538l8zphln24q2k900000gn/T/no-mistakes-evidence/01KYSS83QSE7ZVBZHKN1PJG8N7Rendered-HTML audit verified all three queue cards’ rank/priority/confidence, cause → context → evidence ordering, and absence of forbidden normal-flow implementation jargon.Attempted visual screenshot capture through the browser runtime andchrome-devtools-axi; neither an available browser session nor a Chrome executable was present.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.