Skip to content

feat(web): add Join/Leave project buttons (#113)#138

Open
themightychris wants to merge 1 commit into
developfrom
feat/project-detail-join-leave
Open

feat(web): add Join/Leave project buttons (#113)#138
themightychris wants to merge 1 commit into
developfrom
feat/project-detail-join-leave

Conversation

@themightychris

Copy link
Copy Markdown
Member

First slice of the #113 UI-gaps umbrella (spec-declared features the SPA didn't render).

What

ProjectDetail's spec (project-detail.md) declares "Join Project" / "Leave project" actions and the API endpoints (POST .../members/join · .../members/leave) already exist — but no UI rendered them. Added to the sidebar:

  • Join Project — signed-in non-members
  • Leave project — members, except a sole maintainer (who gets a "transfer the maintainer role first" hint instead, per the authz table)

Membership is derived client-side from the members list + the signed-in user (the project response carries no per-viewer flag). Added join/leave to the API client and two ProjectDetail tests (Join for non-member, Leave for member). type-check + lint + tests (8/8) clean.

Deferred (same #113 ProjectDetail pairing)

The soft-delete banner needs the project response to expose deletedAt (not currently serialized) — a small API/serializer + spec change. I'll do it as a focused follow-up rather than bloat this PR.

Verification note

Local browser testing is blocked (the API can't boot against a non-bare data clone), so this is covered by component tests. Worth an eyeball on the sandbox once deployed.

🤖 Generated with Claude Code

ProjectDetail declared "Join Project" / "Leave project" actions in the spec
(project-detail.md) and the API endpoints existed, but the SPA never rendered
the buttons. Add them to the sidebar:

- Join Project — signed-in users who aren't members (POST .../members/join)
- Leave project — members, except a sole maintainer who must transfer the
  role first (POST .../members/leave); shows an explanatory hint instead.

Membership is computed client-side from the members list + the signed-in user
(the project response carries no per-viewer flag). Added api client join/leave
methods and ProjectDetail tests for both states.

First slice of the #113 UI-gaps umbrella. The soft-delete banner (the other
half of the ProjectDetail pairing) is deferred — it needs the project response
to expose `deletedAt`, a small API/serializer change tracked under #113.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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