Skip to content

Hobbs Time, Status Sheet, Due Date auto-fill, roll forward, Operator, Time Left pills - #60

Merged
dannysusername merged 10 commits into
mainfrom
newfeature
Nov 21, 2026
Merged

dannysusername merged 10 commits into
mainfrom
newfeature

Conversation

@dannysusername

Copy link
Copy Markdown
Owner

Summary

  • Hobbs Time: Block Time renamed to Hobbs Time everywhere, with info marks on My Hours. Data stays in the existing columns (pinned).
  • Status Sheet: Service Timeline renamed to Status Sheet, with a "Maintenance/inspections" tag. Tables and the OAuth scope keep their old names, so nothing moves and connected assistants keep working.
  • Due Date auto-fill: Last Done + cycle fills the Due Date (date and hours) right away; typed Due Dates are never overwritten; hours always shown with 1–3 decimals.
  • Reset to cycle in the roll-forward box.
  • Mark complete rolls forward from the Due Date and asks "When was this done?"; at most one roll per box (409); truthful toast.
  • Title rows darken as a whole on hover; aircraft Owner field renamed Operator (column pinned).
  • Add row fills the Due Date before Add, same rules as saved rows.
  • Time Left shown as colored pills; plain one-line text for print / PDF / Excel.

Data safety

  • Only schema change: two nullable booleans on service_timelines (due_date_auto, due_hours_auto). No values move.
  • Before-snapshots taken from production for Hobbs hours, Status Sheet items (fingerprint) and operator names; to be re-checked after deploy.

Tests

297 unit/integration and 99 browser tests pass locally.

🤖 Generated with Claude Code

dannysusername and others added 10 commits November 20, 2026 14:49
My Hours, the flight log, PDF export, alert emails and the assistant
connection now say "Hobbs Time". Java fields, element ids, JSON keys and
tests use hobbsTime naming to match.

- No data moves: each renamed field is pinned to its existing column
  (@column(name = "block_time_...")), so ddl-auto adds nothing.
  HobbsColumnMappingTest fails if a pin is ever dropped (the Sept 2026
  rename left new, empty columns this way).
- Old names (blockTimeOut, newBlockTime, ...) are still accepted on input
  and returned alongside the new keys until 2026-12-31, so a tab running
  the pre-rename dashboard.js keeps saving correctly.
- Info marks next to Hobbs Time and Time in Service: hover, focus or tap
  shows a one-line description; kept on screen at phone width.
- README, constitution (1.0.1) and docs updated.

Tests: 234 unit/integration and 84 browser tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The maintenance/inspections page is now the Status Sheet everywhere: tab,
headings, PDF and Excel export, alert emails, Import with AI, consent
screen and docs. Code follows the same rule (ServiceTimeline ->
StatusSheetItem, TimelineService -> StatusSheetService, timeline import
-> Status Sheet import, ids/classes/tests). Assistant tools are now
list_status_sheet, propose_status_sheet_import and
confirm_status_sheet_import.

- No data moves: StatusSheetItem stays on table service_timelines,
  statusSheetOrder on column timeline_order, StatusSheetImportRecord on
  timeline_import_records. StatusSheetColumnMappingTest fails if a pin
  is dropped.
- The OAuth scope keeps its id (aviary.timeline.import), so connected
  assistants keep working without re-consent; only its wording changed.
- Info tag next to the Status Sheet tab: "Maintenance/inspections".

Tests: 236 unit/integration and 85 browser tests pass; app boots with no
errors and no new tables or columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When an owner enters a Last Done date or hours on a row with a cycle,
the Due Date fills in and shows on screen right away (no reload): the
save response now returns the saved row and dashboard.js repaints it.

- Date: Last Done + calendar cycle, exact day (days add days, months add
  calendar months, clamped to month end). Hours: Last Done + hours cycle.
  Same math as Complete Maintenance (DueDates.nextDueDate).
- A Due Date the owner typed is never overwritten. New nullable markers
  (due_date_auto, due_hours_auto) record auto vs typed; rows from before
  fall back to comparing with the cycle math. Clearing Last Done clears
  an auto Due Date only. Half-typed dates are ignored.
