Skip to content

fix: removes project references#7907

Merged
pandeymangg merged 1 commit into
epic/v5from
fix/remove-project-refs
Apr 29, 2026
Merged

fix: removes project references#7907
pandeymangg merged 1 commit into
epic/v5from
fix/remove-project-refs

Conversation

@pandeymangg
Copy link
Copy Markdown
Contributor

@pandeymangg pandeymangg requested a review from Dhruwang April 29, 2026 06:21
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 2026

Walkthrough

This pull request updates terminology and identifiers throughout the codebase to reflect a shift from "project" to "workspace" nomenclature. Changes include parameter renames in utility functions (e.g., projectLanguages to workspaceLanguages, currentProjectChannel to currentWorkspaceChannel), error code updates in feedback record directory validation logic, OpenAPI schema modifications introducing workspaceId as the primary identifier with projectId marked as deprecated, test fixtures and descriptions updated to use workspace-based naming, and documentation updates describing workspace-scoped concepts instead of project-scoped ones.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only contains a Linear issue link and is missing all required sections from the template: 'What does this PR do?', 'How should this be tested?', and the required checklist items. Complete the PR description by filling out 'What does this PR do?', 'How should this be tested?', and checking off the required checklist items as applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fix: removes project references' is vague and doesn't clearly summarize the main change; it lacks specificity about what is being changed from projects to. Revise the title to be more specific, such as 'fix: replace project references with workspace terminology' or similar, to clarify the scope of the rename.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/api-v2-reference/openapi.yml (2)

3104-3120: ⚠️ Potential issue | 🟠 Major

Require a workspace selector on create/update/delete.

These request shapes still allow clients to omit both workspaceId and projectId, even though the association cannot be identified from teamId alone. That also drifts from components.schemas.workspaceTeam, which now treats workspaceId as required.

