Skip to content

feat(projects): make assigned staff optional - #392

Merged
nourshoreibah merged 1 commit into
mainfrom
worktree-optional-assigned-staff
Aug 30, 2026
Merged

feat(projects): make assigned staff optional#392
nourshoreibah merged 1 commit into
mainfrom
worktree-optional-assigned-staff

Conversation

@nourshoreibah

Copy link
Copy Markdown
Collaborator

What

Assigned staff is no longer required when creating (or editing) a project.

Why

Admins are members of every project implicitly: @branch/rbac grants them every project action off users.is_admin, never off a project_memberships row. A project that saves with an empty roster is therefore still fully reachable by the people who administer it, and forcing a roster at creation time just blocks setting a project up before staffing is decided.

Changes

  • ProjectFormModal — drop the members.length === 0 validation rule, the required asterisk on the Assigned Staff field, and the now-unreachable error wiring on StaffPicker.
  • projects lambda — refresh the createProject transaction comment, which cited the form rule that no longer exists.
  • Test — the case that asserted "removing the last member blocks Save" now asserts the opposite: an empty roster saves and posts members: [].

No backend or schema change was needed: validateMembers already accepted an omitted/empty array, createProject defaults it to [] and only demands project:manageMembers when the roster is non-empty, and no column or constraint required a membership.

Testing

Not run in this session, per request — CI (frontend-ci, lambda-tests) is the check.

🤖 Generated with Claude Code

Admins reach every project through `users.is_admin`, not through a
membership row, so a project with an empty roster is still fully
reachable by the people who administer it. The "select at least 1 staff
member" rule was the only thing forcing a roster at creation time — the
API already accepted an empty `members` array and the schema never
required one — so it is dropped along with the `*` on the field.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nourshoreibah nourshoreibah added the no-review The PR review bot won't run label Aug 30, 2026
@nourshoreibah
nourshoreibah marked this pull request as ready for review August 30, 2026 19:33
@nourshoreibah
nourshoreibah merged commit 6a7da8c into main Aug 30, 2026
19 checks passed
@nourshoreibah
nourshoreibah deleted the worktree-optional-assigned-staff branch August 30, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-review The PR review bot won't run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant