Skip to content

fix: remove void operators and unnecessary awaits (SonarCloud)#386

Merged
BillChirico merged 1 commit intomainfrom
fix/sonarcloud-cleanup
Mar 26, 2026
Merged

fix: remove void operators and unnecessary awaits (SonarCloud)#386
BillChirico merged 1 commit intomainfrom
fix/sonarcloud-cleanup

Conversation

@BillChirico
Copy link
Copy Markdown
Collaborator

Fixes ~25 SonarCloud critical issues by removing void operator usage from React dashboard components.

Changes

Fix 1: Remove void operator from web dashboard files

Replaced void someFunc() with just someFunc() in fire-and-forget async calls inside useEffect and useCallback hooks:

  • conversations-client.tsx
  • members-client.tsx
  • tickets-client.tsx
  • temp-roles/page.tsx
  • performance-dashboard.tsx
  • health-section.tsx
  • audit-log/page.tsx
  • tickets/[ticketId]/page.tsx
  • conversations/[conversationId]/page.tsx

Test Results

  • ✅ 4202 tests passing (0 failures)
  • ✅ Biome lint: no errors

Copilot AI review requested due to automatic review settings March 26, 2026 08:12
@github-project-automation github-project-automation bot moved this to Backlog in Volvox.Bot Mar 26, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 26, 2026

⚠️ No Changeset found

Latest commit: 69a8e3f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@railway-app
Copy link
Copy Markdown

railway-app bot commented Mar 26, 2026

🚅 Deployed to the volvox-bot-pr-386 environment in volvox-bot

Service Status Web Updated (UTC)
bot ✅ Success (View Logs) Web Mar 26, 2026 at 8:14 am
web ✅ Success (View Logs) Mar 26, 2026 at 8:14 am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8abae1c6-a708-4ff5-a87c-dbfb09aba78a

📥 Commits

Reviewing files that changed from the base of the PR and between ac8a108 and 69a8e3f.

📒 Files selected for processing (9)
  • web/src/app/dashboard/audit-log/page.tsx
  • web/src/app/dashboard/conversations/[conversationId]/page.tsx
  • web/src/app/dashboard/conversations/conversations-client.tsx
  • web/src/app/dashboard/members/members-client.tsx
  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/app/dashboard/tickets/[ticketId]/page.tsx
  • web/src/app/dashboard/tickets/tickets-client.tsx
  • web/src/components/dashboard/health-section.tsx
  • web/src/components/dashboard/performance-dashboard.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Agent
  • GitHub Check: Cursor Bugbot
  • GitHub Check: Greptile Review
  • GitHub Check: Test
  • GitHub Check: E2E Tests (2/2)
  • GitHub Check: E2E Tests (1/2)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{js,ts,tsx}: Use single quotes for strings (except in JSON files); no double quotes
Always include semicolons at the end of statements
Use 2-space indentation (spaces, not tabs)
Always include trailing commas in multi-line arrays, objects, and function parameters
Maintain a maximum line width of 100 characters

Files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/components/dashboard/health-section.tsx
  • web/src/app/dashboard/tickets/[ticketId]/page.tsx
  • web/src/app/dashboard/conversations/[conversationId]/page.tsx
  • web/src/app/dashboard/conversations/conversations-client.tsx
  • web/src/components/dashboard/performance-dashboard.tsx
  • web/src/app/dashboard/tickets/tickets-client.tsx
  • web/src/app/dashboard/members/members-client.tsx
  • web/src/app/dashboard/audit-log/page.tsx
web/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Never use console.* methods in web dashboard code; use appropriate logging mechanisms for React applications

Files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/components/dashboard/health-section.tsx
  • web/src/app/dashboard/tickets/[ticketId]/page.tsx
  • web/src/app/dashboard/conversations/[conversationId]/page.tsx
  • web/src/app/dashboard/conversations/conversations-client.tsx
  • web/src/components/dashboard/performance-dashboard.tsx
  • web/src/app/dashboard/tickets/tickets-client.tsx
  • web/src/app/dashboard/members/members-client.tsx
  • web/src/app/dashboard/audit-log/page.tsx
web/src/app/dashboard/**/*.tsx

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

