Skip to content

fix: update similarity threshold fallback to use nullish coalescing - #16700

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/search-setting-0707
Jul 7, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/search-setting-0707

Conversation

@dcc123456

Copy link
Copy Markdown
Collaborator

Summary

fix: update similarity threshold fallback to use nullish coalescing

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 7, 2026
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79ca56fb-4098-4a99-b000-948d1321fb98

📥 Commits

Reviewing files that changed from the base of the PR and between ac5860c and 3a00217.

📒 Files selected for processing (1)
  • web/src/pages/next-search/search-setting.tsx

📝 Walkthrough

Walkthrough

A single-line change updates the default value logic for search_config.similarity_threshold in the form reset function, switching from || 0.2 to ?? 0.2 so that a value of 0 is preserved rather than replaced by the default.

Changes

Similarity Threshold Default Fix

Layer / File(s) Summary
Nullish coalescing for threshold default
web/src/pages/next-search/search-setting.tsx
Changes search_config.similarity_threshold fallback from || 0.2 to ?? 0.2 in resetForm, preserving a 0 value instead of overwriting it.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A tiny hop, a single line,
Zero now stays, no more decline!
Where "or" once bulldozed the truth away,
"??" lets zero have its say. 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the core change: switching the similarity threshold fallback to nullish coalescing.
Description check ✅ Passed The description matches the required Summary section and states the fix, but it lacks any background context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@wangq8 wangq8 added the ci Continue Integration label Jul 7, 2026
@wangq8
wangq8 merged commit 5236c8f into infiniflow:main Jul 7, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants