Skip to content

Rules manager - #23

Merged
davidbenge merged 2 commits into
mainfrom
rules-manager
Nov 10, 2025
Merged

Rules manager#23
davidbenge merged 2 commits into
mainfrom
rules-manager

Conversation

@Mazhinyan

Copy link
Copy Markdown
Collaborator

No description provided.

import { ErrorBoundary } from "react-error-boundary";
import { HashRouter as Router, Routes, Route } from "react-router-dom";
import SpectrumHeader from "./common/SpectrumHeader";
import SideBar from "./common/SideBar";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import SideBar.

Copilot Autofix

AI 10 months ago

The best way to fix this issue is to delete the unnecessary import statement import SideBar from "./common/SideBar"; on line 10 of src/dx-excshell-1/web-src/src/components/App.js. This change is safe and does not alter the existing functionality of the application since SideBar is not used elsewhere in the code. No other files or code regions need to be changed, and no additional methods, imports, or definitions are required to implement this fix.

Suggested changeset 1
src/dx-excshell-1/web-src/src/components/App.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/dx-excshell-1/web-src/src/components/App.js b/src/dx-excshell-1/web-src/src/components/App.js
--- a/src/dx-excshell-1/web-src/src/components/App.js
+++ b/src/dx-excshell-1/web-src/src/components/App.js
@@ -7,7 +7,6 @@
 import { ErrorBoundary } from "react-error-boundary";
 import { HashRouter as Router, Routes, Route } from "react-router-dom";
 import SpectrumHeader from "./common/SpectrumHeader";
-import SideBar from "./common/SideBar";
 import { Home } from "./Home";
 import { About } from "./About";
 import BrandManagerView from "./layout/BrandManagerView";
EOF
@@ -7,7 +7,6 @@
import { ErrorBoundary } from "react-error-boundary";
import { HashRouter as Router, Routes, Route } from "react-router-dom";
import SpectrumHeader from "./common/SpectrumHeader";
import SideBar from "./common/SideBar";
import { Home } from "./Home";
import { About } from "./About";
import BrandManagerView from "./layout/BrandManagerView";
Copilot is powered by AI and may make mistakes. Always verify output.
IllustratedMessage
} from '@adobe/react-spectrum'

import { CreateRuleBuilder } from './rules-manager/create-rule/CreateRuleBuilder'

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import CreateRuleBuilder.

Copilot Autofix

AI 10 months ago

The fix is to remove the unused import of CreateRuleBuilder from ./rules-manager/create-rule/CreateRuleBuilder in the file src/dx-excshell-1/web-src/src/components/RulesManagerView.js. To implement this, simply delete line 16. This will not impact any functionality, as the import is not referenced elsewhere in the file.

Suggested changeset 1
src/dx-excshell-1/web-src/src/components/RulesManagerView.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/dx-excshell-1/web-src/src/components/RulesManagerView.js b/src/dx-excshell-1/web-src/src/components/RulesManagerView.js
--- a/src/dx-excshell-1/web-src/src/components/RulesManagerView.js
+++ b/src/dx-excshell-1/web-src/src/components/RulesManagerView.js
@@ -13,7 +13,6 @@
   IllustratedMessage
 } from '@adobe/react-spectrum'
 
-import { CreateRuleBuilder } from './rules-manager/create-rule/CreateRuleBuilder'
 import { CreateForm } from './rules-manager/CraeteForm'
 
 
EOF
@@ -13,7 +13,6 @@
IllustratedMessage
} from '@adobe/react-spectrum'

import { CreateRuleBuilder } from './rules-manager/create-rule/CreateRuleBuilder'
import { CreateForm } from './rules-manager/CraeteForm'


Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +41 to +44
import {
IAppEventDefinition,
IProductEventDefinition,
} from "../../../../../shared/types";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused imports IAppEventDefinition, IProductEventDefinition.

Copilot Autofix

AI 10 months ago

The best way to fix the problem is to remove the unused imports from line 41-44 in src/dx-excshell-1/web-src/src/components/rules-manager/CraeteForm.tsx. Specifically, the import statement for IAppEventDefinition and IProductEventDefinition from "../../../../../shared/types" is not necessary since neither type is used anywhere in the file. The detailed fix will remove these lines entirely without affecting other parts of the code or existing functionality.


