fix: show azure icon for in-progress ingestion tasks#2079
Conversation
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughTask connector types now flow from backend upload tasks through task listings into frontend task state, where initial task loads seed connector metadata for connector-specific file icon inference. ChangesTask connector type propagation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/services/task_service.py (1)
1233-1247: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winAdd
connector_typeto the legacy task serializers.get_task_status,get_task_status2, andget_all_tasksstill back the live/tasks/{task_id},/tasks,/v1/tasks/{task_id}, and/v1/taskshandlers, so callers of those endpoints still can’t derive connector-specific UI state from task metadata.🤖 Prompt for 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. In `@src/services/task_service.py` around lines 1233 - 1247, Update the legacy task serializers used by get_task_status, get_task_status2, and get_all_tasks to include the task’s connector_type in each serialized task record. Ensure the live /tasks and /v1/tasks handlers receive this field while preserving the existing serialization behavior for all other metadata.
🤖 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 `@src/services/task_service.py`:
- Around line 399-404: Update the existing_task_id append path in the task
service to validate the incoming processor connector_type against the existing
upload_task.connector_type before adding files. Reject mixed connector types
with the service’s established validation/error mechanism, while preserving
appends when the connector types match and ensuring the task-level metadata
cannot remain stale.
---
Outside diff comments:
In `@src/services/task_service.py`:
- Around line 1233-1247: Update the legacy task serializers used by
get_task_status, get_task_status2, and get_all_tasks to include the task’s
connector_type in each serialized task record. Ensure the live /tasks and
/v1/tasks handlers receive this field while preserving the existing
serialization behavior for all other metadata.
🪄 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: 73661ae4-f9fa-4840-8fe5-37abdc4e2495
📒 Files selected for processing (5)
frontend/app/api/queries/useGetTasksQuery.tsfrontend/contexts/task-context.tsxfrontend/lib/knowledge-table-state.tssrc/models/tasks.pysrc/services/task_service.py
Fixes #2045
Summary
Fixes the Knowledge page icon shown for Azure Blob Storage files while ingestion is still in progress.
Previously, some in-progress Azure Blob Storage files showed the generic file icon until polling completed or the table/page refreshed.
This change propagates
connector_typethrough the task flow so the frontend can resolve the correct connector icon for in-progress Knowledge table rows.Updated flow:
connector_typeto task metadataconnector_typewhen custom connector tasks are createdconnector_typein task API responsesconnector_typeto the frontend task typeWith this, Azure Blob Storage ingestion rows can display the Azure icon immediately instead of temporarily falling back to the generic/local icon.
Summary by CodeRabbit