Skip to content

fix(kanban): tasks not displaying in kanban view and related components#1266

Open
thisisharsh7 wants to merge 2 commits intogeneralaction:mainfrom
thisisharsh7:fix/kanban-tasks-not-showing
Open

fix(kanban): tasks not displaying in kanban view and related components#1266
thisisharsh7 wants to merge 2 commits intogeneralaction:mainfrom
thisisharsh7:fix/kanban-tasks-not-showing

Conversation

@thisisharsh7
Copy link
Contributor

Tasks were not appearing in the kanban view despite being visible in the project sidebar. Additionally, several other components had the same underlying issue where tasks were not being accessed correctly.

Impact

  • Kanban view now displays all tasks for the selected project
  • Titlebar task switcher now works
  • Command palette now shows tasks
  • Task name uniqueness is now properly validated
  • All components now access task data consistently

before -

Screenshot 2026-03-04 at 10 38 36 AM

after -

Screenshot 2026-03-04 at 10 39 27 AM

@vercel
Copy link

vercel bot commented Mar 4, 2026

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

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 4, 2026

Greptile Summary

This PR migrates components from reading the stale project.tasks field to the centralized tasksByProjectId map from useTaskManagement. The core migrations in KanbanBoard, TitlebarContext, TaskModal, ChatInterface, and CommandPaletteWrapper are correct.

However, there is one critical functional regression introduced by this change:

handleStartCreateTaskFromSidebar (in useTaskManagement.ts, lines 381-391) calls showModal('taskModal', { targetProjectId }) without an onSuccess handler. The ModalProvider wraps the callback as args.onSuccess?.(result), which becomes a no-op when undefined. This means clicking "New Task" on a project in the sidebar will open the modal, but when the user submits it, the task creation callback (handleCreateTask) is never triggered. The modal closes (making it appear successful), but no task is created — a silent regression from the previous code which used openTaskModal() (properly wired with onSuccess).

Confidence Score: 1/5

  • Not safe to merge — sidebar-initiated task creation silently fails, breaking a core workflow.
  • The PR correctly migrates components to use tasksByProjectId for consistent task access across the app. However, handleStartCreateTaskFromSidebar has a critical functional regression: it calls showModal without an onSuccess handler, causing task creation to silently fail when triggered from the project sidebar. This breaks user-facing functionality.
  • src/renderer/hooks/useTaskManagement.ts — the handleStartCreateTaskFromSidebar callback must include the onSuccess handler

Last reviewed commit: 312e506

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 4, 2026

Additional Comments (1)

src/renderer/hooks/useTaskManagement.ts, line 391
Missing onSuccess handler — tasks created from the sidebar are silently discarded.

handleStartCreateTaskFromSidebar calls showModal with only targetProjectId and no onSuccess callback. In ModalProvider, the wrapped onSuccess is:

onSuccess: (result) => {
  args.onSuccess?.(result);  // undefined?.() → no-op
  closeModal();
},

Because args.onSuccess is undefined, handleCreateTask is never called when the user submits the modal. The modal closes normally (modal close succeeds), but no task is created — a silent functional regression.

The fix is to pass the onSuccess handler (mirroring the implementation at line 965 where openTaskModalImplRef.current is properly wired):

const handleStartCreateTaskFromSidebar = useCallback(
  (project: Project) => {
    const targetProject = projects.find((p) => p.id === project.id) || project;
    activateProjectView(targetProject);
    showModal('taskModal', {
      targetProjectId: targetProject.id,
      onSuccess: (result) =>
        handleCreateTask(
          result.name,
          result.initialPrompt,
          result.agentRuns,
          result.linkedLinearIssue ?? null,
          result.linkedGithubIssue ?? null,
          result.linkedJiraIssue ?? null,
          result.autoApprove,
          result.useWorktree,
          result.baseRef,
          result.nameGenerated,
          result.targetProjectId
        ),
    });
  },
  [activateProjectView, projects, showModal, handleCreateTask]
);

Context Used: Rule from dashboard - CLAUDE.md (source)

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.

1 participant