Skip to content

refactor: Remove trpc/react dependency from @calcom/atoms#60

Open
tomerqodo wants to merge 8 commits intosentry_combined_20260121_augment_sentry_coderabbit_1_base_refactor_remove_trpc_react_dependency_from_calcom_atoms_pr722from
sentry_combined_20260121_augment_sentry_coderabbit_1_head_refactor_remove_trpc_react_dependency_from_calcom_atoms_pr722
Open

refactor: Remove trpc/react dependency from @calcom/atoms#60
tomerqodo wants to merge 8 commits intosentry_combined_20260121_augment_sentry_coderabbit_1_base_refactor_remove_trpc_react_dependency_from_calcom_atoms_pr722from
sentry_combined_20260121_augment_sentry_coderabbit_1_head_refactor_remove_trpc_react_dependency_from_calcom_atoms_pr722

Conversation

@tomerqodo
Copy link

Benchmark PR from qodo-benchmark#722

Comment on lines +304 to 310
{teamMembers.map((member) => (
<TeamMemberItem key={member.value} member={member} onWeightChange={handleWeightChange} />
))}
{filteredMembers.length === 0 && (
{teamMembers.length === 0 && (
<div className="text-subtle py-4 text-center text-sm">{t("no_members_found")}</div>
)}
</div>
Copy link

Choose a reason for hiding this comment

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

Bug: The component renders the full teamMembers list instead of the filteredMembers list, making the search input and member filtering non-functional.
Severity: MEDIUM

Suggested Fix

In EditWeightsForAllTeamMembers.tsx, change the list rendering logic to iterate over filteredMembers instead of teamMembers. This will ensure the rendered list correctly reflects the search query and other applied filters.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location:
apps/web/modules/event-types/components/EditWeightsForAllTeamMembers.tsx#L304-L310

Potential issue: In the `EditWeightsForAllTeamMembers` component, the list of team
members is rendered by iterating over the `teamMembers` prop directly. However, the
component also computes a `filteredMembers` variable to handle user input from a search
field and to filter members based on the `assignAllTeamMembers` flag. Because the
rendered list uses the unfiltered `teamMembers` array, both the search functionality and
the conditional member filtering are broken. The `filteredMembers` variable is
calculated but never used.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

2 participants