Production win
Focus-aware Deal Commitments Refresh
Time-to-current: 3–4s → ~1.5s on re-entry
Architecture diagram
Focus-aware deal room refresh
Active sessions use push updates, while app re-entry triggers a full refetch to restore user trust quickly.
Mobile deal room
Foreground, background, re-entry states
Active session
WebSocket stream
In-session commitment updates
Background gap
Focus listener
Detects app re-entry
Regain focus
Full refetch API
Authoritative commitment snapshot
Fresh snapshot
Client state
Staleness tracking and merge behavior
Trusted UI
Current deal view
Time-to-current ~1.5s on re-entry
- The design separates live updates from return-to-app freshness.
- Extra network work is focused on the moment users need certainty most.
- Staleness tracking made the UI behavior easier to reason about.
This problem lived in a mobile investment deal room where stale data on app re-entry was creating quiet but important trust issues. During an active session, WebSockets kept things reasonably fresh. But when users backgrounded the app, switched tasks, and came back, the screen could lag reality for long enough to make the product feel uncertain.
That matters more in investment workflows than it might in a casual consumer app. When users return to a deal room, they are not just browsing. They want to know whether the numbers on the screen are current enough to act on.
We ended up separating in-session freshness from re-entry freshness. WebSockets continued to handle active-session updates, but when the app regained focus, we triggered a full refetch to bring the user back to current truth quickly. That was a better match for the user moment than pretending the socket stream alone would cover every attention shift.
The measurable improvement was a drop in time-to-current-state from roughly three to four seconds down to around one and a half seconds on re-entry. But the more important change was psychological. Users had less reason to wonder whether what they were seeing was stale.
There is a trade-off here too. The hybrid approach is less clean than the simple story that "real time updates solve this." It adds client logic, state coordination, and extra network calls on focus regain. But that extra work was worth it because the decisive user moment was re-entry, not just background streaming elegance.
This project lines up closely with a point I care about a lot: perceived performance is often the real business problem. If the user is unsure whether the screen is trustworthy, shaving a little backend latency does not fully solve it. You have to decide where certainty matters most, then design around that moment.