Repository navigation
hal0 v0.9.5.2
·
2111 commits
to main
since this release
Fixed
- Models → Downloads tab: React invariant 310 ("Rendered more hooks than during the previous render"). The Downloads pane in the Models view called
useStateM(false)inside ajobs.map((j) => { … })callback. React counts hook calls per render, so the moment the downloads list changed length (a pull started, finished, failed, or was cleared) the hook count differed across renders and the entire<ModelsView>crashed behind the v3 error boundary — masking the rest of the dashboard. Fix: extract the per-row logic into aDownloadRowcomponent that owns its owncancellingstate, so the hook lives at row-component top level and its count is stable across renders. Pinned byui/src/dash/__tests__/react-hooks-order.test.mjs, a new AST-based static check that walks every JSX/JS file undersrc/dash/and flags any useXxx (incl. theuseStateM/useEffectM/etc. aliases used in this dashboard) called inside an array-iteration callback (.map/.forEach/.filter/.reduce/.some/.every/.flatMap/.find/.findIndex).