Skip to content

fix: usage of input fields on the ui#2437

Merged
JivusAyrus merged 3 commits intomainfrom
suvij/eng-8709-input-fields-shows-wrong-values
Jan 6, 2026
Merged

fix: usage of input fields on the ui#2437
JivusAyrus merged 3 commits intomainfrom
suvij/eng-8709-input-fields-shows-wrong-values

Conversation

@JivusAyrus
Copy link
Copy Markdown
Member

@JivusAyrus JivusAyrus commented Jan 2, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Analytics now exclude null values when calculating field usage and deprecation metrics, improving accuracy of usage reports and unused/used field detection.

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

Checklist

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 2, 2026

Walkthrough

The SQL filters in UsageRepository queries were tightened to exclude null fields: IsNull = false was added alongside IsIndirectFieldUsage = false in getFieldUsage, and IsNull = false was added to the used_fields subqueries in getUnusedFields, getUsedFields, and to the deprecated_fields join in getDeprecatedFieldsUsedInOperation.

Changes

Cohort / File(s) Summary
Analytics Repository Updates
controlplane/src/core/repositories/analytics/UsageRepository.ts
Added AND IsNull = false to multiple SQL predicates: in getFieldUsage filter, in used_fields subqueries for getUnusedFields and getUsedFields, and in the deprecated_fields join for getDeprecatedFieldsUsedInOperation to exclude null fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: usage of input fields on the ui' is partially related to the changeset but lacks specificity about the actual technical change (adding IsNull filters to analytics queries).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 977f954 and e1764eb.

📒 Files selected for processing (1)
  • controlplane/src/core/repositories/analytics/UsageRepository.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • controlplane/src/core/repositories/analytics/UsageRepository.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). (4)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
  • GitHub Check: build_test
  • GitHub Check: build_push_image

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98bb8e9 and 977f954.

📒 Files selected for processing (1)
  • controlplane/src/core/repositories/analytics/UsageRepository.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). (4)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: build_push_image
  • GitHub Check: build_test

Comment thread controlplane/src/core/repositories/analytics/UsageRepository.ts
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 62.75%. Comparing base (da0342d) to head (d03d2cf).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...src/core/repositories/analytics/UsageRepository.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           main    #2437       +/-   ##
=========================================
+ Coverage      0   62.75%   +62.75%     
=========================================
  Files         0      296      +296     
  Lines         0    41353    +41353     
  Branches      0     4244     +4244     
=========================================
+ Hits          0    25951    +25951     
- Misses        0    15381    +15381     
- Partials      0       21       +21     
Files with missing lines Coverage Δ
...src/core/repositories/analytics/UsageRepository.ts 52.42% <0.00%> (ø)

... and 295 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@StarpTech StarpTech left a comment

Choose a reason for hiding this comment

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

LGTM

@JivusAyrus JivusAyrus merged commit b61556c into main Jan 6, 2026
11 checks passed
@JivusAyrus JivusAyrus deleted the suvij/eng-8709-input-fields-shows-wrong-values branch January 6, 2026 14:03
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.

3 participants