Suggested changeset 1
src/dx-excshell-1/web-src/src/components/rules-manager/CraeteForm.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/dx-excshell-1/web-src/src/components/rules-manager/CraeteForm.tsx b/src/dx-excshell-1/web-src/src/components/rules-manager/CraeteForm.tsx
--- a/src/dx-excshell-1/web-src/src/components/rules-manager/CraeteForm.tsx
+++ b/src/dx-excshell-1/web-src/src/components/rules-manager/CraeteForm.tsx
@@ -38,10 +38,6 @@
 } from "../../../../../actions/classes/RulesManger/types";
 import { Brand } from "../../../../../actions/classes/Brand";
 import { validationOfFormData } from "./helpers/validationOfFormData";
-import {
-  IAppEventDefinition,
-  IProductEventDefinition,
-} from "../../../../../shared/types";
 
 const initialFormData = {
   name: "",
EOF
@@ -38,10 +38,6 @@
} from "../../../../../actions/classes/RulesManger/types";
import { Brand } from "../../../../../actions/classes/Brand";
import { validationOfFormData } from "./helpers/validationOfFormData";
import {
IAppEventDefinition,
IProductEventDefinition,
} from "../../../../../shared/types";

const initialFormData = {
name: "",
Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,54 @@
import { isRuleOrGroupValid, RuleGroupType } from "react-querybuilder";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import isRuleOrGroupValid.

Copilot Autofix

AI 10 months ago

To fix this warning, we should remove the unused import isRuleOrGroupValid from the import statement on line 1. Since RuleGroupType is still used, we must retain it in the import. This can be accomplished by simply removing isRuleOrGroupValid, from the import statement. The fix needs to be applied only to the import statement at the start of src/dx-excshell-1/web-src/src/components/rules-manager/helpers/validationOfFormData.ts.


Suggested changeset 1
src/dx-excshell-1/web-src/src/components/rules-manager/helpers/validationOfFormData.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/dx-excshell-1/web-src/src/components/rules-manager/helpers/validationOfFormData.ts b/src/dx-excshell-1/web-src/src/components/rules-manager/helpers/validationOfFormData.ts
--- a/src/dx-excshell-1/web-src/src/components/rules-manager/helpers/validationOfFormData.ts
+++ b/src/dx-excshell-1/web-src/src/components/rules-manager/helpers/validationOfFormData.ts
@@ -1,4 +1,4 @@
-import { isRuleOrGroupValid, RuleGroupType } from "react-querybuilder";
+import { RuleGroupType } from "react-querybuilder";
 import {
   Rule,
   RuleDirection,
EOF
@@ -1,4 +1,4 @@
import { isRuleOrGroupValid, RuleGroupType } from "react-querybuilder";
import { RuleGroupType } from "react-querybuilder";
import {
Rule,
RuleDirection,
Copilot is powered by AI and may make mistakes. Always verify output.
@@ -0,0 +1,25 @@
import { createAsyncThunk } from "@reduxjs/toolkit";
import { Brand } from "../../../../../../actions/classes/Brand";

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import Brand.

Copilot Autofix

AI 10 months ago

To fix the unused import issue, simply remove the import statement for Brand on line 2 in src/dx-excshell-1/web-src/src/store/BrandSlice/asyncThunks/fetchBrandList.ts. This change will have no effect on functionality, because the import is not referenced anywhere in the code provided. Only that line needs to be removed; no other edits, imports, or definitions are necessary.

Suggested changeset 1
src/dx-excshell-1/web-src/src/store/BrandSlice/asyncThunks/fetchBrandList.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/dx-excshell-1/web-src/src/store/BrandSlice/asyncThunks/fetchBrandList.ts b/src/dx-excshell-1/web-src/src/store/BrandSlice/asyncThunks/fetchBrandList.ts
--- a/src/dx-excshell-1/web-src/src/store/BrandSlice/asyncThunks/fetchBrandList.ts
+++ b/src/dx-excshell-1/web-src/src/store/BrandSlice/asyncThunks/fetchBrandList.ts
@@ -1,5 +1,4 @@
 import { createAsyncThunk } from "@reduxjs/toolkit";
-import { Brand } from "../../../../../../actions/classes/Brand";
 import { apiService } from "../../../services/api";
 
 export const fetchBrandList = createAsyncThunk(
EOF
@@ -1,5 +1,4 @@
import { createAsyncThunk } from "@reduxjs/toolkit";
import { Brand } from "../../../../../../actions/classes/Brand";
import { apiService } from "../../../services/api";

export const fetchBrandList = createAsyncThunk(
Copilot is powered by AI and may make mistakes. Always verify output.

@davidbenge davidbenge left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

look like decent start

@davidbenge
davidbenge merged commit ffb093e into main Nov 10, 2025
2 of 4 checks passed
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