stackblitz / bolt.new

Prompt, run, edit, and deploy full-stack web applications
https://bolt.new
MIT License
9.12k stars 3.64k forks source link

Regularly using placeholder text. #3179

Closed TableflipFoundry closed 4 days ago

TableflipFoundry commented 4 days ago

Describe the bug

When updating code in complex apps, bolt will use placeholder comments and not recreate the entire file, then after this, there is a whole process of trying to recover. You cant just stop it, it rebuilds the file incorrectly, then you have to blow a ton of tokens trying to get back where you left off. Here is a prime example. Now hours of work is ruined, and it will take me hours of work to repair. And tons of tokens. The rollback doesnt always work.

`// ... existing imports ...

export default function ContinentCreator() { // ... existing state and hooks ...

const handleSaveAll = async () => { if (!currentWorld || !user?.uid) return;

try {
  addLog('Preparing to save all continents...', 'info');
  const result = await updateWorld(
    currentWorld.world_id,
    { continents },
    user.uid
  );

  if (result) {
    addLog('All continents saved successfully!', 'success');
    // Clear drafts after successful save
    clearDrafts();
  } else {
    throw new Error('Failed to save continents');
  }
} catch (error) {
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
  addLog(`Failed to save continents: ${errorMessage}`, 'error');
  console.error('Save error:', error);
}

};

const ActionButtons = ({ disabled = false }) => ( <div className="flex items`

Link to the Bolt URL that caused the error

https://bolt.new/~/sb1-zvnf4k

Steps to reproduce

This is not intentionally reproducible. It happens when the code gets long and complex, and it needs to be stopped. My document does not exceed any token limits or context window limits.

Expected behavior

I think thats obvious here. This program should never ever use placeholder text. This should be part of its core prompt if its not. Its a huge problem. // ... existing state and hooks ... // ... existing imports ...

Screen Recording / Screenshot

image

Platform

Browser name = Chrome
Full version = 131.0.0.0
Major version = 131
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 168798388,
  "usedJSHeapSize": 144831400,
  "jsHeapSizeLimit": 4294705152
}
Username = TableflipFoundry
Chat ID = 35f61836f28c

Additional context

Error:

You cancelled this message.
codewithtyler commented 4 days ago

I'd keep an eye on the announcements tomorrow. Last I heard they were planning on pushing out an update to add the new diff feature which should help prevent this as Bolt will only be changing the part of the code it intended instead of changing the whole file. I'll try and follow up with you tomorrow once it gets released to see if this is resolved.

TableflipFoundry commented 4 days ago

Oh, that would absolutely change the game. 100%. There are so many errors because bolt rewrites the entire document improperly. I dont know how many tokens this has cost me.

codewithtyler commented 4 days ago

Yeah it's been frustrating a lot of people. Hopefully this update will fix it for you.

Bogatinovski commented 4 days ago

I've been having the issue annoying issue for a long time and I am eagerly looking forward to a permanent fix.

endocytosis commented 4 days ago

Hi all,

Appreciate the patience as improvements continue to be made! Yes, hopefully the new diff feature will help with this. Diff-based file editing is now on production under Feature Previews, which you can enable by going to Settings > Feature Previews and toggling Diffs to on. We are independently tracking this issue with placeholder and commented text here: #2862. We appreciate your continued feedback!

TableflipFoundry commented 4 days ago

Hi all,

Appreciate the patience as improvements continue to be made! Yes, hopefully the new diff feature will help with this. Diff-based file editing is now on production under Feature Previews, which you can enable by going to Settings > Feature Previews and toggling Diffs to on. We are independently tracking this issue with placeholder and commented text here: #2862. We appreciate your continued feedback!

Thank you, after I posted this, I Realized there (of course) were many others with the same complain. I chose to leave it open because I do feel like I managed to produce more information about the problem maybe than some of the others. Sorry to add it to your plate. Thanks for the update.

endocytosis commented 4 days ago

No worries! We appreciate the continued feedback and it is no problem for us to go through and merge similar issues.