Repository navigation
feat(web): display similarity threshold as a percentage - #18974
Conversation
The similarity threshold is stored as a 0-1 float but was shown raw in the slider and number input. Enable the percentage mode of SliderInputFormField so the control reads 0-100 while the underlying form value stays unchanged. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe similarity threshold slider now passes the ChangesSimilarity threshold display
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change only displays the similarity threshold as a percentage while keeping the submitted value unchanged. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
wangq8
left a comment
There was a problem hiding this comment.
This is an AI review comment.
LGTM. The change correctly enables the existing percentage prop of SliderInputFormField, which scales min/max/step by 100 and round-trips the underlying 0–1 float via Math.round(value) / 100. With max={1} and step={0.01} already set on the similarity slider, this yields a 0–100 display in 1% increments while the form value stays unchanged. No regressions (pure presentational change).
Minor (non-blocking): Math.round(value) / 100 quantizes the value to 2 decimal places. Fine for similarity thresholds (step 0.01), but any future sub-0.01 precision would be lost on the slider round-trip.
This is an AI review comment.
Summary
The similarity threshold is stored as a 0-1 float but was shown raw in the slider and number input. Enable the percentage mode of SliderInputFormField so the control reads 0-100 while the underlying form value stays unchanged.