fix: ingesting single files in azure blob now properly navigates to knowledge page#2057
Conversation
…onnectors Signed-off-by: vchen7629 <chenvincent7629@gmail.com>
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Walkthrough
ChangesIngest task tracking and dialog callback
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/components/connectors/shared-bucket-view.tsx`:
- Around line 346-350: The individual-file onIngestSuccess handler in
shared-bucket-view should match the container ingest flow by guarding on
result.task_ids before calling onDone(). Update the onIngestSuccess callback to
only invalidate, trackIngestTasks, and navigate when result.task_ids?.length is
truthy; otherwise show the same toast/info fallback used in the container path.
Use the existing onIngestSuccess, trackIngestTasks, onDone, and result.task_ids
references to locate the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 46350e97-49cc-4664-98a2-09fc6cac2114
📒 Files selected for processing (2)
frontend/components/connectors/shared-bucket-view.tsxfrontend/components/file-browser-dialog.tsx
Wallgau
left a comment
There was a problem hiding this comment.
Nice work, left some notes. The main thing I want to make sure of before we merge is that we're not dropping context by hardcoding user-facing messages where the backend already returns something more specific. Otherwise this looks good.
… hardcoded fallback
Replaced hardcoded toast message with backend message + fallback
Summary
Fixes #2041 , Before Ingesting individually-selected files from a bucket connector would close the file-browser but left the user stuck on the "Add from Azure Blob Storage" pane, because
FileBrowserDialogdiscarded its sync result and never navigated or registered the ingest tasks. This pr adds a newonIngestSuccesscallback soSharedBucketViewwhich mirrors the container path (tracktask_ids+ navigate to Knowledge) and fixes all bucket connectorsBefore
screen-capture.9.webm
After
screen-capture.10.webm
Changes
FileBrowserDialognow accepts an optionalonIngestSuccess(result)callback;handleIngestcaptures the sync mutation result (previously discarded) and invokes it after a successful ingestSharedBucketViewwiresonIngestSuccessto mirror its whole-container path — invalidate the container-status query, register the returnedtask_ids, and callonDone()to navigate to KnowledgetrackIngestTaskshelper inshared-bucket-view.tsxto share thetask_ids→addTaskloop between the container and individual-file ingest pathsSummary by CodeRabbit
New Features
Bug Fixes