Skip to content

Conversation

knollengewaechs
Copy link
Contributor

@knollengewaechs knollengewaechs commented Oct 21, 2025

Steps to test:

  • Go to teams page
  • Add a team using the modal
  • Click "Add Team" again -> field for team name should be empty
  • Same if you only enter a team name, then cancel and open the modal again -> field should be empty

Issues:


(Please delete unneeded items, merge only when none are left open)

  • Added changelog entry (create a $PR_NUMBER.md file in unreleased_changes or use ./tools/create-changelog-entry.py)
  • Added migration guide entry if applicable (edit the same file as for the changelog)
  • Updated documentation if applicable
  • Adapted wk-libs python client if relevant API parts change
  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases
  • Needs datastore update after deployment

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

📝 Walkthrough

Walkthrough

The modal for creating teams now resets its Ant Design form fields both when cancelled and after a successful creation, and the component prop for cancel was renamed to avoid shadowing the new local onCancel handler. A changelog entry documenting the UI fix was added.

Changes

Cohort / File(s) Change Summary
Form reset and prop rename
frontend/javascripts/admin/team/create_team_modal_view.tsx
Renamed destructured prop onCancelonCancelCallback. Added local onCancel wrapper that calls form.resetFields() then onCancelCallback(). After successful create in onOk, call form.resetFields() before invoking onOkCallback. Modal now uses onCancel={onCancel}.
Changelog
unreleased_changes/9009.md
Added changelog entry documenting the UI fix ensuring the create-team modal shows an empty input when opened.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I twitch my nose, the inputs gleam,

Fields cleared away like clover in a stream,
Cancel or save, no ghost remains,
Create again — fresh starts and gains! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Clear Input Field When Opening Add Team Modal" directly relates to the changeset, which implements form field reset behavior in the Add Team modal. The code changes include resetting form fields when the modal is cancelled (clearing the input for the next open) and after successful team creation. While the title focuses on the opening/cancel scenario and doesn't explicitly mention the post-creation reset, it clearly describes a primary aspect of the changes being made.
Linked Issues Check ✅ Passed The code changes address the primary coding objectives from linked issue #8497. The modifications reset the form fields in two key scenarios: when cancelling the modal (via the new onCancel handler) and immediately after successful team creation. These changes directly implement the requirement to "reset the add-team modal input between opens so each new creation starts with an empty field." By ensuring proper state cleanup between interactions, the changes support enabling users to create multiple teams in succession without stale data persisting in the UI.
Out of Scope Changes Check ✅ Passed All changes in the pull request are directly scoped to the objectives specified in linked issue #8497. The modifications to create_team_modal_view.tsx implement the required form reset logic on both cancellation and successful team creation, while the changelog entry in unreleased_changes/9009.md documents the UI fix. No unrelated or tangential changes are present outside the stated requirements.
Description Check ✅ Passed The pull request description is directly related to the changeset. It provides clear testing steps for the form clearing behavior (opening the modal after adding a team, and reopening after cancelling), explicitly references the linked issue #8497, and includes a completed changelog entry. The description effectively communicates what the PR is intended to fix and how to verify the fix works.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-ui-when-creating-many-teams

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 48e1b8f and 0eeab28.

📒 Files selected for processing (1)
  • unreleased_changes/9009.md (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-smoketest-push
  • GitHub Check: frontend-tests
  • GitHub Check: backend-tests
🔇 Additional comments (1)
unreleased_changes/9009.md (1)

1-2: Changelog entry is clear and accurate.

The entry correctly documents the UI fix in user-facing language and is appropriately categorized under "### Fixed". It captures the primary user-visible outcome of the reset behavior.

Note: The actual implementation file (frontend/javascripts/admin/team/create_team_modal_view.tsx) is not included in this review, so I cannot verify the form reset logic, component prop changes, or correctness of the wiring on both the cancel and success paths mentioned in the AI summary and PR objectives.


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.

❤️ Share

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

@knollengewaechs knollengewaechs changed the title Reset Add Team Modal On Save and On Cancel Clear Input Field When Opening Add Team Modal Oct 21, 2025
Copy link
Member

@hotzenklotz hotzenklotz left a comment

Choose a reason for hiding this comment

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

Thanks

@knollengewaechs knollengewaechs enabled auto-merge (squash) October 22, 2025 12:46
@knollengewaechs knollengewaechs merged commit 15eea70 into master Oct 22, 2025
5 checks passed
@knollengewaechs knollengewaechs deleted the update-ui-when-creating-many-teams branch October 22, 2025 12:53
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.

Creating multiple teams in a row does not update UI properly

2 participants