[GIT-238] refactor: migrate types from apps/web to @plane/types#9203
[GIT-238] refactor: migrate types from apps/web to @plane/types#9203Rahulcheryala wants to merge 2 commits into
Conversation
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
apps/web/core/services/issue/issue_relation.service.ts (1)
8-11: ⚡ Quick winMerge the duplicate
@plane/typesimport.
TIssueRelationTypesis now imported from@plane/types(Line 11), duplicating the type import on Line 8. Consolidate them; the// helpersand// Plane-webcomments (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 winMerge the duplicate
@plane/typesimport.
TIssueRelationTypes(Line 16) comes from@plane/types, the same module as the type import on Line 11. Combine into one statement; the// Plane-webcomment 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 winAdd
TIssueRelationTypesto the existing@plane/typesimport block.The new Line 26 import duplicates the
@plane/typessource 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 winConsolidate the duplicate
@plane/typestype imports.
TIssueRelationTypesis imported via a separateimport typefrom@plane/typeseven though other types are already imported from the same module; merge them into a singleimport typestatement (and keep the// Plane-webcomment 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
📒 Files selected for processing (40)
apps/web/app/(all)/[workspaceSlug]/(projects)/extended-project-sidebar.tsxapps/web/ce/components/breadcrumbs/project.tsxapps/web/ce/components/projects/create/root.tsxapps/web/ce/components/relations/index.tsxapps/web/ce/hooks/pages/use-pages-pane-extensions.tsapps/web/ce/types/index.tsapps/web/ce/types/issue-types/index.tsapps/web/ce/types/issue-types/issue-property-values.d.tsapps/web/ce/types/pages/pane-extensions.tsapps/web/ce/types/projects/index.tsapps/web/ce/types/projects/projects.tsapps/web/core/components/common/activity/activity-item.tsxapps/web/core/components/common/activity/helper.tsxapps/web/core/components/dropdowns/project/base.tsxapps/web/core/components/issues/filters.tsxapps/web/core/components/issues/issue-detail-widgets/relations/content.tsxapps/web/core/components/issues/issue-detail-widgets/relations/quick-action-button.tsxapps/web/core/components/issues/issue-detail/issue-activity/activity/actions/relation.tsxapps/web/core/components/issues/issue-detail/relation-select.tsxapps/web/core/components/issues/issue-modal/context/issue-modal-context.tsxapps/web/core/components/issues/relations/issue-list-item.tsxapps/web/core/components/issues/relations/issue-list.tsxapps/web/core/components/navigation/customize-navigation-dialog.tsxapps/web/core/components/navigation/project-header-button.tsxapps/web/core/components/power-k/menus/projects.tsxapps/web/core/components/project/create-project-modal.tsxapps/web/core/components/project/create/common-attributes.tsxapps/web/core/components/workspace/sidebar/projects-list.tsxapps/web/core/constants/gantt-chart.tsapps/web/core/hooks/use-navigation-preferences.tsapps/web/core/services/issue/issue_relation.service.tsapps/web/core/services/project/project.service.tsapps/web/core/store/issue/issue-details/relation.store.tsapps/web/core/store/issue/issue-details/root.store.tsapps/web/core/store/project/project.store.tspackages/types/src/index.tspackages/types/src/issues/issue-property-values.tspackages/types/src/navigation-preferences.tspackages/types/src/project/activity.tspackages/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
| export type TIssuePropertyValues = object; | ||
| export type TIssuePropertyValueErrors = object; No newline at end of file |
There was a problem hiding this comment.
🧩 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*\[' -C2Repository: 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/**' -C2Repository: 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/**' -C2Repository: 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/**' -C2Repository: 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' -C1Repository: 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/**' -C2Repository: 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 -C2Repository: 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/**' -C3Repository: 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 -C2Repository: 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/**' -C0Repository: 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 200Repository: 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.tsxRepository: 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/**' -C2Repository: 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'
fiRepository: 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.
Description
Consolidated types to @packages/types
Type of Change
Summary by CodeRabbit
Release Notes