100 Commits
Author SHA1 Message Date
rickyandClaude Opus 5.5 6697e835c8 Fix nav/com and navigation database template citations
- "Swapping a tray-mounted nav/com unit" cited Part 43 Appendix A
  (c)(32), which doesn't exist; the item is (c)(31). Its wording now
  names that paragraph's conditions (self-contained, panel-mounted,
  tray-mounted, manufacturer's instructions, operational check before
  use).
- "Updating the navigation database" called itself preventive
  maintenance under (c)(31). 14 CFR 43.3(k) says such an update isn't
  maintenance: it's now an Other entry citing 43.3(k), with no
  certificate type.
- Built-in templates now take their entry type from the YAML (it was
  always Maintenance).
- A migration fixes copies already in the database where an admin
  hasn't changed the text; edited ones are left alone.
- Test: every built-in template is valid and cites an existing
  Appendix A paragraph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:28:23 -05:00
rickyandClaude Opus 5.5 acb8b87ca3 Avionics logbook type
Aircraft with a separate avionics logbook can file radio, transponder and
autopilot work under it: AVIONICS joins Aircraft, Engine, Propeller and
Other everywhere a logbook is chosen or filtered (entry form, logbook
filter, squawk resolution, templates, imports).

- Logbook transcription knows it (schema enum and prompt), so scanned
  avionics pages aren't filed as Aircraft.
- The API's ?log= filter and drafts API accept it; docs updated.
- No migration: log_type is a string column. Existing entries unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 16:28:23 -05:00
rickyandClaude Opus 5.5 a5ca534fd1 2026.11.7: flight correction, configurable roles, invitations, read-only records viewer
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:09:41 -05:00
rickyandClaude Opus 5.5 d956cfbe83 Records package viewer: read-only, no account needed
SAM_VIEWER=true (set only by the records package's
viewer/docker-compose.yml) makes the app a read-only copy of an archive,
for whoever receives the records: `docker compose up`, then open
http://localhost:3000.

- At start (bin/docker-entrypoint → sam:viewer:prepare) the package's
  .sam.zip, mounted read-only, is imported once.
- No sign-in: everyone browses as a built-in account. Nothing can be
  changed: any request but GET/HEAD is refused, no role permission
  applies (so no edit buttons), and there's no sign-out or profile. A
  banner names the archive and when it was exported.
- It refuses to start, and every page answers 503, when the database
  has any other account, so turning it on for a real installation stops
  the app instead of exposing its records.
- The viewer listens on 127.0.0.1 only, and skips scheduled jobs
  (reminders, backups, AD searches).
- Docs: the package README (three steps now), Access & sharing, README
  settings and features, the suggested recordkeeping procedures.

Checked end to end with a built image and a real records package: the
archive imported at start, pages browsed without an account, a change
refused, and the container refusing to start once an account existed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 20:03:56 -05:00
rickyandClaude Opus 5.5 34e3232350 Records package viewer: setup code, release image
The viewer/docker-compose.yml in the records package (and the package's
README) said to just create an account, but first-run setup asks for a
one-time code from the log since 2026.11.5; both now say how to get it,
and the right menu for importing. The viewer runs the published image at
the release that made the package (each release is published under its
version), so whoever opens it later gets that version, not whatever
:latest is then. APP_IMAGE, for a fork, is used as it is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:40:01 -05:00
rickyandClaude Opus 5.5 3ad6b9493a Compose files and .env.example catch up
- The compose files' steps say where the first-run setup code is (it's
  asked for since 2026.11.5), that new accounts come from the admin, and
  who adds aircraft; the published image's release tags are mentioned.
- docker-compose.yml passes APP_REVISION/APP_BUILT_AT to the build when
  set, so a locally built image shows its build on Admin → About.
- .env.example lists the optional push notification keys, APP_LOCALE and
  APP_IMAGE, which the README documented but it didn't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:35:45 -05:00
rickyandClaude Opus 5.5 9adbc3d0a8 Docs: maintenance pages follow roles, adding aircraft
The guide pages written before roles said "owners" for work Mechanics
now do too (logbook entries, corrections, asking someone to sign,
components, resolving squawks, reminders), and the Fleet page didn't say
who can add aircraft. The index lists roles, invitations and the new
setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:30:29 -05:00
rickyandClaude Opus 5.5 c360edfce0 One way to add people on an aircraft
Since invitations from an aircraft's Access page only worked for existing
accounts, they did almost what "Add by email" does. The Access page keeps
adding people by email; new people come through the administrator (Admin
→ Users or Admin → Invitations), and outside mechanics through an Owner's
signing invitation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:18:19 -05:00
rickyandClaude Opus 5.5 9a20c91f5e Owners can invite mechanics again; who adds aircraft is an admin setting
- Admin → Settings → Who can add aircraft: administrators only (the
  default) or everyone. Adding an aircraft or importing a .sam.zip makes
  you its Owner, so this decides who can become one.
