Skip to content

fix: add reset form on inventory popup to prevent cache issues#820

Open
tomrndom wants to merge 1 commit intomasterfrom
fix/inventory-popup-cache
Open

fix: add reset form on inventory popup to prevent cache issues#820
tomrndom wants to merge 1 commit intomasterfrom
fix/inventory-popup-cache

Conversation

@tomrndom
Copy link

@tomrndom tomrndom commented Mar 10, 2026

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

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Bug Fixes
    • Sponsor inventory form now properly resets when creating new items, ensuring a clean state for each new entry without retaining previous data.

… unused props

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@tomrndom tomrndom requested a review from smarcet March 10, 2026 17:49
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 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: e97641ae-3f17-4e22-b591-f64b435c0b73

📥 Commits

Reviewing files that changed from the base of the PR and between b29d23f and 900d639.

📒 Files selected for processing (2)
  • src/pages/sponsors-global/inventory/inventory-list-page.js
  • src/pages/sponsors/sponsor-forms-tab/components/manage-items/sponsor-forms-manage-items.js
💤 Files with no reviewable changes (1)
  • src/pages/sponsors/sponsor-forms-tab/components/manage-items/sponsor-forms-manage-items.js

📝 Walkthrough

Walkthrough

The PR removes the explicit open prop passed to SponsorInventoryDialog components in two files and adds form reset logic when initializing a new inventory item dialog.

Changes

Cohort / File(s) Summary
SponsorInventoryDialog Open Prop Removal
src/pages/sponsors-global/inventory/inventory-list-page.js, src/pages/sponsors/sponsor-forms-tab/components/manage-items/sponsor-forms-manage-items.js
Removed the open prop from SponsorInventoryDialog invocations across two files. Dialog visibility is now managed internally or through conditional rendering. Added resetInventoryItemForm() call in handleNewInventoryItem to ensure form state is cleared when opening the new item dialog.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • smarcet

Poem

🐰 Away goes the open prop so neat,
Form resets make the logic complete,
Dialogs now manage their own fate,
Cleaner code, we celebrate! ✨

🚥 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: adding a form reset to the inventory popup to prevent cache issues, which aligns with the primary modification in handleNewInventoryItem.
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 (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/inventory-popup-cache

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