- Hours on Last Done / Due Date always show 1-3 decimals (25 -> 25.0),
  tidied when the owner leaves the box; the server saves the same
  format and rejects non-numeric hours ("Hours must be a number, e.g.
  25.0"). Unchanged legacy text is kept as is; stored values change only
  when that row is edited.
- Warnings (still fills): Last Done in the future, Last Done hours above
  current Time in Service.
- Older cached dashboard.js (no touched flags) keeps the old behavior.

Tests: 265 unit/integration (22 new rule tests, 7 endpoint tests) and
87 browser tests pass, including Due Date appearing without reload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README, DATABASE (dueDateAuto / dueHoursAuto columns, hours format),
BACKEND (/update/{id} response, DueDateAutoFill) and FRONTEND
(applySavedRow, formatSheetHours, touched flags).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reported: 12 months -> 1 month -> delete the number -> tap Remove on the
Due Date calendar, and the old Due Date (one month after Last Done) came
straight back.

Cause: Remove calls autoSave with the Remove button, which wasn't
counted as the owner editing the Due Date. The server kept its saved
auto Due Date and the page repainted it.

- Remove on a Due Date calendar/clock now counts as an owner edit.
- A Due Date the owner removed stays removed on unrelated saves and only
  fills again when Last Done or the cycle changes.

Regression tests (unit + browser); the browser test fails without the
fix. 267 unit/integration and 88 browser tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Due Date stays editable. The row's roll-forward button now opens a
box with two choices: Mark complete (as before) or "Reset to cycle
(01/01/2021)", which keeps Last Done and sets the Due Date back to Last
Done + cycle so it follows the cycle again. Reset is grayed out with the
reason when the Due Date already matches or there is no Last Done; one
Reset covers both date and hours.

- GET /statusSheet/{id}/cyclePreview and POST /resetDueToCycle/{id},
  both owner-checked (403 for another account).
- The box first finishes the row's pending save (flushRowSave), so it
  always reflects what is on screen.
- showChoice: multi-action confirm box; formatPlainDate avoids
  time-zone day shifts.

Tests: 271 unit/integration and 89 browser tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mark complete used to count from today (Last Done = today, Due = today +
cycle), so a second click the same day wrote the same dates while the
toast still said "Due Date rolled forward".

Now choosing Mark complete opens a "When was this done?" box:
- Starts with the Due Date (else Last Done + cycle, else today); hours
  start with the Due Date hours (else Last Done hours + cycle, else
  empty, never guessed from Time in Service). The owner can change them.
- Shows "Next due" live as they edit (server preview, same date math).
- Save sets Last Done = that date / hours and Due = + cycle, only for
  parts with a cycle and a value. Empty hours box = hours not rolled.
- At most one roll per box: the save carries the Due Date the box opened
  with; if it changed (double-click, another tab) the server answers 409
  "This row changed. Open it again to review." and saves nothing.
- The toast names the values actually saved.
- An older cached page (empty body) keeps the old behavior until reload.

GET /statusSheet/{id}/completePreview (owner-checked) is new;
POST /completeMaintenance/{id} takes the box values. No schema change.

Tests: 286 unit/integration and 91 browser tests pass, including the
repeat-click refusal, double-click Save, and other-account 403s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Title rows: hovering darkened only the title text cell, leaving the grip
and trash-can cells the normal green. The whole bar now darkens together
(mouse only, not while dragging, only the hovered row).

Owner -> Operator: the aircraft's Owner field is now Operator in the
info card, Add aircraft form, PDF, alert emails ("The aircraft
operator") and messages ("Set your operator name"), and in code
(operatorName, operator-tag, new-operator-name). Account-ownership
wording ("You do not own this row") is a different concept and stays.

- No data moves: operatorName is pinned to the existing owner_name
  column; OperatorColumnMappingTest fails if the pin is dropped.
- The old "ownerName" request key is still accepted until 2026-12-31 so
  an open tab keeps saving; the new key wins.

Tests: 289 unit/integration and 92 browser tests pass; the hover test
fails without the fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The add row only recalculated Time Left from what was typed in Due Date;
the Due Date was filled from Last Done + cycle only on the server when
Add was clicked, so the user couldn't see it first.

Now the add row keeps its own small state and asks the server to apply
the same DueDateAutoFill rules saved rows use
(POST /statusSheet/addRowResolve, saves nothing):
1. Due Date (date and hours) fills before Add.
2. Order doesn't matter (cycle or Last Done first).
3. A typed Due Date is kept and saved.
4. Remove stays removed until Last Done or the cycle changes.
5. Clearing Last Done clears an auto-filled Due Date.
6. Hours tidy to 1-3 decimals on leaving the box (25 -> 25.0).
7. Typo notes under Last Done; never block Add.
8. The saved row matches the add row (auto-filled parts stay auto, a
   removed part stays blank); the add row resets after Add.
Not added: Mark complete, Reset to cycle, background saving. Title mode
fills nothing.

Tests: 297 unit/integration and 96 browser tests pass; the new endpoint
refuses another account's aircraft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Time Left showed both limits run together ("2 mo 12 days left 480 hours
overdue") and turned the whole cell red when either was overdue.

Now each limit is its own pill, no icons ("45 d", "480 h"), colored by
its own status: green, amber within the user's alert lead time (same
window as alert emails, default 30 days / 10 hrs), red when overdue.
The word "overdue" follows an overdue pill, once if both are. N/A when
nothing is set. One line on wide screens; wraps below 1200px and in the
phone card view so the table never scrolls sideways.

Plain text everywhere else is one line, " · ", "hrs":
"2 mo 12 days left · 480 hrs overdue" (DueDates.formatTimeLeft, PDF,
saved timeLeft, calculateTimeLeft, Excel formula, print). The cell keeps
the plain words in data-plain for saving and the add row.

Also removes the hint under Mark complete in the roll-forward box;
Reset to cycle keeps its reason.

Tests: 297 unit/integration and 99 browser tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dannysusername
dannysusername merged commit 1312a72 into main Nov 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant