-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check-in Chatbot UI Code #1349
base: main
Are you sure you want to change the base?
Check-in Chatbot UI Code #1349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TamiTakamiya I know this is a draft but I've added an initial comment.
I assume much of this is a copy/paste from elsewhere; hence is there much to review?
We'd presumably want to keep our fork aligned with where ever it came from.
It'd be nice to add it to SonarCloud and add some CI jobs (like we have for the "Admin Portal").
@@ -163,3 +163,14 @@ grafana/* | |||
|
|||
# Local LaunchDarkly data | |||
./flagdata.json | |||
|
|||
# node dependencies | |||
node_modules/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd have preferred it if you'd npm install
'ed this in ansible_ai_connect_chatbot
.
Having the node_modules
folder in the root could conflict with other TypeScript modules (now or in the future).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was my intention. I'll double-check the descriptions in README.
For installing dependencies, run | ||
|
||
```commandline | ||
npm install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This README
is in the ansible_ai_connect_chatbot
folder.
This implies npm install
would be ran from this folder.. meaning (AFAIK) node_modules
should not be in the root of ansible_ai_connect_service
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. I'll state that explicitly there.
Yes. I have updated the description. Most of features are implemented in two
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I haven't approved as you state you want to remove App.test.tsx
from Sonar Cloud coverage?
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes LGTM, cosmetic comment and a query
await act(async () => fireEvent.click(colorThemeSwitch)); | ||
expect(colorThemeSwitch.checked).toBeTruthy(); | ||
|
||
// expect(getComputedStyle(showLight!).display).toEqual("none") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TamiTakamiya are u planning to use/support these expect
, and if not can we remove the commented expect
import { ColorThemeSwitch } from "./ColorThemeSwitch/ColorThemeSwitch"; | ||
import reportWebVitals from "./reportWebVitals"; | ||
import "@patternfly/react-core/dist/styles/base.css"; | ||
// import '@patternfly/patternfly/patternfly-addons.css'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above, if not used or intended to use, plz remove commented import
const resp = await axios.post( | ||
import.meta.env.PROD | ||
? "/api/v0/ai/chat/" | ||
: "http://localhost:8080/v1/query/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TamiTakamiya can you plz confirm why are we using localhost
directed query API
Jira Issue: https://issues.redhat.com/browse/AAP-33560
Description
Check-in Chatbot UI code, which has been stored in the
TamiTakamiya/hackathon-latest
branch.
While more than 20 files are added, two
.tsx
files among them,AnsibleChatbot.tsx
useChatbot.tsx
implement the core features of our AAP chatbot.
Note: This PR contains changes on code coverage & sonar cloud properties, but does not include Image creation, Makefile, etc., which means the newly deployed image after merging this PR won't include these UI codes yet.
Testing
Steps to test
cd ansible_ai_connect_chatbot
npm install
npm run coverage
Scenarios tested
Unit tests are included in the PR.
Production deployment