For dashboard routes, add a matcher entry to dashboardTitleMatchers in web/src/lib/page-titles.ts: use exact equality for leaf routes (pathname === '/dashboard/my-route') and subtree checks (pathname.startsWith('/dashboard/my-route/')); export metadata using createPageMetadata(title) for SSR entry points

Files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/app/dashboard/tickets/[ticketId]/page.tsx
  • web/src/app/dashboard/conversations/[conversationId]/page.tsx
  • web/src/app/dashboard/conversations/conversations-client.tsx
  • web/src/app/dashboard/tickets/tickets-client.tsx
  • web/src/app/dashboard/members/members-client.tsx
  • web/src/app/dashboard/audit-log/page.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: ESM only - do not use CommonJS modules
Use src/logger.js; do not use console.*

Files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/components/dashboard/health-section.tsx
  • web/src/app/dashboard/tickets/[ticketId]/page.tsx
  • web/src/app/dashboard/conversations/[conversationId]/page.tsx
  • web/src/app/dashboard/conversations/conversations-client.tsx
  • web/src/components/dashboard/performance-dashboard.tsx
  • web/src/app/dashboard/tickets/tickets-client.tsx
  • web/src/app/dashboard/members/members-client.tsx
  • web/src/app/dashboard/audit-log/page.tsx
🧠 Learnings (10)
📚 Learning: 2026-03-26T00:04:14.673Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-26T00:04:14.673Z
Learning: Applies to {web/src/lib/page-titles.ts,web/src/**/+page.ts,web/src/**/+page.svelte} : New dashboard routes need title wiring in web/src/lib/page-titles.ts: use createPageMetadata() for SSR and keep DashboardTitleSync aligned for client navigation.

Applied to files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/app/dashboard/audit-log/page.tsx
📚 Learning: 2026-03-11T06:42:38.728Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-11T06:42:38.728Z
Learning: Applies to web/src/app/api/**/route.ts : Include guildId in signed WebSocket ticket payload when issuing tickets from dashboard endpoints

Applied to files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/app/dashboard/tickets/[ticketId]/page.tsx
  • web/src/app/dashboard/tickets/tickets-client.tsx
📚 Learning: 2026-03-10T23:21:49.730Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-10T23:21:49.730Z
Learning: Applies to web/src/components/layout/dashboard-shell.tsx : Dashboard page titles should sync with route changes using DashboardTitleSync component mounted in dashboard-shell.tsx and canonical title string 'Volvox.Bot - AI Powered Discord Bot'

Applied to files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/components/dashboard/performance-dashboard.tsx
  • web/src/app/dashboard/audit-log/page.tsx
📚 Learning: 2026-03-12T02:03:36.493Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-12T02:03:36.493Z
Learning: Applies to web/src/app/dashboard/**/*.tsx : For dashboard routes, add a matcher entry to `dashboardTitleMatchers` in `web/src/lib/page-titles.ts`: use exact equality for leaf routes (`pathname === '/dashboard/my-route'`) and subtree checks (`pathname.startsWith('/dashboard/my-route/')`); export `metadata` using `createPageMetadata(title)` for SSR entry points

Applied to files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/components/dashboard/performance-dashboard.tsx
  • web/src/app/dashboard/audit-log/page.tsx
📚 Learning: 2026-03-10T23:21:49.730Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-10T23:21:49.730Z
Learning: Applies to src/api/routes/*.js : Add adaptDeleteGuildIdParam in API route handlers to enforce guild moderation checks on DELETE requests without losing record id

Applied to files:

  • web/src/app/dashboard/temp-roles/page.tsx
📚 Learning: 2026-03-11T06:42:38.728Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-11T06:42:38.728Z
Learning: Applies to web/src/pages/dashboard/**/*.{ts,tsx} : Use shared title helpers from web/src/lib/page-titles.ts for setting browser titles in dashboard pages

Applied to files:

  • web/src/app/dashboard/temp-roles/page.tsx
  • web/src/components/dashboard/health-section.tsx
  • web/src/components/dashboard/performance-dashboard.tsx
  • web/src/app/dashboard/audit-log/page.tsx
📚 Learning: 2026-03-26T00:04:14.673Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-26T00:04:14.673Z
Learning: Applies to src/**/*.{js,ts} : Use the safe Discord messaging helpers in src/utils/safeSend.js instead of raw reply/send/edit calls

Applied to files:

  • web/src/app/dashboard/conversations/conversations-client.tsx
