Skip to content

Frontend: Lint warning cleanup part 1 - #43411

Merged
iansltx merged 3 commits into
mainfrom
lint-cleanup-1
Apr 11, 2026
Merged

Frontend: Lint warning cleanup part 1#43411
iansltx merged 3 commits into
mainfrom
lint-cleanup-1

Conversation

@RachelElysia

@RachelElysia RachelElysia commented Apr 10, 2026

Copy link
Copy Markdown
Member

Issue

Description

  • Quick PR review and grabbed as many confirmed low-risk quick wins as I could git checkout lint-cleanup <file/path/1> <file/path/2>

Summary by CodeRabbit

Release Notes

This release contains internal improvements and one minor UI tweak:

  • Style
    • Dropdown menu background adjusted for clearer contrast in action lists
  • Refactor
    • Stronger type safety across the frontend for more robust behavior
    • Removed unused imports and constants to reduce code clutter
    • Improved hook effect dependencies and effect returns for more consistent UI interactions

@RachelElysia
RachelElysia requested a review from a team as a code owner April 10, 2026 16:30

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

Copilot AI review requested due to automatic review settings April 10, 2026 16:30
@codecov

codecov Bot commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.70588% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.86%. Comparing base (0bf48d3) to head (cfe850d).
⚠️ Report is 49 commits behind head on main.

Files with missing lines Patch % Lines
...mponents/ScriptDetailsModal/ScriptDetailsModal.tsx 0.00% 2 Missing ⚠️
...rtificates/CertificatesTable/CertificatesTable.tsx 0.00% 2 Missing ⚠️
...eContainer/DataTable/ActionButton/ActionButton.tsx 0.00% 1 Missing ⚠️
...ataTable/LiveQueryIssueCell/LiveQueryIssueCell.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #43411      +/-   ##
==========================================
- Coverage   66.86%   66.86%   -0.01%     
==========================================
  Files        2586     2588       +2     
  Lines      207452   207475      +23     
  Branches     9284     9173     -111     
==========================================
+ Hits       138714   138728      +14     
- Misses      56111    56121      +10     
+ Partials    12627    12626       -1     
Flag Coverage Δ
frontend 54.77% <64.70%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR is the first batch of frontend lint-warning cleanups, primarily removing unused imports/props, tightening TypeScript types, and addressing React hooks dependency warnings across the UI and services layer.

Changes:

  • Replace any usages with more specific TypeScript types and adjust related interfaces.
  • Remove unused imports/variables/props and simplify component/test code accordingly.
  • Fix React hooks dependency arrays and minor type correctness issues to satisfy linting rules.

Reviewed changes

