-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the vuex actions. It makes sense to think of them as a chain of tasks that needs to be executed. This helps when it comes to naming, and it makes it easier to reason about them. Another thing is that the action that will be called from a component should describe the whole action chain.
For this action chain I can imagine something like this:
Name of the action chain (so the first action name): provisionExecutionToken
and the chain:
provisionExecutionToken(does encryption bit)
-> requestExecutionToken(does the server call bit, and then calls the js function to decrypt response)
-> setExecutionToken (mutation that sets the state)
It does not need to follow this exactly, but just wanted to give an example of what I am talking about.
I know this is quite a lot of feedback: let me know if you'd like me to tackle some of it, or have a session to go through it? |
Co-authored-by: Jonathan Ngbonga <[email protected]>
8e540a5
to
941c574
Compare
(Rebased to refresh and update) |
This will give us a bit more HTTP debugging context on failure, compared to checking and throwing later.
…n, and use Uint8Array
* @/models/data-upload → @/models/sealed-calls * UploadRequest → SealedRequest * UploadResponse → SealedResponse
Also add some type annotations, while here.
27ff9ce
to
4a8938f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jongbonga and I had a session together to resolve the remaining conversations, with @Nghondzweni listening in. Thanks! 😊️
After that, I made to factor out a sealedPost
helper substantially simplifies the action code: both encryptAndUploadFile
and requestExecutionToken
are now just small wrappers around it. @jongbonga and @longtomjr, can you review this change before merging?
Each request's ephemeral secret key is now managed inside sealedPost.
aa891f6
to
7c17610
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks everyone for getting this sorted!
Issue #13