Skip to content

[P1] Task approval button not visible in planning phase projectsΒ #254

@frankbria

Description

@frankbria

Problem

The "Approve Tasks" button is not visible for projects in the planning phase with pending tasks, causing E2E test failures.

Failing Test

test_task_approval.spec.ts:149 - should handle 422 validation error gracefully

Error

Error: expect(locator).toBeVisible() failed
Locator: getByRole('button', { name: /approve/i })
Expected: visible
Timeout: 5000ms
Error: element(s) not found

Context

  • Test uses project ID 2 which is seeded in 'planning' phase with 4 pending tasks
  • The approve button should appear when there are pending tasks awaiting approval
  • Task approval flow test sequence depends on this button being visible

Possible Root Causes

  1. TaskReview component not rendering for planning phase
  2. Approve button conditional logic incorrect (checking wrong phase/status)
  3. Pending tasks not being loaded from API correctly
  4. Button visibility depends on some other UI state not met

Seeding Verification

πŸ“‹ Seeding issues for project 2 (planning phase task approval)...
βœ… Seeded 3/3 issues for project 2
βœ… Seeded 4 tasks for project 2

Expected Behavior

When a project is in planning phase with pending tasks:

  1. User navigates to project dashboard
  2. Tasks tab shows pending tasks awaiting approval
  3. "Approve Tasks" or similar button is visible
  4. Clicking the button triggers the approval API

Affected Files

  • web-ui/src/components/TaskReview.tsx (or equivalent)
  • web-ui/src/components/Dashboard.tsx
  • tests/e2e/test_task_approval.spec.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-high-betaHigh priority - should fix before beta for best experiencebugSomething isn't workingtestingux

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions