Skip to content

PM-4626: keep engagement name filtering client-side#1586

Merged
jmgasper merged 2 commits intodevfrom
PM-4626
Apr 2, 2026
Merged

PM-4626: keep engagement name filtering client-side#1586
jmgasper merged 2 commits intodevfrom
PM-4626

Conversation

@jmgasper
Copy link
Copy Markdown
Collaborator

@jmgasper jmgasper commented Apr 1, 2026

What was broken
Typing in the Search by name filter on the work engagements page triggered a new engagements fetch on each debounced change, causing the page to keep returning to a loading state while users typed.

Root cause (if identifiable)
The page already filtered engagement titles locally, but it also forwarded the same title value into useFetchEngagements, so SWR treated each input change as a new request key.

What was changed

  • Removed title from the request filters passed to useFetchEngagements so the existing local title filter is used without refetching.
  • Added a regression test that updates the name filter and verifies the fetch hook is still called without a title request filter.

Any added/updated tests

  • Updated src/apps/work/src/pages/engagements/EngagementsListPage/EngagementsListPage.spec.tsx with a regression test for the name filter fetch behavior.

Open with Devin

What was broken
Typing in the Search by name filter on the work engagements page triggered a new engagements fetch on each debounced change, causing the page to keep returning to a loading state while users typed.

Root cause
The page already filtered engagement titles locally, but it also forwarded the same title value into useFetchEngagements, so SWR treated each input change as a new request key.

What was changed
Removed title from the request filters passed to useFetchEngagements so the existing local title filter is used without refetching.
Added a regression test that updates the name filter and verifies the fetch hook is still called without a title request filter.

Any added/updated tests
Updated src/apps/work/src/pages/engagements/EngagementsListPage/EngagementsListPage.spec.tsx with a regression test for the name filter fetch behavior.
@jmgasper jmgasper requested a review from kkartunov as a code owner April 1, 2026 16:36
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

# Conflicts:
#	src/apps/work/src/pages/engagements/EngagementsListPage/EngagementsListPage.spec.tsx
@jmgasper jmgasper merged commit 7c48aae into dev Apr 2, 2026
9 checks passed
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