Skip to content

fix: remove unused imports and variables (part 2 — web/core non-issues)#8752

Open
darkingtail wants to merge 3 commits intomakeplane:previewfrom
darkingtail:fix/oxlint-unused-vars-part2
Open

fix: remove unused imports and variables (part 2 — web/core non-issues)#8752
darkingtail wants to merge 3 commits intomakeplane:previewfrom
darkingtail:fix/oxlint-unused-vars-part2

Conversation

@darkingtail
Copy link
Contributor

@darkingtail darkingtail commented Mar 12, 2026

Summary

Remove unused imports and variables flagged by oxlint no-unused-vars rule.

Scope: apps/web/core/ (excluding components/issues/)
Files: 119

Changes:

  • Remove unused type/value imports
  • Prefix unused callback parameters with _
  • Remove unused variable declarations

Context

This is 3 of 4 PRs splitting the full lint cleanup into reviewable chunks.

Test plan

  • No functional regressions in affected components

Summary by CodeRabbit

  • Chores
    • Project-wide cleanup: removed unused imports, renamed unused variables, and applied minor lint/type tidy-ups across many components and services.
    • No user-visible changes: behavior, UI, and public APIs remain unchanged.

Resolve oxlint no-unused-vars warnings in apps/web/core/
(excluding components/issues/).
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9d0bead4-29c5-4f9b-bf65-c4ee567f36c4

📥 Commits

Reviewing files that changed from the base of the PR and between 6f183e4 and c306813.

📒 Files selected for processing (1)
  • apps/web/core/store/pages/project-page.store.ts

📝 Walkthrough

Walkthrough

Bulk lint-driven cleanup: removed unused React FC type imports, dropped unused props/imports, renamed unused parameters to underscore-prefixed identifiers, and made minor type/import name adjustments. No functional changes to runtime behavior or public APIs.

Changes

