Show duplicate applications on the same field separately in field and rotation tables#552
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
✅ Files skipped from review due to trivial changes (7)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPatch version updates across multiple packages ( Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@fdm-app/app/components/blocks/fertilizer-applications/table.tsx`:
- Around line 67-70: The row-key generation in mapBySimilarAndOrder (inside
createMapper) uses the full-array index `i`, which breaks grouping when similar
applications are interleaved; change the mapper to compute a
per-similar-occurrence index instead of using `i` — e.g., for each application
passed to the mapping function (reference createMapper, mapBySimilarAndOrder,
createDateKey, and application.p_app_amount), count how many prior items in the
same input array share the same similarity key
(`${createDateKey(application.p_app_date)}#${application.p_app_amount?.toPrecision(4)}`)
and use that count as the ordinal suffix, so keys become
`${dateKey}#${amountKey}#${occurrenceIndex}` ensuring consecutive similar items
get 0,1,2... even when interleaved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1b6b4ce4-113d-46e2-a6d4-e3f4329961e2
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
fdm-app/app/components/blocks/fertilizer-applications/table.tsxfdm-rvo/package.jsonpackage.json
There was a problem hiding this comment.
🧹 Nitpick comments (1)
fdm-app/package.json (1)
32-33: Consider isolating dependency/toolchain bumps from the hotfix change.This batch is substantial and unrelated to the fertilizer-table bugfix objective. Splitting these updates into a separate PR would make rollback and incident triage safer if production issues appear.
Also applies to: 63-64, 66-67, 71-71, 74-75, 85-85, 95-96, 109-109
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@fdm-app/package.json` around lines 32 - 33, This PR mixes dependency/toolchain bumps with the fertilizer-table hotfix; revert the unrelated package.json dependency changes (e.g., the bumped entries "@react-router/node" and "@react-router/serve" and the other bumped deps referenced at ranges 63-64, 66-67, 71, 74-75, 85, 95-96, 109) so the commit only contains the fertilizer-table bugfix, then open a separate PR that contains the dependency/toolchain updates (with a clear changelog and CI verification) to allow isolated rollback and safer triage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@fdm-app/package.json`:
- Around line 32-33: This PR mixes dependency/toolchain bumps with the
fertilizer-table hotfix; revert the unrelated package.json dependency changes
(e.g., the bumped entries "@react-router/node" and "@react-router/serve" and the
other bumped deps referenced at ranges 63-64, 66-67, 71, 74-75, 85, 95-96, 109)
so the commit only contains the fertilizer-table bugfix, then open a separate PR
that contains the dependency/toolchain updates (with a clear changelog and CI
verification) to allow isolated rollback and safer triage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 3a019ae8-e52c-4a90-a194-6ece7c183e0e
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
.changeset/quick-eggs-join.mdfdm-app/app/components/blocks/fertilizer-applications/table.tsxfdm-app/package.jsonfdm-app/vite.config.ts
✅ Files skipped from review due to trivial changes (1)
- .changeset/quick-eggs-join.md
🚧 Files skipped from review as they are similar to previous changes (1)
- fdm-app/app/components/blocks/fertilizer-applications/table.tsx
Bug fixes
The changes in this PR ensure that if a field has equivalent fertilizer applications, each of those will be displayed on separate rows.
Across multiple fields, first similar application on each field is grouped in a single row, then the second similar in each row if they exist on some in another row, then the third in each field in a third row, etc.
Closes #551
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Chores