Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

CI failing with 34 ESLint errors across TypeScript strict rules and React hooks violations.

Changes

React Hooks Violations

  • react-hooks/refs: Removed ref forwarding in Hidden.tsx (MuiHidden doesn't support refs), used existing anchorEl state in TypingFilter instead of accessing ref.current during render
  • react-hooks/set-state-in-effect: Replaced useEffect + setState pattern with derived state using nullish coalescing (userToggleValue ?? defaultValue) in ChallengesSection and LearningSection
  • react-hooks/static-components: Moved component definitions (ClassIcon, SvgComponent, ResourceProgress) outside parent render functions to prevent recreation on each render

TypeScript Errors

  • Replaced as any with as unknown as Type for type assertions
  • Converted condition && fn() expressions to condition ? fn() : undefined or if (condition) fn() to satisfy no-unused-expressions
  • Removed or prefixed unused catch variables

Code Quality

  • Used finally block in PersistedStateProvider to eliminate duplicate setLoading(false) calls
  • Extracted inline intersection type to named interface ResourceProgressWithChartProps
// Before: setState in effect causes cascading renders
useEffect(() => {
  if (autoUpdate) {
    setOpenChallenges(hasChallenges);
  }
}, [hasChallenges, autoUpdate]);

// After: derived state with nullish coalescing
const openChallenges = userToggleValue ?? hasChallenges;
Original prompt

Fix this error - https://github.com/layer5io/sistent/actions/runs/21053568182/job/60544875274?pr=1225


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix error in actions run for PR 1225 Fix ESLint errors causing CI failure Jan 16, 2026
Copilot AI requested a review from fitzergerald January 16, 2026 02:55
@leecalcote leecalcote marked this pull request as ready for review January 16, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants