Skip to content

feat: active task dialog#1739

Merged
Wallgau merged 4 commits into
mainfrom
active-task-dialog
Jun 3, 2026
Merged

feat: active task dialog#1739
Wallgau merged 4 commits into
mainfrom
active-task-dialog

Conversation

@Wallgau

@Wallgau Wallgau commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Task details dialog accessible from the header and notification menu via a new icon button (disabled when no active task).
  • Improvements

    • Dialog title now shows an "Active task" prefix for in-progress tasks.
    • Footer buttons and alignment adapt based on available retry actions ("Retry all", "Cancel"/"Close") for clearer actions.
    • Task-details opening behavior unified across the UI.

@coderabbitai

coderabbitai Bot commented Jun 2, 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e87c7d38-2a3d-4c7c-8d7e-fc5b52d242c8

📥 Commits

Reviewing files that changed from the base of the PR and between a2b050c and cfcbf91.

📒 Files selected for processing (1)
  • frontend/components/task-dialog/task-dialog.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/components/task-dialog/task-dialog.tsx

Walkthrough

Centralizes task dialog state in TaskContext with openTaskDialog/closeTaskDialog, renders TaskDialog from the provider, makes TaskDialog title status-aware and footer conditional, and wires Header, TaskNotificationMenu, and TaskErrorContent to openTaskDialog.

Changes

Shared Task Dialog Flow

Layer / File(s) Summary
Context State & Dialog Rendering
frontend/contexts/task-context.tsx
Adds TaskDialog import, extends TaskContext with isTaskDialogOpen, taskDialogTaskId, openTaskDialog, closeTaskDialog; provider state and callbacks; conditionally renders TaskDialog and syncs open/close state.
Dialog Header Status-Aware Title
frontend/components/task-dialog/header.tsx
Imports isTaskInProgressStatus, adds optional taskStatus to TaskDialogHeaderProps, and renders title prefix "Active task" when status is in-progress.
Dialog Footer & Button Refactoring
frontend/components/task-dialog/task-dialog.tsx
Computes isCancelOnly, passes task?.status to header, adjusts DialogFooter alignment for cancel-only vs retry actions, refactors "Retry all"/final action button labels and variants.
Header Active Task Dialog Button
frontend/components/header.tsx
Imports IncidentReporterIcon, gets openTaskDialog from useTask(), computes primaryActiveTaskId, and adds a header icon button that calls openTaskDialog(primaryActiveTaskId) (disabled when none).
Notification Menu Dialog Integration
frontend/components/task-notification-menu.tsx
Adds IncidentReporterIcon, extracts openTaskDialog from useTask(), adjusts active task card header layout, and adds an accessible icon button calling openTaskDialog(task.task_id).
Error Content Dialog Migration
frontend/components/task-error-content.tsx
Replaces local dialog state with useTask()'s openTaskDialog, updates imports, changes "Open task details" click to call openTaskDialog(task.task_id), and removes embedded TaskDialog.
sequenceDiagram
  participant Header
  participant NotificationMenu
  participant ErrorContent
  participant TaskProvider
  participant TaskDialog

  Header->>TaskProvider: openTaskDialog(taskId)
  NotificationMenu->>TaskProvider: openTaskDialog(taskId)
  ErrorContent->>TaskProvider: openTaskDialog(taskId)
  TaskProvider->>TaskProvider: set taskDialogTaskId, set isTaskDialogOpen=true
  TaskProvider->>TaskDialog: render(open=true, taskId)
  TaskDialog->>TaskProvider: onOpenChange(false) / onClose
  TaskProvider->>TaskProvider: set isTaskDialogOpen=false, clear taskDialogTaskId
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • langflow-ai/openrag#1647: Both modify task-error-content.tsx with an incident/report button; this PR wires that action through openTaskDialog.
  • langflow-ai/openrag#1700: Overlapping UI changes to TaskDialogHeader and TaskDialogContent footer/retry flows that this PR builds upon.
  • langflow-ai/openrag#1685: Earlier TaskDialog UI work; this PR further refines title prefix and footer/button behavior and adds context-driven dialog wiring.

Suggested reviewers

  • lucaseduoli
  • mfortman11
  • ricofurtado
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: active task dialog' accurately describes the main change: adding a dialog for viewing active task details, which is the primary feature across all modified files.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch active-task-dialog

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 and usage tips.

@github-actions github-actions Bot added frontend 🟨 Issues related to the UI/UX enhancement 🔵 New feature or request labels Jun 2, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/task-dialog/task-dialog.tsx`:
- Around line 170-184: This footer button currently labeled "Cancel" only calls
onClose (in the Button rendered with props isCancelOnly, isRetrying,
showRetryActions, isCloudBrand), which is misleading; either wire it to perform
real task cancellation by invoking the actual cancel handler (e.g., call the
existing cancelTask/cancelIngestion function or dispatch the cancellation action
and handle isRetrying state) or rename the label to a non-action word like
"Close" or "Dismiss" and update its aria-label/tooltip accordingly so it clearly
only closes the dialog; ensure the change is applied where Button uses
onClose/isCancelOnly/isRetrying and update any related tests or accessibility
text.
🪄 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: 80b8f496-4f57-4d4a-ba95-d6b80e81538a

📥 Commits

Reviewing files that changed from the base of the PR and between 17e8a19 and a2b050c.

📒 Files selected for processing (6)
  • frontend/components/header.tsx
  • frontend/components/task-dialog/header.tsx
  • frontend/components/task-dialog/task-dialog.tsx
  • frontend/components/task-error-content.tsx
  • frontend/components/task-notification-menu.tsx
  • frontend/contexts/task-context.tsx

Comment thread frontend/components/task-dialog/task-dialog.tsx
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 2, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Jun 3, 2026
@github-actions github-actions Bot added the lgtm label Jun 3, 2026
@Wallgau Wallgau merged commit 60abec0 into main Jun 3, 2026
13 checks passed
@github-actions github-actions Bot deleted the active-task-dialog branch June 3, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 🔵 New feature or request frontend 🟨 Issues related to the UI/UX lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants