Skip to content

[GIT-238] refactor: migrate types from apps/web to @plane/types#9203

Open
Rahulcheryala wants to merge 2 commits into
previewfrom
git-238/types-consolidation-packages-types
Open

[GIT-238] refactor: migrate types from apps/web to @plane/types#9203
Rahulcheryala wants to merge 2 commits into
previewfrom
git-238/types-consolidation-packages-types

Conversation

@Rahulcheryala
Copy link
Copy Markdown
Contributor

@Rahulcheryala Rahulcheryala commented Jun 3, 2026

Description

Consolidated types to @packages/types

Type of Change

  • Code refactoring

Summary by CodeRabbit

Release Notes

  • Refactor
    • Consolidated type definitions and imports across multiple components, services, and stores for improved code organization
    • Reorganized internal type module structure to centralize shared type definitions and reduce duplication
    • Updated import paths across the application to reference consolidated type sources
    • Streamlined navigation preference constants and issue-related type definitions for better maintainability

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch git-238/types-consolidation-packages-types

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

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

@Rahulcheryala Rahulcheryala changed the title refactor: migrate types from apps/web to @plane/types [GIT-238] refactor: migrate types from apps/web to @plane/types Jun 3, 2026
@makeplane
Copy link
Copy Markdown

makeplane Bot commented Jun 3, 2026

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

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: 1

🧹 Nitpick comments (4)
apps/web/core/services/issue/issue_relation.service.ts (1)

8-11: ⚡ Quick win

Merge the duplicate @plane/types import.

TIssueRelationTypes is now imported from @plane/types (Line 11), duplicating the type import on Line 8. Consolidate them; the // helpers and // Plane-web comments (Lines 9–10) are now stale.

♻️ Proposed refactor
 import { API_BASE_URL } from "`@plane/constants`";
-import type { TIssueRelation, TIssue } from "`@plane/types`";
-// helpers
-// Plane-web
-import type { TIssueRelationTypes } from "`@plane/types`";
+import type { TIssue, TIssueRelation, TIssueRelationTypes } from "`@plane/types`";
 // services
 import { APIService } from "`@/services/api.service`";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/core/services/issue/issue_relation.service.ts` around lines 8 - 11,
The import of types from "`@plane/types`" is duplicated; remove the extra import
and consolidate TIssueRelation, TIssue, and TIssueRelationTypes into a single
type import. Update the import statement at the top of issue_relation.service.ts
to import { TIssueRelation, TIssue, TIssueRelationTypes } from "`@plane/types`"
and delete the stale "// helpers" and "// Plane-web" comment lines so only one
consolidated type import remains.
apps/web/core/store/issue/issue-details/relation.store.ts (1)

11-16: ⚡ Quick win

Merge the duplicate @plane/types import.

TIssueRelationTypes (Line 16) comes from @plane/types, the same module as the type import on Line 11. Combine into one statement; the // Plane-web comment on Line 14 no longer applies.

♻️ Proposed refactor
-import type { TIssueRelationIdMap, TIssueRelationMap, TIssueRelation, TIssue } from "`@plane/types`";
+import type {
+  TIssue,
+  TIssueRelation,
+  TIssueRelationIdMap,
+  TIssueRelationMap,
+  TIssueRelationTypes,
+} from "`@plane/types`";
 // components
 import type { TRelationObject } from "`@/components/issues/issue-detail-widgets/relations`";
-// Plane-web
 import { REVERSE_RELATIONS } from "`@/constants/gantt-chart`";
-import type { TIssueRelationTypes } from "`@plane/types`";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/core/store/issue/issue-details/relation.store.ts` around lines 11 -
16, The file has two separate imports from "`@plane/types`" (TIssueRelationIdMap,
TIssueRelationMap, TIssueRelation, TIssue and TIssueRelationTypes); merge these
into a single import statement that includes TIssueRelationTypes alongside
TIssueRelationIdMap, TIssueRelationMap, TIssueRelation, and TIssue, remove the
now-misplaced "// Plane-web" comment, and keep the other imports
(TRelationObject and REVERSE_RELATIONS) unchanged so symbols like
TRelationObject and REVERSE_RELATIONS continue to be imported from their
original modules.
apps/web/core/store/issue/issue-details/root.store.ts (1)

9-26: ⚡ Quick win

Add TIssueRelationTypes to the existing @plane/types import block.

The new Line 26 import duplicates the @plane/types source already imported in the block on Lines 9–18. Fold it into that block to avoid a duplicate import statement.

