Commit Graph
15 Commits
Author SHA1 Message Date
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 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 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 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 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 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 1c6c2f88c0 Blackstone oil analysis, .sam.zip export/import, AI logbook transcription
- Oil analysis: Blackstone PDF import (20 elements, oil properties, universal
  averages), results stored per element, oil type, "leave out of trends",
  the original app's statuses; AvLab fixes (multi-line comments, unrelated
  labels no longer steal values). Existing records migrate.
- Aircraft archives in the original app's .sam.zip format (schema v2): export
  from Access & Sharing, background import from the Fleet page, rake tasks.
  Archives move both ways between this app and the original.
- Scanned logbook pages (images or PDFs) upload as a document; with
  ANTHROPIC_API_KEY set, Claude transcribes them into logbook entries.
- Fix: deleting a component or aircraft failed when AD compliances or
  inspection records pointed at a component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:05:19 -05:00
rickyandClaude Opus 5.5 2d068e1a63 Interactive engine data charts: click to zoom, crosshair readout, range stats
Clicking a chart opens a viewer with higher-resolution data (new JSON
endpoint, fetched once): drag to zoom, tabs keep the zoom across metrics,
legend toggles, and min/avg/max for the visible range in monitor time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:42:24 -05:00
rickyandClaude Opus 5.5 d519aa9aae Track oil analysis reports; import AvLab PDFs
New Oil Analysis tab: one record per oil sample with dates, hours, the lab's
verdict and comments, ppm results for 12 wear metals with the lab's averages,
and the report PDF. Shows wear-metal trends, a side-by-side history table,
and flags readings 1.5x or more above the lab average.

AvLab report PDFs can be imported: every sample on the report (current and
previous) is added unless already recorded, the engine is matched by serial
number, and reports for another tail number are refused. The parser reads
positioned text and drops the hidden color-code layer that overlaps results.

Adds the pdf-reader gem. Test fixture is a rebuilt report with a dummy header.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 06:12:51 -05:00
rickyandClaude Opus 5.5 6c6e7af8e6 Add engine monitor data (CGR-30P/CGR-30C) to flight logs
Attach a CGR-30 flight recording when logging a flight or later from the
flight page. The flight page shows engine run time, fuel burned, tach and
engine hours, peak RPM/EGT/CHT/oil/fuel flow, and charts per cylinder.
Unreadable files are rejected; recordings from another tail are flagged.

