Skip to content

feat(researchlab): add task insertion and deletion in pipeline board #19

Merged
Zhang-Henry merged 2 commits intomainfrom
feat/researchlab-taskList-updates
Mar 6, 2026
Merged

feat(researchlab): add task insertion and deletion in pipeline board #19
Zhang-Henry merged 2 commits intomainfrom
feat/researchlab-taskList-updates

Conversation

@MarkSiqiZhang
Copy link
Copy Markdown
Collaborator

Summary

  • Add inline task insertion between existing tasks in the pipeline board.
  • Add task deletion with confirmation modal and automatic dependency cleanup

Changes

Backend (server/routes/taskmaster.js)

  • POST /add-task: Added stage and insertAfterId parameters to control where new tasks are inserted (beginning of stage, after a specific task,
    or append)
  • DELETE /delete-task/:projectName/:taskId: New endpoint to permanently remove a task, clean up dependency references, and reindex remaining tasks
  • reindexTasks(): New utility that reassigns sequential IDs (1, 2, 3…) following global stage order and remaps dependency references

Frontend (src/components/ResearchLab.jsx)

  • Insertion points rendered between task cards with an "Insert" button that expands into an inline form (title + description)
  • "Add task at beginning" button per stage header
  • Delete button on each task card (appears on hover via group-hover)
  • Delete confirmation modal via ReactDOM.createPortal showing task ID/title and warning
  • All interaction state (editing, adding, delete confirm) resets on project switch

API client (src/utils/api.js)

  • Extended addTask() with stage and insertAfterId params
  • Added deleteTask(projectName, taskId) method

Test plan

  • Insert a new task between two existing tasks — verify it appears in the correct position with a sequential ID
  • Insert a task at the beginning of a stage — verify ordering
  • Delete a task — verify confirmation modal appears, task is removed, and remaining tasks are reindexed
  • Delete a task that other tasks depend on — verify the dependency reference is cleaned up
  • Switch projects while editing/inserting/deleting — verify all interaction state resets

@Zhang-Henry Zhang-Henry merged commit ab2be50 into main Mar 6, 2026
1 check passed
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.

2 participants