perf(base): batch page-cell resolution via microtask loader

Per-cell useResolvedPages([id]) calls each mounted with a unique
React Query key, so a grid with 20 page-typed cells fired 20 requests on
first paint. A shared loader now accumulates incoming ids within a
microtask, fires a single POST for the union, and fans the subset each
caller asked for back to them. Cells keep their own cache entry + null
handling; they just share the underlying network call.

Also renames /bases/pages/resolve → /bases/pages/expand — the old name
collided with other "resolve" semantics in the codebase.
This commit is contained in:
Philipinho
2026-04-24 12:11:41 +01:00
parent 89ee3714ac
commit 72fc93dcc1
3 changed files with 83 additions and 8 deletions
@@ -143,7 +143,7 @@ export class BaseController {
}
@HttpCode(HttpStatus.OK)
@Post('pages/resolve')
@Post('pages/expand')
async resolvePages(
@Body() dto: ResolvePagesDto,
@AuthUser() user: User,