Skip to content

chore(Flow/FlowRedirect): minor fix [YTFRONT-5241]#1441

Merged
ma-efremoff merged 1 commit intomainfrom
ma-efremoff/flow
Feb 18, 2026
Merged

chore(Flow/FlowRedirect): minor fix [YTFRONT-5241]#1441
ma-efremoff merged 1 commit intomainfrom
ma-efremoff/flow

Conversation

@ma-efremoff
Copy link
Collaborator

@ma-efremoff ma-efremoff commented Feb 17, 2026

https://nda.ya.ru/t/RIIDfMjF7UfbuW

## Summary by Sourcery

Bug Fixes:

  • Ensure flow filters are updated with the current pipeline path when performing a Flow redirect to prevent stale filter state after navigation.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 17, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

FlowRedirect now dispatches a flow filters update with the current pipeline path before performing the navigation redirect, ensuring filter state is synchronized with the target flow URL.

Sequence diagram for FlowRedirect dispatching filters update before navigation

sequenceDiagram
    participant FlowRedirect
    participant ReduxStore
    participant filtersSlice
    participant AppBrowserHistory

    FlowRedirect->>ReduxStore: useSelector(getPath)
    ReduxStore-->>FlowRedirect: path

    FlowRedirect->>ReduxStore: dispatch updateFlowFilters(pipelinePath=path)
    ReduxStore->>filtersSlice: updateFlowFilters(pipelinePath)
    filtersSlice-->>ReduxStore: flowFilters updated

    FlowRedirect->>AppBrowserHistory: replace(url=makeFlowLink(path))
Loading

File-Level Changes

Change Details Files
Synchronize flow filter state with navigation in FlowRedirect.
  • Inject Redux dispatch into FlowRedirect via useDispatch hook
  • Dispatch filtersSlice.actions.updateFlowFilters with the current pipelinePath before redirecting
  • Include dispatch in the React.useMemo dependency array to comply with hooks rules and avoid stale closures
packages/ui/src/ui/pages/navigation/tabs/FlowRedirect/FlowRedirect.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions
Copy link
Contributor

Storybook is ready.

@github-actions
Copy link
Contributor

Playwright components report is ready.

@github-actions
Copy link
Contributor

Statoscope report is ready.

@github-actions
Copy link
Contributor

E2E-local report is ready.
E2E-remote report is ready.
E2E-screenshots report is ready.
E2E-passwd report is ready.

@ma-efremoff ma-efremoff marked this pull request as ready for review February 18, 2026 13:57
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The redirect and Redux dispatch are side effects and should use useEffect instead of useMemo, which is intended for memoizing computed values rather than performing actions.
  • Consider guarding the redirect/filters update when path is falsy to avoid dispatching and replacing history with an invalid or empty URL.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The redirect and Redux dispatch are side effects and should use `useEffect` instead of `useMemo`, which is intended for memoizing computed values rather than performing actions.
- Consider guarding the redirect/filters update when `path` is falsy to avoid dispatching and replacing history with an invalid or empty URL.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ma-efremoff ma-efremoff merged commit c423fe4 into main Feb 18, 2026
17 of 18 checks passed
@ma-efremoff ma-efremoff deleted the ma-efremoff/flow branch February 18, 2026 14:30
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

Comments