Skip to content

fix: adjust function to reload table if one item is saved#876

Open
tomrndom wants to merge 1 commit intomasterfrom
fix/form-template-item-update
Open

fix: adjust function to reload table if one item is saved#876
tomrndom wants to merge 1 commit intomasterfrom
fix/form-template-item-update

Conversation

@tomrndom
Copy link
Copy Markdown

@tomrndom tomrndom commented Apr 16, 2026

ref: https://app.clickup.com/t/86b96g8y6

Signed-off-by: Tomás Castillo [email protected]

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved handling when adding multiple inventory items. The form now refreshes successfully added items even if some operations fail, providing a more resilient experience during bulk item additions.

@tomrndom tomrndom requested a review from smarcet April 16, 2026 02:20
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 36683a75-b69e-429a-b59c-87fa145d6be2

📥 Commits

Reviewing files that changed from the base of the PR and between 68ac5d1 and 2bfe0fe.

📒 Files selected for processing (1)
  • src/pages/sponsors-global/form-templates/form-template-item-list-page.js

📝 Walkthrough

Walkthrough

Modified promise handling in the form template item addition flow by switching from Promise.all to Promise.allSettled, altering the refresh condition to trigger when at least one clone operation succeeds rather than requiring all to succeed.

Changes

Cohort / File(s) Summary
Promise Handling Update
src/pages/sponsors-global/form-templates/form-template-item-list-page.js
Changed Promise.all to Promise.allSettled for cloneFromInventoryItem operations; refresh now occurs if at least one clone succeeds instead of requiring all successes; error logging removed from rejection handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • smarcet

Poem

🐰 A promise settled, not all-or-none,
When cloning items, one success will run,
The form refreshes with partial gain,
No errors logged, just progress plain!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: modifying the function to reload the table when at least one item is successfully saved, which aligns with the shift from Promise.all to Promise.allSettled behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/form-template-item-update

Comment @coderabbitai help to get the list of available commands and usage tips.

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