📚 Learning: 2026-03-12T02:03:36.493Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-03-12T02:03:36.493Z
Learning: Applies to web/src/**/*.{ts,tsx} : Never use `console.*` methods in web dashboard code; use appropriate logging mechanisms for React applications

Applied to files:

  • web/src/components/dashboard/performance-dashboard.tsx
  • web/src/app/dashboard/audit-log/page.tsx
📚 Learning: 2026-03-11T05:32:46.325Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-11T05:32:46.325Z
Learning: Applies to web/src/app/**/*.{ts,tsx} : Apply static metadata to server-rendered dashboard entry pages and use title template format for root app metadata

Applied to files:

  • web/src/components/dashboard/performance-dashboard.tsx
📚 Learning: 2026-03-11T06:42:38.728Z
Learnt from: CR
Repo: VolvoxLLC/volvox-bot PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-03-11T06:42:38.728Z
Learning: Applies to src/api/ws/*.js : Bind audit-log WebSocket auth tickets to guild context by including nonce.expiry.guildId.hmac in ticket validation

Applied to files:

  • web/src/app/dashboard/tickets/tickets-client.tsx
  • web/src/app/dashboard/audit-log/page.tsx
🔇 Additional comments (11)
web/src/app/dashboard/temp-roles/page.tsx (1)

134-135: void removal is safe in these fetchTempRoles call sites.

fetchTempRoles already handles aborts/errors internally, so direct invocation preserves behavior.

Also applies to: 167-168, 181-182

web/src/app/dashboard/tickets/[ticketId]/page.tsx (1)

89-91: Direct fetchDetail() call in effect looks good.

No regression observed; error handling remains inside fetchDetail.

web/src/components/dashboard/health-section.tsx (1)

99-100: void removal is consistent and safe in HealthSection.

The async workflow is still guarded by internal error/abort handling in fetchHealth.

Also applies to: 106-107, 130-131, 144-145

web/src/app/dashboard/conversations/[conversationId]/page.tsx (1)

71-73: fetchDetail() effect update is good.

No functional regressions detected from removing the void operator here.

web/src/components/dashboard/performance-dashboard.tsx (1)

174-175: These fetchData call-site updates look correct.

Direct invocation preserves current behavior because fetchData already contains abort/error handling.

Also applies to: 180-181, 212-213, 274-275, 289-290

web/src/app/dashboard/conversations/conversations-client.tsx (1)

241-247: fetchConversations call-site cleanup looks good.

The function already handles request lifecycle/errors, so direct invocation is fine here.

Also applies to: 251-257

web/src/app/dashboard/audit-log/page.tsx (1)

228-236: fetchAuditLog invocation updates are solid.

No functional concerns in these segments after removing void.

Also applies to: 240-248

web/src/app/dashboard/members/members-client.tsx (1)

88-95: No action needed—fire-and-forget calls to runFetch are safe.

fetchMembers is designed with comprehensive error handling: all code paths (success, 401 unauthorized, network errors, abort signals, JSON parsing errors) return a resolved promise with a sentinel value ('ok', 'unauthorized', or 'error'). It never throws or rejects. The fire-and-forget calls at lines 88–95, 113–120, and 126–133 cannot cause unhandled promise rejections.

			> Likely an incorrect or invalid review comment.
web/src/app/dashboard/tickets/tickets-client.tsx (3)

189-190: Good cleanup of fire-and-forget call in guild effect.

Line 189 keeps the same control flow while removing unnecessary void, and abort cleanup is still correctly wired.


244-249: Filters effect change looks correct.

Line 244 preserves existing behavior and state transitions; removing void here is safe given internal error handling in fetchTickets.


254-260: Refresh handler update is solid.

Lines 254-260 keep refresh behavior intact while removing redundant void operators.


📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Internal improvements to async function call handling across dashboard components including audit logs, conversations, members, temporary roles, tickets, health monitoring, and performance tracking. No user-facing functionality changes.

Walkthrough

Removed void operators from async function calls across multiple dashboard pages and components. The affected async functions (fetchAuditLog, fetchDetail, fetchConversations, runFetch, fetchTempRoles, fetchStats, fetchTickets, fetchHealth, fetchData) retain their internal logic, state management, and error handling; only the promise handling at call sites changed from explicit discarding to implicit handling.

Changes

Cohort / File(s) Summary
Audit Log Dashboard
web/src/app/dashboard/audit-log/page.tsx
Removed void operator from two fetchAuditLog() call sites (useEffect and handleRefresh callback).
Conversations Dashboard
web/src/app/dashboard/conversations/page.tsx, web/src/app/dashboard/conversations/conversations-client.tsx
Removed void operator from fetchDetail() and fetchConversations() calls across useEffect and refresh handlers.
Members Dashboard
web/src/app/dashboard/members/members-client.tsx
Removed void operator from three runFetch() call sites (initial fetch, pagination, and refresh).
Temp Roles Dashboard
web/src/app/dashboard/temp-roles/page.tsx
Removed void operator from three fetchTempRoles() call sites (initial fetch, post-revoke refresh, and refresh handler).
Tickets Dashboard
web/src/app/dashboard/tickets/[ticketId]/page.tsx, web/src/app/dashboard/tickets/tickets-client.tsx
Removed void operator from fetchDetail(), fetchStats(), and fetchTickets() calls in useEffect and refresh handlers.
Dashboard Components
web/src/components/dashboard/health-section.tsx, web/src/components/dashboard/performance-dashboard.tsx
Removed void operator from fetchHealth() and fetchData() calls across useEffect, interval callbacks, and click handlers.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing void operators from React dashboard components to fix SonarCloud issues.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale (SonarCloud fixes), the specific change pattern (removing void operators), affected files, and test results.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sonarcloud-cleanup
  • 🛠️ Publish Changes: Commit on current branch
  • 🛠️ Publish Changes: Create PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets SonarCloud findings in the Next.js dashboard by removing void operators (and related unnecessary async “fire-and-forget” patterns) from several client components, primarily around useEffect/useCallback fetch flows.

Changes:

  • Replaced void someAsyncCall() with someAsyncCall() in multiple dashboard pages/components to address SonarCloud issues.
  • Updated interval callbacks and click handlers to call refresh/fetch functions without the void operator.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
web/src/components/dashboard/performance-dashboard.tsx Removes void usage for initial fetch, auto-refresh interval, refresh button, and post-save refresh call.
web/src/components/dashboard/health-section.tsx Removes void usage from initial fetch, auto-refresh interval, and refresh/try-again buttons.
web/src/app/dashboard/tickets/tickets-client.tsx Removes void usage when fetching stats and ticket list (effects + refresh).
web/src/app/dashboard/tickets/[ticketId]/page.tsx Removes void usage from the detail fetch effect.
web/src/app/dashboard/temp-roles/page.tsx Removes void usage from list fetches and refresh after revoke.
web/src/app/dashboard/members/members-client.tsx Removes void usage around runFetch calls for list updates, load more, and refresh.
web/src/app/dashboard/conversations/conversations-client.tsx Removes void usage around conversation list fetch calls in effect + refresh.
web/src/app/dashboard/conversations/[conversationId]/page.tsx Removes void usage from the detail fetch effect.
web/src/app/dashboard/audit-log/page.tsx Removes void usage around audit log fetch calls in effect + refresh.

Comment on lines 173 to 175
useEffect(() => {
void fetchData();
fetchData();
return () => abortRef.current?.abort();
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR claims to remove void operator usage in the dashboard, but this file still contains onClick={() => void saveThresholds()} (around line 548). If the goal is to resolve SonarCloud findings consistently, update this remaining call site too (or adjust the PR description/scope).

Copilot uses AI. Check for mistakes.
Comment on lines 239 to 243
useEffect(() => {
if (!guildId) return;
void fetchConversations({
fetchConversations({
guildId,
search: debouncedSearch,
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR description indicates void operators were removed from dashboard components, but this file still has void (async () => { ... })() in the channels-fetch effect (around line 176). Consider removing that remaining void usage as well (or clarify why it’s intentionally kept) to avoid leaving SonarCloud issues behind.

Copilot uses AI. Check for mistakes.
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This PR removes void operator usage from 9 Next.js dashboard components, resolving ~25 SonarCloud critical issues. The changes are purely cosmetic — replacing void someAsyncFn() with bare someAsyncFn() calls in fire-and-forget contexts (useEffect, useCallback handlers, and button onClick handlers).\n\nKey findings:\n- All affected async functions (fetchAuditLog, fetchConversations, runFetch, fetchTempRoles, fetchStats, fetchTickets, fetchDetail, fetchHealth, fetchData) have comprehensive internal try/catch blocks that absorb all errors, including AbortError. Removing void therefore introduces no new risk of unhandled promise rejections at runtime.\n- One void saveThresholds() call remains on line 548 of performance-dashboard.tsx, leaving an inconsistency with the rest of the PR. It is in a button onClick handler and was not included in the diff.\n- No new console.* calls, any types, hardcoded locales, or missing error handling were introduced.

Confidence Score: 5/5

Safe to merge — purely cosmetic removal of void operators with no runtime behaviour change.

Every touched async function has a full try/catch that prevents unhandled rejections, so removing void has zero runtime impact. All 4202 tests pass and Biome reports no lint errors. The only finding is one leftover void saveThresholds() that could be cleaned up in a follow-up, but it does not affect correctness or the SonarCloud fix.

web/src/components/dashboard/performance-dashboard.tsx (line 548) has a remaining void saveThresholds() not addressed by the PR.

Important Files Changed

Filename Overview
web/src/app/dashboard/audit-log/page.tsx Removed void from two fetchAuditLog fire-and-forget calls; function has a full try/catch, so change is safe.
web/src/app/dashboard/conversations/[conversationId]/page.tsx Removed void from fetchDetail() call in useEffect; fetchDetail catches all errors internally.
web/src/app/dashboard/conversations/conversations-client.tsx Removed void from two fetchConversations calls; fetchConversations has proper try/catch with abort-error guard.
web/src/app/dashboard/members/members-client.tsx Removed void from three runFetch calls; runFetch delegates to fetchMembers in the Zustand store, which always resolves (never throws).
web/src/app/dashboard/temp-roles/page.tsx Removed void from three fetchTempRoles calls across useEffect, handleRevoke, and handleRefresh; function has try/catch.
web/src/app/dashboard/tickets/[ticketId]/page.tsx Removed void from fetchDetail() in useEffect; fetchDetail has comprehensive try/catch error handling.
web/src/app/dashboard/tickets/tickets-client.tsx Removed void from four calls (fetchStats and fetchTickets); both functions absorb all errors internally.
web/src/components/dashboard/health-section.tsx Removed void from four fetchHealth call sites (initial load, interval, two button handlers); function catches all errors including AbortError.
web/src/components/dashboard/performance-dashboard.tsx Removed void from five fetchData call sites, but one void saveThresholds() in the button's onClick handler (line 548) was not updated, leaving an inconsistency with the rest of the PR.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["useEffect / useCallback / onClick"] -->|"before: void fn()"| B["Promise discarded\n(void → undefined)"]
    A -->|"after: fn()"| C["Promise still floating\n(functionally identical)"]
    B --> D["Internal try/catch\nin async fn"]
    C --> D
    D -->|success| E["setState(data)"]
    D -->|error| F["setState(errorMsg)"]
    D -->|AbortError| G["return early (no-op)"]
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: web/src/components/dashboard/performance-dashboard.tsx
Line: 548

Comment:
**Leftover `void` not removed by this PR**

This `onClick` handler still uses the `void` operator on `saveThresholds()`, while all analogous event handlers in this same file (e.g. `onClick={() => fetchData()}` on lines 274 and 289) were updated. If the goal is to fully resolve the SonarCloud `void` operator warnings, this call should be updated for consistency.

The `saveThresholds` function has a proper try/catch internally, so directly passing it as the handler is safe:

```suggestion
            <Button onClick={saveThresholds} disabled={thresholdSaving}>
```

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix: remove void operators and unnecessa..." | Re-trigger Greptile

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 90.633% (-0.01%) from 90.643%
when pulling 69a8e3f on fix/sonarcloud-cleanup
into ac8a108 on main.

@BillChirico BillChirico enabled auto-merge (squash) March 26, 2026 11:55
@BillChirico BillChirico merged commit 9f74757 into main Mar 26, 2026
29 checks passed
@BillChirico BillChirico deleted the fix/sonarcloud-cleanup branch March 26, 2026 13:29
@github-project-automation github-project-automation bot moved this from Backlog to Done in Volvox.Bot Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants