Skip to content
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

Fix back button disappear on trace page #59

Conversation

Hailong-am
Copy link
Collaborator

Description

When click how was it generated twice, back button will disappear. Fix it by set chat window pre state when it changed.

image

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c70bcfc) 48.75% compared to head (21e4ead) 48.71%.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           feature/agent-framework      #59      +/-   ##
===========================================================
- Coverage                    48.75%   48.71%   -0.05%     
===========================================================
  Files                           46       46              
  Lines                         1087     1088       +1     
  Branches                       250      251       +1     
===========================================================
  Hits                           530      530              
- Misses                         548      549       +1     
  Partials                         9        9              

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

@@ -65,7 +65,9 @@ export const HeaderChatButton: React.FC<HeaderChatButtonProps> = (props) => {
selectedTabId,
preSelectedTabId,
setSelectedTabId: (tabId: TabId) => {
setPreSelectedTabId(selectedTabId);
if (selectedTabId !== tabId) {
Copy link
Collaborator

@wanglam wanglam Dec 11, 2023

Choose a reason for hiding this comment

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

How about add this a selectedTabId === "chat" check to use_chat_actions? Then, we don't need to call setSelectedTabId if selectedTabId is already "trace".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sounds like a better place to add this special logic for trace, will move it to file use_chat_actions.tsx

Signed-off-by: Hailong Cui <[email protected]>
Copy link
Collaborator

@gaobinlong gaobinlong left a comment

Choose a reason for hiding this comment

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

LGTM.

@Hailong-am Hailong-am merged commit 47a8cc0 into opensearch-project:feature/agent-framework Dec 11, 2023
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants