feat(#16): project settings page - #33
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Closes #16.
Adds
/projects/:id/settingswith four sections — General (rename, read-only slug), Data retention, Members (add/remove by GitHub login), and Danger zone (delete behind a typed-name confirmation)./settingsbecomes a redirect to the current project's settings, and the sidebar links straight at the project so the item highlights.Both the loader and the action resolve
:idagainst the caller's own project list, so a project the user does not belong to redirects to/projectsinstead of surfacing a 403. Retention is editable by any member; renaming, member changes and deletion are owner-only — enforced in the broker and mirrored in the route so a stale tab gets a message instead of a bare "forbidden". The delete confirmation is re-checked server-side, and deleting clearscurrentProjectIDbefore returning to/projects, where the layout forwards to/projects/newif nothing is left.Verification
npm run typecheck,npm run lint(0 errors),npm run buildandoxfmt --checkall pass.Also ran the built SSR server against a stub broker with a forged session: all four sections render; each intent hits the right broker endpoint and revalidates the loader, so member changes appear without a page reload; rename preserves the slug; a wrong delete confirmation issues no DELETE; the correct one deletes, clears
currentProjectIDand 302s to/projects; a non-member id redirects to/projects;/settingsforwards correctly; missing or wrong CSRF returns 403. With the stub reportingrole: member, the page renders exactly as specified — name field disabled, danger zone hidden, no add form or remove buttons, retention still editable — and a rename attempt is rejected server-side.Not verified against the real stack; that needs Docker plus a GitHub OAuth login.
Noted, not fixed
/dashboardand/keysread the current project from a?projectIdquery param that nothing ever sets, so both are stuck on their empty state. Pre-existing from the previous phase and out of scope here.🤖 Generated with Claude Code