Turbo Streams: inline “saved” indicator that updates on autosave

10987
0

Users trust autosave when they can see it. I render a small #save_state region (“Saved just now”, “Saving…”, “Offline”) and update it via Turbo Streams. The autosave endpoint returns a stream that replaces the indicator, and optionally updates a hidden draft_id field when the draft is first created. This keeps the UI honest and avoids guessing client-side. I also make sure the indicator is accessible (not just color) and I keep the copy short. This is a great example of why server-rendered HTML works well with Hotwire: you can centralize formatting (timestamps, localization) in Rails helpers and still update live. The response payload is tiny and the implementation is easy to reason about.