I’ve just followed and implemented @Teodor’s excellent ‘Password Reset Functionality’ tutorial.
The process is entirely logical and similar to what I’ve used in the past. Looking through the server action steps, I can see how it works straightaway and at the moment I think it will be just as clear if I come back to it in six months time - perhaps if I need to tweak it a little. However I know I’m wrong. I’ll look at it in six months and I’ll stare at it blankly until I’ve examined it and probably expanded evey branch, looked at the POST parameters, looked at the query conditions, scratched my head etc…
I would never write even this relatively small amount of code without adding quite a few comments - I know I’ll regret it if I don’t and it always pays off.
I think it would be extremely useful if we could add comments - perhaps as another ‘step’. Adding comments to the JSON itself would be another option - but I imagine it might cause problems or be overwritten as changes are made.
I’ve added a screenshot below of just the second server action from Teodor’s tutorial - as an example of what I mean.