Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/src/app/dashboard/audit-log/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function AuditLogPage() {

useEffect(() => {
if (!guildId) return;
void fetchAuditLog({
fetchAuditLog({
guildId,
action: actionFilter,
userId: debouncedUserSearch,
Expand All @@ -237,7 +237,7 @@ export default function AuditLogPage() {

const handleRefresh = useCallback(() => {
if (!guildId) return;
void fetchAuditLog({
fetchAuditLog({
guildId,
action: actionFilter,
userId: debouncedUserSearch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default function ConversationDetailPage() {
}, [guildId, conversationId, router]);

useEffect(() => {
void fetchDetail();
fetchDetail();
}, [fetchDetail]);

return (
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/dashboard/conversations/conversations-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export default function ConversationsClient() {

useEffect(() => {
if (!guildId) return;
void fetchConversations({
fetchConversations({
guildId,
search: debouncedSearch,
Comment on lines 239 to 243
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.
channel: channelFilter,
Expand All @@ -248,7 +248,7 @@ export default function ConversationsClient() {

const handleRefresh = useCallback(() => {
if (!guildId) return;
void fetchConversations({
fetchConversations({
guildId,
search: debouncedSearch,
channel: channelFilter,
Expand Down
6 changes: 3 additions & 3 deletions web/src/app/dashboard/members/members-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function MembersClient() {
// Fetch on guild/search/sort change
useEffect(() => {
if (!guildId) return;
void runFetch({
runFetch({
guildId,
search: debouncedSearch,
sortColumn,
Expand All @@ -110,7 +110,7 @@ export default function MembersClient() {

const handleLoadMore = useCallback(() => {
if (!guildId || !nextAfter || loading) return;
void runFetch({
runFetch({
guildId,
search: debouncedSearch,
sortColumn,
Expand All @@ -123,7 +123,7 @@ export default function MembersClient() {
const handleRefresh = useCallback(() => {
if (!guildId) return;
resetPagination();
void runFetch({
runFetch({
guildId,
search: debouncedSearch,
sortColumn,
Expand Down
6 changes: 3 additions & 3 deletions web/src/app/dashboard/temp-roles/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default function TempRolesPage() {

useEffect(() => {
if (!guildId) return;
void fetchTempRoles(guildId, page);
fetchTempRoles(guildId, page);
}, [guildId, page, fetchTempRoles]);

const handleRevoke = useCallback(
Expand Down Expand Up @@ -164,7 +164,7 @@ export default function TempRolesPage() {
description: `Removed ${record.role_name} from ${record.user_tag}.`,
});
// Refresh list
void fetchTempRoles(guildId, page);
fetchTempRoles(guildId, page);
} catch {
toast.error('Failed to revoke temp role', {
description: 'A network error occurred. Please try again.',
Expand All @@ -178,7 +178,7 @@ export default function TempRolesPage() {
);

const handleRefresh = useCallback(() => {
if (guildId) void fetchTempRoles(guildId, page);
if (guildId) fetchTempRoles(guildId, page);
}, [guildId, page, fetchTempRoles]);

const rows = data?.data ?? [];
Expand Down
2 changes: 1 addition & 1 deletion web/src/app/dashboard/tickets/[ticketId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function TicketDetailPage() {
}, [guildId, ticketId, router]);

useEffect(() => {
void fetchDetail();
fetchDetail();
}, [fetchDetail]);

return (
Expand Down
8 changes: 4 additions & 4 deletions web/src/app/dashboard/tickets/tickets-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default function TicketsClient() {
useEffect(() => {
if (!guildId) return;
const controller = new AbortController();
void fetchStats(guildId, controller.signal);
fetchStats(guildId, controller.signal);
return () => controller.abort();
}, [guildId, fetchStats]);

Expand Down Expand Up @@ -241,7 +241,7 @@ export default function TicketsClient() {

useEffect(() => {
if (!guildId) return;
void fetchTickets({
fetchTickets({
guildId,
status: statusFilter,
user: debouncedSearch,
Expand All @@ -251,8 +251,8 @@ export default function TicketsClient() {

const handleRefresh = useCallback(() => {
if (!guildId) return;
void fetchStats(guildId);
void fetchTickets({
fetchStats(guildId);
fetchTickets({
guildId,
status: statusFilter,
user: debouncedSearch,
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/dashboard/health-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ export function HealthSection() {

// Initial fetch
useEffect(() => {
void fetchHealth();
fetchHealth();
return () => abortControllerRef.current?.abort();
}, [fetchHealth]);

// Auto-refresh every 60s
useEffect(() => {
const intervalId = window.setInterval(() => {
void fetchHealth(true);
fetchHealth(true);
}, AUTO_REFRESH_MS);
return () => window.clearInterval(intervalId);
}, [fetchHealth]);
Expand All @@ -127,7 +127,7 @@ export function HealthSection() {
variant="outline"
size="sm"
className="gap-2 self-start sm:self-auto"
onClick={() => void fetchHealth()}
onClick={() => fetchHealth()}
disabled={loading}
>
<RefreshCw className={`h-4 w-4 ${loading ? 'animate-spin' : ''}`} />
Expand All @@ -141,7 +141,7 @@ export function HealthSection() {
className="rounded-md border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive"
>
<strong>Failed to load health data:</strong> {error}
<Button variant="outline" size="sm" className="ml-4" onClick={() => void fetchHealth()}>
<Button variant="outline" size="sm" className="ml-4" onClick={() => fetchHealth()}>
Try again
</Button>
</div>
Expand Down
10 changes: 5 additions & 5 deletions web/src/components/dashboard/performance-dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ export function PerformanceDashboard() {

// Initial fetch
useEffect(() => {
void fetchData();
fetchData();
return () => abortRef.current?.abort();
Comment on lines 173 to 175
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.
}, [fetchData]);

// Auto-refresh every 30s
useEffect(() => {
const id = window.setInterval(() => void fetchData(true), AUTO_REFRESH_MS);
const id = window.setInterval(() => fetchData(true), AUTO_REFRESH_MS);
return () => window.clearInterval(id);
}, [fetchData]);

Expand Down Expand Up @@ -209,7 +209,7 @@ export function PerformanceDashboard() {
}
setThresholdMsg('Thresholds saved.');
toast.success('Thresholds saved', { description: 'Alert thresholds updated successfully.' });
void fetchData(true);
fetchData(true);
} catch {
setThresholdMsg('Error: Network failure');
toast.error('Failed to save thresholds', { description: 'A network error occurred.' });
Expand Down Expand Up @@ -271,7 +271,7 @@ export function PerformanceDashboard() {
variant="outline"
size="sm"
className="gap-2"
onClick={() => void fetchData()}
onClick={() => fetchData()}
disabled={loading}
>
<RefreshCw className={`h-4 w-4 ${loading ? 'animate-spin' : ''}`} />
Expand All @@ -286,7 +286,7 @@ export function PerformanceDashboard() {
className="rounded-md border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive"
>
<strong>Failed to load performance data:</strong> {error}
<Button variant="outline" size="sm" className="ml-4" onClick={() => void fetchData()}>
<Button variant="outline" size="sm" className="ml-4" onClick={() => fetchData()}>
Try again
</Button>
</div>
Expand Down
Loading