Also replace the real tail number in test data with N12345.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 20:25:18 -05:00
rickyandClaude Opus 5.5 5bf682502b AirTrail sync and export, GPS tracks, airport database with autocomplete
AirTrail (https://github.com/johanohly/AirTrail):
- File export (Flights → Export for AirTrail) in AirTrail's import
  format, validated against its schema; same-day repeat legs get leg
  numbers so AirTrail's de-duplication doesn't merge them.
- Automatic sync through AirTrail's REST API (Profile → AirTrail sync):
  per-user connection with an encrypted API key and scope check; flights
  are created/updated/deleted in background jobs; a full sync first
  links flights already in AirTrail (e.g. from a file import) instead of
  duplicating them; airports are resolved and cached, with manual
  mapping for unknown codes.
- GPS tracks: GPX, KML and CSV track logs are converted to AirTrail's
  track format for both sync and export; the flight page shows a summary.
- Aircraft ICAO type (e.g. C150) for AirTrail's aircraft type.

Airport database (OurAirports, the source AirTrail uses):
- Managed like AirTrail: downloaded in the background on first start,
  updated in place from Admin → Airports (adds, changes, removes; ids
  stable), with admin-managed custom airports that updates never touch.
- Each airport carries AirTrail's code, so logged codes translate to
  AirTrail's exactly (1B9 → K1B9, 4MB → K5M3).
- From/To autocomplete on new flights (airports this aircraft has used
  rank first); From is pre-filled with the last flight's destination;
  codes are normalized to uppercase.
- Flights → Standardize airport codes: rewrite logged codes to the
  standard code, and fix codes not in the database (typos such as 0R8 →
  08R are suggested).

Also: admin pages grouped under an Admin dropdown menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:40:20 -05:00
rickyandClaude Opus 5.5 0c4803d717 Add flying stats to the Flights tab; drop the DRS search link setting
Flights tab:
- Summary cards for the past 30 days, this year, past 12 months and
  since the first flight (flight hours, flights, tach, fuel).
- Flight hours by month (last 24 months) with the past-year monthly
  average, totals (flights, flight/tach time, average and longest
  flight, fuel, gal/hr, airports visited, most visited) and a by-year
  table.
- Flight time is Hobbs time where recorded, otherwise tach time.

Removed the per-aircraft DRS search link and its "Open in DRS" button:
each AD's DRS link already comes from the Excel import. A guarded
migration drops the column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:52:00 -05:00
rickyandClaude Opus 5.5 b75fd7cf62 Import ADs from FAA DRS exports; N/A determinations and DRS links
AD import (owners, ADs tab → Import from FAA DRS):
- Upload a DRS export (.xlsx recommended, .csv works), preview, confirm.
- Per AD: track, not applicable, or skip, with suggestions and flags for
  superseded/non-current ADs, model mismatches, appliance and STC-only
  ADs, repetitive actions, and older ADs this one supersedes.
- ADs are matched by number; re-importing updates existing ADs from the
  FAA data (preview lists what will change) without touching compliance
  records, recurrence or applicability. Superseded tracked ADs are
  updated and flagged rather than skipped.
- DRS's Excel export hyperlinks each AD number to its DRS page; those
  links are kept (http(s) only). DRS ids aren't derivable from the AD
  number, so no links are guessed.

Also:
- Per-aircraft "not applicable" AD determinations (N/A badge, quick
  action, excluded from airworthiness).
- AD numbers link to their DRS document in the AD list, compliance
  history (now with description, logbook/inspection links) and share page.
- Saved DRS search link per aircraft with an "Open in DRS" button.
- Upload storage extracted to a StoredUpload concern shared with the
  flight import.
- document_url / drs_search_url added in their own guarded migration
  (they were briefly in an already-applied migration).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 18:35:38 -05:00
rickyandClaude Opus 5.5 4d3dc7150a Add spreadsheet flight import; fix oil/fuel consumption charts
Flight import (owners, Flights tab → Import from spreadsheet):
- Upload .xlsx or .csv, preview, then confirm. Columns are matched by
  header name (Date, From, To, Tach, Hobbs, Oil, Fuel, Flight Time).
- Each flight's time is derived from the previous row's meter reading;
  rows are kept in file order so typos (tach going backwards) are
  flagged and skipped while the next good row absorbs the time.
- Unchanged tach imports as a 0.0 hr entry so fuel/oil isn't lost;
  "Full" fuel is warned about; re-imports skip existing rows.
- History only: component hours are untouched unless the owner opts in
  to advancing the aircraft's meters to the last reading.
- Upload redirects to a GET preview (Turbo ignores 200 renders after a
  form POST, which made the button appear to do nothing).

Consumption charts:
- Replace per-fill math (qty ÷ hours since last add), which spiked to
  80 gal/hr on partial fills and top-offs, with a rolling rate (total
  added ÷ hours over a trailing 10 h fuel / 25 h oil window).
- Headline shows recent (last ~50/100 hrs) and lifetime rates; straight
  chart lines instead of splines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 19:23:47 -05:00
rickyandClaude Opus 5.5 38df19c331 Initial commit: Rails port of Simple Aircraft Manager
Rails 8.1 + SQLite rewrite of marbindrakon/simple-aircraft-manager,
designed to self-host as a single container (Solid Queue/Cache/Cable,
Active Storage on disk, Hotwire + importmap, Tailwind).

- Airworthiness engine ported from health/services.py (ADs, grounding
  squawks, inspection recurrency, component replacement)
- Hours updates and flight logs cascading to in-service components,
  optional airworthiness enforcement
- Components, squawks, ADs, inspections, logbook, documents, major
  records, oil/fuel consumption stats and charts, activity log
- Admin/owner/pilot RBAC and public share links (status/maintenance)
- Docker Compose and Kamal deployment, env-driven production config
- Service and integration tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 17:59:08 -05:00