Currently on prod, if someone manually enters a new data row in Airtable (as opposed to using the form), the manual entry turns into a race against the bot, where the user gets a maximum of 20 seconds to enter in all the required data. This is because the code is written assuming that data is entered via the form (and not manually), expecting that data is present for all required fields as soon as the row is created.
In some circumstances, incomplete (or in-progress) manual data would result in the bot continually posting to slack.
The approach
As we discussed on slack, for now, the idea is to patch the issue by preventing repeat message sends.
There were 2 approaches discussed:
Don't send a slack message until all required fields are entered.
UX issues with this approach:
There's no indication as to what fields are required when manually entering data in Airtable
This would result in the bot feeling unreliable ("Why are the data rows I manually enter only sometimes being sent to slack?")
Send a message on the regular bot schedule and make sure the bot doesn't produce any unexpected behavior due to incomplete data (post only once, show human readable strings if any given data field isn't available, don't crash).
UX issues with this approach:
The message sends almost immediately after row creation, with a lot of data yet to be entered
This would result in most manually entered rows sending in "junk" messages, where dispatchers get a single slack message with incomplete info per manually entered row
We collectively opted for number 2; this pull request represents that approach.
Given that this issue is extremely disruptive when it occurs, it was a good first step to solve the technical issue first.
But the UX issue remains.
Communicating with the users
For now, there are 2 things we can suggest to those entering data:
It's better to use the form than manually enter data
If you must manually enter data, you can manually trigger the bot to resend when all of your data entry is complete (we need to show them how)
Next steps
A few ideas that could be useful, depending on if this issue is important enough to pursue:
Find out why some users prefer manual entry over using the form and see if there's something we can do to accommodate them (e.g., make a better form or alternative method of entry)
As Kyle mentioned in slack, remove the bot's dependency on setInterval() and provide users with a "trigger" to send slack messages from Airtable when they are ready (this is probably a very big lift at this point)
Context
The issue
Currently on prod, if someone manually enters a new data row in Airtable (as opposed to using the form), the manual entry turns into a race against the bot, where the user gets a maximum of 20 seconds to enter in all the required data. This is because the code is written assuming that data is entered via the form (and not manually), expecting that data is present for all required fields as soon as the row is created.
In some circumstances, incomplete (or in-progress) manual data would result in the bot continually posting to slack.
The approach
As we discussed on slack, for now, the idea is to patch the issue by preventing repeat message sends.
There were 2 approaches discussed:
We collectively opted for number 2; this pull request represents that approach.
Given that this issue is extremely disruptive when it occurs, it was a good first step to solve the technical issue first.
But the UX issue remains.
Communicating with the users
For now, there are 2 things we can suggest to those entering data:
Next steps
A few ideas that could be useful, depending on if this issue is important enough to pursue:
setInterval()
and provide users with a "trigger" to send slack messages from Airtable when they are ready (this is probably a very big lift at this point)I'd love to hear if there are other ideas.