What people can do on an aircraft now comes from their role there, and
administrators set what each role allows (Admin → Roles).
- Roles are installation-wide sets of permissions (31, grouped as flying,
squawks and notes, maintenance records, imports and exports, the
aircraft, notifications). Seeing an aircraft's records needs none.
- Built in: Owner (always every permission, so an aircraft can always be
managed), Mechanic (shop maintenance: logbook, signing, components,
inspections, ADs, squawks, reminders), Pilot (what pilots could do
before) and Viewer (view only). Administrators can change all but
Owner's, and add their own; a role can be deleted once nobody has it.
- Existing owners and pilots keep exactly what they could do.
- Admin → Users → a user lists their role on every aircraft, to change,
remove or add. On the aircraft's Access page, anyone who manages people
hands out roles, but only an Owner can give or take away Owner, nobody
changes their own (except administrators), and an aircraft always
keeps an Owner (AircraftAccess).
- Controllers declare the permission each action needs; a request that
changes something with none declared is refused (and raises in
development and tests), and a test walks every route to check.
- Weekly reminders and overdue alerts go to roles that get reminders;
the DRS reminder also needs Manage ADs. The API follows the person's
role; its owners_only error is now not_permitted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Edit on a flight: owners can correct any flight; a pilot, the flights
they logged (the same rule as its engine data).
- Date, airports, route, notes, oil and fuel (its oil and fuel records
follow) and the attached files can always be changed.
- The meter readings only on the latest flight, while its tach in is
still the aircraft's tach: the aircraft and installed components move
by the difference, and with both readings the duration is worked out
from them. On earlier flights they're locked (later flights started
from them), pointing to Update Hours; the server ignores them too.
- Each correction is in the activity log with what changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- POST /aircraft/:id/draft_batches turns a visit's work items into one
unsigned entry per logbook, signed in the app (by a user with a
certificate, or a mechanic through a returned or emailed invitation link).
- The squawks they resolve and inspections they complete (with their result)
are held until every entry is signed, then applied, attributed to the last
signer; draft_batch.completed webhook. A draft never clears a squawk alone.
- Drafts are for owners (integrations act for one, drafts:write scope);
unsigned drafts can be withdrawn; lookup by external_ref.
- The signing and entry pages show where a draft came from and what signing
will do.
- The suggested recordkeeping procedures describe the API once it's in use.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Personal tokens (Profile → API tokens) act as their owner; integration
tokens (Admin → Integrations) reach chosen aircraft and scopes, and their
writes name the person they're for (SAM-On-Behalf-Of). Tokens are stored
hashed, shown once, revocable, with last use recorded.
- GET aircraft, components, due list, inspections, ADs, logbook entries and
squawks; POST/PATCH squawks with external_ref links to the other system.
- Idempotency-Key for safe retries, paging, JSON errors, rate limits.
- Record history keeps the token with each change (in the hashed payload).
- Webhooks (squawk created/updated/resolved, entry signed), HMAC-signed,
retried, never sent to the server itself; deliveries listed for admins.
- The outbound address check is shared by AirTrail and webhooks; reporting a
squawk is announced the same way from the form and the API.
- docs/guide/api.md: the API reference.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Refuse to start with a placeholder or short SECRET_KEY_BASE (under 32
characters); warn and fail sam:doctor under 64. .env.example no longer
ships a placeholder.
- First-run setup needs a one-time code printed only in the server log, so
only whoever runs the server can create the admin account.
- AirTrail: the server resolves the address and connects to exactly that;
never the server itself or link-local addresses (cloud metadata);
private-network addresses only for admins or hosts in
AIRTRAIL_ALLOWED_HOSTS.
- Host authorization when APP_HOST is set: APP_HOST, the APP_URL host,
ALLOWED_HOSTS, localhost and IP addresses; /up exempt. A blocked name
gets a short explanation instead of a blank 403.
- docker-compose.direct.yml: HTTPS without a proxy via Thruster's built-in
Let's Encrypt (TLS_DOMAIN).
- Notes' Markdown no longer allows the unused class attribute.
- README, .env.example and the user guide updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Requests run in the viewer's zone: Profile -> Time zone, else their
device's (a tz cookie set from the browser), else the installation's;
times show in it and "today" is the local date (a new flight's date)
- Docker's TZ sets the installation zone (default UTC): scheduled jobs run
on its clock (recurring.yml), and it's used before a device's zone is known
- The weekly reminder email is worked out in the recipient's zone
- Signatures, record history and exports keep exact UTC timestamps
- users.time_zone; README, .env.example and guide updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Offline
- Flights and squawks saved offline are tagged with their user and only sent
while that user is signed in; storage is made persistent; Background Sync
sends them with the app closed (Chromium); unsent count on the app badge
- Report Squawk works offline (photos included, one-time key like flights)
- The Fleet page and, for each of your aircraft, the Overview, W&B, Log
Flight and Report Squawk pages and photo are saved ahead of time, so the
app opens and works without signal; copies say when they were saved
- Sign-out clears saved forms, pages and photos (asks first if items wait)
- Offline page rendered by Rails (localized, follows the theme, no inline
script); service worker version follows the build
Install and notify
- Web Push (web-push gem, VAPID keys from env or storage/vapid_keys.json):
grounding squawks, newly overdue items (daily, once each), signing
requests; per-device on/off and test in Profile -> This device; only
browser push service endpoints accepted
- Manifest shortcuts (Log Flight, Report Squawk via /go/...), lang and
localized description; install help on Profile; reload notice after a
release
Also
- Dockerfile: libssl-dev in the build stage (openssl gem); lockfile checksums
- Leftover English and %{_} interpolation names from the localization pass
- Guide and README updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- more_menu helper (menu / menu-item styles): each section keeps its main
action as a button; imports, exports, printing and tools move under More
(flights, logbook, logbook entry, documents, inspections, fleet)
- Aircraft header: More with status report and, for owners, access &
sharing, edit, .sam.zip and records package; Access & Sharing and Oil
Analysis tabs removed (oil analysis is under Oil & Fuel with a switch)
- Logbook: Print selected appears once an entry is ticked; filters apply on
change; dates use fmt_date (also AirTrail, notes, audits, About)
- Header shows the role on the aircraft and hides the usual Available badge;
no second Grounded badge on the Overview; AD DRS import listed once
- Flights: stat cards 2x2 on phones; By year opens visibly, only with more
than one year; duplicate + Log Flight removed
- Remove unused hello_controller.js; guide and README updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs/guide/disclaimer.md, shown as Help -> Disclaimer: provided as is, not
FAA-approved, user verifies legal and suitable use (43.9/43.11/91.417,
AC 120-78B), status and AD matches don't replace the records or the PIC's
decision, no liability, host responsible for the instance
- README: notice at the top and a Disclaimer section
- Footer notice on every page (app and public layouts), notice on first-run
setup, link from Admin -> About and the guide's start page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Service worker keeps the Log Flight form when opened via Turbo, serves the offline page's script and icon, and treats 502/503/504 as offline; the offline page only links forms actually kept
- Serviced sub-components restart from the airframe time flown since the entry
- New logbook entries can complete inspections (recorded and linked to the entry)
- Components: replacement limit can count from installation (life limit)
- Component-level "Inspect every" / "Inspection critical" removed; a migration converts any unlinked settings into inspection types with a first record; component page lists its inspections
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The report layout now always loads as a full page (turbo-visit-control
reload) and without Turbo (an inline Print handler), so the app's dark theme
isn't carried onto the white report and the report's styles aren't left
behind on Back. Coming due repeated the Airworthiness card, so it's gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Overview: "Coming due" (next 30 days or 10 hours) and "Last flight" (the
most recent day's legs, meters at the end, fuel and oil left).
- Component replace / TBO / inspect intervals, inspection types and ADs take
a number and a days / months / years choice (CalendarInterval). Components
gain month columns (years stored as 12 months; months land on the same
date); inspection types and ADs keep end-of-month. ADs now honour days.
- Due list: hours already run out count as overdue; a component covered by
an inspection type no longer gets its own "Inspect every" item.
- Loading calculator moved to a partial; no limit warnings until a load is
entered. Header buttons don't wrap on phones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shown on Admin -> About, in the software history, records package, procedures
and sam:doctor; release notes in the app under Help.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shared records keep applicability in join tables, so linking to the
airframe or a component, unlinking, edits to the shared record and a
component's deletion are now appended to each affected aircraft's hash
chain. Owners can restore a removed link from Activity -> Record history.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tested against real Federal Register data:
- aircraft searched as make + model ("Cessna" "150L"), which drops the
transport-category ADs that merely contain the model string
- components also searched as maker + type ("Bendix" "magneto"): appliance
ADs usually name a series, not the exact model; "A/B" makers are split
- propellers also searched as maker + "propeller"
- custom terms add to the automatic searches (they used to replace them,
silently turning off engine/component searches); a bare aircraft model is
skipped since make + model covers it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Besides the aircraft and engine/propeller models (and families), each
in-use component is searched as maker + model designator and as
component type + designator (e.g. "Champion 4301", "Magneto 4301"),
so appliance ADs (magnetos, ELTs, radios, transponders) are found
- A match records the component; tracking it makes the AD apply to that
component instead of the airframe (ad_alerts.component_id)
- Page hint, guide and README updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewer compose uses the published image (from docker-compose.image.yml)
and a throwaway secret key, plain HTTP on localhost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- sam:doctor: health report (secret key, address, HTTPS, SMTP and SSO
reachable, Google Drive, migrations, disk, jobs, backup/check/off-site/
procedures/audit recency); exits 1 on a failure
- records:check: backup now + history and signature check; exits 1 on a problem
- backups:list / backups:restore[file]: checks the copy (nightly or Drive
.gz), refuses while the server runs, moves the current DB aside, asks
(CONFIRM=yes to skip)
- users:sign_out_all, sam:records_package[tail], email:test[address],
offsite:backup, offsite:restore_test
- Admin guide: maintenance commands table, restore steps use backups:restore
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Insert suggested text for Hosting and network (HTTPS, sign-in mode,
password/lockout rules, Docker) and Additional procedures (common
Part 91 procedures; electronic-records date filled in), with
[bracketed] blanks for what only the owner knows
- A revision can't be adopted while a [blank] is left (Markdown links ok)
- Generated sections state HTTPS and the sign-in mode from the config
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 10 failed sign-ins in a row (password, authenticator code, or password
at signing) lock an account for 15 minutes from any address; the user
is emailed; admins can unlock. Same message as a wrong password.
- Passwords: at least 12 characters (max 72), refused if found in Have I
Been Pwned (k-anonymity range API; fails open; PWNED_PASSWORDS_CHECK=false)
- Optional TOTP (authenticator app) with 10 recovery codes for password
and emailed-link sign-in, and at signing (auth method password_totp);
codes accepted once; admins can reset; SSO sign-in unaffected
- Demo/test passwords updated; guide, README and procedures document
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
As POH moment-envelope charts and Garmin Pilot give it. Stored as CG
inches (moment x 1000 / weight), shown back as entered with the CG next
to each point; switching the units and saving re-reads the numbers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Admin → Off-site Backup: connect a Google account with your own OAuth
client (drive.file scope; refresh token and secret encrypted)
- Nightly after the verified database backup: upload the gzipped snapshot
(newest N kept, Settings) and every uploaded file not yet copied
- Restore test downloads the newest copy, opens and checks it, and checks
sampled files against their checksums; failures emailed to admins
- About, procedures document, policy completeness and audits use it
- offsite:restore_files rake task; restore steps in the admin guide
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 16 Markdown pages covering every area for pilots, owners, mechanics
and admins, readable on GitHub
- /help renders them with a page list; links between pages work in both
places; only listed pages can be opened
- The electronic records instructions (AC 120-78B user instructions) are
now the guide's records page, also used as the procedures appendix
- Help link in the main menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>