Cohort / File(s) Summary
React FC import removals
apps/web/core/components/.../* (many files, e.g., account/*, comments/*, common/*, cycles/*, estimates/*, inbox/*, modules/*, onboarding/*, pages/*, views/*, etc.)
Removed unused import type { FC } from "react" across numerous component files; purely type/import cleanup with no runtime/API changes.
Unused parameter renames (catch/then/params)
apps/web/core/components/.../sidebar-header.tsx, .../delete/modal.tsx, .../estimate-disable-switch.tsx, .../export-form.tsx, .../issue-root.tsx, .../labels/create-update-label-inline.tsx, .../modules/modal.tsx, .../project/leave-project-modal.tsx, apps/web/core/store/issue/issue-details/relation.store.ts, apps/web/core/store/issue/module/issue.store.ts, apps/web/core/store/pages/project-page.store.ts
Renamed unused function/catch/then parameters to underscore-prefixed names (e.g., err_err, res_res) to satisfy lint rules; no behavior changes.
Removed unused imports & props
apps/web/core/components/account/auth-forms/password.tsx, .../unique-code.tsx, apps/web/core/components/analytics/analytics-section-wrapper.tsx, apps/web/core/components/modules/module-list-item-action.tsx, apps/web/core/components/modules/quick-actions.tsx, apps/web/core/components/pages/editor/*, apps/web/core/components/pages/list/order-by.tsx, apps/web/core/components/project/dropdowns/order-by.tsx, apps/web/core/components/sidebar/add-button.tsx, apps/web/core/components/workspace/billing/comparison/feature-detail.tsx, apps/web/core/hooks/use-collaborative-page-actions.tsx, apps/web/core/services/instance.service.ts, ...apps/web/core/components/inbox/*
Dropped unused imports (tracker events, cn, icons, hooks, useTranslation, etc.) and removed unused destructured props (e.g., isExistingEmail, subtitle, showProject, totalSteps, subscriptionType); no functional changes.
State setter / type renames & lint comments
apps/web/core/components/analytics/insight-table/data-table.tsx, apps/web/core/components/analytics/work-items/*, apps/web/core/services/analytics.service.ts
Renamed state setter variables to underscore-prefixed versions (setRowSelection_setRowSelection, setSorting_setSorting), added lint-disable comments for type augmentations, and renamed generic type param T_T; type/name-only edits.
WorkspaceDraftIssues — method param underscore migration
apps/web/core/store/issue/workspace-draft/issue.store.ts
Multiple public/dummy methods had parameter names changed to underscore-prefixed variants and some placeholder returns adjusted; signatures remain but identifiers now indicate unused parameters.
Misc small edits
apps/web/core/components/modules/module-list-item-action.tsx, apps/web/core/components/estimates/points/create.tsx, apps/web/core/components/pages/editor/editor-body.tsx, apps/web/core/components/power-k/*, apps/web/core/store/issue/...
Reduced import lists (e.g., removed MODULE_TRACKER_EVENTS/ELEMENTS), removed unused constants (e.g., inputProps), removed unused hook imports, and small variable cleanup; no runtime changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

🛠️refactor

Suggested reviewers

  • sriramveeraghanta
  • prateekshourya29

Poem

🐰 I hopped through code both dusk and dawn,
Snipped unused types, then carried on.
Underscores tucked errors out of sight,
Clean lines now hop in morning light. ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete against the template. It lacks Description, Type of Change selection, Screenshots/Media, Test Scenarios details, and References sections required by the repository template. Add missing template sections: expand Description section, select Type of Change (Code refactoring applies), describe actual test scenarios performed, and add issue references if applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing unused imports and variables in web/core components, with specific scope indicator (part 2, excluding issues).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/core/components/project/leave-project-modal.tsx (1)

67-73: ⚠️ Potential issue | 🟡 Minor

Log the error for debugging purposes.

While prefixing the parameter with _ correctly indicates it's unused, the error should actually be logged. The generic toast message doesn't provide enough information for debugging production issues. As per coding guidelines, errors should be logged appropriately for error handling.

📝 Suggested fix to log the error
-            .catch((_err) => {
+            .catch((err) => {
+              console.error("Failed to leave project:", err);
               setToast({
                 type: TOAST_TYPE.ERROR,
                 title: "Error!",
                 message: "Something went wrong please try again later.",
               });
             });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/project/leave-project-modal.tsx` around lines 67 -
73, The catch block swallowing the error hinders debugging; change the parameter
from _err to err in the .catch and log the actual error before showing the toast
(e.g., call your app logger like logger.error(err) or console.error(err)), while
keeping the existing setToast({ type: TOAST_TYPE.ERROR, title: "Error!",
message: "Something went wrong please try again later." }) call to preserve
user-facing behavior.
🧹 Nitpick comments (8)
apps/web/core/components/analytics/analytics-section-wrapper.tsx (1)

13-13: Lint fix is correct, but consider removing the orphaned subtitle prop from the type.

The removal of subtitle from destructuring correctly addresses the no-unused-vars lint warning. However, subtitle remains defined in the Props type (line 13) while the component now completely ignores it—the only reference is the commented-out code on line 26.

This leaves a misleading API where callers can pass subtitle but it has no effect. Consider removing both the prop from the type and the commented-out code, or restoring the feature if it's still needed.

♻️ Optional cleanup
 type Props = {
   title?: string;
   children: React.ReactNode;
   className?: string;
-  subtitle?: string | null;
   actions?: React.ReactNode;
   headerClassName?: string;
 };

 function AnalyticsSectionWrapper(props: Props) {
   const { title, children, className, actions, headerClassName } = props;
   return (
     <div className={className}>
       <div className={cn("mb-6 flex items-center gap-2 text-nowrap", headerClassName)}>
         {title && (
-          <div className="flex items-center gap-2">
-            <h1 className={"text-16 font-medium"}>{title}</h1>
-            {/* {subtitle && <p className="text-16 text-tertiary"> • {subtitle}</p>} */}
-          </div>
+          <h1 className={"text-16 font-medium"}>{title}</h1>
         )}
         {actions}
       </div>
       {children}
     </div>
   );
 }

Also applies to: 19-19, 26-26

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/analytics/analytics-section-wrapper.tsx` at line 13,
The Props type for AnalyticsSectionWrapper still defines the subtitle prop even
though the component no longer uses it; either remove subtitle from the Props
type and delete the commented-out subtitle usage in the component, or restore
the feature by re-adding subtitle to the component render logic (uncomment and
properly handle it) so the prop has effect; update the Props interface, the
AnalyticsSectionWrapper JSX, and remove the orphaned commented code for a
consistent API.
apps/web/core/components/project/dropdowns/order-by.tsx (1)

37-49: Minor observation: Redundant conditional branches render identical markup.

Both the isMobile and non-mobile branches (lines 38-48) render identical JSX. This appears to be pre-existing code outside the scope of this lint cleanup PR, but could be simplified in a future refactor.

♻️ Optional simplification
       customButton={
-        <>
-          {isMobile ? (
-            <div className={getButtonStyling("secondary", "lg")}>
-              <ArrowDownWideNarrow className="size-3.5 shrink-0" strokeWidth={2} />
-              {orderByDetails && t(orderByDetails?.i18n_label)}
-            </div>
-          ) : (
-            <div className={getButtonStyling("secondary", "lg")}>
-              <ArrowDownWideNarrow className="size-3.5 shrink-0" strokeWidth={2} />
-              {orderByDetails && t(orderByDetails?.i18n_label)}
-            </div>
-          )}
-        </>
+        <div className={getButtonStyling("secondary", "lg")}>
+          <ArrowDownWideNarrow className="size-3.5 shrink-0" strokeWidth={2} />
+          {orderByDetails && t(orderByDetails?.i18n_label)}
+        </div>
       }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/project/dropdowns/order-by.tsx` around lines 37 -