♻️ Proposed refactor
 import type {
   TIssue,
   TIssueAttachment,
   TIssueComment,
   TIssueCommentReaction,
   TIssueLink,
   TIssueReaction,
+  TIssueRelationTypes,
   TIssueServiceType,
   TWorkItemWidgets,
 } from "`@plane/types`";
 // plane web store
 import { IssueActivityStore } from "`@/plane-web/store/issue/issue-details/activity.store`";
 import type {
   IIssueActivityStore,
   IIssueActivityStoreActions,
   TActivityLoader,
 } from "`@/plane-web/store/issue/issue-details/activity.store`";
-import type { TIssueRelationTypes } from "`@plane/types`";
 import type { IIssueRootStore } from "../root.store";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/core/store/issue/issue-details/root.store.ts` around lines 9 - 26,
The file has a duplicate import from "`@plane/types`" for TIssueRelationTypes;
update the first import block (which already imports TIssue, TIssueAttachment,
TIssueComment, TIssueCommentReaction, TIssueLink, TIssueReaction,
TIssueServiceType, TWorkItemWidgets) to also include TIssueRelationTypes and
remove the separate import line for TIssueRelationTypes so there is only one
consolidated import from "`@plane/types`" in root.store.ts (refer to the import
block and the standalone TIssueRelationTypes import to locate the changes).
apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx (1)

11-21: ⚡ Quick win

Consolidate the duplicate @plane/types type imports.

TIssueRelationTypes is imported via a separate import type from @plane/types even though other types are already imported from the same module; merge them into a single import type statement (and keep the // Plane-web comment scoped to Plane-web imports).

♻️ Proposed refactor
-import type { TIssue, TIssueServiceType } from "`@plane/types`";
+import type { TIssue, TIssueRelationTypes, TIssueServiceType } from "`@plane/types`";
 import { EIssueServiceType } from "`@plane/types`";
 import { Collapsible } from "`@plane/ui`";
 // components
 import { CreateUpdateIssueModal } from "`@/components/issues/issue-modal/modal`";
 // hooks
 import { useIssueDetail } from "`@/hooks/store/use-issue-detail`";
 // Plane-web
 import { CreateUpdateEpicModal } from "`@/plane-web/components/epics/epic-modal`";
 import { useTimeLineRelationOptions } from "`@/plane-web/components/relations`";
-import type { TIssueRelationTypes } from "`@plane/types`";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx`
around lines 11 - 21, Consolidate duplicate imports from "`@plane/types`" by
merging the separate import for TIssueRelationTypes into the existing import
that brings in TIssue and TIssueServiceType; keep EIssueServiceType as a value
import (import { EIssueServiceType }) and use a single import type { TIssue,
TIssueServiceType, TIssueRelationTypes } for types, and ensure the existing "//
Plane-web" comment remains only above Plane-web imports like
CreateUpdateEpicModal and useTimeLineRelationOptions to preserve grouping.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/types/src/issues/issue-property-values.ts`:
- Around line 7-8: Replace the overly-broad object types for
TIssuePropertyValues and TIssuePropertyValueErrors with keyed Record types so
consumers can index them safely; e.g. change export type TIssuePropertyValues =
object; and export type TIssuePropertyValueErrors = object; to something like
export type TIssuePropertyValues = Record<string, unknown>; and export type
TIssuePropertyValueErrors = Record<string, string | undefined>; (adjust the
value union to match actual value/error shapes used by IssueModalContext and
other consumers) so property access and indexing compile and remain type-safe.

---

Nitpick comments:
In `@apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx`:
- Around line 11-21: Consolidate duplicate imports from "`@plane/types`" by
merging the separate import for TIssueRelationTypes into the existing import
that brings in TIssue and TIssueServiceType; keep EIssueServiceType as a value
import (import { EIssueServiceType }) and use a single import type { TIssue,
TIssueServiceType, TIssueRelationTypes } for types, and ensure the existing "//
Plane-web" comment remains only above Plane-web imports like
CreateUpdateEpicModal and useTimeLineRelationOptions to preserve grouping.

In `@apps/web/core/services/issue/issue_relation.service.ts`:
- Around line 8-11: The import of types from "`@plane/types`" is duplicated;
remove the extra import and consolidate TIssueRelation, TIssue, and
TIssueRelationTypes into a single type import. Update the import statement at
the top of issue_relation.service.ts to import { TIssueRelation, TIssue,
TIssueRelationTypes } from "`@plane/types`" and delete the stale "// helpers" and
"// Plane-web" comment lines so only one consolidated type import remains.

In `@apps/web/core/store/issue/issue-details/relation.store.ts`:
- Around line 11-16: The file has two separate imports from "`@plane/types`"
(TIssueRelationIdMap, TIssueRelationMap, TIssueRelation, TIssue and
TIssueRelationTypes); merge these into a single import statement that includes
TIssueRelationTypes alongside TIssueRelationIdMap, TIssueRelationMap,
TIssueRelation, and TIssue, remove the now-misplaced "// Plane-web" comment, and
keep the other imports (TRelationObject and REVERSE_RELATIONS) unchanged so
symbols like TRelationObject and REVERSE_RELATIONS continue to be imported from
their original modules.

In `@apps/web/core/store/issue/issue-details/root.store.ts`:
- Around line 9-26: The file has a duplicate import from "`@plane/types`" for
TIssueRelationTypes; update the first import block (which already imports
TIssue, TIssueAttachment, TIssueComment, TIssueCommentReaction, TIssueLink,
TIssueReaction, TIssueServiceType, TWorkItemWidgets) to also include
TIssueRelationTypes and remove the separate import line for TIssueRelationTypes
so there is only one consolidated import from "`@plane/types`" in root.store.ts
(refer to the import block and the standalone TIssueRelationTypes import to
locate the changes).
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18d9a988-97cf-42aa-a2b9-75147a33af35

📥 Commits

Reviewing files that changed from the base of the PR and between b6e47cc and dca6fc0.

📒 Files selected for processing (40)
  • apps/web/app/(all)/[workspaceSlug]/(projects)/extended-project-sidebar.tsx
  • apps/web/ce/components/breadcrumbs/project.tsx
  • apps/web/ce/components/projects/create/root.tsx
  • apps/web/ce/components/relations/index.tsx
  • apps/web/ce/hooks/pages/use-pages-pane-extensions.ts
  • apps/web/ce/types/index.ts
  • apps/web/ce/types/issue-types/index.ts
  • apps/web/ce/types/issue-types/issue-property-values.d.ts
  • apps/web/ce/types/pages/pane-extensions.ts
  • apps/web/ce/types/projects/index.ts
  • apps/web/ce/types/projects/projects.ts
  • apps/web/core/components/common/activity/activity-item.tsx
  • apps/web/core/components/common/activity/helper.tsx
  • apps/web/core/components/dropdowns/project/base.tsx
  • apps/web/core/components/issues/filters.tsx
  • apps/web/core/components/issues/issue-detail-widgets/relations/content.tsx
  • apps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsx
  • apps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsx
  • apps/web/core/components/issues/issue-detail/relation-select.tsx
  • apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx
  • apps/web/core/components/issues/relations/issue-list-item.tsx
  • apps/web/core/components/issues/relations/issue-list.tsx
  • apps/web/core/components/navigation/customize-navigation-dialog.tsx
  • apps/web/core/components/navigation/project-header-button.tsx
  • apps/web/core/components/power-k/menus/projects.tsx
  • apps/web/core/components/project/create-project-modal.tsx
  • apps/web/core/components/project/create/common-attributes.tsx
  • apps/web/core/components/workspace/sidebar/projects-list.tsx
  • apps/web/core/constants/gantt-chart.ts
  • apps/web/core/hooks/use-navigation-preferences.ts
  • apps/web/core/services/issue/issue_relation.service.ts
  • apps/web/core/services/project/project.service.ts
  • apps/web/core/store/issue/issue-details/relation.store.ts
  • apps/web/core/store/issue/issue-details/root.store.ts
  • apps/web/core/store/project/project.store.ts
  • packages/types/src/index.ts
  • packages/types/src/issues/issue-property-values.ts
  • packages/types/src/navigation-preferences.ts
  • packages/types/src/project/activity.ts
  • packages/types/src/project/index.ts
💤 Files with no reviewable changes (6)
  • apps/web/ce/types/issue-types/issue-property-values.d.ts
  • apps/web/ce/types/projects/index.ts
  • apps/web/ce/types/projects/projects.ts
  • apps/web/ce/types/index.ts
  • apps/web/ce/types/issue-types/index.ts
  • apps/web/ce/types/pages/pane-extensions.ts

Comment on lines +7 to +8
export type TIssuePropertyValues = object;
export type TIssuePropertyValueErrors = object; No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find prior/duplicate definitions of these types and how they are used.
rg -nP '\bTIssuePropertyValues\b|\bTIssuePropertyValueErrors\b' -g '!packages/types/src/issues/issue-property-values.ts' -C2
# Inspect indexing/access patterns on issuePropertyValues to confirm required shape
rg -nP 'issuePropertyValues\s*\[|issuePropertyValueErrors\s*\[' -C2

Repository: makeplane/plane

Length of output: 1942


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) Read the type file directly
echo "=== packages/types/src/issues/issue-property-values.ts ==="
nl -ba packages/types/src/issues/issue-property-values.ts | sed -n '1,200p'

# 2) Find all usages of these aliases (beyond the one already found)
echo
echo "=== Usages of TIssuePropertyValues / TIssuePropertyValueErrors ==="
rg -nP '\bTIssuePropertyValues\b|\bTIssuePropertyValueErrors\b' -g '!**/node_modules/**' -C1

# 3) Check how the values are accessed (indexing / property access patterns)
echo
echo "=== Access patterns for issuePropertyValues / issuePropertyValueErrors ==="
rg -nP 'issuePropertyValues\s*\[|issuePropertyValueErrors\s*\[' -g '!**/node_modules/**' -C2
rg -nP '\bissuePropertyValues\b\.' -g '!**/node_modules/**' -C2
rg -nP '\bissuePropertyValueErrors\b\.' -g '!**/node_modules/**' -C2

# 4) If the expected shape exists anywhere else, look for non-object definitions
echo
echo "=== Look for likely structured type definitions (Record / maps / specific fields) ==="
rg -nP 'issuePropertyValues.*Record<|issuePropertyValueErrors.*Record<|PropertyValueErrors|PropertyValues' -g '!**/node_modules/**' -C2

Repository: makeplane/plane

Length of output: 179


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== packages/types/src/issues/issue-property-values.ts (first 200 lines) ==="
cat -n packages/types/src/issues/issue-property-values.ts | sed -n '1,200p'

echo
echo "=== Usages of TIssuePropertyValues / TIssuePropertyValueErrors ==="
rg -nP '\bTIssuePropertyValues\b|\bTIssuePropertyValueErrors\b' -g '!**/node_modules/**' -C1

echo
echo "=== Access patterns for issuePropertyValues / issuePropertyValueErrors ==="
rg -nP 'issuePropertyValues\s*\[|issuePropertyValueErrors\s*\[' -g '!**/node_modules/**' -C2
rg -nP '\bissuePropertyValues\b\.' -g '!**/node_modules/**' -C2
rg -nP '\bissuePropertyValueErrors\b\.' -g '!**/node_modules/**' -C2

Repository: makeplane/plane

Length of output: 2241


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== All occurrences of issuePropertyValues / issuePropertyValueErrors ==="
rg -n '\bissuePropertyValues\b|\bissuePropertyValueErrors\b' -g '!**/node_modules/**' -C2

echo
echo "=== Access patterns with bracket/property access (if any) ==="
rg -n '\bissuePropertyValues\b\s*\[' -g '!**/node_modules/**' -C2 || true
rg -n '\bissuePropertyValueErrors\b\s*\[' -g '!**/node_modules/**' -C2 || true
rg -n '\bissuePropertyValues\b\.' -g '!**/node_modules/**' -C2 || true
rg -n '\bissuePropertyValueErrors\b\.' -g '!**/node_modules/**' -C2 || true

echo
echo "=== Where the setters are used ==="
rg -n '\bsetIssuePropertyValues\b|\bsetIssuePropertyValueErrors\b' -g '!**/node_modules/**' -C2

Repository: makeplane/plane

Length of output: 3761


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Occurrences of setIssuePropertyValues / setIssuePropertyValueErrors ==="
rg -n '\bsetIssuePropertyValues\b|\bsetIssuePropertyValueErrors\b' -g '!**/node_modules/**' -C2

echo
echo "=== Object.keys/entries/values access patterns ==="
rg -n 'Object\.(keys|entries|values)\(\s*issuePropertyValues\s*\)|Object\.(keys|entries|values)\(\s*issuePropertyValueErrors\s*\)' -g '!**/node_modules/**' -C2 || true

echo
echo "=== Any other access via context value destructuring ==="
rg -n '\bissuePropertyValues\b|\bissuePropertyValueErrors\b' -g '!**/node_modules/**' -C0

echo
echo "=== Search for any intended structured type names (heuristics) ==="
rg -n 'IssuePropertyValues|PropertyValues|propertyValues|PropertyValueErrors|propertyValueErrors' -g '!**/node_modules/**' -S -g'*.ts' -g'*.tsx' -C1

Repository: makeplane/plane

Length of output: 9190


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Implementations/usages of handleCreateUpdatePropertyValues / handlePropertyValuesValidation ==="
rg -n '\bhandleCreateUpdatePropertyValues\b' -g '!**/node_modules/**' -C2
rg -n '\bhandlePropertyValuesValidation\b' -g '!**/node_modules/**' -C2

echo
echo "=== Search for propertyValues / propertyValueErrors variables in issue-modal module ==="
rg -n '\bpropertyValues\b|\bpropertyValueErrors\b|\bissuePropertyValues\b|\bissuePropertyValueErrors\b' apps/web/core/components/issues/issue-modal -g '!**/node_modules/**' -C2

echo
echo "=== Search for type usages that might define the expected shape ==="
rg -n 'PropertyValues|PropertyValueErrors|AdditionalProperties|propertyValuesValidation' -g '!**/node_modules/**' -C2

Repository: makeplane/plane

Length of output: 26910


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Find useIssueModal implementation ==="
rg -n '\buseIssueModal\b' apps/web -g '!**/node_modules/**' -S

echo
echo "=== Find where handleCreateUpdatePropertyValues is implemented (not just passed as a prop) ==="
rg -n '\bhandleCreateUpdatePropertyValues\b' apps/web -g '!**/node_modules/**' -S -C2

echo
echo "=== Inspect issue-modal context type definitions file ==="
cat -n apps/web/core/components/issues/issue-modal/context/issue-modal-context.tsx | sed -n '1,220p'

Repository: makeplane/plane

Length of output: 10251


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== apps/web/core/hooks/context/use-issue-modal.tsx ==="
cat -n apps/web/core/hooks/context/use-issue-modal.tsx | sed -n '1,260p'

echo
echo "=== Search for issuePropertyValues / issuePropertyValueErrors inside use-issue-modal ==="
rg -n '\bissuePropertyValues\b|\bissuePropertyValueErrors\b' apps/web/core/hooks/context/use-issue-modal.tsx -n -C2

echo
echo "=== Search for related store functions/types in hooks/context/use-issue-modal ==="
rg -n '\bPropertyValue|PropertyValues|Errors|issue-property-values|validate|errors' apps/web/core/hooks/context/use-issue-modal.tsx -S -C2

Repository: makeplane/plane

Length of output: 913


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Find IssueModalProvider and IssueModalContext.Provider ==="
rg -n '\bIssueModalProvider\b|IssueModalContext\.Provider' apps/web -g '!**/node_modules/**' -C2

echo
echo "=== Inspect provider that sets issuePropertyValues/issuePropertyValueErrors ==="
rg -n 'issuePropertyValues\s*:' apps/web -g '!**/node_modules/**' -C3
rg -n 'issuePropertyValueErrors\s*:' apps/web -g '!**/node_modules/**' -C3

Repository: makeplane/plane

Length of output: 6785


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== apps/web/ce/components/issues/issue-modal/provider.tsx (first 240 lines) ==="
cat -n apps/web/ce/components/issues/issue-modal/provider.tsx | sed -n '1,240p'

echo
echo "=== Search within provider for issuePropertyValues usage ==="
rg -n '\bissuePropertyValues\b|\bissuePropertyValueErrors\b' apps/web/ce/components/issues/issue-modal/provider.tsx -C2

Repository: makeplane/plane

Length of output: 3034


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== setIssuePropertyValues usages ==="
rg -n '\bsetIssuePropertyValues\b' -g '!**/node_modules/**' -C2

echo
echo "=== setIssuePropertyValueErrors usages ==="
rg -n '\bsetIssuePropertyValueErrors\b' -g '!**/node_modules/**' -C2

echo
echo "=== issuePropertyValues / issuePropertyValueErrors variable usages (string occurrences) ==="
rg -n '\bissuePropertyValues\b|\bissuePropertyValueErrors\b' -g '!**/node_modules/**' -C0

Repository: makeplane/plane

Length of output: 3254


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for other likely definitions/usages of issue property values types ==="
rg -n 'TIssuePropertyValues|TIssuePropertyValueErrors|IssuePropertyValues|IssuePropertyValueErrors|issuePropertyValues|issuePropertyValueErrors' -g '!**/node_modules/**' -S -C2

echo
echo "=== Search for handlePropertyValuesValidation internals ==="
rg -n '\bhandlePropertyValuesValidation\b' -g '!**/node_modules/**' -C2 -S apps/web

echo
echo "=== Search for property-values payload shape passed into handleCreateUpdatePropertyValues ==="
rg -n '\bhandleCreateUpdatePropertyValues\s*\(\s*\{\s*' -g '!**/node_modules/**' -C2 -S apps/web

echo
echo "=== Search for any JSON/schema of additional properties / property values ==="
rg -n 'additional properties|additionalProperties|property values|property_values|propertyValues|propertyValueErrors|propertyValueErrors' -g '!**/node_modules/**' -S apps/web packages/types | head -n 200

Repository: makeplane/plane

Length of output: 7930


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== apps/web/core/components/issues/issue-modal/base.tsx (relevant sections) ==="
# show around the “add other property values” area
sed -n '180,280p' apps/web/core/components/issues/issue-modal/base.tsx
echo
echo "=== further down around create/update call(s) ==="
sed -n '280,380p' apps/web/core/components/issues/issue-modal/base.tsx

Repository: makeplane/plane

Length of output: 7212


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Find IssueModal provider under plane-web ==="
# list files named provider.tsx near issue-modal
fd provider.tsx -a apps/web -g '*issue-modal*' -t f 2>/dev/null || true
rg -n 'components/issues/issue-modal/provider' apps/web -S || true
rg -n '\bexport const IssueModalProvider\b' apps/web -S -g '!**/node_modules/**' -C1

echo
echo "=== Search for actual module path used by core modal.tsx ==="
# print the import path line
cat -n apps/web/core/components/issues/issue-modal/modal.tsx | sed -n '1,120p'

# locate the referenced file via TypeScript path resolution not possible here,
# so we brute-force by searching for "issuePropertyValues:" assignments in provider files.
echo
echo "=== Search for issuePropertyValues: { ... } assignments ==="
rg -n 'issuePropertyValues\s*:\s*\{' apps/web -S -g '!**/node_modules/**' -C2

Repository: makeplane/plane

Length of output: 3616


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Find provider.tsx for issue-modal (any platform) ==="
find apps/web -type f -name 'provider.tsx' | rg -n 'issue-modal' || true

echo
echo "=== Find actual path used in import alias: apps/web/*/components/issues/issue-modal/provider.tsx ==="
find apps/web -type f -path '*components/issues/issue-modal/provider.tsx' || true

echo
echo "=== Grep for handlePropertyValuesValidation implementation (not just context type) ==="
rg -n '\bhandlePropertyValuesValidation\b' apps/web -g '!**/node_modules/**' -S -g'*.ts' -g'*.tsx' -C2

echo
echo "=== Inspect plane-web provider (if found) ==="
# If the expected file exists, show a window around where issuePropertyValues are set.
p='apps/web/plane-web/components/issues/issue-modal/provider.tsx'
if [ -f "$p" ]; then
  echo "Found: $p"
  cat -n "$p" | sed -n '1,260p'
fi

Repository: makeplane/plane

Length of output: 2802


Avoid collapsing TIssuePropertyValues / TIssuePropertyValueErrors to object.

File: packages/types/src/issues/issue-property-values.ts (lines 7-8)

export type TIssuePropertyValues = object;
export type TIssuePropertyValueErrors = object;

The current repo usage only treats these as opaque values on IssueModalContext (CE provider initializes them as {}); no issuePropertyValues[...] / issuePropertyValueErrors[...] indexing patterns were found here, so the specific “indexing won’t compile” breakage isn’t evidenced in this codebase snapshot. Still, widening them to bare object removes the structured/type-safe shape and makes property/value access non-verifiable and non-indexable.

Restore the original structured type definitions (e.g., the likely keyed Record/map shape) instead of using object placeholders.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/types/src/issues/issue-property-values.ts` around lines 7 - 8,
Replace the overly-broad object types for TIssuePropertyValues and
TIssuePropertyValueErrors with keyed Record types so consumers can index them
safely; e.g. change export type TIssuePropertyValues = object; and export type
TIssuePropertyValueErrors = object; to something like export type
TIssuePropertyValues = Record<string, unknown>; and export type
TIssuePropertyValueErrors = Record<string, string | undefined>; (adjust the
value union to match actual value/error shapes used by IssueModalContext and
other consumers) so property access and indexing compile and remain type-safe.

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.

1 participant