Summary
Products can be created and renamed (via the context layer), but there is no way to delete a product from the UI or API. The Acai.Products.delete_product/1 function exists in the context module but is not wired to any LiveView, controller, or API endpoint.
Current state
Acai.Products.delete_product/1 at lib/acai/products/products.ex:63 performs Repo.delete(product) and has a unit test
- The function is called nowhere — no LiveView event handler, no API controller, no button in any template
product_live.ex only renders the feature-completion matrix; there is no settings/danger zone UI for products
team_settings_live.ex handles team deletion (which cascade-deletes products), but there's no per-product delete flow
- No feature spec exists for product settings or product deletion
What needs to be built
-
Feature spec — Create features/site/product-settings.feature.yaml defining the product deletion workflow (confirm-by-typing-name modal, cascade warning, redirect behavior)
-
UI — Either:
- A settings page at
/t/:team_name/p/:product_name/settings, OR
- A delete button + modal within the existing product view
The modal should:
- Warn that deletion is permanent and cascade-deletes all associated implementations, specs, requirements, and feature states
- Require the user to type the product name to confirm
- Disable the confirm button until the typed name matches exactly
- On confirmation, call
Products.delete_product/1 and redirect to /t/:team_name
-
API endpoint (optional) — A DELETE /api/v1/products/:product_name endpoint for programmatic deletion, if desired
-
Authorisation — Product deletion should respect the team's permission model (only users with appropriate role/scope can delete)
Summary
Products can be created and renamed (via the context layer), but there is no way to delete a product from the UI or API. The
Acai.Products.delete_product/1function exists in the context module but is not wired to any LiveView, controller, or API endpoint.Current state
Acai.Products.delete_product/1atlib/acai/products/products.ex:63performsRepo.delete(product)and has a unit testproduct_live.exonly renders the feature-completion matrix; there is no settings/danger zone UI for productsteam_settings_live.exhandles team deletion (which cascade-deletes products), but there's no per-product delete flowWhat needs to be built
Feature spec — Create
features/site/product-settings.feature.yamldefining the product deletion workflow (confirm-by-typing-name modal, cascade warning, redirect behavior)UI — Either:
/t/:team_name/p/:product_name/settings, ORThe modal should:
Products.delete_product/1and redirect to/t/:team_nameAPI endpoint (optional) — A
DELETE /api/v1/products/:product_nameendpoint for programmatic deletion, if desiredAuthorisation — Product deletion should respect the team's permission model (only users with appropriate role/scope can delete)