Log flights offline: the form is kept by the service worker, flights queue on the device (IndexedDB) and send when back online; one-time keys prevent duplicates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-11 21:13:59 -05:00
1 parent 08ba017c7e
commit 191eb030e8
14 files changed
+314 -14

No files matched your search

@@ -0,0 +1,8 @@
class AddClientKeyToFlightLogs < ActiveRecord::Migration[8.1]
def change
# A random key from the form, so a flight logged offline and sent again
# (after a dropped connection) isn't saved twice.
add_column :flight_logs, :client_key, :string
add_index :flight_logs, [ :aircraft_id, :client_key ], unique: true
end
end