Skip to content

incorrect operation of publishing as tool #14715

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

Closed
5 tasks done
JS-mark opened this issue Mar 3, 2025 · 2 comments · Fixed by #14561
Closed
5 tasks done

incorrect operation of publishing as tool #14715

JS-mark opened this issue Mar 3, 2025 · 2 comments · Fixed by #14561
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report

Comments

@JS-mark
Copy link
Contributor

JS-mark commented Mar 3, 2025

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.0

Cloud or Self Hosted

Cloud

Steps to reproduce

Image
When publishing the workflow as a tool, the status is "disabled", but the click and hover functions are not prohibited.

✔️ Expected Behavior

Normally, it should not be clickable or hoverable when it is in the disabled state.

❌ Actual Behavior

Actually, it can be clicked and hovered.

@JS-mark
Copy link
Contributor Author

JS-mark commented Mar 3, 2025

These issues also existed in previous versions.

@dosubot dosubot bot added cloud When the version is cloud and it is a bug report 🐞 bug Something isn't working labels Mar 3, 2025
Copy link

dosubot bot commented Mar 3, 2025

Hello, @JS-mark! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together!

The issue you're experiencing with the 'Publish as Tool' feature, where it remains clickable and hoverable even when disabled, seems to be a known problem. The code includes logic to handle the disabled state by applying styles like opacity-30 and cursor-not-allowed to indicate that the button is not interactive. However, the click event handler should prevent any action when the button is disabled by checking the published state:

onClick={() => !published && setShowModal(true)}

This logic should ensure that the button does not trigger any actions when it is disabled. If this behavior is not working as expected, it might be due to a bug or an oversight in the implementation. You might want to verify if the published state is being correctly set and if the styles are being applied as intended [1][2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working cloud When the version is cloud and it is a bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants