Skip to content

Dev#96

Merged
abhishek-nexgen-dev merged 18 commits into
masterfrom
dev
May 13, 2026
Merged

Dev#96
abhishek-nexgen-dev merged 18 commits into
masterfrom
dev

Conversation

@abhishek-nexgen-dev
Copy link
Copy Markdown
Member

No description provided.

abhishek-nexgen-dev and others added 18 commits May 13, 2026 11:56
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
feat: Webhook Management System — Complete Frontend Dashboard for CommDesk
@abhishek-nexgen-dev abhishek-nexgen-dev merged commit 8def030 into master May 13, 2026
2 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a new Webhook management system with delivery logs and testing capabilities, integrates Vitest for testing, and enhances the ConfirmModal component. Key feedback highlights a broken sort implementation in the reminders utility and an unreliable selection state check in the Webhook table that relies solely on array lengths.

Comment thread src/utils/reminders.ts

//sorting acc to priority
return reminders.sort((a, b) => (a.type === "urgent" ? -1 : 1)).slice(0, 5);
return reminders.sort((a) => (a.type === "urgent" ? -1 : 1)).slice(0, 5);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The sort function is missing the second argument in the comparator, which is required for a valid sort. The current implementation will not sort the array correctly and may cause runtime errors.

Suggested change
return reminders.sort((a) => (a.type === "urgent" ? -1 : 1)).slice(0, 5);
return reminders.sort((a, b) => Number(b.type === "urgent") - Number(a.type === "urgent")).slice(0, 5);

}: Props) {
const navigate = useNavigate();

const allSelected = webhooks.length > 0 && selectedIds.length === webhooks.length;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The allSelected check is incorrect because it only compares the length of selectedIds and webhooks. This will lead to incorrect selection states if selectedIds contains IDs not present in the current webhooks list.

Suggested change
const allSelected = webhooks.length > 0 && selectedIds.length === webhooks.length;
const allSelected = webhooks.length > 0 && webhooks.every(w => selectedIds.includes(w.id));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants