feat(core): embedding progress (#12367)

### TL;DR

feat: show embedding progress in settings panel

![截屏2025-05-19 20.25.19.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyktQ6Qwc7H6TiRCFoYN/59d8f9ef-0876-4ed5-9c09-db12686adb47.png)

### What changed

* show embedding progress in settings panel
* polling embedding status based on RxJS

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Added real-time embedding progress tracking and display in embedding settings, including a visual progress bar and status messages.
  - Introduced localized text for embedding progress statuses.
  - Added an optional test ID attribute to the progress bar component for improved testing.
- **Style**
  - Added new styles for embedding progress UI elements.
- **Tests**
  - Added an end-to-end test to verify embedding progress is displayed correctly in the settings UI.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
yoyoyohamapi
2025-05-21 05:07:13 +00:00
parent 8f352580a7
commit d70f09b498
9 changed files with 225 additions and 5 deletions

View File

@@ -43,6 +43,24 @@ test.describe('AISettings/Embedding', () => {
await utils.settings.waitForWorkspaceEmbeddingSwitchToBe(page, true);
});
test('should show embedding progress', async ({
loggedInPage: page,
utils,
}) => {
await utils.settings.enableWorkspaceEmbedding(page);
await page.getByTestId('embedding-progress-wrapper');
const progress = await page.getByTestId('embedding-progress');
// wait for the progress to be loading
const title = await page.getByTestId('embedding-progress-title');
await expect(title).toHaveText(/Loading sync status/i);
await expect(progress).not.toBeVisible();
const count = await page.getByTestId('embedding-progress-count');
await expect(count).toHaveText(/\d+\/\d+/);
await expect(progress).toBeVisible();
});
test('should allow manual attachment upload for embedding', async ({
loggedInPage: page,
utils,