Skip to content

Add editable boat logfactor#173

Merged
ultimate merged 2 commits into
mainfrom
codex/add-logfactor-property-to-boat-master-data
Jul 16, 2026
Merged

Add editable boat logfactor#173
ultimate merged 2 commits into
mainfrom
codex/add-logfactor-property-to-boat-master-data

Conversation

@ultimate

Copy link
Copy Markdown
Owner

Motivation

  • Introduce a per-boat logfactor (positive decimal) to capture a vessel-specific loch/log correction and allow sailors to edit and persist it from the boat form.

Description

  • Add logfactor: number to the Boat domain model (app/models/boat.ts) and include it in the BoatForm type (app/models/logbook-forms.ts).
  • Wire default/fallback values and form mapping by updating emptyBoat, defaultBoatForm, and boatToForm with a fallback of 1 when loaded values are non-positive (app/components/logbook/forms.ts).
  • Add a numeric input field for Log factor in the boat manager form with required/positive validation and update saveBoat to persist boatForm.logfactor into the saved Boat object (app/components/logbook/pages/BoatManagerPage.tsx, app/components/LogbookApp.tsx).
  • Persist the column to the database by adding a migration 020_boat_logfactor.sql, updating app/lib/db/schema.sql, and extending BoatsRepository.insert and LogSheetsRepository.toLogbook to read/write the logfactor (app/lib/db/migrations/020_boat_logfactor.sql, app/lib/repositories/boats-repository.ts, app/lib/repositories/log-sheets-repository.ts).
  • Update i18n labels for the new field and adjust fixtures/tests to include logfactor where required (app/lib/i18n/dictionaries/*, tests/*, tests/fixtures/logbook.ts).

Testing

  • Ran npm test (Vitest) and all test files passed: 27 test files, 153 tests passed and 12 skipped (final run succeeded).
  • Ran npm run typecheck (tsc --noEmit) and it succeeded with no type errors.
  • Ran npm run lint (eslint .) and it completed without errors.

Codex Task

@ultimate ultimate added the codex Things in relation to codex (caused by codex or good task for codex) label Jul 13, 2026 — with ChatGPT Codex Connector
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ultilog Ready Ready Preview, Comment Jul 15, 2026 4:37pm

@ultimate
ultimate merged commit ffabc76 into main Jul 16, 2026
3 checks passed
@ultimate
ultimate deleted the codex/add-logfactor-property-to-boat-master-data branch July 16, 2026 01:53
@ultimate

Copy link
Copy Markdown
Owner Author

Implements #141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Things in relation to codex (caused by codex or good task for codex)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant