Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Review Summary by QodoAdd embeddings backfill functionality with UI refresh button
WalkthroughsDescription• Add embeddings backfill action with new web action hook integration • Implement "Refresh Embeddings" button with spinner and user feedback • Refactor state initialization for improved code readability • Support backfilling embeddings for articles and internal articles Diagramflowchart LR
A["Admin Page"] -->|triggers| B["handleBackfillEmbeddings"]
B -->|calls| C["backfillEmbeddings Action"]
C -->|processes| D["Articles & Internal Articles"]
C -->|returns| E["Result: processed, skipped counts"]
E -->|displays| F["User Feedback Notice"]
File Changes1. apps/web/src/app/articles/hooks/useArticlesAdminConvex.ts
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
Pull request overview
Adds an admin-facing way to trigger embeddings backfill for existing articles from the Articles page by wiring a new Convex web action into the articles admin hook and exposing it via a “Refresh Embeddings” UI control.
Changes:
- Added
backfillEmbeddingsweb action reference + hook return inuseArticlesAdminConvex. - Implemented
handleBackfillEmbeddingsand added a “Refresh Embeddings” button with spinner/feedback on the Articles admin page. - Minor state/init and layout cleanup in the Articles page header area.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| apps/web/src/app/articles/page.tsx | Adds backfill handler/state and a new “Refresh Embeddings” button to trigger the action from the UI. |
| apps/web/src/app/articles/hooks/useArticlesAdminConvex.ts | Introduces the embeddings:backfillExisting action ref and exposes it via the admin Convex hook. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }; | ||
|
|
||
| const handleBackfillEmbeddings = async () => { | ||
| if (!activeWorkspace?._id) { |
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
This pull request adds the ability for admins to backfill embeddings for articles directly from the articles admin page. It introduces a new backend action, updates the admin hook to support it, and adds a "Refresh Embeddings" button to the UI. Additionally, there are some minor code cleanups and UI improvements for better usability.
Embeddings Backfill Feature:
backfillEmbeddingsweb action inuseArticlesAdminConvex, with supporting types and references, allowing admins to trigger embeddings backfill for articles and internal articles. [1] [2] [3] [4]handleBackfillEmbeddingsfunction in the articles admin page to call the new action, show progress/spinner, and display results or errors to the user. [1] [2] [3]UI Enhancements: