feat(frontend): improve runners errors ui#5026
Conversation
|
🚅 Deployed to the rivet-pr-5026 environment in rivet-frontend
|
PR 5026 Review — feat(frontend): improve runners errors UIOverviewThis PR replaces a one-off inline error tooltip in Positives
Issues1. describeKind uses default on a closed discriminated union — violates CLAUDE.mdThe
2. setTimeout in ErrorBody is never clearedconst handleCopied = () => {
setCopied(true);
setTimeout(() => setCopied(false), 1500); // no cleanup
};If the popover closes before 1500 ms elapses the callback fires on an unmounted component. Fix with a ref + const timerRef = useRef<ReturnType<typeof setTimeout>>();
const handleCopied = () => {
clearTimeout(timerRef.current);
setCopied(true);
timerRef.current = setTimeout(() => setCopied(false), 1500);
};
useEffect(() => () => clearTimeout(timerRef.current), []);3. Duplicate react import blocks
import { useMemo, useState, type ReactNode } from "react";Minor Notes
SummaryThe core refactor is well-structured and the Ladle story coverage is excellent. The two items most worth addressing are the exhaustive-union violation in
|
21070c2 to
9a22de6
Compare
998ae2d to
3e2bff1
Compare
3e2bff1 to
919b36c
Compare
9a22de6 to
1b3211e
Compare
919b36c to
272227c
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: