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

chore: refactor knowledge code in admin ui #1008

Conversation

ryanhopperlowe
Copy link
Contributor

This should have no effect on logic or UI/UX. it just extracts some subcomponents and abstracts data logic into reusable hooks.

Doing this in preparation for thread level knowledge implementations

Refactored largely using cursor

Copy link
Contributor

@StrongMonkey StrongMonkey left a comment

Choose a reason for hiding this comment

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

LGTM. Walk down through the code with @ryanhopperlowe and it is working as expected.

Thanks for picking it up and refactor the code! Look much better

if (blockPollingFiles) setBlockPollingFiles(false);
};

if (knowledgeSource.state === KnowledgeSourceStatus.Syncing) {
Copy link
Contributor

Choose a reason for hiding this comment

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

you should also check for pending state. Something if sync happen to fast it will never fetch state from syncing given we are pulling every 5 seconds

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed! thanks!

@ryanhopperlowe ryanhopperlowe force-pushed the chore/admin/refactor-knowledge branch from 2c8ed15 to 5abb422 Compare December 20, 2024 18:55
@ryanhopperlowe ryanhopperlowe force-pushed the chore/admin/refactor-knowledge branch from 5abb422 to b3c133a Compare December 20, 2024 20:13
@ryanhopperlowe ryanhopperlowe merged commit c744850 into obot-platform:main Dec 20, 2024
2 checks passed
@ryanhopperlowe ryanhopperlowe deleted the chore/admin/refactor-knowledge branch December 20, 2024 20:23
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