Skip to content

Conversation

@Deepcode007
Copy link
Contributor

@Deepcode007 Deepcode007 commented Jan 10, 2026

Proposed Changes

Fixes #14408

  • Remove intersects_any from ConditionOperation type enum as it has been replaced by has_tag.
  • Confirmed that intersects_any is no longer used in the codebase.
    Tagging: @ohcnetwork/care-fe-code-reviewers

@Jacobjeevan @yash-learner

Merge Checklist

  • Add specs that demonstrate the bug or test the new feature.
  • Update product documentation.
  • Ensure that UI text is placed in I18n files.
  • Prepare a screenshot or demo video for the changelog entry and attach it to the issue.
  • Request peer reviews.
  • Add or update Playwright tests for related changes

Checks:

  1. Backend Alignment: Since the backend has already removed this operation, the API will never send intersects_any in the allowed_operations list. Therefore, the UI dropdowns (which rely on this list) will never display it.
  2. Type Safety (Zod): The conditionSchema in condition.ts (used for form validation) already excluded intersects_any, only allowing equality, in_range, and has_tag.
  3. UI Logic: The CompactConditionEditor component explicitly handles equality, in_range, and has_tag. It does not have logic for intersects_any, so removing it from the type definition cleans up dead code that would never be reachable.
  4. No Textual Matches: grep -r "intersects_any" . confirms the string "intersects_any" does not exist anywhere else in the codebase.

Summary by CodeRabbit

  • Chores
    • Removed a legacy condition option from the platform, simplifying the available condition choices and related logic.
    • Reduces potential confusion by eliminating an unsupported selection in condition configuration; existing conditions continue to function but that option is no longer available.

✏️ Tip: You can customize this high-level summary in your review settings.

@Deepcode007 Deepcode007 requested review from a team January 10, 2026 11:48
@Deepcode007 Deepcode007 requested a review from a team as a code owner January 10, 2026 11:48
@netlify
Copy link

netlify bot commented Jan 10, 2026

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit 92bccea
🔍 Latest deploy log https://app.netlify.com/projects/care-ohc/deploys/6964fcc929d0190008e4194a
😎 Deploy Preview https://deploy-preview-15093.preview.ohc.network
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 10, 2026

Walkthrough

Removed the intersects_any member from the ConditionOperation enum in the condition type definitions, eliminating that operation option from condition logic and any discriminated unions that referenced it.

Changes

Cohort / File(s) Summary
Condition Operation Enum
src/types/base/condition/condition.ts
Removed the intersects_any member from the ConditionOperation enum (−1 line). Review code paths, type guards, and switch branches that handled intersects_any for compilation/runtime gaps.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing 'intersects_any' from the ConditionOperation enum, and references the related issue #14408.
Description check ✅ Passed The description covers the main change, references the issue, confirms no other usages exist, and explains the alignment checks performed. Some merge checklist items remain pending but the core information is present.
Linked Issues check ✅ Passed The PR meets the primary objective of issue #14408 by removing 'intersects_any' from the ConditionOperation enum. Verification confirms no usages remain in the codebase, satisfying the requirement to update/remove all existing usages.
Out of Scope Changes check ✅ Passed The changes are narrowly scoped to removing the 'intersects_any' enum member from ConditionOperation. No unrelated modifications are present; all changes directly address the linked issue requirement.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9bacdb8 and 92bccea.

📒 Files selected for processing (1)
  • src/types/base/condition/condition.ts
💤 Files with no reviewable changes (1)
  • src/types/base/condition/condition.ts
⏰ 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). (5)
  • GitHub Check: build
  • GitHub Check: Test
  • GitHub Check: deploy-preview
  • GitHub Check: CodeQL-Build
  • GitHub Check: OSSAR-Scan

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.

@github-actions
Copy link

github-actions bot commented Jan 10, 2026

🚀 Preview Deployment Ready!

Name Details
🔗 Preview URL https://59db8f7a.care-preview-a7w.pages.dev
📝 Commit 92bccea
🌐 Environment pr-15093

This preview will be automatically updated when you push new commits to this PR.

@github-actions
Copy link

github-actions bot commented Jan 10, 2026

🎭 Playwright Test Results

Status: ✅ Passed
Test Shards: 3

Metric Count
Total Tests 251
✅ Passed 251
❌ Failed 0
⏭️ Skipped 0

📊 Detailed results are available in the playwright-final-report artifact.

Run: #4562

@Deepcode007 Deepcode007 force-pushed the fix/Update_intersects_any_to_has_tag_#14408 branch from 576902d to 9bacdb8 Compare January 12, 2026 10:49
@Deepcode007 Deepcode007 force-pushed the fix/Update_intersects_any_to_has_tag_#14408 branch from 9bacdb8 to 92bccea Compare January 12, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs review needs testing Type Changes Contains changes in typescript types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update intersects_any to has_tag in condition operation type

1 participant