Skip to content

fix: initial steward values [ENG-3411]#7914

Merged
speaker-ender merged 1 commit intomainfrom
fix/initial-steward-values
Apr 15, 2026
Merged

fix: initial steward values [ENG-3411]#7914
speaker-ender merged 1 commit intomainfrom
fix/initial-steward-values

Conversation

@speaker-ender
Copy link
Copy Markdown
Contributor

@speaker-ender speaker-ender commented Apr 14, 2026

Ticket ENG-3411

Description Of Changes

Fixes an issue where the state of the stewards filter on the root action center would be out of sync with the url and requests when logged in as a steward assigned to a monitor.

Code Changes

Steps to Confirm

  1. Create a user with viewer and reviewer permissions
  2. Add a new monitor and assign the previously created user as a steward to that monitor
  3. Log in as the user you created
  4. Confirm that navigating to the root action center screen defaults the stewards filter to assigned to me
  5. Confirm that clearing the filter removes the value and shows all monitors

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Apr 15, 2026 2:39pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Apr 15, 2026 2:39pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 8%
6.1% (2663/43637) 5.22% (1293/24736) 4.19% (542/12917)
fides-js Coverage: 78%
78.98% (1962/2484) 65.55% (1214/1852) 72.57% (336/463)
privacy-center Coverage: 88%
85.97% (331/385) 81.36% (179/220) 78.87% (56/71)

@speaker-ender speaker-ender force-pushed the fix/initial-steward-values branch from 4108836 to 36e1edf Compare April 15, 2026 14:18
@speaker-ender speaker-ender force-pushed the fix/initial-steward-values branch from 36e1edf to 388f123 Compare April 15, 2026 14:26
@speaker-ender speaker-ender marked this pull request as ready for review April 15, 2026 14:26
@speaker-ender speaker-ender requested a review from a team as a code owner April 15, 2026 14:26
@speaker-ender speaker-ender requested review from gilluminate and removed request for a team April 15, 2026 14:26
@speaker-ender speaker-ender force-pushed the fix/initial-steward-values branch from 388f123 to bed46ad Compare April 15, 2026 14:31
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code Review: PR #7914 — fix: initial steward values [ENG-3411]

Scope: Frontend only (TypeScript/React). No backend changes.

This PR fixes an out-of-sync steward filter on the action center root page by removing the defaultStewardFilter default from SearchFormQueryState and instead applying it via a useEffect after the user's monitor assignments are fetched. It also exposes setSearchForm from useSearchForm and changes showSearch + optionFilterProp to an object syntax.


Critical (must fix)

MonitorListSearchForm.tsxshowSearch={{ optionFilterProp: "label" }} is not a valid Ant Design API. Select's showSearch prop accepts a boolean, not an object. The object is truthy so search is enabled, but optionFilterProp inside it is silently ignored, causing the dropdown to filter by value instead of label. Steward name search will break. See inline comment.


Suggestions

MonitorList.tsxformProps.setSearchForm inside the useEffect and its dependency array is slightly indirect. Destructuring setSearchForm out of formProps at the call site would be cleaner and make the dependency array easier to read. See inline comment.

MonitorList.tsx (timing)defaultStewardFilter is undefined until useGetUserMonitorsQuery resolves, so the component will briefly render and fire an API call without the steward filter before the effect kicks in. This is the same race that existed before (the old defaultStewardFilter argument to SearchFormQueryState had the same issue), so it's not a regression. If the flash is unacceptable in the future, the fix would be to defer rendering the monitor list until the user-monitors query has resolved.

MonitorList.tsx (initialValues)steward_key: defaultStewardFilter ?? null in initialValues is always null on the first render (since the query hasn't resolved yet) and is then overwritten by the effect. The line is doing nothing useful for steward_key and its intent is slightly misleading — a comment explaining why would help future readers.


Nit

changelog/7914-fix-steward-filter.yamltype field is blank; should be Fixed. See inline comment.


One blocking issue (showSearch object syntax), otherwise the approach is sound.

🔬 Codegraph: connected (46711 nodes)


💡 Write /code-review in a comment to re-run this review.

Comment thread changelog/7914-fix-steward-filter.yaml Outdated
chore: formatting

refactor: different default method

chore: update changelog

chore: update effect deps

chore: fixing changelog

refactor: destructured item
Copy link
Copy Markdown
Contributor

@gilluminate gilluminate left a comment

Choose a reason for hiding this comment

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

testing worked as expected!

@speaker-ender speaker-ender added this pull request to the merge queue Apr 15, 2026
Merged via the queue into main with commit e99dce8 Apr 15, 2026
51 checks passed
@speaker-ender speaker-ender deleted the fix/initial-steward-values branch April 15, 2026 18:21
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.

2 participants