Skip to content

Add project-scoped feedback category management APIs - #28

Merged
Andreas-Froyland merged 1 commit into
mainfrom
codex/implement-project-scoped-feedback-categories
Feb 10, 2026
Merged

Andreas-Froyland merged 1 commit into
mainfrom
codex/implement-project-scoped-feedback-categories

Conversation

@Andreas-Froyland

Copy link
Copy Markdown
Member

Motivation

  • Provide a project-scoped category system so feedback can be organized per-project and owned by the project's team rather than org-wide.
  • Ensure every new project includes sensible default categories and that those defaults are created atomically with the project.
  • Allow authorized project/team admins to create, edit, reorder, and delete categories with safe rules for collisions and reassignment.

Description

  • Create transactional seeding of default categories (Bug, Feature) during project creation in server/api/teams/[teamId]/projects.post.ts so project + defaults are created atomically.
  • Add a shared helper server/utils/project-categories.ts to resolve project context against the active team, enforce team membership authorization, and provide toCategorySlug utilities.
  • Implement project-scoped category endpoints under server/api/projects/[projectSlug]/categories: GET index.get.ts (list ordered by sortOrder + createdAt), POST index.post.ts (create with validation, slug deduping, explicit ordering), PUT [categoryId].put.ts (update fields and regenerate slug safely), and DELETE [categoryId].delete.ts (block deleting defaults and require reassignment when in use).
  • Enforce behavior rules: categories belong to one project, stable explicit sortOrder, per-project unique slug with suffixing, default categories are non-deletable, and deletion of used categories requires replacementCategoryId which will reassign references before deletion.
  • Add e2e API coverage by extending tests/e2e/team-primary-workspace.spec.ts with a scenario that verifies default listing, create, update/reorder, delete conflict when in use, reassignment-delete, and blocking of default deletion.

Testing

  • Ran yarn typecheck and it completed successfully with no type errors.
  • Ran unit tests via yarn test (Vitest) and all tests passed.
  • Ran yarn lint which completed successfully; only existing repository warnings remain and no new lint errors were introduced.
  • Ran the guarded Playwright runner via yarn test:e2e:if-available which skipped executing E2E because the local database was not reachable and the environment is not cloud/CI (skip reason: database not reachable (); not running in cloud/CI and local DB is unavailable).

Codex Task

@vercel

vercel Bot commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
veerify Error Error Feb 10, 2026 10:38am

@Andreas-Froyland
Andreas-Froyland merged commit 8134e07 into main Feb 10, 2026
8 of 11 checks passed
@Andreas-Froyland
Andreas-Froyland deleted the codex/implement-project-scoped-feedback-categories branch February 10, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant