feat: task ingest dialog#1685
Conversation
…fallbacks of isTotalFailure
Resolve conflicts: keep main Lucide icons and IncidentReporterIcon, retain TaskDialog open handler from task-ingest-dialog work. Co-authored-by: Cursor <cursoragent@cursor.com>
panel, with brand-specific header, filters, category chips, and tabs. Wire list/detail helpers and ingestion failure display; fix nested button hydration in the task error accordion.
|
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 (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughAdds backend retry API and service, enhances task queries/types and failure analysis, implements a TaskDialog UI and useTaskDialog hook for selecting/retrying files, updates context/knowledge-page overlay and deletion logic, extends styling tokens and Tailwind, and adds tests and misc wiring. ChangesTask Ingestion Retry
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
- Add POST /tasks/{task_id}/retry to re-queue failed RETRYABLE files on the
existing task processor (optional file_paths subset).
- Implement TaskService.retry_failed_files with skip reasons (not_failed,
not_retryable, source_file_missing, task_in_progress) and retry_count tracking.
- Classify non-retryable file errors vs transient Docling failures.
- Add tests/unit/test_task_service_retry_failed_files.py.
Frontend — retry
- Add useRetryTaskMutation calling the retry endpoint.
- Extend enhanced task types (actionable_by, retry_count, failure component/
phase) in useGetTasksQuery and single-task fetch in useGetTaskQuery.
- Task dialog: retry all/selected, retry ingestions tab, row selection, polling
while retry runs, and toasts for retried/skipped files.
- task-utils: retryable file helpers, filters, and dialog status labels.
- task-context: markTaskFilesProcessing when retry starts; improved overlay
sync/finalization with enhanced task payloads and knowledge refetch on
completio
- task-error-display: use structured API failure metadata for file errors.
- task-error-content: open task dialog from failure panel; show API component
and resolved error text.
- useCancelTaskMutation: invalidate tasks queries with exact: false.
- Playwright: mock GET /api/tasks** only so retry POST is not intercepted.
Frontend — knowledge bulk delete
- Fix delete modal listing wrong files after partial ingest/retry: AG Grid kept
failed rows selected after checkboxes disappeared (processing → failed).
- Restrict selection and delete to active rows present in listFiles/search
(indexed knowledge only, not overlay-only rows without chunks).
- Prune non-deletable selection when grid data changes; add isRowSelectable.
- Delete with Promise.allSettled via deleteDocumentByFilename so one file
without chunks does not abort the batch; resolve indexed filename for delete.
Tests
- Extend tests/unit/test_task_service_get_task_status2.py for enhanced status.
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 `@src/config/settings.py`:
- Around line 866-868: The auth-retry path is passing the original caller kwargs
(which may still contain 'headers') into the HTTP call causing "got multiple
values for keyword argument 'headers'"; in the retry where you call
self.langflow_http_client.request(method=method, url=url, headers=headers,
**kwargs) replace **kwargs with **request_kwargs (the same dict used earlier
where headers was popped) so only the sanitized request_kwargs and the explicit
headers variable are passed into the request.
🪄 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: 9b12b4a7-814b-4ca3-982b-fdc55c5ba559
📒 Files selected for processing (4)
src/config/settings.pysrc/models/processors.pysrc/services/task_service.pytests/unit/test_task_service_retry_failed_files.py
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/unit/test_task_service_retry_failed_files.py
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/api/schemas/tasks.py (1)
16-22: ⚡ Quick winConsider using a string literal or enum for the status field.
The
statusfield accepts any string value, which could lead to inconsistent status values across the codebase. Using a Literal type or Enum would provide type safety and ensure consistent status strings.🔒 Suggested fix using Literal types
-from pydantic import BaseModel, Field +from typing import Literal +from pydantic import BaseModel, Field class TaskRetryResponse(BaseModel): task_id: str retried: int = 0 skipped: list[TaskRetrySkippedFile] = Field(default_factory=list) - status: str + status: Literal["success", "partial", "failed"] # Adjust values based on actual usage message: str | None = None error: str | None = None🤖 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/api/schemas/tasks.py` around lines 16 - 22, The TaskRetryResponse model's status: str allows arbitrary values; change it to a constrained type (either a Literal union of allowed strings or an Enum) to enforce consistency. Update the TaskRetryResponse definition to replace status: str with status: Literal["pending","in_progress","completed","failed"] (or an Enum class like TaskRetryStatus with those members) and adjust any code that constructs or checks TaskRetryResponse.status to use the chosen literals/enum members; also import typing.Literal or the Enum type and update any tests/serializers that expect a plain string.
🤖 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.
Nitpick comments:
In `@src/api/schemas/tasks.py`:
- Around line 16-22: The TaskRetryResponse model's status: str allows arbitrary
values; change it to a constrained type (either a Literal union of allowed
strings or an Enum) to enforce consistency. Update the TaskRetryResponse
definition to replace status: str with status:
Literal["pending","in_progress","completed","failed"] (or an Enum class like
TaskRetryStatus with those members) and adjust any code that constructs or
checks TaskRetryResponse.status to use the chosen literals/enum members; also
import typing.Literal or the Enum type and update any tests/serializers that
expect a plain string.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e989b78a-5d04-4f29-9b05-74f2a385d106
📒 Files selected for processing (7)
frontend/app/knowledge/page.tsxfrontend/components/task-dialog/use-task-dialog.tssrc/api/schemas/tasks.pysrc/api/tasks.pysrc/app/routes/internal.pysrc/config/settings.pysrc/services/task_service.py
🚧 Files skipped from review as they are similar to previous changes (6)
- src/app/routes/internal.py
- src/api/tasks.py
- src/config/settings.py
- frontend/app/knowledge/page.tsx
- frontend/components/task-dialog/use-task-dialog.ts
- src/services/task_service.py
limit auth-refresh retry to once per request call retry boundedly on persistent 401/403 instead of immediately returning
|
Actionable comments posted: 0 |
issue: https://github.ibm.com/lakehouse/tracker/issues/71806 (task dialog part)
Add full retry-ingestion workflow across backend and frontend for task files, including retry APIs, retry mutation hooks, task-detail querying, and richer task-file metadata from enhanced task endpoints.
Screen.Recording.2026-05-27.at.11.35.07.PM.mov
Screen.Recording.2026-05-27.at.11.50.17.PM.mov
Summary by CodeRabbit
New Features
Bug Fixes
Tests