Skip to content

fix: remove unnecessary ternary expressions and map spreads#8750

Open
darkingtail wants to merge 3 commits intomakeplane:previewfrom
darkingtail:fix/oxlint-no-unneeded-ternary
Open

fix: remove unnecessary ternary expressions and map spreads#8750
darkingtail wants to merge 3 commits intomakeplane:previewfrom
darkingtail:fix/oxlint-no-unneeded-ternary

Conversation

@darkingtail
Copy link
Contributor

@darkingtail darkingtail commented Mar 12, 2026

Summary

Resolve oxlint warnings for two rules:

  • no-unneeded-ternary (98 fixes): Simplify redundant x ? true : falsex, x ? false : true!x
  • no-map-spread (14 fixes): Replace inefficient spread-in-map with Object.assign()

91 files changed, all mechanical transformations with no behavioral changes.

Context

These warnings were introduced by the addition of oxlint to the project's lint toolchain. The pre-commit hook (oxlint --deny-warnings) currently fails on existing code.

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

Test plan

  • pnpm exec oxlint --deny-warnings shows 0 no-unneeded-ternary / no-map-spread warnings
  • No functional regressions in affected components

Summary by CodeRabbit

  • Bug Fixes

    • Fixed password-related button disable behavior so actions enable correctly when validation passes.
  • Refactor

    • Simplified and standardized boolean checks across the app for more consistent UI behavior.
    • Unified object construction patterns for internal consistency.
    • Streamlined filter and form state logic to reduce redundancy and improve reliability.

Resolve oxlint warnings:
- no-unneeded-ternary: simplify redundant boolean ternaries
- no-map-spread: replace inefficient spread-in-map patterns
@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: 5ab727ba-3acd-49d3-8af2-23b23e0f7785

📥 Commits

Reviewing files that changed from the base of the PR and between 9d6ba53 and 70294b1.

📒 Files selected for processing (32)
  • apps/web/core/components/common/filters/created-at.tsx
  • apps/web/core/components/common/filters/created-by.tsx
  • apps/web/core/components/cycles/dropdowns/filters/end-date.tsx
  • apps/web/core/components/cycles/dropdowns/filters/start-date.tsx
  • apps/web/core/components/cycles/dropdowns/filters/status.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/date.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/issues/issue-layouts/filters/header/filters/assignee.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx
  • apps/web/core/components/modules/dropdowns/filters/lead.tsx
  • apps/web/core/components/modules/dropdowns/filters/members.tsx
  • apps/web/core/components/modules/dropdowns/filters/start-date.tsx
  • apps/web/core/components/modules/dropdowns/filters/status.tsx
  • apps/web/core/components/modules/dropdowns/filters/target-date.tsx
  • apps/web/core/components/project/dropdowns/filters/access.tsx
  • apps/web/core/components/project/dropdowns/filters/created-at.tsx
  • apps/web/core/components/project/dropdowns/filters/lead.tsx
  • apps/web/core/components/project/dropdowns/filters/members.tsx
🚧 Files skipped from review as they are similar to previous changes (25)
  • apps/web/core/components/modules/dropdowns/filters/status.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx
  • apps/web/core/components/common/filters/created-by.tsx
  • apps/web/core/components/project/dropdowns/filters/access.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/date.tsx
  • apps/web/core/components/modules/dropdowns/filters/lead.tsx
  • apps/web/core/components/modules/dropdowns/filters/target-date.tsx
  • apps/web/core/components/common/filters/created-at.tsx
  • apps/web/core/components/cycles/dropdowns/filters/status.tsx
  • apps/web/core/components/cycles/dropdowns/filters/end-date.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx
  • apps/web/core/components/modules/dropdowns/filters/start-date.tsx
  • apps/web/core/components/project/dropdowns/filters/lead.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/members.tsx
  • apps/web/core/components/cycles/dropdowns/filters/start-date.tsx
  • apps/web/core/components/inbox/inbox-filter/filters/priority.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/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/issues/issue-layouts/filters/header/filters/module.tsx
  • apps/web/core/components/project/dropdowns/filters/members.tsx
  • apps/web/core/components/project/dropdowns/filters/created-at.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx
  • apps/web/core/components/modules/dropdowns/filters/members.tsx

📝 Walkthrough

Walkthrough

Refactors many files to simplify boolean expressions (removing redundant ternaries, using !!/??) and replaces several object spread patterns with Object.assign; also updates numerous store types from CoreRootStore to RootStore. No functional behavior changes reported.

Changes

