fix(server): blob gc (#15280)

#### PR Dependency Tree


* **PR #15280** 👈

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

* **Bug Fixes**
* Improved workspace document discovery so documents in trashed pages
are correctly included when loading workspace content.
* Fixed dragging collections into Favorites, including reordering
collections within Favorites.
* **Tests**
* Added coverage for document projection behavior and collection
drag-and-drop interactions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-07-19 16:49:41 +08:00
committed by GitHub
parent 9122cfd108
commit 81df4751a3
2 changed files with 43 additions and 5 deletions
+17 -3
View File
@@ -30,7 +30,11 @@ const dragToFavourites = async (
const favourites = page.getByTestId(
'navigation-panel-favorite-category-divider'
);
await dragTo(page, dragItem, favourites);
if (type === 'collection') {
await dragItem.dragTo(favourites);
} else {
await dragTo(page, dragItem, favourites);
}
const item = page
.getByTestId(`navigation-panel-favorites`)
.locator(`[data-testid="navigation-panel-${type}-${id}"]`);
@@ -168,7 +172,12 @@ test('drag a collection to favourites', async ({ page }) => {
await page.waitForTimeout(500);
const collection = await createCollection(page, 'test collection');
const collectionId = getCurrentCollectionIdFromUrl(page);
await dragToFavourites(page, collection, collectionId, 'collection');
await dragToFavourites(
page,
collection.locator('[data-affine-draggable]'),
collectionId,
'collection'
);
});
test('items in favourites can be reordered by dragging', async ({ page }) => {
@@ -183,7 +192,12 @@ test('items in favourites can be reordered by dragging', async ({ page }) => {
{
const collection = await createCollection(page, 'test collection');
const collectionId = getCurrentCollectionIdFromUrl(page);
await dragToFavourites(page, collection, collectionId, 'collection');
await dragToFavourites(
page,
collection.locator('[data-affine-draggable]'),
collectionId,
'collection'
);
}
// assert the order of the items in favourites