๐๐ถ๐ ๐ง๐ผ๐ฑ๐ฎ๐ ๐ช๐ฎ๐ ๐ฌ๐ฒ๐๐๐ฒ๐ฟ๐ฑ๐ฎ๐
A timezone bug recently broke our booking platform.
A venue in Australia saw its activity list disappear when users clicked a card. I could not reproduce the bug from the US. This suggested a date or timezone issue.
I used Claude to help. It identified that the venue was in Australia. It guessed the timezone caused the error. It was right.
The problem was our logic for past days. A US user looking at an Australian venue was looking at the venue's yesterday. Our code excluded all activities from past days. This caused the UI to crash or disappear.
I had to fix this without changing how past days behave. I could not risk a large blast radius.
My solution:
- I kept the past-day logic mostly the same.
- I sent all activities for past days but with empty time slots.
- This stopped the UI glitch.
- This kept the availability data consistent.
I used unit tests to confirm the fix. I forced the AI to create a failing test first, then a passing one.
Two lessons from this:
AI needs limits. Claude found the cause, but it did not see the architectural flaw. AI does not understand how different layers of your system interact unless you tell it.
Control your blast radius. Never make a change that affects more than you can reason about. Small, specific fixes help you sleep at night.
I also noticed our code for fetching availability is messy. I should refactor it to be more efficient. However, I will not refactor just because the code looks bad. I will wait until a new bug or a product requirement forces the change. Refactoring based on emotion alone causes outages.
Optional learning community: https://t.me/GyaanSetuAi