feat(smartem): /models heatmap matrix on mock data (PR 67a)#87
Open
vredchenko wants to merge 1 commit into
Open
feat(smartem): /models heatmap matrix on mock data (PR 67a)#87vredchenko wants to merge 1 commit into
vredchenko wants to merge 1 commit into
Conversation
Implements PR 67a from the plan in #67: a per-grid model × metric weights matrix at the existing top-level /models nav route, rendered on a hand-rolled mock fixture. Cells are colour-coded by current weight (single-hue blue ramp); hovering shows a tooltip with model, metric, weight and timestamp; empty (model, metric) pairs render as a dashed "no data" tile; a gradient legend sits below the matrix. No chart library introduced (deferred to PR 67b1, the ADR tracked at DiamondLightSource/smartem-devtools#196). The mock fixture is shaped to match orval's QualityPredictionModelWeight type so PR 67b2 can swap in useGetModelWeightsForGridGridGridUuidModelWeightsGet without restructuring the data flow. apps/legacy is untouched.
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.
Summary
PR 67a from the plan in #67. Adds the model × metric weights heatmap to apps/smartem at the existing top-level
/modelsnav route. Renders on a hand-rolled mock fixture; no chart library introduced. apps/legacy is untouched.apps/smartem/src/routes/models.tsx— page header + matrix.apps/smartem/src/components/weights/WeightsMatrix.tsx— CSS-grid layout, MUI Tooltip per cell, gradient legend below.apps/smartem/src/components/weights/cellColor.ts— single-hue blue ramp, dark-text-on-light / light-text-on-dark above 0.55.apps/smartem/src/data/mock-model-weights.ts— 4 models × 5 metrics = 19 populated cells + 1 empty for the "no data" demo. Shaped to match orval'sQualityPredictionModelWeighttype so PR 67b2 can swap inuseGetModelWeightsForGridGridGridUuidModelWeightsGetwithout restructuring the data flow.apps/smartem/src/routeTree.gen.tsfor the new/modelsroute.What's deferred
Test plan
npm run typecheck— clean across all workspacesnpm run check(Biome lint + format) — cleannpm run dev:smartem:mock(Playwright):0.82,0.30) colour-coded; 1 empty—cell0.82cell:resnet-atlas · defocus | Weight: 0.820 | Apr 29, 2026, 07:00 PM0.00 / 0.25 / 0.50 / 0.75 / 1.00Closes none — progresses #67.