Frontend: Lint warning cleanup part 1 - #43411
Conversation
There was a problem hiding this comment.
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.
Codecov Report❌ Patch coverage is 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
anyusages 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
useQueryis typed asstring, but the query function can returnPromise.resolve(null)whenscriptIdis 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 typestring | null(and rendering accordingly) or return an empty string instead ofnull.
frontend/services/entities/global_scheduled_queries.ts:16createacceptsIPackQueryFormData, but that type makes fields likeinterval,query_id, andshardoptional while the implementation assumes they exist (later callingNumber(...)). This weakens type-safety and can lead to sendingNaNif a caller omits a field. Consider using a stricter input type forcreate(required fields) or adding runtime validation/defaults before conversion.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR applies widespread frontend cleanup and type tightenings: replaces many Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
frontend/pages/hosts/details/cards/Policies/HostPolicies.tsx (1)
23-30:⚠️ Potential issue | 🟠 MajorRemove stale
routerprop at remainingPoliciesCardcall sites.After this prop contract change,
frontend/pages/hosts/details/HostDetailsPage/HostDetailsPage.tsxstill passesrouter={router}(see provided snippet). That can fail prop type-checking againstIPoliciesProps.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 | 🟠 MajorDon’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 whenselectedScriptContent ?? scriptContentis 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 | 🟡 MinorKeep the query function consistent with the
stringgeneric.
useQuery<string, Error>declares the data asstring, butdownloadScript()returns rawsendRequest(...)which has no explicit return type and defaults tounknown. Additionally, the query function containsPromise.resolve(null)which violates the generic's type contract. TypedownloadScript()explicitly asPromise<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 tighteningcreateinput to required numeric fields.
IPackQueryFormDatamakesinterval,query_id, andshardoptional, but this method immediately casts them withNumber(...);undefinedvalues becomeNaNand 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
CompanyPortalimport was indeed unused—onlyIntuneCompanyPortalis 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: UseRow<IHostCertificate>to eliminate the type assertion on line 45.This pattern is used consistently throughout the codebase and maintains type-safety without relying on
asassertions.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
📒 Files selected for processing (65)
frontend/components/ActionsDropdown/ActionsDropdown.tsxfrontend/components/ActivityDetails/InstallDetails/VppInstallDetailsModal/VppInstallDetailsModal.tests.tsxfrontend/components/AuthenticationNav/AuthenticationNav.tsxfrontend/components/Avatar/Avatar.tsxfrontend/components/FileUploader/FileUploader.stories.tsxfrontend/components/LiveQuery/SelectTargets.tsxfrontend/components/Modal/Modal.tsxfrontend/components/PlatformCompatibility/PlatformCompatibility.tests.tsxfrontend/components/PlatformCompatibility/PlatformCompatibility.tsxfrontend/components/TableContainer/DataTable/ActionButton/ActionButton.tsxfrontend/components/TableContainer/DataTable/HostMdmStatusCell/HostMdmStatusCell.tsxfrontend/components/TableContainer/DataTable/IssueCell/IssueCell.tsxfrontend/components/TableContainer/DataTable/LinkCell/LinkCell.tests.tsxfrontend/components/TableContainer/DataTable/LiveQueryIssueCell/LiveQueryIssueCell.tsxfrontend/components/TargetsInput/TargetsInput.tsxfrontend/components/TooltipTruncatedText/TooltipTruncatedText.stories.tsxfrontend/components/forms/LoginForm/LoginForm.tsxfrontend/components/forms/RegistrationForm/RegistrationForm.tests.jsxfrontend/components/forms/ResetPasswordForm/ResetPasswordForm.tsxfrontend/components/forms/fields/AutoSizeInputField/AutoSizeInputField.tsxfrontend/components/forms/fields/InputField/InputField.tests.tsxfrontend/components/forms/packs/EditPackForm/EditPackForm.tsxfrontend/pages/AccountPage/AccountPage.tsxfrontend/pages/DashboardPage/cards/ActivityFeed/ActivityFeed.tsxfrontend/pages/DashboardPage/cards/Munki/MunkiVersionsTableConfig.tsxfrontend/pages/DashboardPage/cards/WelcomeHost/WelcomeHost.tsxfrontend/pages/ForgotPasswordPage/ForgotPasswordPage.tsxfrontend/pages/RegistrationPage/Breadcrumbs/Breadcrumbs.tsxfrontend/pages/SoftwarePage/SoftwareAddPage/SoftwareFleetMaintained/FleetMaintainedAppsTable/FleetMaintainedAppsTableConfig.tsxfrontend/pages/SoftwarePage/SoftwareTitleDetailsPage/AddPatchPolicyModal/AddPatchPolicyModal.tests.tsxfrontend/pages/SoftwarePage/SoftwareTitleDetailsPage/EditConfigurationModal/EditConfigurationModal.tests.tsxfrontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareInstallerCard/InstallerStatusTable/InstallerStatusTable.tests.tsxfrontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareInstallerCard/InstallerStatusTable/InstallerStatusTableConfig.tsxfrontend/pages/SoftwarePage/SoftwareTitleDetailsPage/SoftwareTitleDetailsPage.tsxfrontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/ViewYamlModal.tsxfrontend/pages/SoftwarePage/SoftwareTitleDetailsPage/ViewYamlModal/helpers.tsxfrontend/pages/SoftwarePage/SoftwareVersionDetailsPage/SoftwareVersionDetailsPage.tsxfrontend/pages/SoftwarePage/SoftwareVulnerabilities/SoftwareVulnerabilitiesTable/SoftwareVulnerabilitiesTable.tsxfrontend/pages/SoftwarePage/SoftwareVulnerabilities/SoftwareVulnerabilitiesTable/VulnerabilitiesTableConfig.tsxfrontend/pages/SoftwarePage/components/forms/SoftwareAndroidForm/helpers.tsxfrontend/pages/SoftwarePage/components/forms/SoftwareOptionsSelector/SoftwareOptionsSelector.tsxfrontend/pages/SoftwarePage/components/icons/index.tsfrontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/CertificateAuthorities.tsxfrontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/CustomSCEPForm/CustomSCEPForm.tsxfrontend/pages/admin/IntegrationsPage/cards/CertificateAuthorities/components/SmallstepForm/SmallstepForm.tsxfrontend/pages/admin/IntegrationsPage/cards/ConditionalAccess/ConditionalAccess.tsxfrontend/pages/admin/IntegrationsPage/cards/MdmSettings/VppPage/components/VppTable/TeamsCell/TeamsCell.tsxfrontend/pages/admin/IntegrationsPage/cards/MdmSettings/components/MdmSettingsSection/MdmSettingsSection.tsxfrontend/pages/admin/IntegrationsPage/cards/Sso/Sso.tsxfrontend/pages/admin/OrgSettingsPage/cards/FleetDesktop/FleetDesktop.tsxfrontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsxfrontend/pages/admin/TeamManagementPage/components/CreateTeamModal/CreateTeamModal.tsxfrontend/pages/hosts/components/ScriptDetailsModal/ScriptDetailsModal.tsxfrontend/pages/hosts/details/DeviceUserPage/BypassModal/BypassModal.tsxfrontend/pages/hosts/details/DeviceUserPage/DeviceUserPage.tsxfrontend/pages/hosts/details/cards/Activity/Activity.tsxfrontend/pages/hosts/details/cards/Certificates/CertificatesTable/CertificatesTable.tsxfrontend/pages/hosts/details/cards/Labels/Labels.tsxfrontend/pages/hosts/details/cards/Policies/HostPolicies.tsxfrontend/pages/hosts/details/cards/Software/DeviceSoftwareTableConfig.tsxfrontend/pages/hosts/details/cards/Software/SelfService/helpers.tsfrontend/pages/queries/edit/components/EditQueryForm/EditQueryForm.tests.tsxfrontend/services/entities/config.tsfrontend/services/entities/global_scheduled_queries.tsfrontend/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
iansltx
left a comment
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
routerwas removed fromIPoliciesProps, but there are still call sites passingrouter={router}(e.g.HostDetailsPage.tsx). This will break compilation due to excess props; either update remaining call sites to stop passingrouteror keeprouterin the props type until all usages are migrated.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| interface IViewYamlModalProps { | ||
| softwareTitleName: string; | ||
| softwareTitleId: number; | ||
| teamId: number; | ||
| iconUrl?: string | null; | ||
| displayName?: string; | ||
| softwarePackage: ISoftwarePackage; | ||
| onExit: () => void; | ||
| isScriptPackage?: boolean; | ||
| isIosOrIpadosApp?: boolean; | ||
| } |
There was a problem hiding this comment.
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.
| onFileUpload: () => { | ||
| alert("File uploaded!"); | ||
| console.log("File uploaded!"); | ||
| }, |
There was a problem hiding this comment.
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.
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 -->
Issue
Description
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: