Found auditing CarHey production (Hotwire-Native app on the RailsFast template) ahead of RailsFast v1.0.0.
The gap
app/views/chats/conversations/index.html.erb subscribes with a bare turbo_stream_from chats_current_messager, :chats_inbox and relies on refresh broadcasts for updates. Two loss modes make that subscription silently stale:
- Non-replayable transport: Action Cable / Solid Cable does not replay frames. Any refresh broadcast sent while the client's socket is down (sleep, network blip, backgrounded WebView) is gone forever. This bites hardest on Hotwire Native, where an inbox tab's WebView lives for the whole app session with pull-to-refresh often disabled — a missed frame means the inbox is stale until the user happens to navigate.
- Non-durable debounce:
broadcast_refresh_later_to parks the refresh in Turbo::Debouncer's in-process 0.5s ScheduledTask before the durable job enqueue — a process restart in that window drops the broadcast server-side.
Downstream heal (reference implementation)
CarHey PR #75 wraps the gem's inbox subscription in a stream-reconciler Stimulus controller in recovery-only mode (no polling): it refetches the frame on cable reconnect, foreground-after-hidden, and network-online, debounced. The RailsFast template ships the same primitive as railsfast--turbo--stream-reconciler (interval 0 = recovery-only).
Suggestion
Either ship an equivalent self-contained recovery affordance in the gem's inbox view (so every host app gets it), or document the wrap pattern prominently for Hotwire Native hosts. Happy to upstream the reconciler pattern if useful.
🤖 Generated with Claude Code
Found auditing CarHey production (Hotwire-Native app on the RailsFast template) ahead of RailsFast v1.0.0.
The gap
app/views/chats/conversations/index.html.erbsubscribes with a bareturbo_stream_from chats_current_messager, :chats_inboxand relies on refresh broadcasts for updates. Two loss modes make that subscription silently stale:broadcast_refresh_later_toparks the refresh inTurbo::Debouncer's in-process 0.5s ScheduledTask before the durable job enqueue — a process restart in that window drops the broadcast server-side.Downstream heal (reference implementation)
CarHey PR #75 wraps the gem's inbox subscription in a stream-reconciler Stimulus controller in recovery-only mode (no polling): it refetches the frame on cable reconnect, foreground-after-hidden, and network-online, debounced. The RailsFast template ships the same primitive as
railsfast--turbo--stream-reconciler(interval 0 = recovery-only).Suggestion
Either ship an equivalent self-contained recovery affordance in the gem's inbox view (so every host app gets it), or document the wrap pattern prominently for Hotwire Native hosts. Happy to upstream the reconciler pattern if useful.
🤖 Generated with Claude Code