@georgecollier I had reported the bug 10 emails earlier in the chain, so you’re correct that the screenshots here don’t share that specific report. I tagged this as a question, rather than “needs help” because I just wanted to focus on the AI question rather than the specific tricky bug report. To help, I’ll share the context here to paint the complete picture for you
I also know that the tone of messages on this forum can get really negative towards bubble, so I want to try to defuse that. I have no problem with the Bubble team using AI so they have more bandwidth to investigate trickier problems, it’s just that disclosure would be helpful and the context here felt inappropriate. I also didn’t include that when I initially replied to the chain, I got an auto-response directing me to an AI chatbot. I chose not to use that because I know that AI is not going to answer this problem adequately (as I’ve already tried that)
In my opinion, I am not sure whether I agree with “they did propose a solution that works” - the response just echoed back ideas I had proposed when I was asking bubble to weigh in on whether these changes are worth trying or just a waste of my time
Here’s the full context on the bug for your knowledge:
My application has a chat functionality that uses a repeating group to show the different threads. The sorting of these threads is determined by the latest message date for each thread, as pulled in the database query. To change the displayed thread on the page, a user can simply click on the cell in the repeating group, which runs a custom event workflow to change the data on the page.
With a high throughput of messages coming into the platform, that sort order changes constantly, and this was causing frustrating race conditions where if a user clicked on a cell and then the sort order changed before the action completed, a different thread would be loaded onto the primary screen than what they had clicked
Through testing, I determined that the issue was in using “Current Cell’s Thing” as a reference - when underlying sort order changed for the repeating group, it seemed that the “Current Cell’s Thing” reference changed to the new value after the user had clicked and “sent” Current Cell’s Thing to the custom workflow
The bubble team eventually responded by saying:
I’ve flagged this behavior to my larger team, and they were able to confirm that race conditions like this are expected in Bubble when the app is trying to complete actions as data updates, especially if there is a slower network connection.
From what you’ve described, it appears that when you pass the current cell’s value to a custom workflow, Bubble is effectively passing a reference to the cell rather than the actual object value at that moment. This means that if a database update causes the contents of the cell to change before the custom workflow runs, the workflow may inadvertently act on the updated value rather than the one originally clicked. This behavior can happen in situations where the timing between user actions and database updates align in just the right way to create a race condition.
And that is where we are caught up to the conversation I shared. I was trying to determine a viable way to fix the issue without adding WU draining workarounds or dramatically impacting page load performance (like sorting in the client would). And, as my app is already hoovering WU and documentation on WU is a bit limited, I was trying to avoid throwing spaghetti at the wall with different ideas that may or may not resolve the problem, particularly when the issue can be difficult to reproduce and test