Also applies to: 3178-3194, 3246-3256

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/api-v2-reference/openapi.yml` around lines 3104 - 3120, Add the
workspace selector as required on these request schemas: include "workspaceId"
in the required list (in addition to "teamId" and "permission") for the
create/update/delete request shapes shown (the blocks containing properties
workspaceId, projectId, permission around the ranges referenced); keep projectId
as a deprecated alias but do not rely on it—make workspaceId mandatory so the
association can be identified (this should mirror
components.schemas.workspaceTeam where workspaceId is required).

5544-5583: ⚠️ Potential issue | 🟠 Major

projectOverwrites needs a deprecation bridge, not a hard rename.

In the v2 schema this is a public field. Replacing it outright with workspaceOverwrites changes the generated contract for existing clients, unlike the projectId migration above where both names are documented. Keep projectOverwrites as a deprecated alias for at least one version, or ship this as an explicit versioned breaking change.

Also applies to: 5828-5828

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/api-v2-reference/openapi.yml` around lines 5544 - 5583, The schema
replaced the public field projectOverwrites with workspaceOverwrites outright;
instead restore projectOverwrites as a deprecated alias that keeps the same
contract for one release: add a projectOverwrites property that either
references the same schema as workspaceOverwrites (using $ref or allOf) or
duplicates its type/enum/patterns, mark it deprecated (deprecated: true and
update description to note deprecation and timeline), and ensure both properties
are documented in the OpenAPI for backward compatibility; apply the same change
where projectOverwrites appears (also around the other occurrence noted at line
~5828).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@apps/web/modules/ee/feedback-record-directory/lib/feedback-record-directory.ts`:
- Line 193: The change replaced the machine-facing error code expected by
callers; restore the original emitted value to avoid breaking consumers by
throwing InvalidInputError with the legacy code "DIRECTORY_PROJECTS_INVALID_ORG"
instead of "DIRECTORY_WORKSPACES_INVALID_ORG" (or add a compatibility mapping so
InvalidInputError still emits "DIRECTORY_PROJECTS_INVALID_ORG" while you
introduce a new constant for future use); update the throw site that currently
uses InvalidInputError("DIRECTORY_WORKSPACES_INVALID_ORG") to emit the legacy
string or to emit both (legacy first) so existing handlers continue to work.

In
`@apps/web/modules/ee/feedback-record-directory/types/feedback-record-directory.ts`:
- Around line 66-67: The new mapping replaced the legacy error code and can
break clients still sending DIRECTORY_PROJECTS_INVALID_ORG; restore backward
compatibility by keeping both cases: ensure the switch returns the same
translation
t("workspace.settings.feedback_record_directories.error_directory_workspaces_invalid_org")
for the legacy constant DIRECTORY_PROJECTS_INVALID_ORG as well as
DIRECTORY_WORKSPACES_INVALID_ORG so both error codes map to the identical
localized message.

---

Outside diff comments:
In `@docs/api-v2-reference/openapi.yml`:
- Around line 3104-3120: Add the workspace selector as required on these request
schemas: include "workspaceId" in the required list (in addition to "teamId" and
"permission") for the create/update/delete request shapes shown (the blocks
containing properties workspaceId, projectId, permission around the ranges
referenced); keep projectId as a deprecated alias but do not rely on it—make
workspaceId mandatory so the association can be identified (this should mirror
components.schemas.workspaceTeam where workspaceId is required).
- Around line 5544-5583: The schema replaced the public field projectOverwrites
with workspaceOverwrites outright; instead restore projectOverwrites as a
deprecated alias that keeps the same contract for one release: add a
projectOverwrites property that either references the same schema as
workspaceOverwrites (using $ref or allOf) or duplicates its type/enum/patterns,
mark it deprecated (deprecated: true and update description to note deprecation
and timeline), and ensure both properties are documented in the OpenAPI for
backward compatibility; apply the same change where projectOverwrites appears
(also around the other occurrence noted at line ~5828).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1883908d-3e4e-44b5-be57-673639c23780

📥 Commits

Reviewing files that changed from the base of the PR and between a862b73 and 0b7267a.

⛔ Files ignored due to path filters (12)
  • apps/web/locales/de-DE.json is excluded by !apps/web/locales/**
  • apps/web/locales/es-ES.json is excluded by !apps/web/locales/**
  • apps/web/locales/fr-FR.json is excluded by !apps/web/locales/**
  • apps/web/locales/nl-NL.json is excluded by !apps/web/locales/**
  • apps/web/locales/pt-BR.json is excluded by !apps/web/locales/**
  • apps/web/locales/pt-PT.json is excluded by !apps/web/locales/**
  • apps/web/locales/ro-RO.json is excluded by !apps/web/locales/**
  • apps/web/locales/ru-RU.json is excluded by !apps/web/locales/**
  • apps/web/locales/sv-SE.json is excluded by !apps/web/locales/**
  • apps/web/locales/tr-TR.json is excluded by !apps/web/locales/**
  • apps/web/locales/zh-Hans-CN.json is excluded by !apps/web/locales/**
  • apps/web/locales/zh-Hant-TW.json is excluded by !apps/web/locales/**
📒 Files selected for processing (21)
  • apps/web/app/(app)/workspaces/[workspaceId]/actions.ts
  • apps/web/lib/utils/templates.test.ts
  • apps/web/modules/ee/analysis/charts/lib/charts.test.ts
  • apps/web/modules/ee/analysis/dashboards/lib/dashboards.test.ts
  • apps/web/modules/ee/feedback-record-directory/lib/feedback-record-directory.test.ts
  • apps/web/modules/ee/feedback-record-directory/lib/feedback-record-directory.ts
  • apps/web/modules/ee/feedback-record-directory/types/feedback-record-directory.ts
  • apps/web/modules/ee/license-check/lib/utils.test.ts
  • apps/web/modules/entitlements/lib/self-hosted-provider.test.ts
  • apps/web/modules/response-pipeline/lib/telemetry.test.ts
  • apps/web/modules/survey/components/template-list/lib/utils.test.ts
  • apps/web/modules/survey/editor/components/survey-editor.tsx
  • apps/web/modules/survey/list/lib/utils.test.ts
  • apps/web/modules/survey/list/lib/utils.ts
  • apps/web/modules/survey/multi-language-surveys/components/language-view.tsx
  • docker/formbricks.sh
  • docs/api-v2-reference/openapi.yml
  • docs/development/standards/organization/naming-conventions.mdx
  • packages/database/README.md
  • packages/surveys/README.md
  • packages/surveys/src/components/general/survey.test.tsx

@sonarqubecloud
Copy link
Copy Markdown

@pandeymangg pandeymangg merged commit 8442ded into epic/v5 Apr 29, 2026
13 checks passed
@pandeymangg pandeymangg deleted the fix/remove-project-refs branch April 29, 2026 10:17
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.

2 participants