Skip to content

Conversation

@prateekshourya29
Copy link
Member

@prateekshourya29 prateekshourya29 commented Nov 25, 2025

Description

This PR removes the module check from link update and delete methods. This was referring to module from node package. The actual intention was to check the module details, but that wasn’t necessary for the request.

Type of Change

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

References

Fixes: PLANE-WEB-3ST

Summary by CodeRabbit

  • Bug Fixes
    • Improved link update and delete operations to work in more scenarios by refining validation logic.

✏️ Tip: You can customize this high-level summary in your review settings.

@makeplane
Copy link

makeplane bot commented Nov 25, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

Removed module existence validation checks from handleUpdateLink and handleDeleteLink handlers in the analytics sidebar component, allowing these functions to proceed when module is undefined while retaining workspace and project ID guard conditions.

Changes

Cohort / File(s) Summary
Removed module validation from handlers
apps/web/core/components/modules/analytics-sidebar/root.tsx
Removed module existence checks from handleUpdateLink and handleDeleteLink; now only guard on workspaceSlug and projectId presence. Error handling and payload construction unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Attention areas: Verify that removing the module check doesn't introduce undefined state errors in dependent code paths; confirm that payload construction safely handles undefined module values; ensure no downstream components depend on module presence validation at this layer.

Poem

A rabbit hops through guards removed with care,
Two handlers now skip the module's stare,
Workspace and project stand sentinel strong,
While module undefined carries along. 🐰✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: removing module checks from analytics sidebar link handlers.
Description check ✅ Passed The description includes the required sections with clear explanations of what was changed and why, though Screenshots and Test Scenarios sections are missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-module-link-actions

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

❤️ Share

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

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

🧹 Nitpick comments (1)
apps/web/core/components/modules/analytics-sidebar/root.tsx (1)

126-132: Removal of module check in link handlers looks correct; consider consistent moduleId guard as a minor hardening

The updated guards in handleUpdateLink and handleDeleteLink now only check workspaceSlug and projectId, which matches the PR intent of dropping the erroneous module validation and should address the Sentry issue without changing the rest of the behavior.

Given that moduleId is a required Props field and ModuleLinksList is only rendered when moduleId is truthy, this is safe in practice. If you want defensive consistency with submitChanges / handleCreateLink, you could also include moduleId in these guards, but that’s optional and not blocking:

-  if (!workspaceSlug || !projectId) return;
+  if (!workspaceSlug || !projectId || !moduleId) return;

Same pattern would apply to handleDeleteLink.

Also applies to: 147-151

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d38147b and 4199bd3.

📒 Files selected for processing (1)
  • apps/web/core/components/modules/analytics-sidebar/root.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,mts,cts}

📄 CodeRabbit inference engine (.github/instructions/typescript.instructions.md)

**/*.{ts,tsx,mts,cts}: Use const type parameters for more precise literal inference in TypeScript 5.0+
Use the satisfies operator to validate types without widening them
Leverage inferred type predicates to reduce the need for explicit is return types in filter/check functions
Use NoInfer<T> utility to block inference for specific type arguments when they should be determined by other arguments
Utilize narrowing in switch(true) blocks for control flow analysis (TypeScript 5.3+)
Rely on narrowing from direct boolean comparisons for type guards
Trust preserved narrowing in closures when variables aren't modified after the check (TypeScript 5.4+)
Use constant indices to narrow object/array properties (TypeScript 5.5+)
Use standard ECMAScript decorators (Stage 3) instead of legacy experimentalDecorators
Use using declarations for explicit resource management with Disposable pattern instead of manual cleanup (TypeScript 5.2+)
Use with { type: "json" } for import attributes; avoid deprecated assert syntax (TypeScript 5.3/5.8+)
Use import type explicitly when importing types to ensure they are erased during compilation, respecting verbatimModuleSyntax flag
Use .ts, .mts, .cts extensions in import type statements (TypeScript 5.2+)
Use import type { Type } from "mod" with { "resolution-mode": "import" } for specific module resolution contexts (TypeScript 5.3+)
Use new iterator methods (map, filter, etc.) if targeting modern environments (TypeScript 5.6+)
Utilize new Set methods like union, intersection, etc., when available (TypeScript 5.5+)
Use Object.groupBy / Map.groupBy standard methods for grouping instead of external libraries (TypeScript 5.4+)
Use Promise.withResolvers() for creating promises with exposed resolve/reject functions (TypeScript 5.7+)
Use copying array methods (toSorted, toSpliced, with) for immutable array operations (TypeScript 5.2+)
Avoid accessing instance fields via super in classes (TypeScript 5....

Files:

  • apps/web/core/components/modules/analytics-sidebar/root.tsx
🧬 Code graph analysis (1)
apps/web/core/components/modules/analytics-sidebar/root.tsx (1)
apps/space/core/store/publish/publish.store.ts (1)
  • workspaceSlug (93-95)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (javascript)

@sriramveeraghanta sriramveeraghanta merged commit 37c59ef into preview Nov 25, 2025
5 of 7 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix-module-link-actions branch November 25, 2025 18:32
ClarenceChen0627 pushed a commit to ClarenceChen0627/plane that referenced this pull request Dec 5, 2025
ClarenceChen0627 pushed a commit to ClarenceChen0627/plane that referenced this pull request Dec 5, 2025
ClarenceChen0627 pushed a commit to ClarenceChen0627/plane that referenced this pull request Dec 5, 2025
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.

3 participants