Skip to content

Add project rename to the project settings page - #424

Open
slorksmo wants to merge 3 commits into
futrx-com:qafrom
slorksmo:feat/project-rename
Open

slorksmo wants to merge 3 commits into
futrx-com:qafrom
slorksmo:feat/project-rename

Conversation

@slorksmo

Copy link
Copy Markdown
Contributor

What

The project Settings tab gets a "Project name" panel to rename the project. It uses the existing PATCH /api/projects/{id} endpoint.

Why

The backend supports renaming, but the UI had no way to do it.

Fixes #418

How

  • New ProjectNameSettings in ui/projects/project-containers/: a form with the current name, Save disabled while the name is empty, unchanged or contains -- (the same rule Service.Update enforces). Server errors are shown under the field. The input and button reuse the classes from ProjectResourceLimits.
  • ProjectContainersPage renders it inside ProjectSettingsPanel at the top of the Settings tab, gated on projects.controls.manage.
  • ProjectContainersContainer calls projectApi.update. No local state update is needed: the notifying project repository publishes the upsert, so the sidebar and the settings header pick up the new name.
  • Only the display name changes. The note under the field shows the slug, which keeps naming the container and the workspace path.

Testing

  • npm test: 647 passed

  • npm run build succeeds

  • Ran it on my own instance: renamed a project and the sidebar picked up the new name without a reload.

  • go test ./... passes (backend and catalog): no backend changes

  • npm test passes (frontend)

  • gofmt / go vet ./... clean: no Go changes

  • npm run build succeeds

UI changes

  • Slot contract still valid (no new modal/menu without a slot)
  • Tested in a real project workspace (not just npm run dev)

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.

Rename a project from its settings page

1 participant