Skip to content

Address review findings (data consistency, timezone, age, threshold copy, types:check) - #4

Merged
wangxiaoxiang5599 merged 1 commit into
mainfrom
dev
Sep 12, 2026
Merged

wangxiaoxiang5599 merged 1 commit into
mainfrom
dev

Conversation

@wangxiaoxiang5599

Copy link
Copy Markdown
Owner

Fixes the five findings from the review:

  1. Out-of-order movements — MoveAnimal now rejects a moved_at earlier than the animal's latest movement (error on the date field), with tests for reject / equal timestamp / HTTP path.
  2. Timezone — config/app.php reads APP_TIMEZONE; the farm timezone, today's date in that timezone and the warning threshold are shared Inertia props. Date pickers no longer use the browser's UTC date; the move dialog labels the timezone.
  3. Age label — whole years/months/days only (7m 4d, never hours); unit tests at boundaries.
  4. Threshold copy — dashboard text uses the configured percentage.
  5. types:check on fresh clone — generates Wayfinder files first (.npmrc has ignore-scripts, so an npm pre-hook would not run).

composer ci:check passes locally: 91 tests, PHPStan level 7 clean, formatting clean.

🤖 Generated with Claude Code

…old copy, types:check

1. MoveAnimal rejects a moved_at earlier than the animal's latest
   movement, so current_paddock_id can never disagree with the history.
   Errors surface on the moved_at field; tests cover reject, equal
   timestamp and the HTTP path.
2. app.timezone now reads APP_TIMEZONE. The farm timezone, today's date
   in that timezone and the warning threshold are shared as Inertia
   props; date pickers use the server's "today" instead of the
   browser's UTC date, and the move dialog states which timezone the
   timestamp is in.
3. Animal::ageLabel() reports whole years/months/days only; the
   date-of-birth has no time component. Unit-tested at boundaries.
4. Dashboard copy uses the configured warning percentage.
5. npm run types:check generates Wayfinder files first so it works on
   a fresh clone (.npmrc has ignore-scripts, so pre-hooks do not run).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wangxiaoxiang5599
wangxiaoxiang5599 merged commit 9325101 into main Sep 12, 2026
1 check 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