Skip to content

refactor(react): remove low-risk lint suppressions - #882

Merged
Neonforge98 merged 2 commits into
developfrom
codex/react-low-risk-suppressions
Aug 22, 2026
Merged

refactor(react): remove low-risk lint suppressions#882
Neonforge98 merged 2 commits into
developfrom
codex/react-low-risk-suppressions

Conversation

@Harry19081

@Harry19081 Harry19081 commented Aug 22, 2026

Copy link
Copy Markdown
Member

Problem

ORGII carries stale ESLint suppression entries and low-risk React dependency suppressions that obscure the current lint signal. Several dependency omissions only involve stable refs or setters, while a component-local pure helper creates three avoidable exhaustive-deps suppressions. The storage reset directive also suppresses one rule that no longer applies alongside one rule that remains required.

Solution

  • Remove 12 fully unused suppression directives and narrow the mixed storage directive to its still-active no-var-requires rule, for 13 stale entries cleaned in this PR.
  • Add stable ref and setter dependencies in the composer pill portal, browser status bar, tab-label collapse, chat scroll pin, chat context, and agent-definition loader.
  • Hoist the pure interactive-event predicate in PlaygroundChatPanel so three memo dependency suppressions are unnecessary.
  • Keep the caller-owned scroll coordination ref behavior unchanged and replace the compiler-hidden exhaustive-deps comment with an accurately targeted, documented immutability suppression.
  • Leave state-synchronization, render-time ref-cache, and overlapping active dependency cases to their dedicated category PRs so this change remains behavior-preserving and conflict-light.

Potential risks

The added dependencies rely on the existing stable-ref and stable-setter contracts. If a caller replaces a ref object identity, the associated effect will now re-run or re-register, which is the correct dependency behavior but is a lifecycle path to watch. No public API, persistence format, IPC contract, dependency, or user-visible markup changes are included. Rollback is a commit revert. Runtime profiling and visual screenshots were not useful for this source-only lint cleanup, so no performance improvement is claimed.

Verification

  • git diff --name-only -- src | rg "\.(tsx?|jsx?)$" | xargs node_modules/.bin/eslint --report-unused-disable-directives --format unix — passed with no findings on all changed source files.
  • pnpm typecheck — passed.
  • pnpm exec vitest run src/engines/SessionCore/utils/__tests__/waitForSnapshotChange.test.ts src/modules/WorkStation/CodeEditor/hooks/sourceControl/__tests__/gitFilesDerivation.test.ts src/components/ComposerInput/__tests__/cutHandler.test.ts — 3 files passed, 37 tests passed.
  • git diff --check — passed.
  • Repository pre-commit gates — lint-staged, scoped TypeScript, and staged-file cleanliness checks passed on both commits.

The full test suite and a redundant full-repository ESLint scan were not run; changed-file lint, full TypeScript, and focused tests were used for this low-risk cleanup.

@Neonforge98
Neonforge98 merged commit fe04637 into develop Aug 22, 2026
3 checks passed
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