Skip to content

Comments

feat(task): add 'creating' status to task interface and update UI components#1037

Open
yashdev9274 wants to merge 2 commits intogeneralaction:mainfrom
yashdev9274:main
Open

feat(task): add 'creating' status to task interface and update UI components#1037
yashdev9274 wants to merge 2 commits intogeneralaction:mainfrom
yashdev9274:main

Conversation

@yashdev9274
Copy link

@yashdev9274 yashdev9274 commented Feb 22, 2026

fix #1032

  • Updated Task interface to include a new 'creating' status.
  • Modified RightSidebar, TaskItem, and TaskTerminalPanel components to handle the new status.
  • Enhanced TaskItem to display a Creating... message when the task is in the 'creating' state.
  • Implemented optimistic UI updates in taskCreationService for immediate feedback during task creation.

…ponents

- Updated Task interface to include a new 'creating' status.
- Modified RightSidebar, TaskItem, and TaskTerminalPanel components to handle the new status.
- Enhanced TaskItem to display a Creating... message when the task is in the 'creating' state.
- Implemented optimistic UI updates in taskCreationService for immediate feedback during task creation.
@vercel
Copy link

vercel bot commented Feb 22, 2026

Someone is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@yashdev9274 yashdev9274 changed the title feat(task): add 'creating' status to task interface and update UI com… feat(task): add 'creating' status to task interface and update UI components Feb 22, 2026
@greptile-apps
Copy link

greptile-apps bot commented Feb 22, 2026

Greptile Summary

Added creating status to the Task interface and implemented optimistic UI updates during task creation. When a single-agent task is created, an optimistic task with status: 'creating' is immediately added to the UI (showing a spinner and "Creating..." text), then replaced with the real task once worktree creation and DB persistence complete. This provides instant feedback during the 3-7 second worktree creation delay.

Key changes:

  • Added 'creating' to task status union type across all components
  • TaskItem displays spinner and "Creating..." text for tasks in creating state
  • taskCreationService creates optimistic task with temporary ID before worktree creation
  • Optimistic task is replaced with real task after successful creation

Issue found:

  • Missing cleanup of optimistic task on error - if task creation fails, the optimistic task remains stuck in UI with "Creating..." status

Confidence Score: 4/5

  • Safe to merge after fixing the error cleanup issue
  • Implementation is solid and follows the existing multi-agent optimistic pattern, but needs error handling to remove orphaned optimistic tasks on failure
  • src/renderer/lib/taskCreationService.ts requires error handling fix for optimistic task cleanup

Important Files Changed

Filename Overview
src/renderer/types/chat.ts Added 'creating' status to Task interface status union type
src/renderer/components/TaskItem.tsx Updated to handle 'creating' status with spinner and "Creating..." text
src/renderer/lib/taskCreationService.ts Implemented optimistic UI updates with 'creating' status; missing error cleanup for optimistic task

Last reviewed commit: ae1d1fc

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link

greptile-apps bot commented Feb 22, 2026

Additional Comments (1)

src/renderer/lib/taskCreationService.ts
optimistic task cleanup missing on error

when task creation fails, the optimistic task with status: 'creating' remains in state and UI

  } catch (error) {
    const { log } = await import('./logger');
    log.error('Failed to create task:', error as any);

    // Remove optimistic task if it was created
    if (optimisticTaskId) {
      setProjects((prev) =>
        prev.map((project) =>
          project.id === selectedProject.id
            ? { ...project, tasks: project.tasks?.filter((t) => t.id !== optimisticTaskId) }
            : project
        )
      );
      setSelectedProject((prev) =>
        prev ? { ...prev, tasks: prev.tasks?.filter((t) => t.id !== optimisticTaskId) } : null
      );
      setActiveTask((current) => (current?.id === optimisticTaskId ? null : current));
    }

    callbacks.toast({
      title: 'Error',
      description:
        (error as Error)?.message || 'Failed to create task. Please check the console for details.',
    });
    return false;
  }

@yashdev9274
Copy link
Author

yashdev9274 commented Feb 23, 2026

@arnestrickmann @rabanspiegel I've raised PR for #1032 issue. do lmk if any changes needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UX: Slow UI feedback when creating a new workspace

1 participant