Hi Khan thanks for posting in the Lucid community! Unfortunately adding notes to lines directly isn't currently supported in Lucidchart. However our development team would love to hear more about how this would be a useful tool for you via this feature request form - they use ideas submitted here when prioritizing improvements to Lucidchart.
However I think the alternative of a comment is a great idea! This would most closely imitate the function of a note where a small icon is present near the associated shape and you can click on it to reveal additional information. If you implement this we'd love to see how it turns out! Please let me know if you have any additional questions.