Skip to content

fix: live server runtime errors#7314

Merged
sriramveeraghanta merged 5 commits intopreviewfrom
fix-live-server
Jul 2, 2025
Merged

fix: live server runtime errors#7314
sriramveeraghanta merged 5 commits intopreviewfrom
fix-live-server

Conversation

@sriramveeraghanta
Copy link
Member

@sriramveeraghanta sriramveeraghanta commented Jul 2, 2025

Description

  • Fix live server runtime issues due to ESM build processing.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Summary by CodeRabbit

  • New Features

    • Added new configuration files and build scripts for improved development workflows in several packages.
    • Expanded the public API of the types package by re-exporting additional enums.
  • Refactor

    • Refactored server implementation to a class-based design for improved modularity and lifecycle management.
    • Consolidated and cleaned up import statements across multiple files for improved code organization.
    • Updated TypeScript and bundler configurations for modern standards and streamlined builds.
  • Chores

    • Enhanced and standardized package metadata, build scripts, and linting configurations.
    • Removed unused dependencies and redundant files.
  • Style

    • Improved code clarity by consolidating and simplifying import statements.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 2, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This 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

Files/Groups Change Summary
live/.eslintrc.json, packages/editor/.eslintrc.js, packages/constants/.eslintrc.js, packages/types/.eslintrc.js Simplified ESLint configs by removing parserOptions and/or rules; added new ESLint config files for constants and types packages using shared configs.
live/package.json, packages/constants/package.json, packages/types/package.json Refined and expanded npm scripts for build, lint, type checking, and formatting; updated dependencies and devDependencies; clarified exports, main/module/types fields, and included files for packaging.
live/tsconfig.json, packages/editor/tsconfig.json, packages/constants/tsconfig.json, packages/types/tsconfig.json Updated TypeScript configs for modern module systems and resolutions, enabled decorators, strict settings, and clarified include/exclude patterns.
live/tsup.config.ts, packages/constants/tsup.config.ts, packages/types/tsup.config.ts Refactored tsup build configs to static exports, expanded formats, enabled declaration file generation, minification, and cleaned up options.
live/src/ee/lib/authentication.ts Deleted re-export file for authentication module, removing redundant indirection.
live/src/ee/lib/update-document.ts Added a missing semicolon to the export statement.
live/src/server.ts Refactored server to a class-based design, encapsulating setup, middleware, routes, and shutdown logic. Improved error handling and unified shutdown process.
packages/editor/src/core/helpers/parser.ts, space/core/store/issue-detail.store.ts, web/app/(all)/.../page.tsx, web/ce/components/estimates/helper.tsx, web/core/components/analytics/work-items/priority-chart.tsx, web/core/components/core/image-picker-popover.tsx, web/core/components/core/modals/user-image-upload-modal.tsx, web/core/components/core/modals/workspace-image-upload-modal.tsx, web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx, web/core/components/dropdowns/estimate.tsx, web/core/components/estimates/inputs/root.tsx, web/core/components/inbox/modals/create-modal/issue-description.tsx, web/core/components/issues/description-input.tsx, web/core/components/issues/issue-detail/issue-activity/helper.tsx, web/core/components/issues/issue-modal/components/description-editor.tsx, web/core/components/issues/workspace-draft/root.tsx, web/core/hooks/use-page-operations.ts, web/core/layouts/auth-layout/project-wrapper.tsx, web/core/services/workspace.service.ts, web/core/store/user/index.ts Consolidated and unified import statements, reducing redundancy and improving maintainability.
packages/types/src/index.ts Added export for all enums, broadening the public API surface.
space/helpers/editor.helper.ts Refactored internal logic by extracting an inline async function into a named function within the same module.

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
Loading

Possibly related PRs

  • fix: live server runtime errors #7314: Contains identical changes to the live server refactor, ESLint config simplification, and package.json script updates, indicating a direct relation.

Suggested labels

🐛bug

Suggested reviewers

  • Palanikannan1437

Poem

In the warren of code, where the constants reside,
The scripts now are tidy, the configs unified.
Imports hop together, no longer astray,
The server stands tall in a class-based array.
With enums exported and types all in line,
This bunny approves—your refactor is fine!

((\
( -.-)
o_(")(") — Hopping towards better code!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4fc2473 and 609c675.

📒 Files selected for processing (1)
  • live/src/server.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sriramveeraghanta sriramveeraghanta marked this pull request as ready for review July 2, 2025 11:50
Copy link
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: 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
additionalAssetIds is appended after converting the first set to an array, so any IDs that already exist in assetSources can 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 when query_type is undefined

params.query_type.join(",") assumes query_type is 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/constants

Please 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 unaffected

Switching to @plane/types improves DX; just double-check that the EFileAssetType re-export is marked as export const enum/export enum and 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 – validate EFileAssetType re-export

If the enum is re-exported via export *, verify that treeshaking still drops unused members; otherwise consider export { EFileAssetType } explicitly in the barrel.

packages/constants/.eslintrc.js (1)

1-5: Add parserOptions.project for full TypeScript rule coverage
Without a parserOptions.project, rules that rely on type-information (e.g. @typescript-eslint/no-misused-promises) are silently disabled. Point it at the package-level tsconfig.json.

 parser: "@typescript-eslint/parser",
+parserOptions: {
+  project: "./tsconfig.json",
+},
packages/types/tsup.config.ts (1)

3-10: Add sourcemaps & explicit target for better DX

Nice 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: true hurts 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 unnecessary async wrapper

getAssetSrc does 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 duplication

Both getAssetDownloadSrc and getAssetSrc point 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5874636 and 4fc2473.

⛔ Files ignored due to path filters (1)
  • yarn.lock is 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: Dropping parserOptions.project may disable type-aware rules

Removing the parserOptions.project entry 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, keep parserOptions.project or disable the rules explicitly.

web/core/components/issues/workspace-draft/root.tsx (1)

7-8: Confirm new barrel export from @plane/constants

EUserPermissionsLevel, EDraftIssuePaginationType, and PROJECT_TRACKER_ELEMENTS are now imported from the package root.
Make sure packages/constants/src/index.ts re-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 only

The helper remains unchanged and the new @plane/types barrel 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 EEstimateSystem and TCycleEstimateType imports into a single import from @plane/types aligns 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/enums to @plane/types uses 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/enums to @plane/types follows 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 EEstimateSystem and TEstimateSystemKeys into a single import from @plane/types improves 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, and TIssuePublicComment into a single import from @plane/types maintains 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/types imports 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/types into 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/enums to the main package export @plane/types is 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/types and @plane/types/src/enums into a single import statement from @plane/types is 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: true for 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/types import 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/types and 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 LGTM

Switching to a single barrel import is consistent with the new @plane/types shape 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 approve

All references to deep imports from @plane/types/src (including @plane/types/src/enums) have been removed across the repository. The consolidated import from @plane/types is correct and CI is unlikely to break.

web/core/services/workspace.service.ts (1)

19-23: Good cleanup of workspace sidebar types

Pulling 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

TIssue and EFileAssetType now come from the barrel; matches the new build.


83-97: Empty entity_identifier may break uploads

When creating a new issue (data.id is undefined) you pass an empty string:

entity_identifier: data.id ?? "",

If the API requires a non-empty identifier this will 400. Either:

  1. Upload as a “temporary” attachment and patch later, or
  2. 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 enabled

Please verify that declaration: true and composite: true are 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

  1. "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.
  2. experimentalDecorators/emitDecoratorMetadata need reflect-metadata at 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 verified

Verified that live/package.json specifies "type": "module", so emitting both ESM and CJS builds via your tsup.config.ts is 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.

@sriramveeraghanta sriramveeraghanta merged commit 7153064 into preview Jul 2, 2025
3 of 5 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix-live-server branch July 2, 2025 12:50
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
* fix: live tsconfig and tsup config

* fix: lock file updates

* feat: adding build process to constants and types packages

* chore: coderabbit suggestions
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