fix: remove unused imports and variables (part 2 — web/core non-issues)#8752
fix: remove unused imports and variables (part 2 — web/core non-issues)#8752darkingtail wants to merge 3 commits intomakeplane:previewfrom
Conversation
Resolve oxlint no-unused-vars warnings in apps/web/core/ (excluding components/issues/).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughBulk lint-driven cleanup: removed unused React Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
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 | 🟡 MinorLog 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 orphanedsubtitleprop from the type.The removal of
subtitlefrom destructuring correctly addresses theno-unused-varslint warning. However,subtitleremains defined in thePropstype (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
subtitlebut 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
isMobileand 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 removingisExistingEmailfrom the component contract.Line 44 stops using
isExistingEmail, butTAuthUniqueCodeFormstill requires it andapps/web/core/components/account/auth-forms/form-root.tsx:111-118still 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.
_Tis still unused, so this keeps dead type surface without adding any inference or safety. SinceAnalyticsService.processUrlneither 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 removingsubscriptionTypefrom the type definition.The
subscriptionTypeprop is removed from the destructuring but remains a required property inTPlanFeatureDetailProps. 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:
- Remove
subscriptionTypefrom the type and update the parent call site (preferred if truly unused).- 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 definedFormDatatype instead ofany.The function parameter is typed as
any, which bypasses TypeScript's type checking. TheFormDatatype 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
_errorsatisfies 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:loaderstate is never set totrue.The
loaderstate is initialized asfalseand only ever set tofalseinonCancel. It's never set totrueat the start ofonSubmit, 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
📒 Files selected for processing (119)
apps/web/core/components/account/auth-forms/email.tsxapps/web/core/components/account/auth-forms/password.tsxapps/web/core/components/account/auth-forms/unique-code.tsxapps/web/core/components/analytics/analytics-section-wrapper.tsxapps/web/core/components/analytics/insight-table/data-table.tsxapps/web/core/components/analytics/work-items/priority-chart.tsxapps/web/core/components/analytics/work-items/workitems-insight-table.tsxapps/web/core/components/archives/archive-tabs-list.tsxapps/web/core/components/comments/comment-create.tsxapps/web/core/components/comments/comment-reaction.tsxapps/web/core/components/common/activity/activity-item.tsxapps/web/core/components/common/activity/user.tsxapps/web/core/components/common/count-chip.tsxapps/web/core/components/common/pro-icon.tsxapps/web/core/components/core/list/list-root.tsxapps/web/core/components/core/theme/theme-switch.tsxapps/web/core/components/cycles/active-cycle/cycle-stats.tsxapps/web/core/components/cycles/active-cycle/productivity.tsxapps/web/core/components/cycles/active-cycle/progress.tsxapps/web/core/components/cycles/analytics-sidebar/issue-progress.tsxapps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsxapps/web/core/components/cycles/analytics-sidebar/sidebar-header.tsxapps/web/core/components/cycles/archived-cycles/view.tsxapps/web/core/components/cycles/cycles-view.tsxapps/web/core/components/cycles/list/cycle-list-group-header.tsxapps/web/core/components/cycles/list/cycle-list-project-group-header.tsxapps/web/core/components/cycles/list/root.tsxapps/web/core/components/cycles/modal.tsxapps/web/core/components/empty-state/section-empty-state-root.tsxapps/web/core/components/estimates/create/modal.tsxapps/web/core/components/estimates/delete/modal.tsxapps/web/core/components/estimates/estimate-disable-switch.tsxapps/web/core/components/estimates/estimate-list.tsxapps/web/core/components/estimates/estimate-search.tsxapps/web/core/components/estimates/inputs/number-input.tsxapps/web/core/components/estimates/inputs/root.tsxapps/web/core/components/estimates/inputs/text-input.tsxapps/web/core/components/estimates/loader-screen.tsxapps/web/core/components/estimates/points/create-root.tsxapps/web/core/components/estimates/points/create.tsxapps/web/core/components/estimates/points/preview.tsxapps/web/core/components/exporter/export-form.tsxapps/web/core/components/exporter/single-export.tsxapps/web/core/components/gantt-chart/chart/root.tsxapps/web/core/components/gantt-chart/root.tsxapps/web/core/components/home/user-greetings.tsxapps/web/core/components/home/widgets/links/create-update-link-modal.tsxapps/web/core/components/home/widgets/links/links.tsxapps/web/core/components/home/widgets/manage/index.tsxapps/web/core/components/home/widgets/manage/widget-item-drag-handle.tsxapps/web/core/components/home/widgets/manage/widget-item.tsxapps/web/core/components/home/widgets/recents/filters.tsxapps/web/core/components/inbox/content/inbox-issue-header.tsxapps/web/core/components/inbox/content/issue-root.tsxapps/web/core/components/inbox/inbox-filter/applied-filters/date.tsxapps/web/core/components/inbox/inbox-filter/applied-filters/label.tsxapps/web/core/components/inbox/inbox-filter/applied-filters/member.tsxapps/web/core/components/inbox/inbox-filter/applied-filters/priority.tsxapps/web/core/components/inbox/inbox-filter/applied-filters/root.tsxapps/web/core/components/inbox/inbox-filter/applied-filters/state.tsxapps/web/core/components/inbox/inbox-filter/applied-filters/status.tsxapps/web/core/components/inbox/inbox-filter/filters/date.tsxapps/web/core/components/inbox/inbox-filter/filters/filter-selection.tsxapps/web/core/components/inbox/inbox-filter/filters/labels.tsxapps/web/core/components/inbox/inbox-filter/filters/members.tsxapps/web/core/components/inbox/inbox-filter/filters/priority.tsxapps/web/core/components/inbox/inbox-filter/filters/state.tsxapps/web/core/components/inbox/inbox-filter/filters/status.tsxapps/web/core/components/inbox/inbox-filter/root.tsxapps/web/core/components/inbox/inbox-filter/sorting/order-by.tsxapps/web/core/components/inbox/modals/create-modal/issue-description.tsxapps/web/core/components/inbox/modals/create-modal/issue-properties.tsxapps/web/core/components/inbox/modals/create-modal/issue-title.tsxapps/web/core/components/inbox/modals/create-modal/modal.tsxapps/web/core/components/inbox/sidebar/inbox-list-item.tsxapps/web/core/components/inbox/sidebar/inbox-list.tsxapps/web/core/components/instance/maintenance-view.tsxapps/web/core/components/instance/not-ready-view.tsxapps/web/core/components/labels/create-update-label-inline.tsxapps/web/core/components/modules/analytics-sidebar/issue-progress.tsxapps/web/core/components/modules/archived-modules/header.tsxapps/web/core/components/modules/archived-modules/view.tsxapps/web/core/components/modules/links/create-update-modal.tsxapps/web/core/components/modules/modal.tsxapps/web/core/components/modules/module-list-item-action.tsxapps/web/core/components/modules/module-status-dropdown.tsxapps/web/core/components/modules/module-view-header.tsxapps/web/core/components/modules/quick-actions.tsxapps/web/core/components/navigation/customize-navigation-dialog.tsxapps/web/core/components/navigation/tab-navigation-root.tsxapps/web/core/components/onboarding/header.tsxapps/web/core/components/onboarding/invite-members.tsxapps/web/core/components/onboarding/steps/common/header.tsxapps/web/core/components/onboarding/steps/profile/consent.tsxapps/web/core/components/onboarding/switch-account-dropdown.tsxapps/web/core/components/pages/editor/editor-body.tsxapps/web/core/components/pages/editor/toolbar/options-dropdown.tsxapps/web/core/components/pages/list/order-by.tsxapps/web/core/components/power-k/ui/modal/footer.tsxapps/web/core/components/power-k/ui/modal/search-results.tsxapps/web/core/components/project-states/create-update/create.tsxapps/web/core/components/project-states/root.tsxapps/web/core/components/project/dropdowns/order-by.tsxapps/web/core/components/project/leave-project-modal.tsxapps/web/core/components/sidebar/add-button.tsxapps/web/core/components/views/filters/order-by.tsxapps/web/core/components/views/view-list-item-action.tsxapps/web/core/components/views/view-list-item.tsxapps/web/core/components/web-hooks/form/secret-key.tsxapps/web/core/components/workspace-notifications/notification-app-sidebar-option.tsxapps/web/core/components/workspace/billing/comparison/feature-detail.tsxapps/web/core/hooks/use-collaborative-page-actions.tsxapps/web/core/services/analytics.service.tsapps/web/core/services/instance.service.tsapps/web/core/store/issue/issue-details/relation.store.tsapps/web/core/store/issue/issue-details/root.store.tsapps/web/core/store/issue/module/issue.store.tsapps/web/core/store/issue/workspace-draft/issue.store.tsapps/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
| } catch (_err) { | ||
| return false; |
There was a problem hiding this comment.
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".
| } catch (_error) { | ||
| setLoader(false); | ||
| setPlotType(moduleId, plotType); | ||
| } |
There was a problem hiding this comment.
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).
Summary
Remove unused imports and variables flagged by
oxlintno-unused-varsrule.Scope:
apps/web/core/(excludingcomponents/issues/)Files: 119
Changes:
_Context
This is 3 of 4 PRs splitting the full lint cleanup into reviewable chunks.
Test plan
Summary by CodeRabbit