Copilot reviewed 65 out of 65 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
frontend/services/entities/software.ts Removes unused default import; keeps only typed imports.
frontend/services/entities/global_scheduled_queries.ts Replaces any with IPackQueryFormData for request payloads.
frontend/services/entities/config.ts Narrows update payload type from any to object.
frontend/pages/SoftwarePage/SoftwareVulnerabilities/SoftwareVulnerabilitiesTable/VulnerabilitiesTableConfig.tsx Refines table cell prop typing for vulnerability rows.
frontend/pages/SoftwarePage/SoftwareVulnerabilities/SoftwareVulnerabilitiesTable/SoftwareVulnerabilitiesTable.tsx Fixes hook dependency array to include referenced values.
frontend/pages/SoftwarePage/SoftwareVersionDetailsPage/SoftwareVersionDetailsPage.tsx Ensures helper returns explicitly (undefined) for exhaustiveness.
frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/ViewYamlModal.tsx Removes unused props from modal props interface.
frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/helpers.tsx Removes unused React helpers/imports.
frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareTitleDetailsPage.tsx Removes unused prop passed to child component.
frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareInstallerCard/InstallerStatusTable/InstallerStatusTableConfig.tsx Removes unused imports and simplifies React import.
frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareInstallerCard/InstallerStatusTable/InstallerStatusTable.tests.tsx Removes unused testing imports/variables.
frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditConfigurationModal/EditConfigurationModal.tests.tsx Removes unused service import.
frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/AddPatchPolicyModal/AddPatchPolicyModal.tests.tsx Removes unused waitFor import.
frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppsTable/FleetMaintainedAppsTableConfig.tsx Replaces any cell props with react-table CellProps.
frontend/pages/SoftwarePage/components/icons/index.ts Removes unused icon import.
frontend/pages/SoftwarePage/components/forms/SoftwareOptionsSelector/SoftwareOptionsSelector.tsx Replaces any with string[] for selected categories.
frontend/pages/SoftwarePage/components/forms/SoftwareAndroidForm/helpers.tsx Removes unused local validation types.
frontend/pages/RegistrationPage/Breadcrumbs/Breadcrumbs.tsx Removes unused React type import.
frontend/pages/queries/edit/components/EditQueryForm/EditQueryForm.tests.tsx Removes unused container destructuring.
frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx Memoizes callback and removes unused prop passthrough.
frontend/pages/hosts/details/DeviceUserPage/BypassModal/BypassModal.tsx Removes unused baseClass constant.
frontend/pages/hosts/details/cards/Software/SelfService/helpers.ts Removes unused import.
frontend/pages/hosts/details/cards/Software/DeviceSoftwareTableConfig.tsx Removes unused TextCell import.
frontend/pages/hosts/details/cards/Policies/HostPolicies.tsx Removes unused router prop and fixes hook deps.
frontend/pages/hosts/details/cards/Labels/Labels.tsx Removes unused constants import.
frontend/pages/hosts/details/cards/Certificates/CertificatesTable/CertificatesTable.tsx Improves row typing for click handler.
frontend/pages/hosts/details/cards/Activity/Activity.tsx Removes unused imports in favor of consolidated feed component.
frontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsx Tightens useQuery typing and guards download content fallback.
frontend/pages/ForgotPasswordPage/ForgotPasswordPage.tsx Types submit payload and removes unused return.
frontend/pages/DashboardPage/cards/WelcomeHost/WelcomeHost.tsx Removes unused Link import.
frontend/pages/DashboardPage/cards/Munki/MunkiVersionsTableConfig.tsx Removes unused header props interface.
frontend/pages/DashboardPage/cards/ActivityFeed/ActivityFeed.tsx Removes unused platform helper import.
frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx Removes unused import and simplifies early return.
frontend/pages/admin/TeamManagementPage/components/CreateTeamModal/CreateTeamModal.tsx Removes unused import and types form event.
frontend/pages/admin/OrgSettingsPage/cards/FleetDesktop/FleetDesktop.tsx Removes unused baseClass.
frontend/pages/admin/IntegrationsPage/cards/Sso/Sso.tsx Removes unused baseClass.
frontend/pages/admin/IntegrationsPage/cards/MdmSettings/VppPage/components/VppTable/TeamsCell/TeamsCell.tsx Removes unused classnames import.
frontend/pages/admin/IntegrationsPage/cards/MdmSettings/components/MdmSettingsSection/MdmSettingsSection.tsx Removes unused context usage/imports.
frontend/pages/admin/IntegrationsPage/cards/ConditionalAccess/ConditionalAccess.tsx Removes unused Spinner import.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/SmallstepForm/SmallstepForm.tsx Removes unused baseClass.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx Removes unused baseClass.
frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsx Removes unused baseClass.
frontend/pages/AccountPage/AccountPage.tsx Replaces any form data types with structured/partial types.
frontend/components/TooltipTruncatedText/TooltipTruncatedText.stories.tsx Removes unused story import.
frontend/components/TargetsInput/TargetsInput.tsx Makes effect cleanup return explicit to satisfy linting.
frontend/components/TableContainer/DataTable/LiveQueryIssueCell/LiveQueryIssueCell.tsx Removes unused generic/prop from cell props typing.
frontend/components/TableContainer/DataTable/LinkCell/LinkCell.tests.tsx Removes unused user variable.
frontend/components/TableContainer/DataTable/IssueCell/IssueCell.tsx Removes unused generic parameter in props interface.
frontend/components/TableContainer/DataTable/HostMdmStatusCell/HostMdmStatusCell.tsx Removes unused id destructure.
frontend/components/TableContainer/DataTable/ActionButton/ActionButton.tsx Replaces any with number[] for callback argument.
frontend/components/PlatformCompatibility/PlatformCompatibility.tsx Replaces any[] with QueryablePlatform[] for platform typing.
frontend/components/PlatformCompatibility/PlatformCompatibility.tests.tsx Updates test data to use queryable platform keys.
frontend/components/Modal/Modal.tsx Makes effect cleanup return explicit to satisfy linting.
frontend/components/LiveQuery/SelectTargets.tsx Fixes hook dependency arrays for linting correctness.
frontend/components/forms/ResetPasswordForm/ResetPasswordForm.tsx Removes unused return value from submit handler.
frontend/components/forms/RegistrationForm/RegistrationForm.tests.jsx Removes unused screen import.
frontend/components/forms/packs/EditPackForm/EditPackForm.tsx Avoids returning setErrors result; uses explicit return.
frontend/components/forms/LoginForm/LoginForm.tsx Replaces any errors state with Record<string, string>.
frontend/components/forms/fields/InputField/InputField.tests.tsx Removes non-null assertions; adds explicit test failure messages.
frontend/components/forms/fields/AutoSizeInputField/AutoSizeInputField.tsx Types textarea ref and fixes effect dependencies.
frontend/components/FileUploader/FileUploader.stories.tsx Replaces alert with console.log in story args handler.
frontend/components/Avatar/Avatar.tsx Removes unused import and redundant interface.
frontend/components/AuthenticationNav/AuthenticationNav.tsx Fixes effect dependency array to include router.
frontend/components/ActivityDetails/InstallDetails/VppInstallDetailsModal/VppInstallDetailsModal.tests.tsx Removes unused handler import.
frontend/components/ActionsDropdown/ActionsDropdown.tsx Types select state param and adds explicit menu background color.
Comments suppressed due to low confidence (2)

frontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsx:131

  • useQuery is typed as string, but the query function can return Promise.resolve(null) when scriptId is falsy. Even if the query is disabled in that case, the typing is inconsistent and can mask null/undefined handling issues. Consider making the query type string | null (and rendering accordingly) or return an empty string instead of null.
    frontend/services/entities/global_scheduled_queries.ts:16
  • create accepts IPackQueryFormData, but that type makes fields like interval, query_id, and shard optional while the implementation assumes they exist (later calling Number(...)). This weakens type-safety and can lead to sending NaN if a caller omits a field. Consider using a stricter input type for create (required fields) or adding runtime validation/defaults before conversion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/services/entities/config.ts
@coderabbitai

coderabbitai Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 52262fee-1011-4675-bbd5-7933c5b3857e

📥 Commits

Reviewing files that changed from the base of the PR and between 7ee978b and cfe850d.

📒 Files selected for processing (1)
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareInstallerCard/SoftwareInstallerCard.tsx

Walkthrough

The PR applies widespread frontend cleanup and type tightenings: replaces many any usages with specific types (e.g., QueryablePlatform[], Record<string, string>, HTMLTextAreaElement, IPackQueryFormData, object, number[]), fixes React hook dependency arrays, removes unused imports/constants, and makes small control-flow/return-value consistency fixes in effects and submit handlers. Several tests were simplified by removing unused imports or destructured values. A few component props/interfaces were narrowed or had unused props removed in localized files.

Possibly related PRs

  • fleetdm/fleet PR 43411 — Makes similar frontend lint/type-cleanup changes, including the ActionsDropdown typing and customStyles.menu adjustment.
  • fleetdm/fleet PR 34758 — Modifies SoftwareInstallerCard/ViewYamlModal prop usage (teamId/isIosOrIpadosApp surface), overlapping the component API changes here.
  • fleetdm/fleet PR 31420 — Edits VppInstallDetailsModal test imports, matching the test-file import removals in this PR.
🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

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.
Description check ❓ Inconclusive The description is minimal and vague. It mentions this is part 1 of lint cleanup work but provides no concrete details about the specific changes, testing, or verification performed. Add details about what specific lint warnings were addressed, confirm testing was performed, and clarify the scope/risk assessment of the changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: a frontend lint warning cleanup work, which aligns with the file summaries showing removal of unused imports, type tightening, and unused variable removals.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch lint-cleanup-1

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (3)
frontend/pages/hosts/details/cards/Policies/HostPolicies.tsx (1)

23-30: ⚠️ Potential issue | 🟠 Major

Remove stale router prop at remaining PoliciesCard call sites.