49, The conditional using isMobile renders identical JSX in both branches;
simplify by removing the ternary and rendering a single block that uses
getButtonStyling("secondary", "lg"), ArrowDownWideNarrow, and the label
expression (orderByDetails && t(orderByDetails?.i18n_label)) once (e.g., replace
the isMobile ? (...) : (...) with a single <div> using getButtonStyling and the
same children).
apps/web/core/components/account/auth-forms/unique-code.tsx (1)

24-30: Complete the prop cleanup by removing isExistingEmail from the component contract.

Line 44 stops using isExistingEmail, but TAuthUniqueCodeForm still requires it and apps/web/core/components/account/auth-forms/form-root.tsx:111-118 still passes it. Keeping a dead required prop leaves the API misleading and makes this lint cleanup incomplete. I’d remove it from the type here and from the parent call site as well.

Also applies to: 44-44

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/account/auth-forms/unique-code.tsx` around lines 24
- 30, Remove the now-unused isExistingEmail prop from the component contract:
delete it from the TAuthUniqueCodeForm type in unique-code.tsx and remove the
corresponding argument where the component is instantiated in form-root.tsx (the
call that currently passes isExistingEmail). Ensure any references/usages of
isExistingEmail inside the unique-code component and related handlers (e.g.,
generateEmailUniqueCode, handleEmailClear) are eliminated or updated so the
component compiles without that prop.
apps/web/core/services/analytics.service.ts (1)

91-97: Drop the unused generic instead of renaming it.

_T is still unused, so this keeps dead type surface without adding any inference or safety. Since AnalyticsService.processUrl neither returns nor narrows by that type, remove the generic entirely and simplify the explicit type arguments at Lines 29, 47, and 72.

♻️ Suggested cleanup
-  processUrl<_T extends string>(
+  processUrl(
     endpoint: string,
     workspaceSlug: string,
     tab: TAnalyticsGraphsBase | TAnalyticsTabsBase,
     params?: TAnalyticsFilterParams,
     isPeekView?: boolean
   ) {
// same-file call sites after removing the generic
this.processUrl("advance-analytics", workspaceSlug, tab, params, isPeekView);
this.processUrl("advance-analytics-stats", workspaceSlug, tab, params, isPeekView);
this.processUrl("advance-analytics-charts", workspaceSlug, tab, params, isPeekView);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/services/analytics.service.ts` around lines 91 - 97, Remove the
unused generic parameter from AnalyticsService.processUrl by deleting "<_T
extends string>" from the method signature so the function is not generic; then
update all call sites that currently pass an explicit type argument (e.g.
this.processUrl<...>(...)) to call this.processUrl(...) without any generic, and
simplify the three explicit-type call sites to use the same 5 runtime arguments
(endpoint, workspaceSlug, tab, params, isPeekView).
apps/web/core/components/workspace/billing/comparison/feature-detail.tsx (1)

13-19: Consider completing the cleanup by removing subscriptionType from the type definition.

The subscriptionType prop is removed from the destructuring but remains a required property in TPlanFeatureDetailProps. The parent component (base.tsx:107) still computes and passes this value. This creates dead code in the parent (getSubscriptionType(planKey)) and a misleading type interface.

Options:

  1. Remove subscriptionType from the type and update the parent call site (preferred if truly unused).
  2. If intentionally preserved for future use, prefix with _ in destructuring (e.g., const { _subscriptionType, data } = props;) to align with the PR's stated convention for unused parameters.
♻️ Proposed fix to complete the cleanup

In this file:

-import type { EProductSubscriptionEnum } from "@plane/types";
 // plane imports
 // constants
 import type { TPlanFeatureData } from "@/constants/plans";

 type TPlanFeatureDetailProps = {
-  subscriptionType: EProductSubscriptionEnum;
   data: TPlanFeatureData;
 };

Then in apps/web/core/components/workspace/billing/comparison/base.tsx, remove the unused prop:

 <PlanFeatureDetail
