feat(web): add Join/Leave project buttons (#113)#138
Open
themightychris wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:Membership is derived client-side from the members list + the signed-in user (the project response carries no per-viewer flag). Added
join/leaveto 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