Four hours of work, one wrong folder.
The bug was me.
I spent an evening on EndlichSichtbar with Claude Code. About four hours. Edge functions, admin dashboard, a stack of small fixes I'd been avoiding for weeks. Good session. Went to bed feeling like a competent adult.
Next day I opened the project and carried on. Half an hour in, something was off. A fix I distinctly remembered writing wasn't there. Then another one.
Wrong folder.
How you do this to yourself
Two copies of the same project on my machine. One cloned from GitHub, sitting in my user directory. One downloaded as a ZIP from GitHub's web interface, sitting on my desktop in a folder structure I built myself, presumably during a phase where I believed I was organised.
The ZIP one has -main on the end of the folder name. That is the entire visual difference between four hours of work and no hours of work.
The evening went into the clone. The morning went into the ZIP, which was older, on files that had already been superseded. And then I pushed.
Nothing vanished, technically. It was just buried under an older version that I had personally and confidently put on top of it.
Whose fault it is, since we're being honest
Not Git's. Git did precisely what I asked.
Not the AI's. Claude Code read the files in front of it and worked on those files correctly, which is the whole job.
Mine. I had two versions of the truth and no habit that made me check which one I was standing in.
Which, and I say this through slightly gritted teeth, is exactly the failure mode I care about in products. The system behaves correctly on wrong input and hands back a confident result. Nothing warns you, because from inside that folder everything looks completely consistent.
I write about this. I then did it to myself at 9am on a Tuesday.
The fix is embarrassingly small
First thing I type in any session now, before any actual task:
check the code and tell me whether this is current
Ten seconds. Checks the remote, compares the local commit, tells me if I'm behind. Last time it came straight back with: the local repo is not current, GitHub has a newer commit, shall I pull?
Yes. Always yes.
The bigger rule
I work across Lovable, GitHub and my laptop. Lovable pushes to main. Claude Code pushes to main. I pull to my machine. Three writers, one branch, what could possibly go wrong.
The rule now: whoever wrote last, everyone else pulls first. Lovable, then local. Never local on top of Lovable.
Not clever. Just the thing that stops the evening I've described from happening twice.
Four hours isn't a catastrophe. It was expensive enough to make the habit stick, which is the cheapest version of that lesson I was ever realistically going to get. And if I never broke anything, I'd have nothing to write about.
