What Building BroTider Taught Me About Live Data
⚡ Tech
BroTider
iOS
Swift
Software Engineering

What Building BroTider Taught Me About Live Data

In BroTider, fresh data for boats once appeared under a road label. Here’s what I changed and how I tested it.

Uygar DuzgunUUygar Duzgun
Dec 6, 2026
5 min read

One of the simplest bugs we found while working on BroTider was this: switch from boat mode to road mode on Hisingsbron, and the app could say “Road open” before it had a road update. It had a fresh answer about the fairway. The screen had changed what question it was asking, but the live data underneath it still answered the old one.

I build BroTider for people who want to check a bridge before they set off. For someone looking at their phone before a trip, “Road open” is not a harmless placeholder. It reads like a fact. I wanted the app to say less until it actually knew enough.

Why fresh live data can still be wrong

At Hisingsbron in Gothenburg, “open” is ambiguous on its own. A driver wants to know whether the road is open. A boater wants to know whether the fairway is open. Those can be opposite answers at the same moment.

The state I needed to separate wasn't just “open” from “closed.” It was which question the observation answered. Switching views can change a label immediately. It can't turn one observation into a different one. A timestamp only tells me how recent the answer is; it doesn't tell me whether the answer belongs on this screen.

The fix was to keep one road observation and one fairway observation, each with its own status and timestamp. Road mode reads the road observation. Boat mode reads the fairway observation. If I'm looking at a mode that has no fresh observation of its own, the app shows that the status is unknown instead of guessing.

What I kept, and what I stopped trusting

A failed refresh isn't a report that the road is closed. It also isn't proof that it's still open. In BroTider, a failed fetch doesn't create a new observation or make the previous one younger. If the last observation for that same mode is still fresh, it remains usable; once it ages out, we show uncertainty. A fresh boat update can't extend the lifetime of a road update.

There was another case I didn't want to leave to chance: two requests can come back in a different order than they were sent. The change keeps track of the current request per feed. A late fairway response can't overwrite road status, and a response from a superseded request can't replace the newer road observation.

I apply the same distinction to schedules. The Hisingsbron page separates live status from scheduled opening windows. A schedule is useful for planning, but a planned opening is not a report that the road is blocked right now.

See the difference on the live page

Open Hisingsbron’s Live section and compare the two cards. The road card shows the latest reported status and Senast kontrollerad (last checked). The next-opening card shows a scheduled window. You can compare it with the day's schedule.

BroTider website screenshot showing Hisingsbron open for road traffic with its last-checked time, next to a separate planned opening window of 05:35
BroTider website screenshot showing Hisingsbron open for road traffic with its last-checked time, next to a separate planned opening window of 05:35

In our December 6, 2026 browser check, the road card read Öppen för biltrafik (open for road traffic), while the schedule card showed 05:35. That's a snapshot of what the website reported, not current travel guidance or evidence that the bridge opened at 05:35. This is the public web example; the boat-to-road switch described above is the iPhone app bug we tested separately.

The tests that made the fix real

I wanted the tests to prove which answer the user would see, not merely that the view had switched modes. The regression checks cover these sequences:

A fairway update says open. Switch to road mode before any road update arrives. Road status stays unknown.
The first road request fails. The app still has no road observation to show.
A road response says closed. An open fairway response arrives later. Road mode still says closed, and boat mode can independently show open.
Start two road requests. Let the newer one finish first. The late reply from the older one doesn't change the displayed result.
Let the last road observation expire, then refresh only the fairway. Road mode becomes unknown instead of inheriting the fairway's freshness.

Those are tests of the app's state handling, not a guarantee about every live bridge response. The change shipped in iOS version 1.2.4, listed in the Swedish App Store. When making a real trip, follow the signs and signals at the bridge.

My checklist for any app that shows live data

Write the question your label answers. “Is this road open?” is clearer than “Is the bridge open?”
Store the status with its source and timestamp. Match all three to the thing the user is looking at.
Give missing and stale data a real UI state. Don't silently turn either into “open,” “closed,” or “all clear.”
Test a mode switch while a request is pending. Then reverse the response order and force one request to fail.
Keep a plan separate from an observation. A scheduled time and a current status can both be true without meaning the same thing.

I covered early BroTider work in my July engineering build log. This fix taught me a narrower lesson that I’ll use in other apps: a fresh answer is only useful if it answers the right question.

FAQ

Why keep road and fairway status separate?+
They answer different questions. A fresh signal that boats can pass does not mean the road is open. Each mode needs its own status and freshness check.
What should an app show when live data is missing?+
If there is no still-fresh observation for the selected mode, say that live status is unavailable. Do not borrow a status from a different feed or display a schedule as a live observation.
How do you test responses arriving out of order?+
Use a fake clock and controllable responses. Switch modes, bring replies back in the opposite order, and check that each reply can update only its own signal and that older requests cannot replace newer ones.
✻

Recommended for you

AI Engineering Build Log: What I Shipped in July 2026

AI Engineering Build Log: What I Shipped in July 2026

July's work spanned a notarized macOS release, controlled music-analysis tests, public SEO actors, internal TestFlight builds, and deliberate non-releases.

9 min read
Claude Fable 5.2: Complex Coding, Planning and Research

Claude Fable 5.2: Complex Coding, Planning and Research

Why I use Fable for complex plans, research and codebase-wide features, with Fable 5.2 benchmarks, pricing and independent early tests.

8 min read
Multi-Agent Code Review Workflow: Two Reviewers, One Final Writer

Multi-Agent Code Review Workflow: Two Reviewers, One Final Writer

Two AI sessions inspect one file independently, debate evidence, and hand a structured decision to a third session that writes the final patch.

10 min read