Report how many documents the reindex actually queues

The index-all trigger returned Boolean(jobId) while the client typed
the field as a number, so the toast read "Indexing true document(s)".
The route now answers with the count of live documents still lacking a
content index, computed from the same live-scoped counts the usage
gauge reads, and an honest 0 when no job was created. OpenAPI schema
updated to the integer shape; the hook's type carries a contract note
so the wire and the toast cannot drift apart again. Route test pins
the number, a component test pins that the toast renders the count and
never the word "true".

Refs #776
This commit is contained in:
Marc-André Bombeck committed 2026-08-13 12:13:55 +02:00
1 parent 4543fa7192
commit 86a3d74187
6 files changed
+290 -8

No files matched your search

+5 -2
View File
@@ -12792,7 +12792,8 @@ paths:
immediately; the work runs off-request on the queue.
responses:
"200":
description: Whether a backfill job was enqueued.
description: How many live documents the enqueued backfill still has to index (0 when everything is indexed or no job
was created).
content:
application/json:
schema:
@@ -38680,7 +38681,9 @@ components:
type: object
properties:
enqueued:
type: boolean
type: integer
minimum: 0
maximum: 9007199254740991
required:
- enqueued
additionalProperties: false