Canvas Moodboard - AI Custom Component randomly deleting things

I’m losing my mind trying to build a drag and drop canvas moodboard for outfit creation in Glide. I didn’t think it was possible until I found the custom component feature, and I’ve had some success across different versions. The problem is that just when I start making real progress, parts I’ve already built disappear and I can’t move forward.

For example, I’ll ask it to attach the tool icons to the selection box that appears when an item is clicked. It does exactly that, then immediately removes the X icon. Even if I switch to a completely different prompt, it still ends up stripping out SVG icons or deleting buttons. No matter how many times I rebuild, it eventually breaks again.

Here’s what I need it to do:

• Show a sidebar with images from a separate list of URLs
• Add an item to the canvas at 100×100 px when a user clicks it
• Let the user drag items around, resize, rotate, flip horizontally, change their z-order, duplicate them, or delete them (sending them back to the sidebar)
• Save each item’s position and transform data as JSON in a column, then reload that layout when the component initializes (gott this working!)
• Provide an export button that takes a screenshot of the canvas and saves it in a column as an image or URL for the outfit cover (couldn’t figure that bit out)

I’ve got most of the features working on its own, but I can’t combine them all without losing icons or controls. Any ideas on how to keep everything in place & handle the AI?

I’d super love for there to be a way to see what the AI thinks I am asking it to do. Have it write down its thoughts and changelog / process cause sometimes it deletes functions that I can’t see and I don’t find out until I’ve made a ton of progress

(Somewhat unrelated though, as infuriating as this component is its also quite intellectually stimulating to see things I’d only ever dreamed of come to life, even if not fully functional)

1 Like

Another approach I am trying is starting with the panel layout and then moving onto the resize/rotate functions

I can’t move past this point - if I prompt it to add additional buttons to the toolbar, it will delete some of the existing ones to replace it. I want a Bring forward and Send backwards button in ADDITION to the existing buttons. I have tried so many variations of the prompt and it just won’t do it without replacing existing data

1 Like

I’ve experienced this too – the ai custom component sort of reaches a limit where you can’t add anything else to it without it removing other features. The only way around this I’ve found has been to try to and simplify certain prompts or as you have done start again and try and get to where you want to get to in less steps or something.

It’s as if there is like a character limit or something I think maybe the AI can’t hold anything larger than a certain amount. Sometimes, I’ve also found inspecting the component and trying to simplify the code by prompting it to remove unnecessary code has helped cause there is more free characters

1 Like

I am going a little bit insane ahaha

I’ve had it generate code in place of the actual component after asking it to add a single button

1 Like

Theoretically this wouldn’t work, since Glide does not expose an API for uploading to their storage through buffer data (which is the screenshot in this case).

My rule of thumb if my component gets a little bit complex is tell it to “keep any other logic that is not related to the aforementioned prompt as is”. At least it’s a bit of a guardrail you want to have, though it doesn’t work 100% of the times.

Also, tell it to add comments to its own code every time you try a new prompt. Keep the prompt as simple as you can. Making multiple changes mean there’s a bigger chance it alters something you didn’t mean.

Every new iteration means it looks at the current state of the code and make changes based on that, so having comments mean it can have a bit better context of what it was trying to do previously.

I’ve been trying to tell it to comment its code and not modify anything else but even after 5 prompts its already deleting things.

Yeah, it do be like that sometimes. Also why this feature has been in Beta like forever. (meaning it’s not fit for production apps)

It’s a blackbox and you don’t have full control over it.