Re-assess how data is sent to the back end
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- flask, javascript, python
- Domain
- backend-api-design, web-dev
Research direction
Start with the Front End Developer's Guide sections on Serialising Form Data and Handling User Interactions with Ajax. Search the Ajax functions, Flask receiver methods using request.form or request.json, and self._front_end_data. Done means the project has an agreed data format, defined type handling, and a clear approach for JavaScript arrays.
Written by the indexing model from the issue text.
Description
There are several related issues here:
- Some Ajax functions use the HTML
FormDataAPI to serialise the data sent to the back end. In Flask, this has to be accessed usingrequest.form. Elsewhere, we send data in the form of a JSON string, which is accessed withrequest.json. We should have a single format to standardise the receiver methods. - A simplified receiver should annotate the type of
self._front_end_dataasDict[str, str]. That means that everything in the dict extracted from the JSON string must be of type string. We need to guarantee that that is the case and remember to cast the values to integers, floats, Booleans, etc. before we use them. - It is not clear what happens to Javascript array data, which deserialises as a Python list. Of the standard form input types, checkboxes are (I think) the only type that submits an array. The other scenario is if we try to send an arbitrary array to the back end via an Ajax request. How do we handle this scenario? On the front end? On the back end? (A very cursory search of Stack Overflow suggested the latter.)
Relevant reading from the Front End Developer's Guide:
- Dominant language
- Python
- Stars
- 123
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from WheatonCS/Lexos
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
AnalysisTool bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
enhancement Front End
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Dendrogram enhancement Front End
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Back End Front End Scrubbing
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100