-  subscriptionType={getSubscriptionType(planKey)}
   data={
     isSelfManaged
       ? (feature["self-hosted"]?.[planKey] ?? feature.cloud[planKey])
       : feature.cloud[planKey]
   }
 />
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/workspace/billing/comparison/feature-detail.tsx`
around lines 13 - 19, TPlanFeatureDetailProps still declares subscriptionType
even though PlanFeatureDetail no longer destructures or uses it; remove
subscriptionType from the TPlanFeatureDetailProps type and then remove the
corresponding argument passed from the parent (the call site that computes
getSubscriptionType(planKey) in base.tsx) so the prop is no longer passed, or if
you want to keep the prop for future use instead prefix it when destructuring
(e.g., _subscriptionType) to mark it unused; update TPlanFeatureDetailProps and
the parent call accordingly to eliminate the dead code.
apps/web/core/components/project/leave-project-modal.tsx (1)

56-56: Use the defined FormData type instead of any.

The function parameter is typed as any, which bypasses TypeScript's type checking. The FormData type is already defined at the top of the file and should be used here for better type safety.

🔧 Suggested type improvement
-  const onSubmit = async (data: any) => {
+  const onSubmit = async (data: FormData) => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/project/leave-project-modal.tsx` at line 56, The
onSubmit handler is currently typed with any which disables type checking;
change its parameter type to the existing FormData type (i.e., update the
signature of onSubmit to accept data: FormData) so TypeScript enforces the
expected shape; locate the onSubmit function in leave-project-modal.tsx and
replace the any type with FormData wherever it's declared or used.
apps/web/core/components/inbox/content/issue-root.tsx (1)

120-126: Consider logging the error for consistency with other catch blocks in this file.

While renaming to _error satisfies the linter, this catch block silently swallows the error. Other catch blocks in this component (lines 108-109, 131-132) log errors before showing toasts. Consider adding error logging here as well for debugging purposes.

♻️ Suggested improvement
-      } catch (_error) {
+      } catch (error) {
+        console.error("Error updating work item:", error);
         setToast({
           title: "Work item update failed",
           type: TOAST_TYPE.ERROR,
           message: "Work item update failed",
         });
       }

