Skip to content

Require at least one task when creating a project - #186

Merged
hturnbull93 merged 3 commits into
mainfrom
claude/project-submissions-require-tasks-d4jhni
Jul 25, 2026
Merged

Require at least one task when creating a project#186
hturnbull93 merged 3 commits into
mainfrom
claude/project-submissions-require-tasks-d4jhni

Conversation

@hturnbull93

@hturnbull93 hturnbull93 commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Project creation now requires at least one task on both paths: volunteer proposals (Suggest a Project) already enforced this server-side, but admin-created organisation projects did not and could start in a needs_tasks status. Admin org projects now require ≥1 task too, and always start in_progressneeds_tasks is no longer reachable at creation time on either path.
  • The "at least one task" requirement is baked directly into ProjectForm (required-field styling + client-side validation) instead of being gated behind a requireTasks prop that every caller had to remember to pass — both call sites always needed it, so the prop was removed.
  • Task completion never re-evaluates the parent project's status, so an in_progress project can end up with zero open tasks (last task completed or deleted) and just sit there. Added admin.projects.staleInProgress and a "No Open Tasks" tab on the triage page so admins can find these and close them out or add more work.

Test plan

  • npm run typecheck, npm run lint, npm run format:check all pass
  • Full e2e suite (npm test) passes: 146 passed, 6 pre-existing skips, 0 failures
  • New e2e coverage added for the gate itself — UI and direct-API level, for both the volunteer and admin creation flows (e2e/tests/06-project-lifecycle.spec.ts)
  • Updated existing e2e specs/helpers that relied on admin projects being creatable with zero tasks (e2e/tests/08-project-tasks.spec.ts, e2e/tests/20-task-management.spec.ts, e2e/tests/21-approval-gate.spec.ts, e2e/actions/projects.ts)
  • Manual check of the new "No Open Tasks" triage tab in the browser

The volunteer "Suggest a Project" flow already rejected empty task
lists server-side; admin-created org projects did not, and instead
started in a needs_tasks status. Close that gap so both paths require
at least one task up front, so no project needs tasks immediately
after creation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqbXEqpoQdFyBhWCrCyc7F
@railway-app
railway-app Bot temporarily deployed to PauseAI Catalyse / catalyse-pr-186 July 25, 2026 11:00 Destroyed
Both call sites always passed requireTasks, so the prop no longer
distinguished any real case — make the requirement unconditional
instead of a flag every caller had to remember to set.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DqbXEqpoQdFyBhWCrCyc7F
@railway-app
railway-app Bot temporarily deployed to PauseAI Catalyse / catalyse-pr-186 July 25, 2026 11:01 Destroyed
@railway-app

railway-app Bot commented Jul 25, 2026

Copy link
Copy Markdown

🚅 Deployed to the catalyse-pr-186 environment in PauseAI Catalyse

Service Status Web Updated (UTC)
web ✅ Success (View Logs) Web Jul 25, 2026 at 11:02 am
1 service not affected by this PR
  • Cron for digest

Task completion never re-evaluates project status, so a project can
sit in_progress indefinitely after its last task is done. Surface
these in the triage page so admins can close them out or add tasks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7LqHwh4oR1wbyKgRbhTiF
@railway-app
railway-app Bot temporarily deployed to PauseAI Catalyse / catalyse-pr-186 July 25, 2026 13:59 Destroyed
@hturnbull93
hturnbull93 merged commit 7d8108a into main Jul 25, 2026
2 of 3 checks 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