-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix(Analytics): no tags tracking for upload & crawl #1024
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -64,7 +64,7 @@ export const useLogin = () => { | |||
redirect(previousPage); | |||
} | |||
} | |||
}, [session?.user]); | |||
}, [session?.user, track]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ? Since track is a static function
frontend/app/App.tsx
Outdated
|
||
useEffect(() => { | ||
void fetchAllBrains(); | ||
void fetchAndSetActiveBrain(); | ||
}, [session?.user]); | ||
}, [fetchAllBrains, fetchAndSetActiveBrain]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? The fetch seems to be required primarily only when the auth status changes, plus these functions are static.
@@ -32,7 +32,7 @@ services: | |||
context: backend | |||
dockerfile: Dockerfile | |||
container_name: backend-core | |||
command: uvicorn main:app --host 0.0.0.0 --port 5050 | |||
command: uvicorn main:app --reload --host 0.0.0.0 --port 5050 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :D
@@ -17,7 +17,7 @@ export const usePublicPrompts = ({ onSelect }: UsePublicPromptsProps) => { | |||
setPublicPrompts(await getPublicPrompts()); | |||
}; | |||
void fetchPublicPrompts(); | |||
}, []); | |||
}, [getPublicPrompts]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static function too
@@ -1,41 +1,41 @@ | |||
/* eslint-disable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
}); | ||
} finally { | ||
setCrawling(false); | ||
} | ||
}, | ||
[session.access_token, publish] | ||
[publish, crawlWebsiteUrl, t, track] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
function Crawler() { | ||
return ( | ||
return ( | ||
<Suspense fallback={"Loading..."}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not lo longer using server component so we can remove these
frontend/app/upload/components/FileUploader/hooks/useFileUploader.ts
Outdated
Show resolved
Hide resolved
eb1fda4
to
1ba3902
Compare
Risk Level 2 - /home/runner/work/quivr/quivr/frontend/app/upload/components/Crawler/hooks/useCrawler.ts The const crawlWebsite = useCallback(
async (brainId: UUID | undefined) => {
// function body
},
[] // remove session.access_token from dependencies
); Risk Level 2 - /home/runner/work/quivr/quivr/frontend/app/upload/components/FileUploader/hooks/useFileUploader.ts The const upload = useCallback(
async (file: File, brainId: UUID) => {
// function body
},
[] // remove session.access_token from dependencies
); Risk Level 3 - /home/runner/work/quivr/quivr/frontend/app/upload/components/Crawler/index.tsx The component has been stripped of its contents and only empty divs are left. This will result in an empty component being rendered. Ensure that the necessary JSX elements are included. return (
<div className=\"w-full\">
<div className=\"flex justify-center gap-5 px-6\">
<div className=\"max-w-xl w-full\">
<div className=\"flex-col justify-center gap-5\">
// Add necessary JSX elements here
</div>
</div>
</div>
</div>
); 🔄🔒🚫 Powered by Code Review GPT |
* 🚚 create useCrawlApi to use in useCrawler hook * 🚑 fix tracking in Crawl * 🧑💻 add hot reloading within docker containers * 🚑 fix tracking for upload * 🚚 create useUploadApi for fileUpload request * 📈 add june tag for Language change * 🩹 revert dependencies
Description
Fix tracking for file_uploaded,url_crawled and invalid_url
Add api for backend requests for upload and crawl
Fix some linter issues
Checklist before requesting a review
Please delete options that are not relevant.
Screenshots (if appropriate):