Cohort / File(s) Summary
Filter isChecked Props - Boolean Simplification
apps/space/components/issues/filters/labels.tsx, apps/space/components/issues/filters/priority.tsx, apps/space/components/issues/filters/state.tsx, apps/web/core/components/.../filters/assignee.tsx, apps/web/core/components/.../filters/created-by.tsx, apps/web/core/components/.../filters/cycle.tsx, apps/web/core/components/.../filters/due-date.tsx, apps/web/core/components/.../filters/labels.tsx, apps/web/core/components/.../filters/mentions.tsx, apps/web/core/components/.../filters/module.tsx, apps/web/core/components/.../filters/priority.tsx, apps/web/core/components/.../filters/project.tsx, apps/web/core/components/.../filters/start-date.tsx, apps/web/core/components/.../filters/state-group.tsx, apps/web/core/components/.../filters/state.tsx
Replaced ternary boolean coercions in isChecked/filter props with direct boolean expressions or ?? false; semantics preserved.
Button Disabled State - Boolean Simplification
apps/admin/app/(all)/(home)/sign-in-form.tsx, apps/admin/components/instance/setup-form.tsx, apps/space/components/account/auth-forms/password.tsx, apps/web/core/components/account/auth-forms/password.tsx, apps/web/core/components/account/auth-forms/reset-password.tsx, apps/web/core/components/account/auth-forms/set-password.tsx, apps/web/core/components/onboarding/profile-setup.tsx, apps/web/core/components/onboarding/steps/profile/root.tsx, apps/web/core/components/onboarding/steps/role/root.tsx, apps/web/core/components/onboarding/steps/usecase/root.tsx
Refactored nested ternaries controlling button disabled state into clearer negated conjunctions or equivalent boolean expressions; behavior unchanged.
Object Construction - Spread to Object.assign
apps/web/app/(all)/[workspaceSlug]/(projects)/extended-sidebar.tsx, apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx, apps/web/core/components/issues/issue-layouts/filters/header/display-filters/display-properties.tsx, apps/web/core/components/power-k/ui/pages/open-entity/project-settings-menu.tsx, apps/web/core/components/power-k/ui/pages/open-entity/workspace-settings-menu.tsx, apps/web/core/components/workspace/sidebar/sidebar-menu-items.tsx, apps/web/core/components/workspace-notifications/sidebar/filters/menu/root.tsx, apps/web/helpers/views.helper.ts, packages/editor/src/core/extensions/custom-link/helpers/autolink.ts, packages/editor/src/core/extensions/slash-commands/command-items-list.tsx, packages/utils/src/rich-filters/operations/traversal/core.ts
Replaced object spread merges with Object.assign({}, ...) in multiple transform/map sites; resulting objects and behavior remain the same.
Search/Custom Date State - Boolean Simplification
apps/web/core/components/common/filters/created-at.tsx, apps/web/core/components/cycles/archived-cycles/header.tsx, apps/web/core/components/cycles/cycles-view-header.tsx, apps/web/core/components/cycles/dropdowns/filters/end-date.tsx, apps/web/core/components/cycles/dropdowns/filters/start-date.tsx, apps/web/core/components/cycles/dropdowns/filters/status.tsx, apps/web/core/components/inbox/inbox-filter/filters/date.tsx, apps/web/core/components/modules/archived-modules/header.tsx, apps/web/core/components/modules/dropdowns/filters/start-date.tsx, apps/web/core/components/modules/dropdowns/filters/target-date.tsx, apps/web/core/components/modules/module-view-header.tsx, apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx, apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx
Simplified isCustomDateSelected / isSearchOpen initializations from ternary coercions to direct boolean/length checks; semantics preserved.
Sidebar Collapsed State - Boolean Simplification
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/[cycleId]/page.tsx, apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx, apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/[moduleId]/page.tsx, apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx, apps/web/core/lib/wrappers/store-wrapper.tsx
Refactored isSidebarCollapsed and localStorage parsing from nested ternaries to direct comparisons (=== "true"/=== true); behavior unchanged.
Miscellaneous Boolean Props - Simplification
apps/admin/app/(all)/(dashboard)/general/intercom.tsx, apps/admin/providers/user.provider.tsx, apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx, apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx, apps/web/core/components/dropdowns/cycle/cycle-options.tsx, apps/web/core/components/estimates/root.tsx, apps/web/core/components/gantt-chart/views/week-view.ts, 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/issues/issue-layouts/filters/header/display-filters/extra-options.tsx, apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx, apps/web/core/components/issues/issue-layouts/filters/header/display-filters/order-by.tsx, apps/web/core/components/issues/issue-layouts/filters/header/display-filters/sub-group-by.tsx, apps/web/core/components/issues/issue-layouts/list/default.tsx, apps/web/core/components/issues/issue-layouts/quick-add/root.tsx, apps/web/core/components/issues/issue-layouts/utils.tsx, apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx, apps/web/core/components/modules/analytics-sidebar/root.tsx, apps/web/core/components/modules/dropdowns/filters/lead.tsx, apps/web/core/components/modules/dropdowns/filters/members.tsx, apps/web/core/components/modules/dropdowns/filters/status.tsx, apps/web/core/components/modules/modal.tsx, apps/web/core/components/project-states/options/delete.tsx, apps/web/core/components/project-states/state-item-title.tsx, apps/web/core/components/project-states/state-item.tsx, apps/web/core/components/project/dropdowns/filters/access.tsx, apps/web/core/components/project/dropdowns/filters/created-at.tsx, apps/web/core/components/project/dropdowns/filters/lead.tsx, apps/web/core/components/project/dropdowns/filters/members.tsx, apps/web/core/components/workspace-notifications/notification-app-sidebar-option.tsx, apps/web/core/store/notifications/workspace-notifications.store.ts, packages/ui/src/collapsible/collapsible.tsx, packages/ui/src/form-fields/password/indicator.tsx
Various ternary-to-direct-boolean or !! coercions for toggles, visibility flags, and other boolean props; preserves prior behavior.
Type Import / Constructor Signature Updates (RootStore)
apps/space/store/cycle.store.ts, apps/space/store/helpers/base-issues.store.ts, apps/space/store/instance.store.ts, apps/space/store/issue-detail.store.ts, apps/space/store/issue-filters.store.ts, apps/space/store/issue.store.ts, apps/space/store/label.store.ts, apps/space/store/members.store.ts, apps/space/store/module.store.ts, apps/space/store/profile.store.ts, apps/space/store/publish/publish.store.ts, apps/space/store/publish/publish_list.store.ts, apps/space/store/state.store.ts, apps/space/store/user.store.ts
Replaced CoreRootStore type references with RootStore (imports, class fields, constructor parameter types) across many store modules — changes exported constructor/type signatures; no runtime logic changes.
Styling String Reordering
packages/propel/src/button/helper.tsx
Adjusted CSS class string ordering and disabled-state classes for button variants; stylistic change only.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • JayashTripathy

Poem

"I nibble at ternaries, hop past the noise,
I tidy the booleans, simplify toys.
Spreads turned to Assigns, neat and quick,
One rabbit's rewrite—clean, concise, and slick. 🐇"

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: removing unnecessary ternary expressions and map spreads, which aligns with the 98 no-unneeded-ternary fixes and 14 no-map-spread fixes across 91 files.
Description check ✅ Passed The PR description includes all key required sections: comprehensive Summary explaining the oxlint fixes, Type of Change (Code refactoring), Context, Test plan, and References. It clearly explains the purpose and scope of changes.

✏️ 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

Note

Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.

🟡 Minor comments (23)
apps/web/core/components/modules/dropdowns/filters/start-date.tsx-69-69 (1)

69-69: ⚠️ Potential issue | 🟡 Minor

Preserve a strict boolean for isChecked.

This simplification is not equivalent to the previous ternary: when appliedFilters is nullish, Line 69 now passes undefined instead of false. If FilterOption treats “unset” differently from false, this changes behavior.