After this prop contract change, frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx still passes router={router} (see provided snippet). That can fail prop type-checking against IPoliciesProps.

Suggested follow-up diff (call site)
--- a/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx
+++ b/frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsx
@@
 <PoliciesCard
   policies={host?.policies || []}
   isLoading={isLoadingHost}
   togglePolicyDetailsModal={togglePolicyDetailsModal}
   hostPlatform={host.platform}
-  router={router}
   currentTeamId={currentTeam?.id}
 />

Also applies to: 39-49

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

In `@frontend/pages/hosts/details/cards/Policies/HostPolicies.tsx` around lines 23
- 30, The PoliciesCard call sites in HostDetailsPage are still passing a
now-stale router prop which no longer exists on IPoliciesProps; remove the
router={router} argument from each PoliciesCard invocation in HostDetailsPage
(and any other files calling PoliciesCard) so the props match the IPoliciesProps
interface (ensure remaining props: policies, isLoading, deviceUser,
togglePolicyDetailsModal, hostPlatform, currentTeamId are preserved).
frontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsx (2)

145-153: ⚠️ Potential issue | 🟠 Major

Don’t turn missing content into a successful blank download.

Because the footer still renders on Lines 191-193 while the content area can be in the loading/error states on Lines 257-263, this "" fallback makes the download action succeed with an empty file when the script body is unavailable. Bail out when selectedScriptContent ?? scriptContent is still nullish instead of silently saving a blank file.

