I've been stuck on this sidebar issue for hours🫠

How do I stop the chatbot sidebar from creating “New chat” when there’s been no conversation? I want it to be like on ChatGPT how you can’t keep clicking “New chat” and have more empty conversation pages appear.


What’s going on in these workflows? Is there a workflow creating a new chat here?

1 Like

You could set a conditional, on the workflow for the button “New conversation” so that it will only run when the last conversation (Do a search for, find the last conversation) is not empty.

1 Like

You will write RepeatingGroup Message's List of Messages:count is not 0 to that only when expression. (IF this repeating group is keeping track of the messages of that chat).

Hey man, your solution almost worked. It’s really close. I did what you said but the only problem is although clicking the New chat button doesn’t visually create more conversation tabs, I think it still is creating them because if I spam click it and then try type in a message and press send, the question disappears. It loads though. Any idea on what I could do from here?

Hey mac, I appreciate the reply. Honestly, I’ve been using Bubble.io for 2 days. I’m trying to create my 1st software so I’ve been watching and copying tutorials.

I’ll explain as best I can what you’ve red-boxed is for, and I’ll also put the link to the video + timestamp for a better explanation.

So basically when there are no conversations in the database, the 1st ‘When’ is what initiates the first conversation.
However, if there was already a conversation done, the 2nd ‘When’ doesn’t create a new conversation, but still displays the new data (my message I assume).

I re-watched the video and I don’t think I made any mistakes.

Here’s the link to the video (click to 29:30min): https://www.youtube.com/watch?v=Oqs9xgR-MBM&ab_channel=PlanetNoCode

Don’t you have a Conversation or Chat datatype? You can check if it is really created in the Appdata even after “spam click”. Because what you describe might be another problem.

These are my datatypes. I’m pretty sure this is what you’re asking whether I have or not. I just deleted my conversations and messages so I try again from fresh. I’ll let you know what happens very soon.

Hey again Huseyin, so when I spam click the ‘New conversation’ button and then type in and send my message, it disappears. After this I checked to see if the question actually registered in the App data. For both ‘All Conversations’ and ‘All Messages’, the AI replied to it.

So basically after spam clicking the ‘New conversation’ button and sending a new question, the question disappeared but was still answered by the AI and recorded in App data.

Do you think you know what’s wrong potentially?

Edit/To add on: I deleted all the conversations and messages again. Then I spam clicked before typing my first message. It still didn’t show the message I typed and entered.

This means the problem is Clicking ‘New conversation’ more than once causes my entered message to disappear. The message still gets replied to (as shown in App data). Even if I start fresh and spam click, the same issue happens.

I don’t. The conversation might not be set up to the page’s conversation properly after creation. The question might not be associated with the current conversation. So, can’t know without other things in your app.

Check this example I have created for another forum question: Tests for Forum 9 | Bubble Editor

chrome_ZNYJ6WAcZJ

1 Like

Okay thank you. I’ll have a fiddle around and let you know how it goes. Thanks again for your help.

Edit: I can see how in ‘Tests for Forum 9’, when I spam click ‘New Session’ it doesn’t affect my message when I enter it. Interesting.

:white_check_mark:UPDATE

I (with the great help of @hergin) solved the problem I was having. Here’s what I did:

Instead of having the “Only when: RepeatingGroup Message’s List of Messages:count is not 0” in Step 1, I simply moved it to the event/big When box and now when I spam click ‘New conversation’ it doesn’t affect the question or replies when I press enter.

Thanks for everyone’s help!

You probably only want to Create a new Conversation when the first message is sent (after all, can you really have a conversation without saying anything?!)

Another way which is reasonable is to use a ‘temporary’ yes/no field on the conversation. Create a conversation, and mark it as temporary. When a message is sent (i.e the conversation is no longer empty), change temporary to no (using a trigger or just a front end workflow). In the repeating group of conversations, only display Conversations where temporary = no.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.