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

improve User Input Validation and feedback #30

Open
bhpayne opened this issue Jan 10, 2025 · 0 comments
Open

improve User Input Validation and feedback #30

bhpayne opened this issue Jan 10, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@bhpayne
Copy link
Member

bhpayne commented Jan 10, 2025

On 2025-01-09 I provided Gemini 2.0 Flash (https://aistudio.google.com/prompts/) all the .py and .html files from the PDG and used the following prompt:

The following files are from a project that works but is incomplete. 
Review the code and provide suggestions of what the most 
important tasks are to work on next.

The most important task according to Gemini's assessment would be to improve User Input Validation and feedback.

Gemini says

Problem: The app currently relies on basic validators in Flask-WTF and catching exceptions, but more fine-grained control and specific messages for users are needed. The web forms are not catching bad input.
Action:
* Improved Form Validation: For every Flask-WTF form, add more custom validators (as functions) to catch edge cases, and invalid inputs.
* Consistent Error Messages: Ensure that errors detected in Python (e.g. during saving files, communicating with Neo4j, or processing Latex) provide a user-friendly message, rather than crashing the web app. All messages need to be a string, not objects.
* Clear HTML feedback: Ensure that all forms have their HTML counterparts updated when the Python code of the Flask-WTF form has been modified.
* Javascript validation: Validate user input in the browser.
* Sanitize before display: Sanitize any data before displaying in the HTML.

Why this is High Priority: A good user experience is dependent on users being shown how to fix their input problems. Unhandled issues or uninformative errors can lead to frustration and make the system hard to use.

I agree with Gemini's assessment about the importance of addressing this to improve usability of the web interface.

A more specific critique I'll add is the issue of invalid Latex being passed to the backend.

@bhpayne bhpayne added the enhancement New feature or request label Jan 10, 2025
@bhpayne bhpayne self-assigned this Jan 10, 2025
@bhpayne bhpayne moved this to Todo - not urgent in v8_flask_neo4j Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo - not urgent
Development

No branches or pull requests

1 participant