feat(core): migrate more pull to realtime (#14936)

#### PR Dependency Tree


* **PR #14936** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

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

* **Refactor**
* Consolidated realtime subscription patterns for consistent, more
reliable live updates across comments, notifications, transcription
tasks, and embedding progress.
* Standardized realtime room naming and subscription keys for
deterministic delivery.

* **New Features**
* Introduced a reusable live-query mechanism powering realtime snapshot
+ event workflows used by comments, notifications, transcript tasks, and
embedding progress.

* **Tests**
* Added tests covering live-query behavior and deterministic
subscription key generation.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/14936)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-05-11 00:33:25 +08:00
committed by GitHub
parent 8cf00738c2
commit db0ff0a9df
26 changed files with 812 additions and 441 deletions
@@ -127,10 +127,8 @@ test.describe('AISettings/Embedding', () => {
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();
await expect(title).not.toHaveAttribute('data-progress', 'loading');
const count = await page.getByTestId('embedding-progress-count');
await expect(count).toHaveText(/\d+\/\d+/);