Skip to content

Conversation

@Lindar90
Copy link

@Lindar90 Lindar90 commented Feb 10, 2026

Summary by CodeRabbit

  • New Features
    • Added feature-flagged support for a confidence-score review option in metadata editing; off by default and toggleable to affect editor and list views.
  • Tests
    • Added tests covering rendering with the confidence-score feature enabled and disabled, and a test ensuring the editor receives the review flag.
  • Chores
    • Updated metadata editor dependency to a newer version.

@Lindar90 Lindar90 requested review from a team as code owners February 10, 2026 14:49
@CLAassistant
Copy link

CLAassistant commented Feb 10, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Denis Marusevich seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Lindar90 Lindar90 marked this pull request as draft February 10, 2026 14:49
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Walkthrough

Adds a confidence-score feature flag check (metadata.confidenceScore.enabled) in the metadata sidebar and threads a new boolean prop isConfidenceScoreReviewEnabled to MetadataInstanceEditor and MetadataInstanceList; tests were added and @box/metadata-editor was bumped.

Changes

Cohort / File(s) Summary
Sidebar + Editor
src/elements/content-sidebar/MetadataSidebarRedesign.tsx, src/elements/content-sidebar/MetadataInstanceEditor.tsx
Add useFeatureEnabled('metadata.confidenceScore.enabled') in the sidebar and introduce/forward isConfidenceScoreReviewEnabled prop to MetadataInstanceEditor (defaulted to false) and MetadataInstanceList.
List
src/elements/content-sidebar/MetadataInstanceList.tsx
Receives new isConfidenceScoreReviewEnabled prop from parent (prop threading only).
Tests
src/elements/content-sidebar/__tests__/MetadataInstanceEditor.test.tsx, src/elements/content-sidebar/__tests__/MetadataSidebarRedesign.test.tsx
Add tests asserting rendering with the confidence-score feature flag enabled and disabled.
Dependencies
package.json
Bump @box/metadata-editor from ^1.18.0 to ^1.32.0 in dependencies and peerDependencies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ready-to-merge

Suggested reviewers

  • tjuanitas
  • reneshen0328
  • jfox-box

Poem

🐰 I nudged a little flag through leaves of code,
From sidebar root to editor road,
Tests did cheer, dependencies grew,
Hops of change in tidy queue—hooray! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and does not follow the template. It only contains generic merge queue instructions without any explanation of the actual code changes, implementation details, or the purpose of the HITL feature. Add a clear description of the changes made, the feature being implemented (HITL confidence score review), the affected components, and the reasoning behind the changes. Remove or supplement the generic merge instructions.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(content-sidebar): FF integration for HITL' is directly related to the main change, clearly indicating a feature for content-sidebar related to feature flag integration.

✏️ 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

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/elements/content-sidebar/__tests__/MetadataInstanceEditor.test.tsx (1)

166-172: Test doesn't verify that isConfidenceScoreReviewEnabled is actually forwarded.

The assertion (checking the template header text) is identical to the existing test on Lines 90–95 and doesn't validate that the prop reaches MetadataInstanceForm. Consider asserting on a visible effect of the prop or using a spy/mock on MetadataInstanceForm to confirm it receives isConfidenceScoreReviewEnabled={true}.


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.

Copy link
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

🤖 Fix all issues with AI agents
In `@src/elements/content-sidebar/__tests__/MetadataSidebarRedesign.test.tsx`:
- Around line 277-285: The tests are double-nesting feature flags because
renderComponent already wraps the second arg into { wrapperProps: { features }
}, so update the two tests to pass the features object directly to
renderComponent (not wrapped in wrapperProps). Specifically, change the calls
that currently pass { wrapperProps: { features: {
'metadata.confidenceScore.enabled': true/false } } } to pass {
'metadata.confidenceScore.enabled': true } and {
'metadata.confidenceScore.enabled': false } respectively so
useFeatureEnabled('metadata.confidenceScore.enabled') receives the correct flag.
🧹 Nitpick comments (1)
src/elements/content-sidebar/__tests__/MetadataInstanceEditor.test.tsx (1)

166-172: Test is a basic smoke test — consider asserting the prop is forwarded.

This test only verifies the component renders without crashing when isConfidenceScoreReviewEnabled is true, but doesn't assert any behavioral difference. Since MetadataInstanceEditor is a pass-through wrapper, you could verify the prop reaches MetadataInstanceForm (e.g., via a snapshot or by checking a rendered artifact that depends on this flag). Low priority given this is a thin wrapper.

@Lindar90 Lindar90 force-pushed the HITL-ff-integration branch 2 times, most recently from 1cb51e4 to a38bcc3 Compare February 11, 2026 06:59
@Lindar90 Lindar90 marked this pull request as ready for review February 11, 2026 06:59
Copy link
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

🤖 Fix all issues with AI agents
In `@package.json`:
- Line 138: Update the peerDependencies entry for `@box/metadata-editor` in
package.json to ^1.32.0 so it matches the devDependencies bump and ensures the
new isConfidenceScoreReviewEnabled prop (and related support in
MetadataInstanceForm / MetadataInstanceList) is available to consumers; locate
the existing peerDependencies block, replace the ^1.18.0 requirement for
`@box/metadata-editor` with ^1.32.0, then run install/tests to validate no other
dependency constraints break.
🧹 Nitpick comments (1)
src/elements/content-sidebar/__tests__/MetadataInstanceEditor.test.tsx (1)

166-172: Test doesn't assert anything specific to isConfidenceScoreReviewEnabled.

This test is functionally identical to the first test (Lines 90–95) — it only checks that the template header renders. It doesn't verify that isConfidenceScoreReviewEnabled is forwarded to MetadataInstanceForm or that it produces any observable difference in the rendered output. Consider asserting on a confidence-score-specific UI element or, at minimum, verifying the prop is passed through (e.g., via a spy on MetadataInstanceForm).

@Lindar90 Lindar90 force-pushed the HITL-ff-integration branch from a38bcc3 to 484837e Compare February 11, 2026 09:03
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.

4 participants