Suggested fix
-                  isChecked={appliedFilters?.includes(option.value)}
+                  isChecked={appliedFilters?.includes(option.value) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/modules/dropdowns/filters/start-date.tsx` at line
69, The isChecked prop currently can become undefined when appliedFilters is
nullish; change the expression used for isChecked (in the component rendering
the FilterOption in start-date.tsx) to always produce a strict boolean—e.g.,
coerce appliedFilters?.includes(option.value) to true/false using a boolean cast
or a conditional that returns false when appliedFilters is nullish—so
FilterOption receives either true or false, not undefined.
packages/editor/src/core/extensions/slash-commands/command-items-list.tsx-324-325 (1)

324-325: ⚠️ Potential issue | 🟡 Minor

Return a boolean from this filter callback.

Line 325 returns undefined, which is what Biome is complaining about here. Since query is already typed as string, the simplest fix is to remove the guard; otherwise return false explicitly.

Suggested fix
     const filteredSlashSections = SLASH_COMMAND_SECTIONS.map((section) =>
       Object.assign({}, section, {
         items: section.items.filter((item) => {
-          if (typeof query !== "string") return;
-
           const lowercaseQuery = query.toLowerCase();
           return (
             item.title.toLowerCase().includes(lowercaseQuery) ||
             item.description.toLowerCase().includes(lowercaseQuery) ||
             item.searchTerms.some((t) => t.includes(lowercaseQuery))
           );
         }),
       })
     );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/editor/src/core/extensions/slash-commands/command-items-list.tsx`
around lines 324 - 325, The filter callback for section.items.filter currently
can return undefined because of the guard "if (typeof query !== 'string')
return;", so update the callback in command-items-list.tsx to always return a
boolean: either remove the unnecessary typeof-guard (since query is typed as
string) or change it to "if (typeof query !== 'string') return false;". Ensure
the callback used by items: section.items.filter((item) => { ... }) returns
true/false in all code paths so Biome no longer flags an undefined return.
apps/web/core/components/project-states/options/delete.tsx-35-35 (1)

35-35: ⚠️ Potential issue | 🟡 Minor

Remove the remaining redundant ternary.

Line 35 still matches the no-unneeded-ternary pattern this PR is trying to eliminate, so it may keep the lint warning alive.

Suggested change
-  const isDeleteDisabled = state.default ? true : totalStates === 1;
+  const isDeleteDisabled = state.default || totalStates === 1;

As per coding guidelines, "Use OxLint with shared .oxlintrc.json config for linting".

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

In `@apps/web/core/components/project-states/options/delete.tsx` at line 35, The
expression for isDeleteDisabled uses an unnecessary ternary; simplify the
constant by assigning the boolean expression directly (use state.default ||
totalStates === 1) so replace the ternary in the isDeleteDisabled declaration
with the equivalent boolean expression to satisfy the no-unneeded-ternary lint
rule and keep state.default and totalStates references intact.
apps/space/components/issues/filters/priority.tsx-48-48 (1)

48-48: ⚠️ Potential issue | 🟡 Minor

Apply boolean coercion to fix type mismatch in isChecked prop.

appliedFilters has type string[] | null (line 18), so appliedFilters?.includes(priority.key) returns boolean | undefined. The FilterOption component requires isChecked: boolean (strict boolean). Using !! coercion ensures the correct type:

🛠️ Proposed fix
               <FilterOption
                 key={priority.key}
-                isChecked={appliedFilters?.includes(priority.key)}
+                isChecked={!!appliedFilters?.includes(priority.key)}
                 onClick={() => handleUpdate(priority.key)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/space/components/issues/filters/priority.tsx` at line 48, The isChecked
prop on FilterOption is receiving type boolean | undefined because
appliedFilters has type string[] | null; update the isChecked expression to
coerce to a strict boolean (e.g., use double-bang) so it always passes a
boolean: change the current isChecked={appliedFilters?.includes(priority.key)}
to a boolean-coerced expression using appliedFilters and priority.key so
FilterOption.isChecked receives a boolean value.
apps/web/core/components/project/dropdowns/filters/lead.tsx-77-77 (1)

77-77: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to prop expecting boolean.

Since appliedFilters is typed as string[] | null, the expression appliedFilters?.includes(member.id) returns boolean | undefined, not boolean. The FilterOption component's isChecked prop is strictly typed as boolean.

While this works at runtime (undefined is falsy), it violates the TypeScript type contract. Use double negation to coerce to boolean:

🛠️ Proposed fix
                     <FilterOption
                       key={`lead-${member.id}`}
-                      isChecked={appliedFilters?.includes(member.id)}
+                      isChecked={!!appliedFilters?.includes(member.id)}
                       onClick={() => handleUpdate(member.id)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/project/dropdowns/filters/lead.tsx` at line 77, The
isChecked prop on FilterOption is receiving a boolean | undefined because
appliedFilters is string[] | null; coerce the expression
appliedFilters?.includes(member.id) to a strict boolean (e.g. using
double-negation or Boolean()) so isChecked always gets a boolean; update the
usage of appliedFilters?.includes(member.id) inside the FilterOption prop to
!!appliedFilters?.includes(member.id) (or equivalent) to satisfy the prop type.
apps/space/components/issues/filters/labels.tsx-59-59 (1)

59-59: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop with strictNullChecks enabled.

Per apps/space/tsconfig.json, strictNullChecks is true. The FilterOption component's isChecked prop is typed as boolean (not boolean | undefined), but appliedFilters?.includes(label?.id) returns undefined when appliedFilters is null. This should cause a TypeScript error.

Proposed fix
-                    isChecked={appliedFilters?.includes(label?.id)}
+                    isChecked={appliedFilters?.includes(label?.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/space/components/issues/filters/labels.tsx` at line 59, The isChecked
prop of FilterOption is receiving a boolean | undefined because
appliedFilters?.includes(label?.id) can be undefined; change the expression to
guarantee a boolean (for example by using a boolean coercion or defaulting
appliedFilters to an empty array) so isChecked always receives a boolean; update
the usage in labels.tsx where appliedFilters and label?.id are referenced (the
FilterOption isChecked prop) to use a deterministic boolean (e.g.,
!!appliedFilters?.includes(label?.id) or (appliedFilters ??
[]).includes(label?.id)).
apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx-71-71 (1)

71-71: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

appliedFilters?.includes(label?.id) returns undefined when appliedFilters is null. Add nullish coalescing for type correctness.

Proposed fix
-                    isChecked={appliedFilters?.includes(label?.id)}
+                    isChecked={appliedFilters?.includes(label?.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx`
at line 71, The isChecked prop is receiving a boolean | undefined because
appliedFilters?.includes(label?.id) can be undefined when appliedFilters is
null; update the expression used for isChecked (in the Labels component where
isChecked={appliedFilters?.includes(label?.id)}) to coerce to a boolean (e.g.,
use nullish coalescing or double-bang) so it always passes a boolean (for
example replace with appliedFilters?.includes(label?.id) ?? false or
!!appliedFilters?.includes(label?.id)).
apps/web/core/components/modules/dropdowns/filters/status.tsx-44-44 (1)

44-44: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

When appliedFilters is null, the expression returns undefined. Add nullish coalescing for consistency with the expected boolean type.

Proposed fix
-                isChecked={appliedFilters?.includes(status.value)}
+                isChecked={appliedFilters?.includes(status.value) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/modules/dropdowns/filters/status.tsx` at line 44,
The isChecked prop for the checkbox currently receives
appliedFilters?.includes(status.value) which can be boolean | undefined when
appliedFilters is null; change it to a guaranteed boolean by using nullish
coalescing on the includes result (e.g., appliedFilters?.includes(status.value)
?? false) so isChecked always receives a boolean; update the usage where
isChecked is passed (the component rendering the checkbox, referencing
appliedFilters and status.value) to use this coalesced expression.
apps/web/core/components/project/dropdowns/filters/members.tsx-77-77 (1)

77-77: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Same issue as other filter components—appliedFilters?.includes(member.id) can be undefined when appliedFilters is null, but isChecked requires boolean.

Proposed fix
-                      isChecked={appliedFilters?.includes(member.id)}
+                      isChecked={appliedFilters?.includes(member.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/project/dropdowns/filters/members.tsx` at line 77,
The isChecked prop is receiving a boolean | undefined because
appliedFilters?.includes(member.id) can be undefined when appliedFilters is
null; update the expression where isChecked is set (in the Members filter
component using appliedFilters and member.id) to always produce a boolean—for
example coerce with !!appliedFilters?.includes(member.id) or use (appliedFilters
?? []).includes(member.id)—so isChecked receives a strict boolean value.
apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx-63-63 (1)

63-63: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

appliedFilters?.includes(state.id) returns undefined when appliedFilters is null, but FilterOption's isChecked prop expects a strict boolean. Add a nullish coalescing operator to ensure a boolean value.

Proposed fix
-                    isChecked={appliedFilters?.includes(state.id)}
+                    isChecked={appliedFilters?.includes(state.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx`
at line 63, The isChecked prop on FilterOption is receiving a boolean |
undefined from appliedFilters?.includes(state.id); update the prop to always
pass a boolean by coalescing the result to false (e.g., use
appliedFilters?.includes(state.id) ?? false or wrap with !!) so
FilterOption.isChecked receives a strict boolean; change the usage where
isChecked={appliedFilters?.includes(state.id)} to use the nullish/coercion fix
referencing appliedFilters and state.id.
apps/web/core/components/modules/dropdowns/filters/lead.tsx-77-77 (1)

77-77: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

When appliedFilters is null, optional chaining returns undefined. The FilterOption component's isChecked prop expects a strict boolean type (see filter-option.tsx line 11). Add nullish coalescing to ensure type safety.

Proposed fix
-                      isChecked={appliedFilters?.includes(member.id)}
+                      isChecked={appliedFilters?.includes(member.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/modules/dropdowns/filters/lead.tsx` at line 77, The
isChecked prop on FilterOption is receiving a boolean | undefined because
appliedFilters?.includes(member.id) can be undefined when appliedFilters is
null; change the expression used where isChecked is set (currently
appliedFilters?.includes(member.id)) to coerce a strict boolean (for example via
nullish coalescing or Boolean()) so isChecked always receives a boolean value;
update the usage near the FilterOption invocation referencing appliedFilters and
member.id to return false when appliedFilters is null.
apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx-63-66 (1)

63-66: ⚠️ Potential issue | 🟡 Minor

Keep isChecked boolean on the null path.

appliedFilters is nullable, so this now passes undefined when filters haven't been initialized. The old ternary always passed false, which is closer to the PR's “no behavioral change” goal and avoids leaking a tri-state value into FilterOption.

💡 Suggested fix
-                  isChecked={appliedFilters?.includes(option.value)}
+                  isChecked={!!appliedFilters?.includes(option.value)}
As per coding guidelines, `**/*.{ts,tsx}`: Enable TypeScript strict mode and ensure all files must be typed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx`
around lines 63 - 66, The isChecked prop on FilterOption can become undefined
because appliedFilters is nullable; change the expression used in the
FilterOption JSX so that isChecked is always a boolean (false when
appliedFilters is null/undefined) instead of passing undefined. Locate the
FilterOption usage (props: isChecked, onClick with handleUpdate) and replace the
current appliedFilters?.includes(option.value) with a boolean-safe check (e.g.,
(appliedFilters ?? []).includes(option.value) or Boolean(appliedFilters &&
appliedFilters.includes(option.value))) so isChecked is always true/false.
apps/web/core/components/common/filters/created-by.tsx-77-77 (1)

77-77: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Per the FilterOption type definition (context snippet), isChecked expects a strict boolean. The optional chaining returns undefined when appliedFilters is null.

🔧 Proposed fix
-                      isChecked={appliedFilters?.includes(member.id)}
+                      isChecked={appliedFilters?.includes(member.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/common/filters/created-by.tsx` at line 77, The
isChecked prop for FilterOption is receiving a boolean | undefined due to
optional chaining on appliedFilters; change the expression to produce a strict
boolean — e.g., replace isChecked={appliedFilters?.includes(member.id)} with a
boolean-coerced form like isChecked={!!appliedFilters?.includes(member.id)} or
by checking (appliedFilters ?? []).includes(member.id) so FilterOption receives
a true/false value.
apps/web/core/components/cycles/dropdowns/filters/end-date.tsx-67-67 (1)

67-67: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Consistent with other filter components — appliedFilters?.includes(option.value) returns boolean | undefined.

🔧 Proposed fix
-                  isChecked={appliedFilters?.includes(option.value)}
+                  isChecked={appliedFilters?.includes(option.value) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/cycles/dropdowns/filters/end-date.tsx` at line 67,
The isChecked prop currently receives appliedFilters?.includes(option.value)
which can be boolean | undefined; coerce it to a strict boolean to match the
prop type by wrapping the expression with an explicit boolean cast (e.g., using
Boolean(...) or !!...) where isChecked={...} is set; update the usage around
appliedFilters, option.value and the isChecked prop in end-date.tsx to ensure a
plain boolean is passed.
apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx-45-45 (1)

45-45: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Same issue as other filter components — appliedFilters?.includes(priority.key) can return undefined when appliedFilters is null.

🔧 Proposed fix
-                isChecked={appliedFilters?.includes(priority.key)}
+                isChecked={appliedFilters?.includes(priority.key) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx`
at line 45, The isChecked prop is receiving a boolean | undefined from
appliedFilters?.includes(priority.key); change the expression to always produce
a boolean (e.g., coalesce appliedFilters to an empty array or force a boolean)
so isChecked always gets a boolean; update the usage in the priority.tsx filter
component where appliedFilters and priority.key are referenced (the isChecked
prop on the checkbox/control) to use a deterministic boolean expression like
forcing a boolean or using (appliedFilters ?? []) before calling includes.
apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx-52-52 (1)

52-52: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Consistent with other filter components in this PR — needs explicit boolean coercion.

🔧 Proposed fix
-                  isChecked={appliedFilters?.includes(stateGroup.key)}
+                  isChecked={appliedFilters?.includes(stateGroup.key) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx`
at line 52, The isChecked prop is receiving a boolean | undefined from
appliedFilters?.includes(stateGroup.key); coerce it to a strict boolean (e.g.,
use !! or Boolean(...)) so isChecked always gets a boolean. Update the
expression where isChecked is set (the isChecked prop that references
appliedFilters?.includes(stateGroup.key)) to explicitly convert the result to
boolean.
apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx-77-77 (1)

77-77: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

appliedFilters?.includes(member.id) returns boolean | undefined (when appliedFilters is null), but FilterOption.isChecked expects a strict boolean. The original ternary implicitly handled this by coercing to false.

🔧 Proposed fix using nullish coalescing
-                      isChecked={appliedFilters?.includes(member.id)}
+                      isChecked={appliedFilters?.includes(member.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx`
at line 77, The isChecked prop on FilterOption is receiving
appliedFilters?.includes(member.id), which can be boolean | undefined; change it
to a strict boolean by coercing the value (e.g., use nullish coalescing or
double-bang) so isChecked always receives a boolean; update the expression where
FilterOption.isChecked is set (references: appliedFilters, member.id,
FilterOption) to use appliedFilters?.includes(member.id) ?? false or
!!appliedFilters?.includes(member.id).
apps/space/components/issues/filters/state.tsx-59-59 (1)

59-59: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to isChecked: boolean prop.

When appliedFilters is null, optional chaining returns undefined, but FilterOption expects a strict boolean type (see filter-option.tsx line 11). Use nullish coalescing or double negation to ensure a boolean value.

🛡️ Proposed fix
-                   isChecked={appliedFilters?.includes(state.id)}
+                   isChecked={appliedFilters?.includes(state.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/space/components/issues/filters/state.tsx` at line 59, The isChecked
prop on FilterOption is receiving appliedFilters?.includes(state.id) which can
be boolean | undefined; change it to a strict boolean by coercing the result
(e.g., use nullish coalescing or double-negation) so it always passes a boolean
to FilterOption; update the expression near
isChecked={appliedFilters?.includes(state.id)} to something like
isChecked={appliedFilters?.includes(state.id) ?? false} or
isChecked={!!appliedFilters?.includes(state.id)} to satisfy the FilterOption
prop type.
apps/web/core/components/common/filters/created-at.tsx-67-67 (1)

67-67: ⚠️ Potential issue | 🟡 Minor

Add nullish coalescing operator to ensure isChecked receives boolean.

The FilterOption component expects isChecked as boolean, but appliedFilters?.includes(option.value) returns undefined when appliedFilters is null. Use isChecked={appliedFilters?.includes(option.value) ?? false} to provide a default value.

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

In `@apps/web/core/components/common/filters/created-at.tsx` at line 67, The
isChecked prop on FilterOption can receive undefined when appliedFilters is null
because appliedFilters?.includes(option.value) yields undefined; change the
expression in the FilterOption render (the isChecked prop passed where
appliedFilters and option.value are referenced) to use a nullish default so it
always gets a boolean (e.g., replace appliedFilters?.includes(option.value) with
a nullish-coalesced form to return false when appliedFilters is null).
apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx-71-71 (1)

71-71: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

When appliedFilters is null, the expression appliedFilters?.includes(cycle.id) evaluates to undefined, but FilterOption's isChecked prop expects a strict boolean. The original ternary served as type coercion.

🔧 Proposed fix
-                  isChecked={appliedFilters?.includes(cycle.id)}
+                  isChecked={appliedFilters?.includes(cycle.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx`
at line 71, The isChecked prop on FilterOption is receiving a boolean |
undefined because appliedFilters?.includes(cycle.id) can be undefined when
appliedFilters is null; change the expression to produce a strict boolean (e.g.
use !!appliedFilters?.includes(cycle.id) or appliedFilters ?
appliedFilters.includes(cycle.id) : false) so isChecked always gets a boolean;
update the usage in module.tsx where FilterOption is rendered with isChecked and
reference appliedFilters and cycle.id.
apps/web/core/components/cycles/dropdowns/filters/start-date.tsx-68-68 (1)

68-68: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Consistent with other filter components, when appliedFilters is null, this evaluates to undefined rather than a boolean.

🔧 Proposed fix
-                  isChecked={appliedFilters?.includes(option.value)}
+                  isChecked={appliedFilters?.includes(option.value) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/cycles/dropdowns/filters/start-date.tsx` at line 68,
The isChecked prop for the checkbox is receiving a boolean | undefined because
appliedFilters can be null; update the expression used at isChecked (where
appliedFilters?.includes(option.value) is passed) to always produce a boolean
(e.g., coerce with !! or Boolean) so isChecked receives a plain boolean; locate
the isChecked usage in this component (reference: appliedFilters, option.value,
isChecked) and replace the undefined-producing expression with a
boolean-coercing one.
apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx-78-78 (1)

78-78: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Same pattern as other filter components—appliedFilters can be null, causing undefined to be passed.

🔧 Proposed fix
-                  isChecked={appliedFilters?.includes(cycle.id)}
+                  isChecked={appliedFilters?.includes(cycle.id) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx`
at line 78, The isChecked prop is receiving a boolean | undefined because
appliedFilters can be null; change the expression to always produce a
boolean—for example, coerce the result with a double-bang or default
appliedFilters to an empty array—so replace
isChecked={appliedFilters?.includes(cycle.id)} with a deterministic boolean like
isChecked={!!appliedFilters?.includes(cycle.id)} or isChecked={(appliedFilters
?? []).includes(cycle.id)}; update the usage in the component where
appliedFilters and cycle.id are referenced to ensure the prop receives a
boolean.
apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx-66-66 (1)

66-66: ⚠️ Potential issue | 🟡 Minor

Type mismatch: boolean | undefined passed to boolean prop.

Same issue as other filter components—when appliedFilters is null, the optional chaining returns undefined instead of a boolean.

🔧 Proposed fix
-                  isChecked={appliedFilters?.includes(option.value)}
+                  isChecked={appliedFilters?.includes(option.value) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx`
at line 66, The isChecked prop is receiving a boolean | undefined because
appliedFilters can be null; update the expression that sets isChecked (where
isChecked={appliedFilters?.includes(option.value)}) to always return a
boolean—either coerce with a boolean cast (e.g.,
!!appliedFilters?.includes(option.value)) or call includes on a safe default
(e.g., (appliedFilters ?? []).includes(option.value)); change the code where
appliedFilters, option.value and the isChecked prop are used in the due-date
filter component so the prop always receives a plain boolean.
🧹 Nitpick comments (12)
apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx (1)

53-55: Use strict equality and remove redundant optional chaining.

Two minor improvements for this refactored expression:

  1. == should be === for strict comparison (typically enforced by eqeqeq linting rule)
  2. estimateType?.type uses unnecessary optional chaining since estimateType && already guarantees it's truthy
✨ Suggested improvement
   const isEstimatePointValid = isEmpty(cycleDetails?.progress_snapshot || {})
-    ? !!(estimateType && estimateType?.type == EEstimateSystem.POINTS)
+    ? !!(estimateType && estimateType.type === EEstimateSystem.POINTS)
     : !isEmpty(cycleDetails?.progress_snapshot?.estimate_distribution || {});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx` around
lines 53 - 55, The conditional computing isEstimatePointValid should use strict
equality and remove redundant optional chaining: update the ternary expression
in isEstimatePointValid (which references cycleDetails, estimateType,
EEstimateSystem, isEmpty, progress_snapshot, and estimate_distribution) so the
comparison uses === instead of == and drop the extra optional chaining on
estimateType.type (since estimateType is already checked truthy); keep the same
logical branches but change the expression to use estimateType.type ===
EEstimateSystem.POINTS and access estimate_distribution via
cycleDetails.progress_snapshot without the unnecessary ?. chaining.
apps/web/core/components/onboarding/steps/profile/root.tsx (1)

144-144: Consider simplifying the first clause with De Morgan's law.

The double negation in the first part can be flattened for improved readability while preserving the logic.

✨ Suggested simplification
-  const isButtonDisabled = !(!isSubmitting && isValid) || (!isPasswordAlreadySetup && !isValidPassword);
+  const isButtonDisabled = isSubmitting || !isValid || (!isPasswordAlreadySetup && !isValidPassword);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/onboarding/steps/profile/root.tsx` at line 144, The
condition for isButtonDisabled uses a double negation; replace the first clause
!(!isSubmitting && isValid) with its De Morgan equivalent (isSubmitting ||
!isValid) to improve readability while keeping the second clause
(!isPasswordAlreadySetup && !isValidPassword) unchanged; update the declaration
of isButtonDisabled accordingly (referencing the isButtonDisabled variable and
the isSubmitting, isValid, isPasswordAlreadySetup, isValidPassword symbols).
apps/web/core/components/onboarding/steps/usecase/root.tsx (1)

84-84: Consider simplifying with De Morgan's law for readability.

Same pattern as role/root.tsx — the double negation can be expressed more directly.

✨ Suggested simplification
-  const isButtonDisabled = !(!isSubmitting && isValid);
+  const isButtonDisabled = isSubmitting || !isValid;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/onboarding/steps/usecase/root.tsx` at line 84, The
expression for isButtonDisabled uses a double negation which reduces
readability; replace the current logic in the isButtonDisabled declaration with
the equivalent, clearer condition using De Morgan's law: set isButtonDisabled to
true when isSubmitting is true OR isValid is false (i.e., use isSubmitting ||
!isValid) so the variable name directly matches the boolean expression and
mirrors the pattern used in role/root.tsx.
apps/web/core/components/onboarding/steps/role/root.tsx (1)

90-90: Consider simplifying with De Morgan's law for readability.

The expression !(!isSubmitting && isValid) is logically correct but the double negation is harder to parse. Using De Morgan's law, this simplifies to a more direct form.

✨ Suggested simplification
-  const isButtonDisabled = !(!isSubmitting && isValid);
+  const isButtonDisabled = isSubmitting || !isValid;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/onboarding/steps/role/root.tsx` at line 90, The
isButtonDisabled assignment uses double negation; change it to a direct boolean
expression: set isButtonDisabled to true when isSubmitting is true or when
isValid is false (i.e., use a straightforward OR of isSubmitting and the
negation of isValid), replacing the current !(!isSubmitting && isValid) usage in
the component where isButtonDisabled, isSubmitting, and isValid are defined.
apps/web/core/components/estimates/root.tsx (1)

140-140: Missed redundant ternaries on adjacent lines.

Lines 140 and 147 contain the same no-unneeded-ternary pattern that this PR aims to fix. Since estimateToUpdate and estimateToDelete are already typed as string | undefined, the ternary expressions are redundant.

♻️ Proposed fix
       <UpdateEstimateModal
         workspaceSlug={workspaceSlug}
         projectId={projectId}
-        estimateId={estimateToUpdate ? estimateToUpdate : undefined}
+        estimateId={estimateToUpdate}
         isOpen={!!estimateToUpdate}
         handleClose={() => setEstimateToUpdate(undefined)}
       />
       <DeleteEstimateModal
         workspaceSlug={workspaceSlug}
         projectId={projectId}
-        estimateId={estimateToDelete ? estimateToDelete : undefined}
+        estimateId={estimateToDelete}
         isOpen={!!estimateToDelete}
         handleClose={() => setEstimateToDelete(undefined)}
       />

Also applies to: 147-147

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

In `@apps/web/core/components/estimates/root.tsx` at line 140, The JSX uses
redundant ternaries when passing optional values: replace occurrences like
estimateId={estimateToUpdate ? estimateToUpdate : undefined} and the analogous
line using estimateToDelete with the direct values
(estimateId={estimateToUpdate} and estimateId={estimateToDelete}) since
estimateToUpdate and estimateToDelete are already typed string | undefined;
update the JSX props in the root component where estimateId is set to remove the
unnecessary ? : expression.
apps/admin/components/instance/setup-form.tsx (1)

224-224: Drop the redundant errorData.type && guard.

errorData.type === EErrorCodes.INVALID_EMAIL and errorData.type === EErrorCodes.INVALID_PASSWORD already return false when type is unset, so the extra left-hand check is just noise and can yield undefined instead of a plain boolean.

Suggested cleanup
-                hasError={errorData.type && errorData.type === EErrorCodes.INVALID_EMAIL}
+                hasError={errorData.type === EErrorCodes.INVALID_EMAIL}
@@
-                  hasError={errorData.type && errorData.type === EErrorCodes.INVALID_PASSWORD}
+                  hasError={errorData.type === EErrorCodes.INVALID_PASSWORD}

Also applies to: 268-268

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

In `@apps/admin/components/instance/setup-form.tsx` at line 224, Remove the
redundant left-hand guard from the hasError props: replace expressions like
"errorData.type && errorData.type === EErrorCodes.INVALID_EMAIL" and the similar
check for EErrorCodes.INVALID_PASSWORD with the direct comparison
"errorData.type === EErrorCodes.INVALID_EMAIL" and "errorData.type ===
EErrorCodes.INVALID_PASSWORD" respectively (in the component where hasError is
set), so the prop receives a plain boolean result; update occurrences around the
hasError usage (the lines referencing EErrorCodes.INVALID_EMAIL and
EErrorCodes.INVALID_PASSWORD) accordingly.
apps/web/core/components/issues/issue-layouts/list/default.tsx (1)

114-114: Rename is_list to isList.

The boolean simplification is fine, but this touched local still uses snake_case instead of the repo's camelCase convention.

As per coding guidelines, "Use camelCase for variable and function names".

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

In `@apps/web/core/components/issues/issue-layouts/list/default.tsx` at line 114,
Rename the local boolean variable is_list to isList to follow the repository's
camelCase convention; update the declaration (currently const is_list = group_by
=== null;) and all usages of is_list within the file (including JSX, functions,
props, or conditional checks) to isList, and ensure any related identifiers
derived from group_by remain untouched unless they also violate camelCase
conventions—verify the component compiles and tests pass after replacing all
references.
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx (1)

78-78: Consider further simplification.

The expression storedValue ? storedValue === true : false is still a ternary. Since useLocalStorage is typed with boolean, this can be simplified to storedValue === true which handles both false and null/undefined cases correctly.

♻️ Proposed simplification
-  const isSidebarCollapsed = storedValue ? storedValue === true : false;
+  const isSidebarCollapsed = storedValue === true;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/app/`(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx
at line 78, The line computing isSidebarCollapsed can be simplified: replace the
ternary expression using storedValue with a direct boolean comparison. Update
the use of storedValue in the isSidebarCollapsed assignment (related to
useLocalStorage and storedValue) to use storedValue === true so it handles false
and null/undefined correctly and removes the unnecessary ternary.
apps/web/core/components/project/dropdowns/filters/access.tsx (1)

45-45: Same type consideration as other filter components.

When appliedFilters is null, optional chaining returns undefined. This follows the same pattern flagged in other files. If FilterOption requires strict boolean, consider adding ?? false.

♻️ Proposed fix for type safety
-               isChecked={appliedFilters?.includes(`${access.key}`)}
+               isChecked={appliedFilters?.includes(`${access.key}`) ?? false}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/project/dropdowns/filters/access.tsx` at line 45,
The isChecked prop uses optional chaining on appliedFilters
(isChecked={appliedFilters?.includes(`${access.key}`)}) which can produce
undefined when appliedFilters is null; update the check in the FilterOption
render (reference: appliedFilters, access.key, FilterOption.isChecked) to return
a strict boolean (e.g., coerce with ?? false or Boolean(...)) so isChecked
always receives a boolean value.
apps/web/core/components/modules/dropdowns/filters/target-date.tsx (1)

68-68: Consistent with other filter components - same type consideration applies.

Same pattern as other filter files: appliedFilters?.includes() returns boolean | undefined. Consider adding ?? false for strict type safety if FilterOption requires boolean.

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

In `@apps/web/core/components/modules/dropdowns/filters/target-date.tsx` at line
68, The isChecked prop currently uses appliedFilters?.includes(option.value)
which can be boolean | undefined; update the value passed to isChecked to
guarantee a boolean (e.g., use a nullish-coalescing fallback or Boolean cast) so
it never supplies undefined; change the expression around
appliedFilters?.includes(option.value) in target-date.tsx (the isChecked prop
where appliedFilters, option.value, and FilterOption are involved) to return
false instead of undefined for strict type safety.
apps/web/core/components/inbox/inbox-filter/filters/state.tsx (1)

63-63: Optional chaining is redundant here.

Since filterValue is initialized with a fallback to [] on line 32, it's always an array and never undefined. The ?. on filterValue?.includes() is unnecessary, though harmless.

✨ Optional cleanup
-                  isChecked={filterValue?.includes(state?.id)}
+                  isChecked={filterValue.includes(state.id)}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/core/components/inbox/inbox-filter/filters/state.tsx` at line 63,
The optional chaining on filterValue is redundant because filterValue is
initialized to [] (so never undefined); update the expression in the component
to call includes directly (replace filterValue?.includes(state?.id) with
filterValue.includes(state?.id)), keeping the optional chaining on state?.id if
state can be nullish; this change targets the use of filterValue and state?.id
in the isChecked prop.
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/[cycleId]/page.tsx (1)

42-42: Consider further simplification.

The expression storedValue ? storedValue === true : false is correct but redundant. Since useLocalStorage returns a parsed boolean or null, this can be simplified to just storedValue === true, which handles all cases:

  • true === truetrue
  • false === truefalse
  • null === truefalse
♻️ Suggested simplification
-  const isSidebarCollapsed = storedValue ? storedValue === true : false;
+  const isSidebarCollapsed = storedValue === true;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/web/app/`(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/[cycleId]/page.tsx
at line 42, The conditional expression assigning isSidebarCollapsed is
redundant; replace the current ternary (storedValue ? storedValue === true :
false) with a direct comparison storedValue === true to handle true/false/null
consistently; update the assignment where isSidebarCollapsed is defined (using
the value returned by useLocalStorage/storedValue) to use storedValue === true.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e823bea0-253f-44fa-820e-7527f407dac5

📥 Commits

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

📒 Files selected for processing (91)
  • apps/admin/app/(all)/(dashboard)/general/intercom.tsx
  • apps/admin/app/(all)/(home)/sign-in-form.tsx
  • apps/admin/components/instance/setup-form.tsx
  • apps/admin/providers/user.provider.tsx
  • apps/space/components/account/auth-forms/auth-root.tsx
  • apps/space/components/account/auth-forms/password.tsx
  • apps/space/components/issues/filters/labels.tsx
  • apps/space/components/issues/filters/priority.tsx
  • apps/space/components/issues/filters/state.tsx
  • apps/web/app/(all)/[workspaceSlug]/(projects)/extended-sidebar.tsx
  • apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/[cycleId]/page.tsx
  • apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/header.tsx
  • apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/[moduleId]/page.tsx
  • apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/modules/(detail)/header.tsx
  • apps/web/core/components/account/auth-forms/password.tsx
  • apps/web/core/components/account/auth-forms/reset-password.tsx
  • apps/web/core/components/account/auth-forms/set-password.tsx
  • apps/web/core/components/chart/utils.ts
  • apps/web/core/components/common/filters/created-at.tsx
  • apps/web/core/components/common/filters/created-by.tsx
  • apps/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx
  • apps/web/core/components/cycles/archived-cycles/header.tsx
  • apps/web/core/components/cycles/cycles-view-header.tsx
  • apps/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx
  • apps/web/core/components/cycles/dropdowns/filters/end-date.tsx
  • apps/web/core/components/cycles/dropdowns/filters/start-date.tsx
  • apps/web/core/components/cycles/dropdowns/filters/status.tsx
  • apps/web/core/components/dropdowns/cycle/cycle-options.tsx
  • apps/web/core/components/estimates/root.tsx
  • apps/web/core/components/gantt-chart/views/week-view.ts
  • apps/web/core/components/inbox/inbox-filter/filters/date.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/issues/issue-layouts/filters/header/display-filters/display-properties.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/display-filters/extra-options.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/display-filters/group-by.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/display-filters/order-by.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/display-filters/sub-group-by.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/assignee.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/created-by.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/cycle.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/due-date.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/labels.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/mentions.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/module.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/priority.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/project.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/start-date.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/state-group.tsx
  • apps/web/core/components/issues/issue-layouts/filters/header/filters/state.tsx
  • apps/web/core/components/issues/issue-layouts/list/default.tsx
  • apps/web/core/components/issues/issue-layouts/quick-action-dropdowns/issue-detail.tsx
  • apps/web/core/components/issues/issue-layouts/quick-add/root.tsx
  • apps/web/core/components/issues/issue-layouts/utils.tsx
  • apps/web/core/components/modules/analytics-sidebar/issue-progress.tsx
  • apps/web/core/components/modules/analytics-sidebar/root.tsx
  • apps/web/core/components/modules/archived-modules/header.tsx
  • apps/web/core/components/modules/dropdowns/filters/lead.tsx
  • apps/web/core/components/modules/dropdowns/filters/members.tsx
  • apps/web/core/components/modules/dropdowns/filters/start-date.tsx
  • apps/web/core/components/modules/dropdowns/filters/status.tsx
  • apps/web/core/components/modules/dropdowns/filters/target-date.tsx
  • apps/web/core/components/modules/modal.tsx
  • apps/web/core/components/modules/module-view-header.tsx
  • apps/web/core/components/onboarding/profile-setup.tsx
  • apps/web/core/components/onboarding/steps/profile/root.tsx
  • apps/web/core/components/onboarding/steps/role/root.tsx
  • apps/web/core/components/onboarding/steps/usecase/root.tsx
  • apps/web/core/components/power-k/ui/pages/open-entity/project-settings-menu.tsx
  • apps/web/core/components/power-k/ui/pages/open-entity/workspace-settings-menu.tsx
  • apps/web/core/components/project-states/options/delete.tsx
  • apps/web/core/components/project-states/state-item-title.tsx
  • apps/web/core/components/project-states/state-item.tsx
  • apps/web/core/components/project/dropdowns/filters/access.tsx
  • apps/web/core/components/project/dropdowns/filters/created-at.tsx
  • apps/web/core/components/project/dropdowns/filters/lead.tsx
  • apps/web/core/components/project/dropdowns/filters/members.tsx
  • apps/web/core/components/workspace-notifications/notification-app-sidebar-option.tsx
  • apps/web/core/components/workspace-notifications/sidebar/filters/menu/root.tsx
  • apps/web/core/components/workspace/sidebar/sidebar-menu-items.tsx
  • apps/web/core/lib/wrappers/store-wrapper.tsx
  • apps/web/core/store/notifications/workspace-notifications.store.ts
  • apps/web/helpers/views.helper.ts
  • packages/editor/src/core/extensions/custom-link/helpers/autolink.ts
  • packages/editor/src/core/extensions/slash-commands/command-items-list.tsx
  • packages/ui/src/collapsible/collapsible.tsx
  • packages/ui/src/form-fields/password/indicator.tsx
  • packages/utils/src/rich-filters/operations/traversal/core.ts

Comment on lines +67 to 68
const isTelemetryEnabledParam = searchParams?.get("is_telemetry_enabled") === "True" || true;
const errorCode = searchParams?.get("error_code") || undefined;
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

Restore three-state parsing for is_telemetry_enabled.

searchParams?.get("is_telemetry_enabled") === "True" || true is always true, so this setup flow can no longer honor is_telemetry_enabled=False from the query string. Because Lines 97-98 then copy that value into formData, the hidden field at Line 161 will always submit "True". That is a real behavior change in a telemetry opt-out path, and it diverges from apps/admin/app/(all)/(dashboard)/general/form.tsx:45-68, where telemetry is treated as a real boolean.

Proposed fix
-  const isTelemetryEnabledParam = searchParams?.get("is_telemetry_enabled") === "True" || true;
+  const isTelemetryEnabledParam = searchParams?.get("is_telemetry_enabled");
@@
-    if (isTelemetryEnabledParam) setFormData((prev) => ({ ...prev, is_telemetry_enabled: isTelemetryEnabledParam }));
+    if (isTelemetryEnabledParam !== null) {
+      setFormData((prev) => ({
+        ...prev,
+        is_telemetry_enabled: isTelemetryEnabledParam === "True",
+      }));
+    }

Also applies to: 92-98

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

In `@apps/admin/components/instance/setup-form.tsx` around lines 67 - 68, The
value for isTelemetryEnabledParam is forced true by the `... === "True" || true`
expression, so restore three-state parsing by reading
`searchParams.get("is_telemetry_enabled")` and mapping `"True" -> true`,
`"False" -> false`, and anything else -> undefined (or null) before copying into
`formData`; update the variable `isTelemetryEnabledParam` in setup-form.tsx and
any subsequent code that copies it into `formData` (and the analogous block
around the later copy) so the hidden telemetry field will submit the actual
parsed boolean or no value when unset.

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/propel/src/button/helper.tsx`:
- Around line 20-22: The change updates the CSS class strings for the "danger"
and "secondary" button variants (the variant entries labeled danger and
secondary in the button helper) which alters visual tokens
(borders/shadows/background) and therefore is not lint-only; revert these two
class string edits back to their original classes to keep this PR purely lint
changes, or extract the visual adjustments into a separate styling PR (with
screenshots/design review) that modifies the danger and secondary variant
entries in the button helper.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2fabda4b-7508-44fe-8e9b-b1a708dcc754

📥 Commits

Reviewing files that changed from the base of the PR and between 1e40f1c and 9d6ba53.

📒 Files selected for processing (18)
  • apps/space/components/issues/filters/labels.tsx
  • apps/space/components/issues/filters/priority.tsx
  • apps/space/components/issues/filters/state.tsx
  • apps/space/store/cycle.store.ts
  • apps/space/store/helpers/base-issues.store.ts
  • apps/space/store/instance.store.ts
  • apps/space/store/issue-detail.store.ts
  • apps/space/store/issue-filters.store.ts
  • apps/space/store/issue.store.ts
  • apps/space/store/label.store.ts
  • apps/space/store/members.store.ts
  • apps/space/store/module.store.ts
  • apps/space/store/profile.store.ts
  • apps/space/store/publish/publish.store.ts
  • apps/space/store/publish/publish_list.store.ts
  • apps/space/store/state.store.ts
  • apps/space/store/user.store.ts
  • packages/propel/src/button/helper.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/space/components/issues/filters/labels.tsx
  • apps/space/components/issues/filters/state.tsx
  • apps/space/components/issues/filters/priority.tsx

Comment on lines +20 to +22
"border border-danger-strong bg-layer-2 text-danger-secondary hover:bg-danger-subtle active:bg-danger-subtle-hover disabled:border-subtle-1 disabled:bg-layer-2 disabled:text-disabled",
secondary:
"bg-layer-2 hover:bg-layer-2-hover active:bg-layer-2-active disabled:bg-layer-transparent text-secondary disabled:text-disabled border border-strong disabled:border-subtle-1 shadow-raised-100",
"border border-strong bg-layer-2 text-secondary shadow-raised-100 hover:bg-layer-2-hover active:bg-layer-2-active disabled:border-subtle-1 disabled:bg-layer-transparent disabled:text-disabled",
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

Please keep this PR lint-only or split the button restyling out.

These class changes modify the rendered appearance of two shared variants by introducing new base border/shadow/background tokens. That conflicts with the stated goal of a mechanical oxlint cleanup with no behavioral changes, and it adds UI regression risk to what should be an easy-to-validate lint PR. Please revert these visual tweaks here or move them into a separate styling PR with screenshots/design review.

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

In `@packages/propel/src/button/helper.tsx` around lines 20 - 22, The change
updates the CSS class strings for the "danger" and "secondary" button variants
(the variant entries labeled danger and secondary in the button helper) which
alters visual tokens (borders/shadows/background) and therefore is not
lint-only; revert these two class string edits back to their original classes to
keep this PR purely lint changes, or extract the visual adjustments into a
separate styling PR (with screenshots/design review) that modifies the danger
and secondary variant entries in the button helper.

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