Skip to content

fix(web): remove unnecessary double type cast in unified-diff-view#761

Merged
selfcontained merged 1 commit into
mainfrom
agt_3d25209283ee/job-debt-collector-64aff79b
Jul 12, 2026
Merged

fix(web): remove unnecessary double type cast in unified-diff-view#761
selfcontained merged 1 commit into
mainfrom
agt_3d25209283ee/job-debt-collector-64aff79b

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Removed the as unknown as MouseEvent double-cast in unified-diff-view.tsx gutter click handler
  • The EventMap type from react-diff-view already provides React.MouseEvent<HTMLElement> which includes shiftKey — the intermediate cast through unknown was unnecessary tech debt

Why this qualifies as tech debt

Double-casting through unknown bypasses TypeScript's type safety, making it harder to catch real type errors if the upstream library changes its event types. Since the correct type is already available, the cast added noise with no benefit.

Next up

The backlog is now empty — next run will re-audit for fresh issues.

🤖 Generated with Claude Code

The EventMap onClick handler from react-diff-view already provides
React.MouseEvent<HTMLElement> which includes shiftKey — the
`as unknown as MouseEvent` double cast was unnecessary tech debt.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@selfcontained selfcontained merged commit 2e8067a into main Jul 12, 2026
1 check passed
@selfcontained selfcontained deleted the agt_3d25209283ee/job-debt-collector-64aff79b branch July 12, 2026 09: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.

1 participant