As per coding guidelines: "Use try-catch with proper error types and log errors appropriately for error handling".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/inbox/content/issue-root.tsx` around lines 120 -
126, The catch block currently swallows the error by using _error; update it to
capture the thrown error (e.g., use "error" instead of "_error") and log it
before calling setToast so it matches the other handlers—use the project's
logger (or console.error) to log the error with context, then keep the existing
setToast call with TOAST_TYPE.ERROR to show the user message.
apps/web/core/components/project-states/create-update/create.tsx (1)

26-26: Pre-existing issue: loader state is never set to true.

The loader state is initialized as false and only ever set to false in onCancel. It's never set to true at the start of onSubmit, so the button will never show the "Creating" text or be disabled during submission.

This is outside the scope of this lint cleanup PR, but worth addressing in a follow-up.

🔧 Suggested fix for a follow-up PR
 const onSubmit = async (formData: Partial<IState>) => {
   if (!groupKey) return { status: "error" };

+  setLoader(true);
   try {
     await createStateCallback({ ...formData, group: groupKey });

     setToast({
       type: TOAST_TYPE.SUCCESS,
       title: "Success!",
       message: "State created successfully.",
     });
     handleClose();
     return { status: "success" };
   } catch (error) {
     const errorStatus = error as { status: number; data: { error: string } };
     if (errorStatus?.status === 400) {
       setToast({
         type: TOAST_TYPE.ERROR,
         title: "Error!",
         message: "State with that name already exists. Please try again with another name.",
       });
       return { status: "already_exists" };
     } else {
       setToast({
         type: TOAST_TYPE.ERROR,
         title: "Error!",
         message: errorStatus.data.error ?? "State could not be created. Please try again.",
       });
       return { status: "error" };
     }
+  } finally {
+    setLoader(false);
   }
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/project-states/create-update/create.tsx` at line 26,
The loader state is never set to true, so update the submit flow to
setLoader(true) at the start of the onSubmit handler (before any async work) and
ensure setLoader(false) is called in all exit paths (success, error, or
finally); adjust onSubmit and onCancel in create.tsx to use the existing loader
and setLoader state so the submit button shows "Creating" and is disabled during
the async create operation (refer to loader, setLoader, onSubmit, onCancel).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx`:
- Around line 114-117: The catch block currently swallows exceptions by naming
the param _error and not reporting it; change the catch to capture the error
(e.g., catch (error)) and forward that error to the project's
logging/error-reporting path before calling setLoader(false) and
setPlotType(moduleId, plotType); ensure you call the existing logger/reporting
helper (use the project's central logger or error reporter) so the fetch failure
is recorded, then revert the plot type with setPlotType(moduleId, plotType) and
clear the loader with setLoader(false).

---

Outside diff comments:
In `@apps/web/core/components/project/leave-project-modal.tsx`:
- Around line 67-73: The catch block swallowing the error hinders debugging;
change the parameter from _err to err in the .catch and log the actual error
before showing the toast (e.g., call your app logger like logger.error(err) or
console.error(err)), while keeping the existing setToast({ type:
TOAST_TYPE.ERROR, title: "Error!", message: "Something went wrong please try
again later." }) call to preserve user-facing behavior.

---

Nitpick comments:
In `@apps/web/core/components/account/auth-forms/unique-code.tsx`:
- Around line 24-30: Remove the now-unused isExistingEmail prop from the
component contract: delete it from the TAuthUniqueCodeForm type in
unique-code.tsx and remove the corresponding argument where the component is
instantiated in form-root.tsx (the call that currently passes isExistingEmail).
Ensure any references/usages of isExistingEmail inside the unique-code component
and related handlers (e.g., generateEmailUniqueCode, handleEmailClear) are
eliminated or updated so the component compiles without that prop.

In `@apps/web/core/components/analytics/analytics-section-wrapper.tsx`:
- Line 13: The Props type for AnalyticsSectionWrapper still defines the subtitle
prop even though the component no longer uses it; either remove subtitle from
the Props type and delete the commented-out subtitle usage in the component, or
restore the feature by re-adding subtitle to the component render logic
(uncomment and properly handle it) so the prop has effect; update the Props
interface, the AnalyticsSectionWrapper JSX, and remove the orphaned commented
code for a consistent API.

In `@apps/web/core/components/inbox/content/issue-root.tsx`:
- Around line 120-126: The catch block currently swallows the error by using
_error; update it to capture the thrown error (e.g., use "error" instead of
"_error") and log it before calling setToast so it matches the other
handlers—use the project's logger (or console.error) to log the error with
context, then keep the existing setToast call with TOAST_TYPE.ERROR to show the
user message.

In `@apps/web/core/components/project-states/create-update/create.tsx`:
- Line 26: The loader state is never set to true, so update the submit flow to
setLoader(true) at the start of the onSubmit handler (before any async work) and
ensure setLoader(false) is called in all exit paths (success, error, or
finally); adjust onSubmit and onCancel in create.tsx to use the existing loader
and setLoader state so the submit button shows "Creating" and is disabled during
the async create operation (refer to loader, setLoader, onSubmit, onCancel).

In `@apps/web/core/components/project/dropdowns/order-by.tsx`:
- Around line 37-49: The conditional using isMobile renders identical JSX in
both branches; simplify by removing the ternary and rendering a single block
that uses getButtonStyling("secondary", "lg"), ArrowDownWideNarrow, and the
label expression (orderByDetails && t(orderByDetails?.i18n_label)) once (e.g.,
replace the isMobile ? (...) : (...) with a single <div> using getButtonStyling
and the same children).

In `@apps/web/core/components/project/leave-project-modal.tsx`:
- Line 56: The onSubmit handler is currently typed with any which disables type
checking; change its parameter type to the existing FormData type (i.e., update
the signature of onSubmit to accept data: FormData) so TypeScript enforces the
expected shape; locate the onSubmit function in leave-project-modal.tsx and
replace the any type with FormData wherever it's declared or used.

In `@apps/web/core/components/workspace/billing/comparison/feature-detail.tsx`:
- Around line 13-19: TPlanFeatureDetailProps still declares subscriptionType
even though PlanFeatureDetail no longer destructures or uses it; remove
subscriptionType from the TPlanFeatureDetailProps type and then remove the
corresponding argument passed from the parent (the call site that computes
getSubscriptionType(planKey) in base.tsx) so the prop is no longer passed, or if
you want to keep the prop for future use instead prefix it when destructuring
(e.g., _subscriptionType) to mark it unused; update TPlanFeatureDetailProps and
the parent call accordingly to eliminate the dead code.

In `@apps/web/core/services/analytics.service.ts`:
- Around line 91-97: Remove the unused generic parameter from
AnalyticsService.processUrl by deleting "<_T extends string>" from the method
signature so the function is not generic; then update all call sites that
currently pass an explicit type argument (e.g. this.processUrl<...>(...)) to
call this.processUrl(...) without any generic, and simplify the three
explicit-type call sites to use the same 5 runtime arguments (endpoint,
workspaceSlug, tab, params, isPeekView).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 71fc7afc-24d3-4237-a45d-312ad48981e3

📥 Commits

Reviewing files that changed from the base of the PR and between 6627282 and be0713c.

📒 Files selected for processing (119)
  • apps/web/core/components/account/auth-forms/email.tsx
  • apps/web/core/components/account/auth-forms/password.tsx
  • apps/web/core/components/account/auth-forms/unique-code.tsx
  • apps/web/core/components/analytics/analytics-section-wrapper.tsx
  • apps/web/core/components/analytics/insight-table/data-table.tsx
  • apps/web/core/components/analytics/work-items/priority-chart.tsx
  • apps/web/core/components/analytics/work-items/workitems-insight-table.tsx
  • apps/web/core/components/archives/archive-tabs-list.tsx
  • apps/web/core/components/comments/comment-create.tsx
  • apps/web/core/components/comments/comment-reaction.tsx
  • apps/web/core/components/common/activity/activity-item.tsx
  • apps/web/core/components/common/activity/user.tsx
  • apps/web/core/components/common/count-chip.tsx
  • apps/web/core/components/common/pro-icon.tsx
  • apps/web/core/components/core/list/list-root.tsx
  • apps/web/core/components/core/theme/theme-switch.tsx
  • apps/web/core/components/cycles/active-cycle/cycle-stats.tsx
  • apps/web/core/components/cycles/active-cycle/productivity.tsx
  • apps/web/core/components/cycles/active-cycle/progress.tsx
  • apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx
  • apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx
  • apps/web/core/components/cycles/analytics-sidebar/sidebar-header.tsx
  • apps/web/core/components/cycles/archived-cycles/view.tsx
  • apps/web/core/components/cycles/cycles-view.tsx
  • apps/web/core/components/cycles/list/cycle-list-group-header.tsx
  • apps/web/core/components/cycles/list/cycle-list-project-group-header.tsx
  • apps/web/core/components/cycles/list/root.tsx
  • apps/web/core/components/cycles/modal.tsx
  • apps/web/core/components/empty-state/section-empty-state-root.tsx
  • apps/web/core/components/estimates/create/modal.tsx
  • apps/web/core/components/estimates/delete/modal.tsx
  • apps/web/core/components/estimates/estimate-disable-switch.tsx
  • apps/web/core/components/estimates/estimate-list.tsx
  • apps/web/core/components/estimates/estimate-search.tsx
  • apps/web/core/components/estimates/inputs/number-input.tsx
  • apps/web/core/components/estimates/inputs/root.tsx
  • apps/web/core/components/estimates/inputs/text-input.tsx
  • apps/web/core/components/estimates/loader-screen.tsx
  • apps/web/core/components/estimates/points/create-root.tsx
  • apps/web/core/components/estimates/points/create.tsx
  • apps/web/core/components/estimates/points/preview.tsx
  • apps/web/core/components/exporter/export-form.tsx
  • apps/web/core/components/exporter/single-export.tsx
  • apps/web/core/components/gantt-chart/chart/root.tsx
  • apps/web/core/components/gantt-chart/root.tsx
  • apps/web/core/components/home/user-greetings.tsx
  • apps/web/core/components/home/widgets/links/create-update-link-modal.tsx
  • apps/web/core/components/home/widgets/links/links.tsx
  • apps/web/core/components/home/widgets/manage/index.tsx
  • apps/web/core/components/home/widgets/manage/widget-item-drag-handle.tsx
  • apps/web/core/components/home/widgets/manage/widget-item.tsx
  • apps/web/core/components/home/widgets/recents/filters.tsx
  • apps/web/core/components/inbox/content/inbox-issue-header.tsx
  • apps/web/core/components/inbox/content/issue-root.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/date.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/label.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/member.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/priority.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/root.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/state.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/status.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/date.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/filter-selection.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/labels.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/members.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/priority.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/state.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/status.tsx
  • apps/web/core/components/inbox/inbox-filter/root.tsx
  • apps/web/core/components/inbox/inbox-filter/sorting/order-by.tsx
  • apps/web/core/components/inbox/modals/create-modal/issue-description.tsx
  • apps/web/core/components/inbox/modals/create-modal/issue-properties.tsx
  • apps/web/core/components/inbox/modals/create-modal/issue-title.tsx
  • apps/web/core/components/inbox/modals/create-modal/modal.tsx
  • apps/web/core/components/inbox/sidebar/inbox-list-item.tsx
  • apps/web/core/components/inbox/sidebar/inbox-list.tsx
  • apps/web/core/components/instance/maintenance-view.tsx
  • apps/web/core/components/instance/not-ready-view.tsx
  • apps/web/core/components/labels/create-update-label-inline.tsx
  • apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx
  • apps/web/core/components/modules/archived-modules/header.tsx
  • apps/web/core/components/modules/archived-modules/view.tsx
  • apps/web/core/components/modules/links/create-update-modal.tsx
  • apps/web/core/components/modules/modal.tsx
  • apps/web/core/components/modules/module-list-item-action.tsx
  • apps/web/core/components/modules/module-status-dropdown.tsx
  • apps/web/core/components/modules/module-view-header.tsx
  • apps/web/core/components/modules/quick-actions.tsx
  • apps/web/core/components/navigation/customize-navigation-dialog.tsx
  • apps/web/core/components/navigation/tab-navigation-root.tsx
  • apps/web/core/components/onboarding/header.tsx
  • apps/web/core/components/onboarding/invite-members.tsx
  • apps/web/core/components/onboarding/steps/common/header.tsx
  • apps/web/core/components/onboarding/steps/profile/consent.tsx
  • apps/web/core/components/onboarding/switch-account-dropdown.tsx
  • apps/web/core/components/pages/editor/editor-body.tsx
  • apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx
  • apps/web/core/components/pages/list/order-by.tsx
  • apps/web/core/components/power-k/ui/modal/footer.tsx
  • apps/web/core/components/power-k/ui/modal/search-results.tsx
  • apps/web/core/components/project-states/create-update/create.tsx
  • apps/web/core/components/project-states/root.tsx
  • apps/web/core/components/project/dropdowns/order-by.tsx
  • apps/web/core/components/project/leave-project-modal.tsx
  • apps/web/core/components/sidebar/add-button.tsx
  • apps/web/core/components/views/filters/order-by.tsx
  • apps/web/core/components/views/view-list-item-action.tsx
  • apps/web/core/components/views/view-list-item.tsx
  • apps/web/core/components/web-hooks/form/secret-key.tsx
  • apps/web/core/components/workspace-notifications/notification-app-sidebar-option.tsx
  • apps/web/core/components/workspace/billing/comparison/feature-detail.tsx
  • apps/web/core/hooks/use-collaborative-page-actions.tsx
  • apps/web/core/services/analytics.service.ts
  • apps/web/core/services/instance.service.ts
  • apps/web/core/store/issue/issue-details/relation.store.ts
  • apps/web/core/store/issue/issue-details/root.store.ts
  • apps/web/core/store/issue/module/issue.store.ts
  • apps/web/core/store/issue/workspace-draft/issue.store.ts
  • apps/web/core/store/pages/project-page.store.ts
💤 Files with no reviewable changes (83)
  • apps/web/core/components/cycles/active-cycle/cycle-stats.tsx
  • apps/web/core/components/inbox/content/inbox-issue-header.tsx
  • apps/web/core/components/inbox/inbox-filter/root.tsx
  • apps/web/core/components/modules/links/create-update-modal.tsx
  • apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx
  • apps/web/core/components/cycles/archived-cycles/view.tsx
  • apps/web/core/components/home/widgets/manage/index.tsx
  • apps/web/core/components/onboarding/switch-account-dropdown.tsx
  • apps/web/core/components/home/widgets/recents/filters.tsx
  • apps/web/core/components/instance/maintenance-view.tsx
  • apps/web/core/components/home/widgets/manage/widget-item-drag-handle.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/state.tsx
  • apps/web/core/components/modules/quick-actions.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/date.tsx
  • apps/web/core/components/modules/archived-modules/view.tsx
  • apps/web/core/components/common/count-chip.tsx
  • apps/web/core/components/cycles/active-cycle/progress.tsx
  • apps/web/core/components/comments/comment-reaction.tsx
  • apps/web/core/components/archives/archive-tabs-list.tsx
  • apps/web/core/components/cycles/cycles-view.tsx
  • apps/web/core/components/empty-state/section-empty-state-root.tsx
  • apps/web/core/components/cycles/active-cycle/productivity.tsx
  • apps/web/core/components/common/pro-icon.tsx
  • apps/web/core/components/pages/editor/editor-body.tsx
  • apps/web/core/components/views/view-list-item-action.tsx
  • apps/web/core/components/cycles/list/cycle-list-group-header.tsx
  • apps/web/core/components/onboarding/steps/profile/consent.tsx
  • apps/web/core/components/workspace-notifications/notification-app-sidebar-option.tsx
  • apps/web/core/components/estimates/points/create.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/labels.tsx
  • apps/web/core/components/inbox/modals/create-modal/modal.tsx
  • apps/web/core/components/exporter/single-export.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/root.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/priority.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/status.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/priority.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/filter-selection.tsx
  • apps/web/core/components/onboarding/steps/common/header.tsx
  • apps/web/core/components/modules/module-status-dropdown.tsx
  • apps/web/core/components/inbox/modals/create-modal/issue-title.tsx
  • apps/web/core/components/pages/editor/toolbar/options-dropdown.tsx
  • apps/web/core/components/estimates/points/preview.tsx
  • apps/web/core/components/core/theme/theme-switch.tsx
  • apps/web/core/components/estimates/estimate-list.tsx
  • apps/web/core/components/cycles/list/root.tsx
  • apps/web/core/components/cycles/analytics-sidebar/issue-progress.tsx
  • apps/web/core/components/instance/not-ready-view.tsx
  • apps/web/core/components/estimates/create/modal.tsx
  • apps/web/core/components/sidebar/add-button.tsx
  • apps/web/core/store/issue/issue-details/root.store.ts
  • apps/web/core/components/inbox/inbox-filter/sorting/order-by.tsx
  • apps/web/core/components/navigation/tab-navigation-root.tsx
  • apps/web/core/components/modules/archived-modules/header.tsx
  • apps/web/core/components/estimates/inputs/root.tsx
  • apps/web/core/components/estimates/estimate-search.tsx
  • apps/web/core/components/home/user-greetings.tsx
  • apps/web/core/components/project-states/root.tsx
  • apps/web/core/components/estimates/inputs/text-input.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/state.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/member.tsx
  • apps/web/core/components/navigation/customize-navigation-dialog.tsx
  • apps/web/core/components/common/activity/user.tsx
  • apps/web/core/components/views/view-list-item.tsx
  • apps/web/core/components/comments/comment-create.tsx
  • apps/web/core/components/onboarding/header.tsx
  • apps/web/core/components/power-k/ui/modal/footer.tsx
  • apps/web/core/components/web-hooks/form/secret-key.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/members.tsx
  • apps/web/core/components/gantt-chart/chart/root.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/status.tsx
  • apps/web/core/components/estimates/loader-screen.tsx
  • apps/web/core/components/inbox/modals/create-modal/issue-properties.tsx
  • apps/web/core/components/inbox/inbox-filter/applied-filters/label.tsx
  • apps/web/core/components/cycles/list/cycle-list-project-group-header.tsx
  • apps/web/core/components/power-k/ui/modal/search-results.tsx
  • apps/web/core/components/modules/module-view-header.tsx
  • apps/web/core/components/home/widgets/links/links.tsx
  • apps/web/core/components/inbox/sidebar/inbox-list.tsx
  • apps/web/core/components/core/list/list-root.tsx
  • apps/web/core/components/gantt-chart/root.tsx
  • apps/web/core/components/estimates/inputs/number-input.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/date.tsx
  • apps/web/core/components/home/widgets/links/create-update-link-modal.tsx

Comment on lines +79 to 80
} catch (_err) {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Don’t collapse request failures into “date already exists.”

Swallowing every exception here and returning false makes network/server failures look like a validation conflict, so handleDateChange shows the wrong toast and hides the real failure mode. Please log the error and surface a distinct fallback path for request errors instead of reusing the invalid-date result.

As per coding guidelines, "Use try-catch with proper error types and log errors appropriately for error handling".

Comment on lines +114 to 117
} catch (_error) {
setLoader(false);
setPlotType(moduleId, plotType);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Don't swallow the refresh failure here.

Renaming this to _error makes the failure path explicitly ignore the exception. Please keep the caught error and report it through the existing logging/error-reporting path before reverting the plot type; otherwise these fetch failures become silent and hard to debug.

Based on learnings: Applies to **/*.{ts,tsx} : Use try-catch with proper error types and log errors appropriately for error handling.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx` around
lines 114 - 117, The catch block currently swallows exceptions by naming the
param _error and not reporting it; change the catch to capture the error (e.g.,
catch (error)) and forward that error to the project's logging/error-reporting
path before calling setLoader(false) and setPlotType(moduleId, plotType); ensure
you call the existing logger/reporting helper (use the project's central logger
or error reporter) so the fetch failure is recorded, then revert the plot type
with setPlotType(moduleId, plotType) and clear the loader with setLoader(false).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant