Skip to content

fix(web): defer retrieval document search until selection settles - #21144

Merged
wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/web-retrieval-docs-selection
Oct 19, 2026
Merged

wangq8 merged 1 commit into
infiniflow:mainfrom
dcc123456:fix/web-retrieval-docs-selection

Conversation

@dcc123456

Copy link
Copy Markdown
Collaborator

Summary

Selecting documents in the retrieval documents popover fired the search on every checkbox click, so checking several documents triggered repeated lookups. Now the popover keeps a draft selection and only commits it on close, and unchanged selections are skipped entirely.

Selecting documents in the retrieval documents popover fired the search on
every checkbox click, so checking several documents triggered repeated
lookups. Now the popover keeps a draft selection and only commits it on
close, and unchanged selections are skipped entirely.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@dcc123456
dcc123456 requested a review from wangq8 October 19, 2026 07:32
@dcc123456 dcc123456 added 🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration labels Oct 19, 2026
@dcc123456
dcc123456 marked this pull request as draft October 19, 2026 07:32
@dcc123456
dcc123456 marked this pull request as ready for review October 19, 2026 07:32
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 426aadee-c91a-41e1-94e1-f31e73159a13
📥 Commits

Reviewing files that changed from the base of the PR and between 2488925 and 0e89da6.

📒 Files selected for processing: 1
  • web/src/pages/next-search/retrieval-documents/index.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The retrieval document selector keeps selection changes as a draft while its popover is open. On close, it commits changed selections to the parent and triggers testing. Changes made while the popover is closed commit immediately.

Changes: Selection commit flow

Layer / File(s) Summary
Draft selection and commit handling
web/src/pages/next-search/retrieval-documents/index.tsx
Selection changes update a draft while the popover is open. Closing it commits the draft when its IDs differ from the committed selection. Changes made while closed commit immediately. Toggle, Escape, and close-command actions use the shared close handler.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: euvre

Merge Risk: ⚪ Minimal · up to 0e89d

Document selections commit when the popover closes, and the inspected reset path does not undo the parent’s selection. The change is mergeable after normal checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly describes the main change: delaying retrieval document searches until the selection is finalized.
Description check Passed The description includes the required Summary section and explains the repeated-search problem and the draft-selection solution.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit checks the choices twice,
Then saves the set when popovers close.
If choices change while tucked away,
They commit at once and testing goes.
Soft paws keep drafts in neat array.

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

@wangq8
wangq8 merged commit 5e0d840 into infiniflow:main Oct 19, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants