fix: live server runtime errors#7314
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update introduces extensive configuration and codebase refactoring across multiple packages. Key changes include improved and standardized TypeScript and ESLint configurations, enhanced build and lint scripts, and consolidation of import statements for better maintainability. The server implementation is refactored to a class-based design, and package exports are clarified for both constants and types packages. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Server
participant ExpressApp
participant HocusPocusServer
User->>Server: Start server (listen)
Server->>ExpressApp: Setup middleware/routes
Server->>HocusPocusServer: Initialize collaboration server
ExpressApp-->>User: Respond to HTTP requests
HocusPocusServer-->>User: Handle WebSocket collaboration
Note over Server: On error or shutdown signal
Server->>HocusPocusServer: Graceful shutdown
Server->>ExpressApp: Close HTTP server
Server-->>User: Log shutdown and exit
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 5
🔭 Outside diff range comments (3)
packages/editor/src/core/helpers/parser.ts (1)
24-31: Asset list may contain duplicates – switch to set-based merge
additionalAssetIdsis appended after converting the first set to an array, so any IDs that already exist inassetSourcescan re-appear, causing the duplicate-asset service to process the same asset twice.-const additionalAssetIds = extractAdditionalAssetsFromHTMLContent(htmlContent); -return [...Array.from(assetSources), ...additionalAssetIds]; +const additionalAssetIds = extractAdditionalAssetsFromHTMLContent(htmlContent); +additionalAssetIds.forEach((id) => assetSources.add(id)); +return [...assetSources];This keeps the final list unique without extra O(n²) work.
packages/types/src/index.ts (1)
18-19:"./analytics"exported twice – remove the duplicate
Double export may break tooling that relies on unique re-exports and slightly increases bundle size.-export * from "./analytics";Keep only one of the two identical lines.
Also applies to: 48-49
web/core/services/workspace.service.ts (1)
322-333: Possible crash whenquery_typeis undefined
params.query_type.join(",")assumesquery_typeis always an array. If the caller omits it, this throws at runtime:- query_type: params.query_type.join(","), + ...(params.query_type ? { query_type: params.query_type.join(",") } : {}),Consider guarding or defaulting to
[].
♻️ Duplicate comments (1)
packages/types/tsconfig.json (1)
3-12: Same declaration/composite concern as in@plane/constantsPlease mirror the flags here for consistent type consumption across packages.
"compilerOptions": { + "declaration": true, + "composite": true,
🧹 Nitpick comments (8)
web/core/components/core/modals/user-image-upload-modal.tsx (1)
9-11: Barrel import looks good – ensure treeshaking unaffectedSwitching to
@plane/typesimproves DX; just double-check that theEFileAssetTypere-export is marked asexport const enum/export enumand not a reified object, to avoid bloating the client bundle.web/core/components/core/modals/workspace-image-upload-modal.tsx (1)
9-11: Same note as above – validateEFileAssetTypere-exportIf the enum is re-exported via
export *, verify that treeshaking still drops unused members; otherwise considerexport { EFileAssetType }explicitly in the barrel.packages/constants/.eslintrc.js (1)
1-5: AddparserOptions.projectfor full TypeScript rule coverage
Without aparserOptions.project, rules that rely on type-information (e.g.@typescript-eslint/no-misused-promises) are silently disabled. Point it at the package-leveltsconfig.json.parser: "@typescript-eslint/parser", +parserOptions: { + project: "./tsconfig.json", +},packages/types/tsup.config.ts (1)
3-10: Add sourcemaps & explicit target for better DXNice minimal config. Two tweaks worth considering:
format: ["esm"], + target: "es2019", // keep node-14+ compatibility + sourcemap: true, // Easier debugging for downstream packages dts: true,Sourcemaps are basically free and many consumers still expect them.
packages/constants/tsup.config.ts (1)
3-10: Ship source-maps & make minification opt-in
minify: truehurts debuggability in local/CI builds, and debugging without source-maps is painful. A common pattern:format: ["esm"], + sourcemap: true, - minify: true, + minify: process.env.NODE_ENV === "production",Optional but highly recommended.
space/helpers/editor.helper.ts (2)
30-37: Drop the unnecessaryasyncwrapper
getAssetSrcdoes not perform any await-able work; returning a wrapped Promise just adds overhead.- const getAssetSrc = async (path: string) => { + const getAssetSrc = (path: string): string => { if (!path) return ""; if (path.startsWith("http")) { return path; } - else { - return getEditorAssetSrc(anchor, path) ?? ""; - } + return getEditorAssetSrc(anchor, path) ?? ""; };
41-43: Minor duplicationBoth
getAssetDownloadSrcandgetAssetSrcpoint to the same function. If the consumer treats them identically, consider exposing only one alias to reduce API surface.live/src/server.ts (1)
68-73: Improve input validation and error response.The validation logic could be more robust and the error response should be more consistent with REST API standards.
- if (description_html === undefined || variant === undefined) { - res.status(400).send({ - message: "Missing required fields", - }); - return; - } + if (!description_html || !variant) { + res.status(400).json({ + error: "Missing required fields: description_html and variant are required" + }); + return; + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (39)
live/.eslintrc.json(1 hunks)live/package.json(2 hunks)live/src/ee/lib/authentication.ts(0 hunks)live/src/ee/lib/update-document.ts(1 hunks)live/src/server.ts(1 hunks)live/tsconfig.json(2 hunks)live/tsup.config.ts(1 hunks)packages/constants/.eslintrc.js(1 hunks)packages/constants/package.json(1 hunks)packages/constants/tsconfig.json(1 hunks)packages/constants/tsup.config.ts(1 hunks)packages/editor/.eslintrc.js(0 hunks)packages/editor/src/core/helpers/parser.ts(1 hunks)packages/editor/tsconfig.json(1 hunks)packages/types/.eslintrc.js(1 hunks)packages/types/package.json(1 hunks)packages/types/src/index.ts(1 hunks)packages/types/tsconfig.json(1 hunks)packages/types/tsup.config.ts(1 hunks)space/core/store/issue-detail.store.ts(1 hunks)space/helpers/editor.helper.ts(1 hunks)web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx(1 hunks)web/ce/components/estimates/helper.tsx(1 hunks)web/core/components/analytics/work-items/priority-chart.tsx(1 hunks)web/core/components/core/image-picker-popover.tsx(1 hunks)web/core/components/core/modals/user-image-upload-modal.tsx(1 hunks)web/core/components/core/modals/workspace-image-upload-modal.tsx(1 hunks)web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx(1 hunks)web/core/components/dropdowns/estimate.tsx(1 hunks)web/core/components/estimates/inputs/root.tsx(1 hunks)web/core/components/inbox/modals/create-modal/issue-description.tsx(1 hunks)web/core/components/issues/description-input.tsx(1 hunks)web/core/components/issues/issue-detail/issue-activity/helper.tsx(1 hunks)web/core/components/issues/issue-modal/components/description-editor.tsx(1 hunks)web/core/components/issues/workspace-draft/root.tsx(1 hunks)web/core/hooks/use-page-operations.ts(1 hunks)web/core/layouts/auth-layout/project-wrapper.tsx(1 hunks)web/core/services/workspace.service.ts(1 hunks)web/core/store/user/index.ts(1 hunks)
💤 Files with no reviewable changes (2)
- packages/editor/.eslintrc.js
- live/src/ee/lib/authentication.ts
🧰 Additional context used
🧠 Learnings (22)
web/core/components/core/modals/user-image-upload-modal.tsx (2)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
web/core/components/issues/workspace-draft/root.tsx (2)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
web/core/components/estimates/inputs/root.tsx (2)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/read.tsx:11-12
Timestamp: 2024-11-28T07:02:15.514Z
Learning: Some components are still in core and have not been moved yet, so their import paths remain the same.
web/core/components/issues/issue-detail/issue-activity/helper.tsx (1)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
web/core/components/core/image-picker-popover.tsx (2)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
web/core/components/issues/description-input.tsx (4)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/read.tsx:11-12
Timestamp: 2024-11-28T07:02:15.514Z
Learning: Some components are still in core and have not been moved yet, so their import paths remain the same.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
space/core/store/issue-detail.store.ts (3)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/read.tsx:11-12
Timestamp: 2024-11-28T07:02:15.514Z
Learning: Some components are still in core and have not been moved yet, so their import paths remain the same.
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
web/core/layouts/auth-layout/project-wrapper.tsx (3)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
web/core/components/issues/issue-modal/components/description-editor.tsx (3)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
web/core/store/user/index.ts (1)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
web/core/hooks/use-page-operations.ts (2)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
web/core/components/core/modals/workspace-image-upload-modal.tsx (2)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
web/core/components/dropdowns/estimate.tsx (3)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
packages/editor/src/core/helpers/parser.ts (1)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx (2)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
web/core/components/analytics/work-items/priority-chart.tsx (3)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/read.tsx:11-12
Timestamp: 2024-11-28T07:02:15.514Z
Learning: Some components are still in core and have not been moved yet, so their import paths remain the same.
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
web/core/components/inbox/modals/create-modal/issue-description.tsx (3)
Learnt from: mathalav55
PR: makeplane/plane#6107
File: web/ce/components/workspace-notifications/sidebar/notification-card/options/archive.tsx:11-14
Timestamp: 2024-11-28T07:02:54.664Z
Learning: When components are still located in `core`, it's appropriate for files to import them using `@/components/...`, and the migration to the new import paths is not necessary in such cases.
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
live/tsconfig.json (2)
Learnt from: lifeiscontent
PR: makeplane/plane#7164
File: packages/ui/.storybook/main.ts:24-47
Timestamp: 2025-06-04T16:22:44.344Z
Learning: In packages/ui/.storybook/main.ts, the webpackFinal function intentionally overrides the CSS loader strategy by finding and replacing existing CSS rules. This is a temporary workaround for a known upstream issue in Storybook's CSS handling that has been communicated to the Storybook maintainers. The current implementation should not be changed until the upstream issue is resolved.
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
space/helpers/editor.helper.ts (1)
Learnt from: SatishGandham
PR: makeplane/plane#5864
File: packages/editor/src/core/extensions/custom-image/read-only-custom-image.ts:60-60
Timestamp: 2024-10-22T08:03:04.373Z
Learning: In `packages/editor/src/core/extensions/custom-image/read-only-custom-image.ts`, the `getImageSource` command returns a string directly, not a function.
packages/constants/tsconfig.json (1)
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
packages/constants/package.json (2)
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7061
File: web/core/components/workspace-notifications/root.tsx:18-18
Timestamp: 2025-05-14T13:16:23.323Z
Learning: In the Plane project codebase, the path alias `@/plane-web` resolves to the `ce` directory, making imports like `@/plane-web/hooks/use-notification-preview` correctly resolve to files in `web/ce/hooks/`.
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (35)
live/src/ee/lib/update-document.ts (1)
1-1: LGTM – semicolon fix aligns with project style.
No functional impact, and the file now follows the repo’s statement-termination convention.live/.eslintrc.json (1)
4-4: DroppingparserOptions.projectmay disable type-aware rulesRemoving the
parserOptions.projectentry means ESLint will no longer run with full TypeScript type-information. Any rules that rely on type-checking (e.g.@typescript-eslint/no-misused-promises,no-floating-promises, etc.) will silently fall back to a less accurate analysis.
If the intention was only to simplify the config, verify that you are not depending on type-aware rules in the extended preset (@plane/eslint-config/server.js). If those rules are still enabled, keepparserOptions.projector disable the rules explicitly.web/core/components/issues/workspace-draft/root.tsx (1)
7-8: Confirm new barrel export from@plane/constants
EUserPermissionsLevel,EDraftIssuePaginationType, andPROJECT_TRACKER_ELEMENTSare now imported from the package root.
Make surepackages/constants/src/index.tsre-exports all three symbols; otherwise the build will fail at runtime in the ESM bundles that triggered this PR.web/ce/components/estimates/helper.tsx (1)
1-1: LGTM – import path consolidation onlyThe helper remains unchanged and the new
@plane/typesbarrel keeps things tidy. No further action required.web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx (1)
3-3: LGTM! Import consolidation improves ESM compatibility.The consolidation of
EEstimateSystemandTCycleEstimateTypeimports into a single import from@plane/typesaligns perfectly with the PR objective to fix ESM build processing issues. This change improves tree-shaking and build efficiency.web/core/layouts/auth-layout/project-wrapper.tsx (1)
9-9: LGTM! Import path simplification enhances ESM compatibility.Changing from
@plane/types/src/enumsto@plane/typesuses the main package export and avoids deep imports, which improves ESM build compatibility and addresses the runtime errors mentioned in the PR objectives.web/core/hooks/use-page-operations.ts (2)
2-2: LGTM! Comment update improves import organization clarity.The comment change from "// constants" to "// plane imports" better reflects the actual imports and improves code organization.
5-5: LGTM! Import path simplification aligns with ESM standards.Changing from
@plane/types/src/enumsto@plane/typesfollows the same beneficial pattern seen across the codebase to improve ESM build compatibility.web/core/components/estimates/inputs/root.tsx (1)
2-2: LGTM! Import consolidation enhances build efficiency.Consolidating
EEstimateSystemandTEstimateSystemKeysinto a single import from@plane/typesimproves build efficiency and supports the ESM build processing improvements outlined in the PR objectives.space/core/store/issue-detail.store.ts (1)
8-8: LGTM! Import consolidation supports ESM build improvements.Consolidating
EFileAssetType,TFileSignedURLResponse, andTIssuePublicCommentinto a single import from@plane/typesmaintains consistency with the systematic import improvements across the codebase and supports the ESM build processing fixes.web/core/store/user/index.ts (1)
4-6: LGTM! Import consolidation improves code organization.The addition of the comment and consolidation of
@plane/typesimports into a single line improves readability and follows best practices. These changes align well with the broader ESM build processing fixes.web/core/components/issues/description-input.tsx (1)
10-10: LGTM! Clean import consolidation.Consolidating the three separate imports from
@plane/typesinto a single line improves code organization and aligns with the ESM build processing improvements.web/core/components/core/image-picker-popover.tsx (1)
14-14: LGTM! Import path simplification is well-executed.Moving from the deep import path
@plane/types/src/enumsto the main package export@plane/typesis consistent with the ESM build processing improvements and package restructuring.web/core/components/issues/issue-detail/issue-activity/helper.tsx (1)
3-3: LGTM! Import consolidation supports ESM improvements.Consolidating the imports from
@plane/typesand@plane/types/src/enumsinto a single import statement from@plane/typesis consistent with the package restructuring and helps with ESM build processing.packages/types/.eslintrc.js (1)
1-5: LGTM! Well-structured ESLint configuration for the types package.The ESLint configuration follows best practices by extending the shared library config, using the appropriate TypeScript parser, and setting
root: truefor package-level configuration. This addition supports the broader standardization of tooling across packages.packages/editor/src/core/helpers/parser.ts (1)
2-2: Import consolidation looks good
The unified@plane/typesimport removes redundant paths and aligns with the new package surface.web/core/components/dropdowns/estimate.tsx (1)
7-14: Import clean-up acknowledged
Switching to@plane/typesand collapsing the hook imports improves readability and avoids deep paths.web/core/components/issues/issue-modal/components/description-editor.tsx (1)
14-14: Unified type import LGTM
The consolidated import reflects the new public API of@plane/types.web/core/components/analytics/work-items/priority-chart.tsx (1)
18-18: Import consolidation LGTMSwitching to a single barrel import is consistent with the new
@plane/typesshape and avoids deep-path churn. No further action required.web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/pages/(detail)/[pageId]/page.tsx (1)
9-9: No lingering deep-path imports detected – unified import is safe to approveAll references to deep imports from
@plane/types/src(including@plane/types/src/enums) have been removed across the repository. The consolidated import from@plane/typesis correct and CI is unlikely to break.web/core/services/workspace.service.ts (1)
19-23: Good cleanup of workspace sidebar typesPulling
IWorkspaceSidebarNavigation*into the main barrel import removes brittle deep paths. Clean and forward-compatible.web/core/components/inbox/modals/create-modal/issue-description.tsx (2)
9-9: Import merge OK
TIssueandEFileAssetTypenow come from the barrel; matches the new build.
83-97: Emptyentity_identifiermay break uploadsWhen creating a new issue (
data.idis undefined) you pass an empty string:entity_identifier: data.id ?? "",If the API requires a non-empty identifier this will 400. Either:
- Upload as a “temporary” attachment and patch later, or
- Block upload until the entity exists.
- entity_identifier: data.id ?? "", + // Up-front validation avoids silent 400s + entity_identifier: data.id ?? undefined,and reject early if
undefined.packages/constants/tsconfig.json (1)
3-12: Ensure declaration & composite settings are enabledPlease verify that
declaration: trueandcomposite: trueare set—either in your shared base config or directly in packages/constants/tsconfig.json—to support project‐references and incremental builds.• File: packages/constants/tsconfig.json
Recommended diff:"compilerOptions": { + "declaration": true, + "composite": true, "outDir": "./dist", "rootDir": "./src", …live/tsconfig.json (1)
4-8: Verify TS 5+ “bundler” resolution & decorator runtime
"moduleResolution": "Bundler"requires TypeScript ≥ 5.0 and tooling that understands the new emit. Make sure the CI image and local dev containers use the matching version.experimentalDecorators/emitDecoratorMetadataneedreflect-metadataat runtime; confirm it’s imported once (typically in the app entry) or decorators will fail silently.No action if both are already covered; flagging for double-check.
Also applies to: 20-21
packages/editor/tsconfig.json (2)
4-7: LGTM! Modern TypeScript configuration updates.The updates to use ES2022 libs, ESNext target, and bundler moduleResolution align well with modern TypeScript and bundler practices. These changes will enable better ESM support and access to newer JavaScript features.
11-13: Good practice: Explicit relative path prefixes.Adding the "./" prefix to path mappings makes the relative paths more explicit and clear, which is a good practice for maintainability.
live/tsup.config.ts (1)
3-15: Approve dual-format output – ESM/CJS compatibility verifiedVerified that
live/package.jsonspecifies"type": "module", so emitting both ESM and CJS builds via yourtsup.config.tsis compatible. No further changes required.packages/types/package.json (2)
6-19: Excellent modern package configuration.The transformation to a properly built and distributed package with ES module type, comprehensive exports field, and dual format support is excellent. This follows modern Node.js package best practices and will resolve ESM compatibility issues.
20-28: Comprehensive development workflow scripts.The addition of development, build, linting, type checking, and formatting scripts provides a complete development workflow that's consistent with modern TypeScript package practices.
live/package.json (2)
11-18: Excellent build and quality assurance improvements.The enhanced build script with type checking and the comprehensive set of linting, formatting, and cleaning scripts provide a robust development workflow. The type checking before bundling will catch issues early.
49-50: Good standardization with shared configs.Adding shared ESLint and TypeScript configuration packages promotes consistency across the monorepo and reduces configuration duplication.
packages/constants/package.json (3)
6-19: Consistent modern package transformation.This transformation follows the same excellent pattern as the @plane/types package, establishing proper build distribution, ES module support, and comprehensive exports configuration. The consistency across packages is commendable.
30-31: Logical dependency on @plane/types.The dependency on @plane/types makes sense since constants packages often reference types for better type safety and consistency.
20-29: Complete development workflow.The comprehensive set of scripts for development, building, linting, and formatting provides a complete development experience consistent with modern TypeScript package practices.
* fix: live tsconfig and tsup config * fix: lock file updates * feat: adding build process to constants and types packages * chore: coderabbit suggestions
Description
Type of Change
Summary by CodeRabbit
New Features
Refactor
Chores
Style