💡 Suggested guard
 const getScriptContent = async () => {
   try {
-      const content = selectedScriptContent || scriptContent || "";
+      const content = selectedScriptContent ?? scriptContent;
+      if (content == null) {
+        renderFlash("error", "Couldn’t Download. Please try again.");
+        return;
+      }
       const formatDate = format(new Date(), "yyyy-MM-dd");
       const filename = `${formatDate} ${
         selectedScriptDetails?.name || "Script details"
       }`;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsx`
around lines 145 - 153, The getScriptContent function currently falls back to an
empty string when selectedScriptContent or scriptContent is missing, which
causes FileSaver.saveAs to create a blank file; change the logic to check if
(selectedScriptContent ?? scriptContent) is nullish and if so abort early
(return) and surface an error/notification instead of proceeding to build a File
and calling FileSaver.saveAs; update references in the function to use the
guarded content variable and only construct the filename/File when content is
present (use selectedScriptDetails?.name for the filename as before).

125-131: ⚠️ Potential issue | 🟡 Minor

Keep the query function consistent with the string generic.

useQuery<string, Error> declares the data as string, but downloadScript() returns raw sendRequest(...) which has no explicit return type and defaults to unknown. Additionally, the query function contains Promise.resolve(null) which violates the generic's type contract. Type downloadScript() explicitly as Promise<string> to ensure the type boundary is enforced.

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

In `@frontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsx`
around lines 125 - 131, The query declares data as string but the queryFn can
return null and downloadScript() is untyped (defaults to unknown); update the
downloadScript function signature to return Promise<string> (ensuring its
internal sendRequest call is typed to return string) and change the useQuery
query function so it never resolves null (e.g., return a Promise<string>
empty-string or throw when scriptId is absent) so the returned value matches
useQuery<string, Error>; modify symbols: downloadScript, sendRequest usage, and
the useQuery(["scriptContent", scriptId], ...) query function accordingly.
🧹 Nitpick comments (3)
frontend/services/entities/global_scheduled_queries.ts (1)

12-35: Consider tightening create input to required numeric fields.

IPackQueryFormData makes interval, query_id, and shard optional, but this method immediately casts them with Number(...); undefined values become NaN and can leak into the request payload.

Proposed type-contract refinement
 import {
   IEditScheduledQuery,
   IPackQueryFormData,
 } from "interfaces/scheduled_query";

+type IGlobalScheduledQueryCreateData = Omit<
+  IPackQueryFormData,
+  "interval" | "query_id" | "shard"
+> & {
+  interval: number;
+  query_id: number;
+  shard: number;
+};
+
 export default {
-  create: (formData: IPackQueryFormData) => {
+  create: (formData: IGlobalScheduledQueryCreateData) => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/services/entities/global_scheduled_queries.ts` around lines 12 - 35,
The create function in global_scheduled_queries.ts is casting optional
IPackQueryFormData fields (interval, query_id, shard) with Number(...) which
turns undefined into NaN and can leak invalid values into params; update the
create implementation to validate and/or require numeric inputs before casting:
check that formData.interval, formData.query_id, and formData.shard are present
and numeric (or provide safe defaults) and throw or return an error if they are
missing/invalid, then build params with Number(...) only after validation so
report_id, interval, and shard cannot be NaN; reference the create function,
IPackQueryFormData, and the params object when making the changes.
frontend/pages/SoftwarePage/components/icons/index.ts (1)

76-76: Unused import removal is correct.

The CompanyPortal import was indeed unused—only IntuneCompanyPortal is imported and referenced throughout the file. Removing it aligns with the lint cleanup objectives.

♻️ Optional: Remove the blank line for consistency

A blank line now appears where the import was removed. Consider removing it to keep the import section clean:

 import Cloudflare from "./Cloudflare";
-
 import CotEditor from "./CotEditor";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/pages/SoftwarePage/components/icons/index.ts` at line 76, Remove the
leftover blank line in the import block after removing the unused CompanyPortal
import; locate the import section where IntuneCompanyPortal is imported (and
CompanyPortal was deleted) and delete the extra empty line so imports remain
contiguous and consistent.
frontend/pages/hosts/details/cards/Certificates/CertificatesTable/CertificatesTable.tsx (1)

44-45: Use Row<IHostCertificate> to eliminate the type assertion on line 45.

This pattern is used consistently throughout the codebase and maintains type-safety without relying on as assertions.

Suggested diff
-  const onClickTableRow = (row: Row) => {
-    onSelectCertificate(row.original as IHostCertificate);
+  const onClickTableRow = (row: Row<IHostCertificate>) => {
+    onSelectCertificate(row.original);
   };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/pages/hosts/details/cards/Certificates/CertificatesTable/CertificatesTable.tsx`
around lines 44 - 45, Change the onClickTableRow signature to accept a typed
table row instead of asserting inside the body: replace the untyped Row
parameter in onClickTableRow with Row<IHostCertificate> so you can pass
row.original directly to onSelectCertificate without using the `as` assertion;
update the function declaration (onClickTableRow) and any callers to use the new
Row<IHostCertificate> type for consistency with other table handlers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@frontend/components/forms/fields/AutoSizeInputField/AutoSizeInputField.tsx`:
- Around line 45-51: The effect on useEffect that forces focus and moves the
caret to the end is re-running on every value change because value is in the
dependency array, causing caret jumps while typing; update the effect so it only
runs when focus state initially becomes true (remove value from dependencies) or
guard the selection logic with a "justFocused" flag (e.g., a ref like
wasFocusedRef) so you only set inputElement.current.focus() and
selectionStart/selectionEnd when isFocused transitions from false to true,
referencing useEffect, isFocused, inputElement, selectionStart and selectionEnd
to locate and modify the logic.

In
`@frontend/components/TableContainer/DataTable/LiveQueryIssueCell/LiveQueryIssueCell.tsx`:
- Around line 6-10: The prop type ILiveQueryIssueCellProps was changed to remove
rowId but call sites (e.g., TargetsInputHostsTableConfig.tsx which still passes
rowId to LiveQueryIssueCell) rely on it; restore backward compatibility by
adding rowId?: string (or the appropriate type) back to ILiveQueryIssueCellProps
and ensure the LiveQueryIssueCell component accepts and (if unused) safely
ignores an optional rowId, or alternatively update all call sites to stop
passing rowId (prefer restoring the optional prop if multiple external callers
exist).

---

Outside diff comments:
In `@frontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsx`:
- Around line 145-153: The getScriptContent function currently falls back to an
empty string when selectedScriptContent or scriptContent is missing, which
causes FileSaver.saveAs to create a blank file; change the logic to check if
(selectedScriptContent ?? scriptContent) is nullish and if so abort early
(return) and surface an error/notification instead of proceeding to build a File
and calling FileSaver.saveAs; update references in the function to use the
guarded content variable and only construct the filename/File when content is
present (use selectedScriptDetails?.name for the filename as before).
- Around line 125-131: The query declares data as string but the queryFn can
return null and downloadScript() is untyped (defaults to unknown); update the
downloadScript function signature to return Promise<string> (ensuring its
internal sendRequest call is typed to return string) and change the useQuery
query function so it never resolves null (e.g., return a Promise<string>
empty-string or throw when scriptId is absent) so the returned value matches
useQuery<string, Error>; modify symbols: downloadScript, sendRequest usage, and
the useQuery(["scriptContent", scriptId], ...) query function accordingly.

In `@frontend/pages/hosts/details/cards/Policies/HostPolicies.tsx`:
- Around line 23-30: The PoliciesCard call sites in HostDetailsPage are still
passing a now-stale router prop which no longer exists on IPoliciesProps; remove
the router={router} argument from each PoliciesCard invocation in
HostDetailsPage (and any other files calling PoliciesCard) so the props match
the IPoliciesProps interface (ensure remaining props: policies, isLoading,
deviceUser, togglePolicyDetailsModal, hostPlatform, currentTeamId are
preserved).

---

Nitpick comments:
In
`@frontend/pages/hosts/details/cards/Certificates/CertificatesTable/CertificatesTable.tsx`:
- Around line 44-45: Change the onClickTableRow signature to accept a typed
table row instead of asserting inside the body: replace the untyped Row
parameter in onClickTableRow with Row<IHostCertificate> so you can pass
row.original directly to onSelectCertificate without using the `as` assertion;
update the function declaration (onClickTableRow) and any callers to use the new
Row<IHostCertificate> type for consistency with other table handlers.

In `@frontend/pages/SoftwarePage/components/icons/index.ts`:
- Line 76: Remove the leftover blank line in the import block after removing the
unused CompanyPortal import; locate the import section where IntuneCompanyPortal
is imported (and CompanyPortal was deleted) and delete the extra empty line so
imports remain contiguous and consistent.

In `@frontend/services/entities/global_scheduled_queries.ts`:
- Around line 12-35: The create function in global_scheduled_queries.ts is
casting optional IPackQueryFormData fields (interval, query_id, shard) with
Number(...) which turns undefined into NaN and can leak invalid values into
params; update the create implementation to validate and/or require numeric
inputs before casting: check that formData.interval, formData.query_id, and
formData.shard are present and numeric (or provide safe defaults) and throw or
return an error if they are missing/invalid, then build params with Number(...)
only after validation so report_id, interval, and shard cannot be NaN; reference
the create function, IPackQueryFormData, and the params object when making the
changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6544878a-01b3-4397-9421-448c5dc82343

📥 Commits

Reviewing files that changed from the base of the PR and between e7470fa and 369a549.

📒 Files selected for processing (65)
  • frontend/components/ActionsDropdown/ActionsDropdown.tsx
  • frontend/components/ActivityDetails/InstallDetails/VppInstallDetailsModal/VppInstallDetailsModal.tests.tsx
  • frontend/components/AuthenticationNav/AuthenticationNav.tsx
  • frontend/components/Avatar/Avatar.tsx
  • frontend/components/FileUploader/FileUploader.stories.tsx
  • frontend/components/LiveQuery/SelectTargets.tsx
  • frontend/components/Modal/Modal.tsx
  • frontend/components/PlatformCompatibility/PlatformCompatibility.tests.tsx
  • frontend/components/PlatformCompatibility/PlatformCompatibility.tsx
  • frontend/components/TableContainer/DataTable/ActionButton/ActionButton.tsx
  • frontend/components/TableContainer/DataTable/HostMdmStatusCell/HostMdmStatusCell.tsx
  • frontend/components/TableContainer/DataTable/IssueCell/IssueCell.tsx
  • frontend/components/TableContainer/DataTable/LinkCell/LinkCell.tests.tsx
  • frontend/components/TableContainer/DataTable/LiveQueryIssueCell/LiveQueryIssueCell.tsx
  • frontend/components/TargetsInput/TargetsInput.tsx
  • frontend/components/TooltipTruncatedText/TooltipTruncatedText.stories.tsx
  • frontend/components/forms/LoginForm/LoginForm.tsx
  • frontend/components/forms/RegistrationForm/RegistrationForm.tests.jsx
  • frontend/components/forms/ResetPasswordForm/ResetPasswordForm.tsx
  • frontend/components/forms/fields/AutoSizeInputField/AutoSizeInputField.tsx
  • frontend/components/forms/fields/InputField/InputField.tests.tsx
  • frontend/components/forms/packs/EditPackForm/EditPackForm.tsx
  • frontend/pages/AccountPage/AccountPage.tsx
  • frontend/pages/DashboardPage/cards/ActivityFeed/ActivityFeed.tsx
  • frontend/pages/DashboardPage/cards/Munki/MunkiVersionsTableConfig.tsx
  • frontend/pages/DashboardPage/cards/WelcomeHost/WelcomeHost.tsx
  • frontend/pages/ForgotPasswordPage/ForgotPasswordPage.tsx
  • frontend/pages/RegistrationPage/Breadcrumbs/Breadcrumbs.tsx
  • frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppsTable/FleetMaintainedAppsTableConfig.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/AddPatchPolicyModal/AddPatchPolicyModal.tests.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditConfigurationModal/EditConfigurationModal.tests.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareInstallerCard/InstallerStatusTable/InstallerStatusTable.tests.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareInstallerCard/InstallerStatusTable/InstallerStatusTableConfig.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareTitleDetailsPage.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/ViewYamlModal.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/helpers.tsx
  • frontend/pages/SoftwarePage/SoftwareVersionDetailsPage/SoftwareVersionDetailsPage.tsx
  • frontend/pages/SoftwarePage/SoftwareVulnerabilities/SoftwareVulnerabilitiesTable/SoftwareVulnerabilitiesTable.tsx
  • frontend/pages/SoftwarePage/SoftwareVulnerabilities/SoftwareVulnerabilitiesTable/VulnerabilitiesTableConfig.tsx
  • frontend/pages/SoftwarePage/components/forms/SoftwareAndroidForm/helpers.tsx
  • frontend/pages/SoftwarePage/components/forms/SoftwareOptionsSelector/SoftwareOptionsSelector.tsx
  • frontend/pages/SoftwarePage/components/icons/index.ts
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/SmallstepForm/SmallstepForm.tsx
  • frontend/pages/admin/IntegrationsPage/cards/ConditionalAccess/ConditionalAccess.tsx
  • frontend/pages/admin/IntegrationsPage/cards/MdmSettings/VppPage/components/VppTable/TeamsCell/TeamsCell.tsx
  • frontend/pages/admin/IntegrationsPage/cards/MdmSettings/components/MdmSettingsSection/MdmSettingsSection.tsx
  • frontend/pages/admin/IntegrationsPage/cards/Sso/Sso.tsx
  • frontend/pages/admin/OrgSettingsPage/cards/FleetDesktop/FleetDesktop.tsx
  • frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx
  • frontend/pages/admin/TeamManagementPage/components/CreateTeamModal/CreateTeamModal.tsx
  • frontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsx
  • frontend/pages/hosts/details/DeviceUserPage/BypassModal/BypassModal.tsx
  • frontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsx
  • frontend/pages/hosts/details/cards/Activity/Activity.tsx
  • frontend/pages/hosts/details/cards/Certificates/CertificatesTable/CertificatesTable.tsx
  • frontend/pages/hosts/details/cards/Labels/Labels.tsx
  • frontend/pages/hosts/details/cards/Policies/HostPolicies.tsx
  • frontend/pages/hosts/details/cards/Software/DeviceSoftwareTableConfig.tsx
  • frontend/pages/hosts/details/cards/Software/SelfService/helpers.ts
  • frontend/pages/queries/edit/components/EditQueryForm/EditQueryForm.tests.tsx
  • frontend/services/entities/config.ts
  • frontend/services/entities/global_scheduled_queries.ts
  • frontend/services/entities/software.ts
💤 Files with no reviewable changes (21)
  • frontend/components/TooltipTruncatedText/TooltipTruncatedText.stories.tsx
  • frontend/pages/DashboardPage/cards/WelcomeHost/WelcomeHost.tsx
  • frontend/pages/admin/OrgSettingsPage/cards/FleetDesktop/FleetDesktop.tsx
  • frontend/pages/DashboardPage/cards/ActivityFeed/ActivityFeed.tsx
  • frontend/components/Avatar/Avatar.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsx
  • frontend/pages/SoftwarePage/components/forms/SoftwareAndroidForm/helpers.tsx
  • frontend/pages/admin/IntegrationsPage/cards/MdmSettings/VppPage/components/VppTable/TeamsCell/TeamsCell.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsx
  • frontend/components/ActivityDetails/InstallDetails/VppInstallDetailsModal/VppInstallDetailsModal.tests.tsx
  • frontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/SmallstepForm/SmallstepForm.tsx
  • frontend/pages/hosts/details/cards/Activity/Activity.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditConfigurationModal/EditConfigurationModal.tests.tsx
  • frontend/pages/admin/IntegrationsPage/cards/Sso/Sso.tsx
  • frontend/pages/hosts/details/cards/Software/DeviceSoftwareTableConfig.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareTitleDetailsPage.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/helpers.tsx
  • frontend/pages/hosts/details/DeviceUserPage/BypassModal/BypassModal.tsx
  • frontend/pages/DashboardPage/cards/Munki/MunkiVersionsTableConfig.tsx
  • frontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/ViewYamlModal.tsx
  • frontend/pages/hosts/details/cards/Software/SelfService/helpers.ts

Comment thread frontend/components/forms/fields/AutoSizeInputField/AutoSizeInputField.tsx Outdated

@iansltx iansltx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got a couple questions here. Given that (most of) these tweaks were LLM-generated, probably useful to see what the explanation was for the change, then make sure that explanation is actually valid, and you'll be the better judge of that than me.

Most of this stuff is indeed straightforward though :)

Comment thread frontend/components/ActionsDropdown/ActionsDropdown.tsx
Comment thread frontend/pages/ForgotPasswordPage/ForgotPasswordPage.tsx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 66 out of 66 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

frontend/pages/hosts/details/cards/Policies/HostPolicies.tsx:33

  • router was removed from IPoliciesProps, but there are still call sites passing router={router} (e.g. HostDetailsPage.tsx). This will break compilation due to excess props; either update remaining call sites to stop passing router or keep router in the props type until all usages are migrated.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 19 to 26
interface IViewYamlModalProps {
softwareTitleName: string;
softwareTitleId: number;
teamId: number;
iconUrl?: string | null;
displayName?: string;
softwarePackage: ISoftwarePackage;
onExit: () => void;
isScriptPackage?: boolean;
isIosOrIpadosApp?: boolean;
}

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

IViewYamlModalProps no longer includes softwareTitleId, teamId, or isIosOrIpadosApp, but at least one call site still passes these props (e.g. SoftwareInstallerCard.tsx renders <ViewYamlModal softwareTitleId={...} teamId={...} isIosOrIpadosApp={...} />). This will cause a TypeScript props error; either re-add the props (if still intended) or update all call sites to stop passing them.

Copilot uses AI. Check for mistakes.
Comment on lines 14 to 16
onFileUpload: () => {
alert("File uploaded!");
console.log("File uploaded!");
},

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

This story now uses console.log in onFileUpload, which likely violates the repo's no-console lint rule (other stories explicitly disable it when needed). Consider using Storybook's actions addon (e.g. an action('fileUpload') handler) or add an explicit eslint-disable-next-line no-console if logging is intended.

Copilot uses AI. Check for mistakes.
@iansltx
iansltx merged commit c9e66b2 into main Apr 11, 2026
7 of 8 checks passed
@iansltx
iansltx deleted the lint-cleanup-1 branch April 11, 2026 00:49
sgress454 added a commit that referenced this pull request Apr 28, 2026
Resolves #44301

This PR updates the `fork-ts-checker-webpack-plugin` to resolve the
errors we were seeing when running it. Since it now runs cleanly, it
identified a few typescript errors that need to be resolved at the same
time:

* `<EmptyState>` no longer takes a `graphicName` param since it's been
redesigned in #43896
* `<PoliciesCard>` was reworked in #43411 and no longer takes `router`.

I verified that this compiles cleanly in `make generate` and `make
generate-dev`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Refactor**
* Simplified component properties and prop handling across host details,
packs, and queries pages.
* Refined empty-state configuration in packs management and queries
tables.

* **Chores**
* Updated development build tool dependency from version 6.5.0 to 9.1.0
for TypeScript type-checking integration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants