Skip to content

chore: clear the lint warnings in tests and commit-thread - #1174

Closed
kachelle wants to merge 1 commit into
dev-null-sh:productionfrom
kachelle:fix/lint-warnings
Closed

kachelle wants to merge 1 commit into
dev-null-sh:productionfrom
kachelle:fix/lint-warnings

Conversation

@kachelle

@kachelle kachelle commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Clears 14 of the 17 warnings the lint job prints on production:

  • Marks the floating `test()` promises in `ConversationSearch`, `IssueCommands` and `TranslationLanguages` with `void`, like the other node tests.
  • The probe components in `ThreadHistory` and `ThreadMutationHistory` hand their hook result to an `onRender` prop instead of reassigning a variable outside the component.
  • Drops the unused `formatExactCount` import in `commit-thread.tsx`.

The 3 `react(refs)` and `react(set-state-in-effect)` warnings in `useThread` stay. They come from how it drops stale reply requests, and changing that changes behavior, so it belongs in its own PR.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated unit test setup and result capture across conversation search, issue commands, thread history, and translation language coverage. Existing test cases and assertions are unchanged. These adjustments keep the test suite aligned with current testing conventions; no changes to app behavior are included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 05db403c-3a5f-4f35-a35f-d4013402801e
Commits

Reviewing files that changed from the base of the PR and between 8438a32 and 274f7e9.

Files selected for processing: 6
  • resources/js/components/commit-thread.tsx
  • tests/Unit/ConversationSearch.test.ts
  • tests/Unit/IssueCommands.test.ts
  • tests/Unit/ThreadHistory.test.tsx
  • tests/Unit/ThreadMutationHistory.test.tsx
  • tests/Unit/TranslationLanguages.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The change removes one unused import, adds void to test registrations, and updates hook test probes to pass results through callbacks. Test assertions remain unchanged.

Changes: Test updates

Layer / File(s) Summary
Discard test registration return values
tests/Unit/ConversationSearch.test.ts, tests/Unit/IssueCommands.test.ts, tests/Unit/TranslationLanguages.test.ts
Test registrations now use void to discard their return values. Test bodies and assertions are unchanged.
Capture hook results through callbacks
tests/Unit/ThreadHistory.test.tsx, tests/Unit/ThreadMutationHistory.test.tsx
Probe components pass hook results to onRender callbacks, which the tests use to capture the results. Inputs and assertions remain unchanged.

Import cleanup

Layer / File(s) Summary
Remove unused number-formatting import
resources/js/components/commit-thread.tsx
The formatExactCount import is removed. The other number-formatting imports remain.

Priority: Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

Suggested reviewers: xheaven, nunomaduro

Merge Risk: Minimal · up to 274f7

The cleanup is mergeable with no identified behavior or availability risk.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: clearing lint warnings in the test files and commit-thread.tsx. The changeset adds void to node:test registrations in three test files, passes hook results through onR…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: clearing lint warnings in the test files and commit-thread.tsx. The changeset adds void to node:test registrations in three test files, passes hook results through onRender in two probe-based tests, and removes an unused import in commit-thread.tsx. The title is specific and accurate, and it does not mention the three remaining useThread warnings that the PR objectives say stay open.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@kachelle

Copy link
Copy Markdown
Contributor Author

Closing, #1178 already fixed this the same way.

@mnapoli, you are too fast! 🧡

@kachelle kachelle closed this Oct 26, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Oct 26, 2026
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