New task form: need to reset VDAF parameters when changing VDAF type
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 10
- Forks
- 5
- Avg merge
- 2h 41m
- Merged PRs (30d)
- 66
Description
When the vdaf.type field is changed in the new task form, we need to both clear any nested parameters that don't apply to the new VDAF, and set default values of VDAF parameters to mirror the default values of their controls. Currently, if you change the "Function" selector to "sum" and don't touch the "Measurement Range" selector, the request will only include a type within the vdaf nested object. Moreover, the API error (below) is not surfaced as a validation error in the UI.
{
"vdaf": {
"bits": [
{
"code": "required",
"message": null,
"params": {
"value": null
}
}
]
}
}
Furthermore, if you change the function to "histogram", enter some histogram buckets, and then change the function to "sum", the histogram buckets will still be sent to the server in the request.
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.
Research direction
Start by locating the new task form and the handler for changes to the vdaf.type field. Trace how control defaults and nested VDAF values are assembled into the request, then check how the shown API validation response is mapped into UI errors. Done means irrelevant parameters are cleared, applicable defaults are submitted, and VDAF validation errors appear in the form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100