Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove excess intent fetching on /training/intents page #731

Merged

Conversation

IgorKrupenja
Copy link
Collaborator

@IgorKrupenja IgorKrupenja commented Dec 3, 2024

Related task:

This PR:

  • Resolves most issues with excessive data fetching on intents page. Previously all intent data for all intents was fetched every time. This was very slow and not scalable. Now, I split off a separate IntentDetails component where detailed data is fetched only for the selected intent. The Intents/index.tsx itself now only fetches minimum data required to render the list.
  • Response and rule fetching is not fixed in this PR, these still fetch data for all requests. This will be implemented in later PRs.
  • This IntentDetails component is also going to be used with common intents page to remove the significant code duplication. I will implement this in a later PR.
  • Fixes a couple minor issues, mostly related to types. It was very difficult to work otherwise.

@IgorKrupenja IgorKrupenja changed the title Fix excessive fetching part 1 WIP Fix excessive fetching of intent data Dec 4, 2024
@IgorKrupenja IgorKrupenja marked this pull request as ready for review December 4, 2024 11:21
Copy link
Collaborator

@1AhmedYasser 1AhmedYasser left a comment

Choose a reason for hiding this comment

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

LGTM

@IgorKrupenja
Copy link
Collaborator Author

IgorKrupenja commented Dec 11, 2024

2.5% code duplication reported by Sonar is expected due to Intents and Common Intents pages having duplicate code before, introduced way back. We will get rid of this in the next task: #743

@turnerrainer turnerrainer merged commit 746a322 into buerokratt:v2.0.2 Dec 11, 2024
4 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.

Remove excess intent fetching on /training/intents page Remove excess data fetching in Training Module
3 participants