- A signing invitation from an Owner of the aircraft (or an
  administrator) lets the outside mechanic create an account for the
  invited address again, with a password or by signing in with SSO;
  checked when it's used. Others' signing invitations still need an
  existing account, and say so.
- Docs: who makes accounts, the new setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:09:49 -05:00
rickyandClaude Opus 5.5 19bc3efa19 New accounts only from an administrator or an administrator's invitation
Anyone can add an aircraft and so manage its people, so invitations from
non-administrators could bring in new accounts without an administrator.

- An invitation makes a new account only if whoever made it is still an
  administrator when it's used; an aircraft's Access page invitations are
  for people who already have an account (its welcome page says so).
- Signing invitations no longer make accounts: the mechanic needs one
  first, and the owner is told when they don't have one.
- With SSO, "Continue with <provider>" on an administrator's invitation
  makes the account and accepts the invitation (only for its address when
  it has one), so invitations work without OIDC_AUTO_CREATE_USERS. That
  setting stays, documented as giving accounts without an invitation; the
  Authentik example now leaves it off.
- Docs: who makes accounts (guide, README, Authentik, .env.example, API).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:00:45 -05:00
rickyandClaude Opus 5.5 b4c7aaa3ff Invitation codes: a link that gives an account and roles
Ported from the original (InvitationCode), adapted to configurable roles.

- Admin → Invitations: a label, optionally one email address (only it can
  use the link, and it's emailed) and a name, how many uses (or
  unlimited), an expiry (or never), and a role on any aircraft (or none,
  for an account only).
- An aircraft's Access page: whoever manages its people invites to that
  aircraft, with only the roles they can give; they see and revoke its
  invitations.
- /join/<code>: shows what it gives; create an account (when password
  sign-in is on) or sign in, then accept. Existing accounts and SSO users
  accept too. A role someone already has on an aircraft stays.
- Roles are given as the invitation's creator (AircraftAccess), and only
  while they can still manage that aircraft's people. Codes are kept as
  digests and shown once; uses are counted under a lock; account creation
  and accepting are rate-limited; any invalid link gets the same answer.
- Docs: guide (Administration, Access & sharing), README, and why /join
  isn't on the Authentik bypass list. The README's not-yet-ported list
  now names Prometheus metrics, and no longer claims oil analysis import
  as new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 18:50:58 -05:00
rickyandClaude Opus 5.5 a645778f26 Docs catch up with today's changes
- User guide: the connection status (red top bar, the ring), a weak
  signal counting as none for flights and squawks, the offline page for
  any other page, PDFs on phones, the activity log loading as you scroll,
  What's new on About, Aircraft access on Admin → Users, and grounding
  squawks notifying everyone on the aircraft.
- README: the configurable roles table, feature rows for phones and
  offline and the REST API, and rows that said "Owners can…".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 18:32:42 -05:00
rickyandClaude Opus 5.5 3e5d896662 Locked flight readings look locked
The tach and Hobbs fields of an earlier flight were disabled but looked
like any other field. Disabled fields now look it everywhere (grey,
muted text, a not-allowed cursor), and the flight form marks its locked
readings "Locked".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 17:58:47 -05:00
rickyandClaude Opus 5.5 d8cd462194 Configurable roles: Owner, Mechanic, Pilot, Viewer and custom roles
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>
2026-11-15 17:43:38 -05:00
rickyandClaude Opus 5.5 d2cd60c6a7 Flights can be corrected after they're saved
- 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>
2026-11-15 17:12:05 -05:00
rickyandClaude Opus 5.5 34879e7310 2026.11.6: PDFs on phones, connection status, weak signal, activity paging, REST API
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:40:10 -05:00
rickyandClaude Opus 5.5 e8b0cd030e What's new stays short as releases pile up
- Admin → About shows the running version's release notes, with a link
  to all releases.
- The What's new page keeps the running version (and any newer) open and
  folds each older release to one line, grouped by month: its version
  and a count of its changes, fixes and notes for administrators.
- CHANGELOG.md itself is unchanged and reads the same on GitHub; the
  app splits it into releases when shown (Changelog).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:38:45 -05:00
rickyandClaude Opus 5.5 e4bc3a5b7b Weak signal counts as no signal
With a signal so weak requests hang, the phone still says it's online, so
nothing fell back: Log Flight waited minutes with no feedback, and pages
never reached the offline page.

- Log Flight and Report Squawk say "Sending…" and, after 10 seconds
  without an answer (60 with photos), keep the entry on the device as
  with no signal. When the top bar is already red they keep it right
  away. If it got through after all, the copy sent later is dropped
  (same client_key).
- What's kept on the device isn't sent while the top bar is red, gives
  up after 15 seconds, and goes again as soon as the server answers.
- Every page of the app falls back to its kept copy or the offline page:
  after 10 seconds, then 3 while requests keep failing, and at once right
  after a failure. Downloads made while you wait (.sam.zip, records
  package, PDFs) have no time limit.

Checked on an Android 14 emulator with a connection that accepts
requests and never answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:34:13 -05:00
rickyandClaude Opus 5.5 d9de1be562 Connection status in the top bar, as SilverBullet does
- The top bar (and the phone's status bar) turns red when the server
  can't be reached: the device is offline, or a request failed (signal
  but no internet, or the proxy answering for the app). While red it
  checks /up every 15 seconds and turns back on its own.
- A ring fills while pages are saved for offline use or flights and
  squawks logged offline are sent, with the percentage in its middle,
  and hides when done. While some wait to send, it's amber with how many.

Checked on an Android 14 emulator: airplane mode on and off, saving for
offline, and a flight logged offline then sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:15:50 -05:00
rickyandClaude Opus 5.5 66fa5f4423 PDFs show on phones, drawn with PDF.js
Android shows nothing for a PDF in a frame and iPhones only its first
page. On touch screens the document viewer now draws every page with
PDF.js 6.5.438 (vendored in public/pdfjs/<version>/, loaded only there);
desktop browsers keep their own viewer in the frame.

- Pages are drawn as they come near the screen and let go once far from
  it, so a long manual doesn't use up a phone's memory.
- Only the parts of the file those pages need are downloaded: uploaded
  files now send Accept-Ranges, and PDF.js's background fetch of the
  whole file is off.
- JBIG2/JPEG 2000 scans decode (wasm, with JS fallbacks).

