Skip to content

Feature: add OVERRIDE action on sponsor forms#1017

Open
santipalenque wants to merge 1 commit into
masterfrom
feature/sponsor-forms-override-action
Open

Feature: add OVERRIDE action on sponsor forms#1017
santipalenque wants to merge 1 commit into
masterfrom
feature/sponsor-forms-override-action

Conversation

@santipalenque

@santipalenque santipalenque commented Jul 22, 2026

Copy link
Copy Markdown

https://app.clickup.com/t/9014802374/86bb1557g

Summary by CodeRabbit

  • New Features
    • Added an Override action for managed sponsor forms.
    • Added a confirmation warning explaining that overriding creates a new customized form.
    • Managed and customized form lists now display the appropriate available actions.
    • Forms automatically refresh after a successful override.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Sponsor managed-form override

Layer / File(s) Summary
Override action and refresh flow
src/actions/sponsor-forms-actions.js
Adds the override thunk and action type, posts to the override endpoint, handles errors, and refreshes managed and customized forms after success.
Override confirmation and table integration
src/i18n/en.json, src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/index.js
Adds confirmation text, wires the override action into Redux, and updates managed/customized form table actions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SponsorFormsTab
  participant ReduxThunk
  participant ManagedFormsAPI
  SponsorFormsTab->>ReduxThunk: confirm and submit form.id
  ReduxThunk->>ManagedFormsAPI: POST /managed-forms/{formId}/override
  ManagedFormsAPI-->>ReduxThunk: override result
  ReduxThunk->>SponsorFormsTab: refresh managed and customized forms
Loading

Possibly related PRs

Suggested reviewers: tomrndom, smarcet

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an OVERRIDE action for sponsor forms.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 feature/sponsor-forms-override-action

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
src/i18n/en.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/actions/sponsor-forms-actions.js`:
- Around line 649-651: Update the refresh success handler containing
getSponsorManagedForms and getSponsorCustomizedForms to dispatch both actions
with the current managed and customized table parameters, matching the parameter
construction used by the UI handlers. Preserve each table’s page, sorting,
search, and showArchived state instead of invoking the default-argument forms.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: a56f5fa7-e68b-448d-af26-cf1c836b557d

📥 Commits

Reviewing files that changed from the base of the PR and between 53b15bf and f493345.

📒 Files selected for processing (3)
  • src/actions/sponsor-forms-actions.js
  • src/i18n/en.json
  • src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/index.js

Comment on lines +649 to +651
.then(() => {
dispatch(getSponsorManagedForms());
dispatch(getSponsorCustomizedForms());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve the active table queries during refresh.

These default-argument calls reset both tables to page 1, default sorting, an empty search, and showArchived=false after an override. Refresh using the current managed/customized table parameters, as the UI handlers do, so an override does not move users out of their current view.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/actions/sponsor-forms-actions.js` around lines 649 - 651, Update the
refresh success handler containing getSponsorManagedForms and
getSponsorCustomizedForms to dispatch both actions with the current managed and
customized table parameters, matching the parameter construction used by the UI
handlers. Preserve each table’s page, sorting, search, and showArchived state
instead of invoking the default-argument forms.

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