Demo, all content is generated
Question

Bolt keeps reverting the changes I make by hand in the code editor

Open · 391 views · asked by joaquin_r · edited

I fix small things myself in Bolt's code view (text, a padding) because it's faster than prompting. But the next time I prompt anything, some of my manual edits are gone. It feels random, not always.

What I’ve tried

Saving explicitly with ctrl+s before prompting. Writing "keep my manual changes" in the prompt.

Comment
+1, drives me nuts tomvibes · edited

3 answers

siddharth_r · edited

Bolt has file locking: right-click a file in the tree → Lock file. The AI won't touch locked files. I lock anything I've hand-tuned and unlock when I actually want changes there.

There's also a "target file" option to tell it to only change specific files for a prompt.

Comment
didn't know about lock, trying joaquin_r · edited
Works for whole files. But the problem is when I change one line in a big file that Bolt also needs to edit. joaquin_r · edited
sergio_ruiz · edited

For the big-file case: the model rewrites the file from what's in its context, and if your edit wasn't in the snapshot it got, it's gone. Two habits help: split big files so your hand-tuned bits live in their own file (then lock it), and after a manual edit mention it in the next prompt ("I changed the header padding to 24px in Header.tsx, keep that").

Comment
bellaship · edited

Same thing here, locking files helped for maybe 80% of it. For the rest I stopped editing by hand in Bolt and do small fixes in VS Code after export.

Comment