Checked on an Android 14 emulator with Chromium 160 (which reports
pdfViewerEnabled but can't show a PDF in a frame).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:15:45 -05:00
rickyandClaude Opus 5.5 2e8d789975 Activity log loads as you scroll
The activity log stopped at 200 events. It now loads 50 at a time, the
next page coming in a lazy frame as it scrolls into view (as Oil & Fuel
does), keeping the category filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 13:15:33 -05:00
rickyandClaude Opus 5.5 e4c27c6ff7 API: draft logbook entries for signing
- 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>
2026-11-14 19:11:38 -05:00
rickyandClaude Opus 5.5 bffdea937c REST API v1: tokens, read endpoints, squawks, webhooks
- 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>
2026-11-14 19:05:10 -05:00
rickyandClaude Opus 5.5 ec0f43019f Favicon matches the app icon
The white plane in a blue ring on the dark rounded square, tuned to read
at 16 px, instead of the plane emoji (which looked different everywhere).
Adds favicon.ico (16/32/48) for browsers and tools that ask for it, busts
the cached SVG with ?v=2, and keeps it with the offline page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 14:37:30 -05:00
rickyandClaude Opus 5.5 291990412e 2026.11.5: faster photos, phone-friendly cards, profile layout, push diagnostics, hardening
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:33:22 -05:00
rickyandClaude Opus 5.5 a2672b99a3 Restore thumbnails for photos recorded without dimensions
Photos uploaded before image processing was installed are marked analyzed
with no width, so the "unreadable image" check showed them as file links.
Every resizable image gets a thumbnail again; one that can't be read still
falls back to the original when resizing fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:26:28 -05:00
rickyandClaude Opus 5.5 908c943e21 Fix crashes found by fuzzing malformed input
- Components can't be made into a parent loop, and the parts tree walks
  stop safely if one exists (logbook entry and squawk resolution pages
  crashed).
- A rejected aircraft photo no longer breaks the edit page; empty photos
  are refused; images that can't be read aren't resized, and a failed
  resize sends the original instead of an error.
- Unsupported formats (/report.pdf…) answer 406; tampered upload
  references, out-of-range numbers and constraint violations get a form
  message instead of a 500; requests with null bytes are refused (400).
- Blank values in required columns with defaults take the default;
  optional links to records that don't exist are validation errors.
- Imports (oil report, logbook scans, .sam.zip) accept only uploaded files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 13:17:43 -05:00
rickyandClaude Opus 5.5 5876c07a1a Harden installs reachable from the internet without a proxy
- 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>
2026-11-14 12:42:53 -05:00
rickyandClaude Opus 5.5 faae719b12 Profile: two columns on wide screens
The account and its security (sign-on, two-factor, sessions) on the left,
calendar, certificates, this device and integrations on the right; one
column on phones. The account form gets a title like the other cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 12:10:32 -05:00
ricky e199e6feeb Add LICENSE file with public domain declaration 2026-11-14 12:07:29 -05:00
rickyandClaude Opus 5.5 d4b71d17a1 Smaller aircraft photos, one-row-per-item detail cards, push diagnostics
- Aircraft photos get 192px and 960x432 copies made on upload; the header,
  share page and Fleet cards use them (and the offline copies), instead of
  the full original.
- Flight, engine data, component and major record details show one label
  and value per row on phones (wide items no longer add grid columns).
- Profile re-records this device's push subscription on every visit, and
  says why if it can't; Send test delivers now and lists each device's
  result; Google's other push hosts are accepted; turning notifications on
  shows the browser's actual error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:55:11 -05:00
rickyandClaude Opus 5.5 3f314a13bb 2026.11.4: time zones, Update Hours confirmation, squawk thumbnails, workflow polish
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:51:22 -05:00
rickyandClaude Opus 5.5 9662c7ae16 Time zones: each person's own, and TZ for the installation
- 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>
2026-11-14 07:49:22 -05:00
rickyandClaude Opus 5.5 03b9ad65cb Workflow polish: setup checklist, next leg, grouped component limits
- Setup checklist on a new aircraft's Overview (owners): components,
  standard inspections, DRS AD import, registration/airworthiness
  certificate, weight and balance; hideable per device
- Log Flight: "Save and log next leg" reopens the form on the same date,
  starting where the leg ended
- Component form: limits in two collapsible groups (replacement and expiry;
  overhaul and TBO), open when in use
- Squawk form warns what "Ground Aircraft" does
- Logbook entry form: inspection result only for inspection entries
  (show-when controller); document names default from the file
- Dates in pickers, the activity log, airworthiness lines, search, audits
  and transcription notes use the app format
- No duplicate Report Squawk button on Squawks; "Record service" label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:43:03 -05:00
rickyandClaude Opus 5.5 3452a35896 Aircraft description stays inside the Details card
simple_format makes paragraphs, so the padded box around them is a div:
inside a <p> the browser closed it early and the text spilled out unstyled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:22:30 -05:00
rickyandClaude Opus 5.5 79a64cc208 Squawk photos as thumbnails
- Photos show as 64px thumbnails (160px resized copies, made once with
  libvips and kept; lazy-loaded) that open the in-app viewer, which has
  Download; other files keep their name chip and download link
- image_processing gem and the vips variant processor (libvips was already
  in the image)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:16:46 -05:00
rickyandClaude Opus 5.5 9d3643df33 Sticky solid top bar so iPadOS doesn't blur it in the home-screen app
iOS/iPadOS 26 draws a blur over the top of home-screen web apps; with a
solid, full-width bar stuck to the top edge WebKit extends its color
instead. The status banners now sit just below the bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:01:12 -05:00
rickyandClaude Opus 5.5 cce1ce51b5 Confirm Update Hours and say what changed
- Updating the meters without a flight asks first, showing each reading's
  change, that every in-service component moves and no flight is logged,
  and a warning when a reading goes down; unchanged readings aren't sent
- The flash lists each changed reading (old -> new, difference) and how far
  the components moved; a lowered reading is labelled a correction

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:51:22 -05:00
rickyandClaude Opus 5.5 f534541467 2026.11.3: installed app works offline, notifications, More menus, translatable text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:40:49 -05:00
rickyandClaude Opus 5.5 8d5f57da81 Installed app: offline squawks and pre-flight pages, push notifications, shortcuts
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>
2026-11-13 22:39:42 -05:00
rickyandClaude Opus 5.5 89ed0a76f9 Move all user-facing text into config/locales/en.yml for localization
- Views use lazy t(".key") lookups; sentences with values or links stay
  whole (interpolation, _html keys); counts use one/other plurals
- Stored-value labels (statuses, types, priorities...) are LabelSets read
  from labels: in the current locale; field names and validation messages
  under activerecord:; flash and activity text under flash:
- Services, models, helpers, mailer subjects, the logbook PDF, procedures
  templates, records package README and transcription warnings localized;
  the PDF reuses LogbookEntry#certification_statement instead of a copy
- Scripts read js: strings from a JSON tag via app/javascript/i18n.js
- Dates through I18n.l (app, weekday, month_year, long formats); html lang
  follows the locale
- APP_LOCALE picks the language (falls back to English); missing
  translations raise in development and tests
- README: Translating section and APP_LOCALE

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:08:20 -05:00
rickyandClaude Opus 5.5 3f45b557c2 Secondary actions behind More menus; tidier aircraft header and tabs
- 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>
2026-11-13 21:21:57 -05:00
rickyandClaude Opus 5.5 bff6a05173 Remove orphaned code and unused Solid Cable; simplify compliance status
- Delete methods nothing calls: BackupRun.last_good, EntrySignature#short_id,
  Sso#issuer_origin, InspectionType#effect_label and #latest_record_for,
  ApplicationHelper#airworthiness_dot, Airworthiness::Status#can_fly? and
  FlightStats#shortest_flight (tests now check red? / longest_flight)
- Routes: sessions and passwords limited to the actions that exist
- Theme toggle: drop the unused button target
- Action Cable was never used (no broadcasts or streams): async adapter in
  production, solid_cable gem, cable database and app/channels removed
- Empty system test setup removed with capybara and selenium-webdriver
- Compliance: one due_result helper for overdue / due soon; inspections use
  next_due for the date, as ADs do
- applicable_to moved into SharedRecordHistory (was identical in ADs and
  inspection types)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:04:41 -05:00
rickyandClaude Opus 5.5 e939d29deb 2026.11.2: disclaimer (no warranty; verifying legal use is up to the user)
- 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>
2026-11-13 18:11:20 -05:00
rickyandClaude Opus 5.5 352a38c7fb 2026.11.1: offline flight logging fixed, inspections from logbook entries, life limits from installation, component inspections moved to inspection types
- 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>
2026-11-12 07:30:59 -05:00
rickyandClaude Opus 5.5 7552e4a8a3 Status report readable in dark mode and Back no longer breaks the theme; drop the Overview's Coming due card
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>
2026-11-11 21:45:54 -05:00
rickyandClaude Opus 5.5 31ac991bab Overview shows coming due and the last flight; intervals in days, months or years
- 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>
2026-11-11 21:40:14 -05:00
rickyandClaude Opus 5.5 215efe6814 Consistency and accessibility: one date/time format, lang, skip link, focus outlines, alt text, labelled icons, contrast; release notes updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:17:26 -05:00
rickyandClaude Opus 5.5 191eb030e8 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>
2026-11-11 21:13:59 -05:00
rickyandClaude Opus 5.5 08ba017c7e Search inside documents: PDF text, Tesseract OCR for scans (in the image), optional Claude; nightly catch-up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:09:12 -05:00
rickyandClaude Opus 5.5 2953b9a18d Search across the logbook, squawks, notes, ADs, documents, components, flights and major records (top bar)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:05:27 -05:00
rickyandClaude Opus 5.5 8c8e3b7374 Versions: year.month.release (VERSION) plus build (commit); What's new from CHANGELOG.md
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>
2026-11-11 21:03:31 -05:00
rickyandClaude Opus 5.5 98e943cf0a Calendar feed: due items (inspections, ADs, component limits, documents) as a private iCalendar link, hour-based dates projected from the past year's flying
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:00:30 -05:00
rickyandClaude Opus 5.5 87e30946fe Logbook: a new entry can mark its sub-components serviced or replaced on the Components tab, dated to the entry
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:57:18 -05:00
rickyandClaude Opus 5.5 8bea2abf75 AD baseline: record DRS imports and the models they covered; weekly search starts from the last import; reminders and audit check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:56:20 -05:00
rickyandClaude Opus 5.5 ba0455b149 Record history for ADs and inspection types (applicability links and changes), with restore
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>
2026-11-11 20:54:35 -05:00
rickyandClaude Opus 5.5 d5d06d4169 Tests: dummy names instead of a real one
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:52:52 -05:00
rickyandClaude Opus 5.5 6e871e9ebb Documents: collections (and Uncollected) collapse, closed by default, with document counts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:31:02 -05:00
rickyandClaude Opus 5.5 85326d494c Oil & Fuel: records load 50 at a time, the rest as you scroll (all records reachable; was capped at 200)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:27:48 -05:00
rickyandClaude Opus 5.5 455a26a346 Flights tab: load the flight log 30 days at a time, the rest as you scroll (lazy Turbo frames)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:22:02 -05:00
rickyandClaude Opus 5.5 7dbf180f76 Flights tab: flight log grouped by day (route chain, tach/Hobbs/fuel/oil totals), expand for the legs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 18:44:11 -05:00
rickyandClaude Opus 5.5 0db17b3ba6 AD search: make + model for the aircraft, maker + type for components, additive custom terms
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>
2026-11-09 21:12:41 -05:00
rickyandClaude Opus 5.5 d2f5ce1e92 New-AD search covers every installed component
- 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>
2026-11-09 21:05:07 -05:00
rickyandClaude Opus 5.5 afaa1ca191 Records package: README explains viewing the data locally, links the source; includes viewer/docker-compose.yml
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>
2026-11-08 07:05:43 -05:00
rickyandClaude Opus 5.5 3f390f3366 Import accepts a records package (uses the .sam.zip inside it)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 06:53:33 -05:00
rickyandClaude Opus 5.5 87d25f141a Exports download as one file: octet-stream (Safari no longer unzips them); importer accepts a re-zipped folder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 06:49:07 -05:00
rickyandClaude Opus 5.5 0fd795440d AD search: also look for the engine/propeller model family (O-200A -> O-200)
ADs usually name the family or spell the suffix differently (O-200-A),
so an exact-model search could miss them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:05:12 -05:00
rickyandClaude Opus 5.5 350914bddc Declare UTF-8 in HTML layouts; byte order mark on packaged CSVs
Packaged HTML opened from disk had no charset, so browsers guessed
Windows-1252 and em dashes showed as mojibake; Excel does the same with
CSVs that lack a BOM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 17:24:53 -05:00
rickyandClaude Opus 5.5 5471b9317f Records package: intact status-report styles, no in-app controls; on-condition TSO
- Inlining CSS used String#sub with a replacement string, so "\&" in
  escaped selectors became "</head>"; use block replacements
- Packaged status report and procedures omit the Back link, the print
  button and the favicon link (they don't work outside the app)
- Status report: "On condition (Part 91)" as Tracked as, with remaining
  hours shown for reference; on condition clears the hard-limit flag

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 17:21:58 -05:00
rickyandClaude Opus 5.5 2fe2f464c1 Docker examples use the published Docker Hub image
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 16:52:17 -05:00
rickyandClaude Opus 5.5 a6e5c4343f Docker: complete .env.example, image-based and Traefik compose examples, health checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 16:49:37 -05:00
rickyandClaude Opus 5.5 1412470cd5 Maintenance commands: doctor, records check, restore, sign out all, more
- 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>
2026-11-07 16:42:52 -05:00
rickyandClaude Opus 5.5 20fe485f10 Account recovery from the command line (bin/rails users:*)
list, reset_password (generated, shown once; unlocks and signs out),
sign_in_link (one-time, 15 min), unlock, reset_two_factor, enable,
disable, make_admin, create_admin. Logged; documented in the admin
guide and README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 16:36:58 -05:00
rickyandClaude Opus 5.5 76643de2e7 Procedures: suggested text from the installation's settings; blanks block adoption
- 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>
2026-11-07 15:35:41 -05:00
rickyandClaude Opus 5.5 90e68711a0 Procedures: hosting and additional procedures render as Markdown (paragraphs, bold)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 15:28:02 -05:00
rickyandClaude Opus 5.5 f2e4fd0beb Authentik reference: SSO, forward auth and the unauthenticated URL list
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 15:22:44 -05:00
rickyandClaude Opus 5.5 14316bb60f Sign-in hardening: lockout, stronger passwords, authenticator codes
- 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>
2026-11-07 15:17:56 -05:00
rickyandClaude Opus 5.5 a6bfe922be README: bring up to date (SSO is ported, stack, env vars, roles, features)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 14:53:58 -05:00
rickyandClaude Opus 5.5 9d9aad7318 Loading setup: station headers line up with their columns
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 14:47:21 -05:00
rickyandClaude Opus 5.5 c822bda779 CG envelope can be entered as moment (lb-in/1000)
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>
2026-11-07 14:42:44 -05:00
rickyandClaude Opus 5.5 7694719582 Off-site backup to Google Drive
- 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>
2026-11-07 13:51:45 -05:00
rickyandClaude Opus 5.5 fe3fba1736 User guide in docs/guide, shown in the app under Help
- 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>
2026-11-07 13:40:09 -05:00
rickyandClaude Opus 5.5 761f381679 Recordkeeping procedures, QC audits and user instructions (AC 120-78B)
- Admin → Recordkeeping Procedures: generated procedures document
  (2.2.11 / 3.2.8) from the system setup plus owner-entered details;
  adopted as numbered, immutable revisions; included in the records package
- Admin → Records Audits: periodic QC checklist (3.2.8.5) combining app
  checks with a restore test, sampled entries vs. source documents and a
  user review; next due date on About and in admins' weekly reminder
- User instructions at /help/records, linked from the logbook and signing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:30:46 -05:00
rickyandClaude Opus 5.5 68a1719db2 Records integrity: history, nightly backup and check, records package
AC 120-78B chapter 3:
- Every change to logbook entries, sub-components, signatures, inspection
  records, AD compliance, major records, W&B, components, squawks and
  documents is kept as a RecordVersion (who, IP, when, field changes),
  hash-chained per aircraft; versions can't be edited or deleted. Shown on
  each logbook entry and in Activity -> Record history
- Nightly job: SQLite online-backup copy to storage/backups, verified
  (integrity_check + record counts), pruned to the configured number; then
  an integrity check of the history chains and every signature's seal and
  fingerprint. Results on Admin -> About ("Back up and check now"); admins
  are emailed on failure
- Software versions recorded (first/last seen) on Admin -> About
- Records package (Access & Sharing): logbook entries PDF with signatures,
  signatures.csv, record-history.csv, self-contained status report HTML,
  the .sam.zip, and a README, for the FAA/NTSB or a buyer
- Legacy (paper) records: documents can be marked as legacy records;
  aircraft have an "electronic records since" date (status report, package)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:21:26 -05:00
rickyandClaude Opus 5.5 d719f663bc Electronic signatures on logbook entries (AC 120-78B chapter 2)
- Sign an entry: review exactly what's certified, choose a current
  certificate (eligibility checked: pilot only for preventive maintenance,
  inspections need their result and time), re-enter the password or sign
  in again with SSO (prompt=login, within 5 minutes), and confirm the
  "Certified by" statement (43.9 return to service, 43.11(a)(5) for
  inspections, preventive maintenance for pilots)
- The signature stores signer, certificate, statement, UTC time, how they
  authenticated, IP/browser, a SHA-256 fingerprint of the entry's content
  and a readable snapshot; an HMAC seal covers the signature record. Status
  shows Valid / Superseded / Altered since signing. The signer is emailed
- Signed entries (and their sub-components) can't be edited or deleted;
  a correction entry, once signed, supersedes the original (kept)
- Owners invite an outside mechanic by email to sign one entry: one-time,
  14-day link; they create or use their own account and certificate and
  see only that entry
- Admins can disable accounts (signed out, can't sign in or sign; past
  signatures kept); users with signatures can't be deleted
- Printouts show the electronic signature and fingerprint; archives carry
  signatures (marked imported, with their origin) and corrections

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:12:04 -05:00
rickyandClaude Opus 5.5 7caa213e7a Sub-components on logbook entries (e.g. the oil filter on the engine)
- Once a component is chosen, its sub-components are offered on the entry
  form (and the squawk Resolve page); ticked ones are saved with their
  total time and time since service, worked out from the airframe total
  time like the component's (editable; blank before it was installed)
- Entry page and printed PDFs list each sub-component with its serial
  number and times; parts without an overhaul type read "Since service"
- Archives carry them: the original format's list of components per entry
  (first = the entry's component, the rest = sub-components)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 12:54:49 -05:00
rickyandClaude Opus 5.5 72e1d7760f Editable logbook templates; component times follow the airframe time
- Templates move to the database (Admin -> Logbook templates: add, edit,
  delete, restore the built-in ones). The built-in preventive maintenance
  set is added once on first use; deletions stick. A template can set the
  entry type, logbook (picking the matching component) and certificate
- Template list shows "Name — Part 43 App. A (c)(6), (c)(23)" instead of
  the doubled parentheses
- Component total time and time since overhaul are worked out from the
  entry's airframe total time (current times shifted by the difference);
  blank when the entry predates the overhaul; typing them stops the
  automatic updates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:40:23 -05:00
rickyandClaude Opus 5.5 a51f78ebf3 Logbook entries link a component and its times; boxed page printouts
- An entry can link a component (engine, propeller…) and records its total
  time and time since overhaul at the entry; picking the engine or prop log
  selects that component and fills its current times (editable). Squawk
  fixes carry the squawk's component
- Components have an overhaul type (major, factory overhaul, factory new),
  shown as SMOH / SFOH / SNEW
- Printouts: engine and propeller entries add the serial number, total
  time and SMOH/SFOH (blanks when no component is linked); airframe total
  time is labelled as such; full-page layouts draw a box around each entry
- Archives carry the entry's component and times (the original format's
  components / component_hours), no longer dropped on import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:19:44 -05:00
rickyandClaude Opus 5.5 aa262065b2 Certificates on user profiles, with "Sign as"
- Users add their FAA certificates (kind, number, optional expiry) on
  their profile; admins see them on the Users list
- "Sign as" on new/edited logbook entries and the squawk Resolve page
  fills the signer's name, kind of certificate and number (expired
  certificates aren't offered); deferrals default to mechanic for users
  with a mechanic certificate
- Weekly reminder lists certificates expiring within 60 days (or lapsed
  in the last 30), even when nothing else is due
- Preventive maintenance templates keep a certificate already chosen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 11:08:21 -05:00
rickyandClaude Opus 5.5 5584ad59c5 Printable logbook entries (PDF) for the paper logbook
- Print one entry or several (tick them on the logbook list) as a PDF:
  Avery 5164/8164 or 5163/8163 adhesive labels (start at any label on a
  partly used sheet), or half-letter / letter pages
- Each entry has the aircraft and serial, log, date, total time in
  service, the work, the signer's name and certificate, and a blank line
  to sign by hand; inspection entries with a recorded result get the
  43.11(a)(5) statement unless the text already certifies
- Labels: long entries shrink to fit, then continue on the next label.
  Pages: entries follow one another with their signature lines, numbered
- Generated with Prawn (built-in fonts; unsupported characters become ?)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:59:58 -05:00
rickyandClaude Opus 5.5 6cab81332e Unverified transcriptions, PM templates, ICA inspections, W&B, AD watch
- Entries transcribed by Claude are unverified (with Claude's confidence)
  until an owner checks them against the scan: badge, filter, "mark
  verified" stepping through the rest
- Preventive maintenance templates on new logbook entries, keyed to Part 43
  Appendix A(c), setting the entry type and pilot certificate (43.3(g))
- An STC's ICA can become a tracked recurring inspection, linked from its
  major record
- Weight & balance: history of empty weight/CG (linked to the 337 that
  changed them), loading stations and CG envelope from the POH, and a live
  calculator for takeoff and landing weight/CG; shown on the status report
- New ADs: weekly Federal Register search per aircraft (aircraft, engine
  and propeller models, or custom terms); track or dismiss each; included
  in the weekly reminder
- Archives carry the new records; brakeman: explicit params, reviewed
  About-page links

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:49:29 -05:00
rickyandClaude Opus 5.5 bed07386ef About page links to the source code and the running commit
APP_REPOSITORY_URL overrides the repository for a fork.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:38:41 -05:00
rickyandClaude Opus 5.5 61c3749793 Deferrals, expirations, standard inspections, reminders, squawk fixes
- Squawks: defer an inoperative item under 91.213(d) once each condition
  is confirmed (pilots may too); deferred items stop grounding and are
  listed for awareness. Resolving can record the fix as a logbook entry
  (43.9 fields) or link an existing one
- Expiration dates on components (ELT battery, 91.207(c)) and documents;
  new document types (registration, airworthiness certificate, insurance,
  radio license). Expired replacement-critical parts and an expired
  registration (91.203) ground; others warn; registration warns 90 days out
- Standard inspections: one click adds annual, 100-hour, 91.411, 91.413,
  ELT (91.207(d)) and VOR (91.171) checks with the right rules, skipping
  ones already tracked and linking annual to 100-hour
- Weekly Monday reminder email to owners when something needs attention;
  profile opt-out; admin "send me this week's reminder"
- README feature table updated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:24:33 -05:00
rickyandClaude Opus 5.5 a4ec7a691e Record keeping: 43.9/43.11 sign-off fields, AD method, status report
- Logbook entries record the signer's kind of certificate and number and
  an inspection's result; maintenance and inspection entries list what
  43.9 / 43.11 needs that's missing (flagged, not enforced). Transcription
  reads the certificate details too
- AD compliance records the method (inspection, terminating action, AMOC,
  not applicable) and the AD revision complied with, filled in from the AD
  when blank; the method sets the permanent / N/A flags
- Maintenance status report (91.417(a)(2)): total times, life-limited
  parts, time since overhaul, inspection and AD status, major alterations,
  open discrepancies; print or save as PDF; on maintenance share links too
- Archives carry the new fields

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:14:21 -05:00
rickyandClaude Opus 5.5 a4b72cf2c1 Part 91 inspection rules: limitations, annual as 100-hour, overrun, clock
- Inspection types say what overdue means: grounds the aircraft, no IFR
  (91.411), no transponder (91.413) or advisory. Overdue limitations show
  as a new LIMITED status ("VFR only", "No transponder") and don't block
  flights under airworthiness enforcement
- "Also counts as": an annual satisfies the 100-hour (91.409(b))
- Overrun allowance: a 100-hour done within 10 hrs of due counts the next
  one from when it was due; done early, from when it was done
- Per-aircraft maintenance clock (tach or Hobbs) for time in service; new
  records default to it (fixes the tach-offset mismatch)
- Status labels Current / Due soon / limitation / Grounded, with the
  91.7 pilot-in-command note
- Migration converts existing types by name; archives carry the new fields

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 10:04:46 -05:00
rickyandClaude Opus 5.5 ef7cd2efba Admin setting for the maximum upload size
- Admin -> Settings: maximum upload size per file (1-1024 MB, default 50),
  stored in a new settings table and read on each use, so a change applies
  to every process at once
- Enforced by attachment validation and the direct-upload endpoint; upload
  forms, bulk upload and Admin -> About show the current limit
- .sam.zip import accepts files up to 1 GB to match

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 09:45:12 -05:00
rickyandClaude Opus 5.5 4f548f3874 Email test button and sign-in by emailed link
- Admin -> About: Email card (delivery, server, encryption, login name,
  From; never the password) and a "Send test email" button that sends
  immediately and shows the SMTP error if it fails
- SMTP: implicit TLS on port 465 (or SMTP_TLS=true), auth only with a
  username, 10-15 s timeouts
- "Email me a sign-in link": single-use (spent by any later sign-in via a
  monotonic users.last_signed_in_at), 15-minute expiry, confirm step so
  mail scanners can't use it up, same answer for unknown addresses, rate
  limited, off when PASSWORD_LOGIN=false
- Admin -> Users shows last sign-in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 09:27:57 -05:00
rickyandClaude Opus 5.5 2b0a2f1949 Ruby 4.0.9, Rails 8.1 defaults, newest gems; admin About page
- Ruby 3.2.3 (end of life) -> 4.0.9 in the Docker image and .ruby-version
- config.load_defaults 8.1
- All gems at their newest compatible versions, including json 3.1,
  roo 4.0, rubyzip 3.7 and solid_cable 4.1
- Admin -> About: running revision and build time, uptime, Ruby/Rails/
  SQLite and key gem versions, which features are configured (never
  secret values), storage and database sizes, background job health,
  record counts. The image takes APP_REVISION and APP_BUILT_AT build args.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 08:56:14 -05:00
rickyandClaude Opus 5.5 ac4da93aaf Security hardening and OpenID Connect single sign-on
- SSO via OmniAuth OpenID Connect (Authentik, Keycloak, …): link by stable
  subject, by verified email, or from the profile; optional auto-create,
  admin-group sync, and turning password sign-in off
- Current password required to change email or password; password changes
  and resets sign out other sessions; idle sessions expire after 30 days;
  "sign out everywhere else"; session reset on sign-in
- Rate-limit password resets; scope squawk components to the aircraft
- Strict Content Security Policy with nonces (inline handlers removed),
  Permissions-Policy and COOP headers; file links expire after an hour

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 08:38:25 -05:00
rickyandClaude Opus 5.5 2bfcb845ca Bulk document upload and deduplicated file storage
- Bulk Upload page: pick many files or a folder; each file becomes a
  document named after it, and files sharing a name become one multi-page
  document. Files go up as direct uploads with per-file progress.
- Direct uploads require a signed-in user and check type/size up front;
  only fresh, unattached blobs can be attached; abandoned uploads are
  purged nightly.
- DedupDisk storage service: each distinct file is stored once under its
  SHA-256 and blobs hard-link to it; nightly sweep (and storage:dedupe)
  links pre-existing duplicates and drops unused objects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 08:20:22 -05:00