ref(ui): Drop leftover unused optional args in drawer, table, and filters - #123259
ref(ui): Drop leftover unused optional args in drawer, table, and filters#123259JonasBa wants to merge 1 commit into
Conversation
…ters Nothing passes these options. Keep public callbacks and inherited bags that callers still use. Co-authored-by: Cursor <cursoragent@cursor.com>
|
cc @TkDodo @nsdeschenes — leftover unused-args. Could not request review (fork token). |
| Footer, | ||
| Header, | ||
| organization, | ||
| onClose, | ||
| closeModal, | ||
| }: Props) { | ||
| const {mutateAsync: submitCreateTeam} = useMutation({ |
There was a problem hiding this comment.
Bug: The CreateTeamModal no longer accepts an onClose prop, so the callback passed by callers to receive the newly created team is never executed.
Severity: HIGH
Suggested Fix
Update the openCreateTeamModal function to follow the pattern used by other modal openers. Destructure the onClose callback from the options object and pass it as part of the second argument to the openModal function. This ensures the modal framework handles the onClose event correctly when the modal is closed.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: static/app/components/modals/createTeamModal.tsx#L27-L32
Potential issue: The `CreateTeamModal` component was refactored to no longer accept an
`onClose` prop. However, the `openCreateTeamModal` function still accepts an `onClose`
callback from its callers (e.g., in `TeamSelector`) and spreads it as a prop to the
modal component. Since the modal component no longer uses the `onClose` prop, the
callback is never invoked when a team is successfully created and the modal is closed.
This breaks the expected behavior for callers, which rely on this callback to receive
the newly created team object and resolve promises or trigger subsequent UI updates.
Also affects:
static/app/components/onboarding/createSampleEventButton.tsx:22~27static/app/components/timeSince.tsx:41~46static/app/components/core/table/table.tsx:107~112static/app/components/pageFilters/project/projectPageFilter.tsx:49~54
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c65a096. Configure here.
| }) | ||
| ); | ||
| closeModal(); | ||
| onClose?.(team); |
There was a problem hiding this comment.
Team create callback still required
High Severity
CreateTeamModal no longer calls onClose after a successful create. TeamSelector and the settings team-select dropdown still pass that callback to add the new team to a project and resolve the create-team promise, so those flows hang and skip the follow-up work.
Reviewed by Cursor Bugbot for commit c65a096. Configure here.
| } | ||
| }, | ||
| [columns, onColumnResize] | ||
| [columns] |
There was a problem hiding this comment.
Table resize callback still used
High Severity
Table no longer accepts or invokes onColumnResize, and it always stores widths internally. GridEditable still passes that callback through DataTable.Grid so Discover, Performance, Insights, and Explore can persist column widths, so those resizes never reach the parent.
Reviewed by Cursor Bugbot for commit c65a096. Configure here.


Leftover unused-args after #123200–#123237 and #123247–#123248. These options are never passed (~95 LOC).
Summary
DrawerOptions.onOpen,CreateTeamModal.onClose,CreateSampleEventButton.onClick,ProjectPageFilter.onReset,TimeSince.prefix, andTable.onColumnResize.Test plan
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.