Skip to content

fix(ui): RunHistoryStrip setState-in-effect lint failure blocks frontend lint gate #357

@w7-mgfcode

Description

@w7-mgfcode

Problem

pnpm lint (the frontend eslint . gate) fails on dev due to a pre-existing
react-hooks/set-state-in-effect error in
frontend/src/components/demo/RunHistoryStrip.tsx (the effect calls
setItems/setLastSummary synchronously in its body). eslint-plugin-react-hooks@7
(pinned in the lockfile) promotes this to an error, so the whole-repo lint gate
is red.

This is unrelated to any feature work — it blocks the frontend lint gate for
every branch. Fixing it in isolation keeps feature PRs green.

Scope

  • frontend/src/components/demo/RunHistoryStrip.tsx ONLY.
  • Refactor the run-history append so it no longer calls setState synchronously
    inside the effect body (derive/guard appropriately), preserving the existing
    HISTORY_CAP + persistence behavior.

Acceptance

  • pnpm lint reports 0 errors for this file.
  • pnpm tsc --noEmit clean; pnpm test --run green.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions