Skip to content

Surface prerender_html jobs in the local indexing dashboard#5448

Merged
habdelra merged 4 commits into
mainfrom
cs-12029-prerender-split-surface-prerender_html-jobs-in-the-local
Jul 9, 2026
Merged

Surface prerender_html jobs in the local indexing dashboard#5448
habdelra merged 4 commits into
mainfrom
cs-12029-prerender-split-surface-prerender_html-jobs-in-the-local

Conversation

@habdelra

@habdelra habdelra commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Prerender jobs on the local indexing dashboard

The local _indexing-dashboard now shows prerender_html jobs everywhere indexing jobs appear, reading the same progress source indexing jobs use — the indexing event sink fed by the worker progress stream — with no new plumbing.

  • Active view: a realm's running jobs group into a single card — the index pass first, the prerender pass after it with its own label and bar color. When one pass has already finished while the other runs, the finished pass shows as a compact ✓ line sourced from the sink's history, so a realm reads as one story: "index ✓, prerender 40/93".
  • Calculating state: only index passes show the "calculating files…" bar, because they announce a zero total at kickoff and fill it in after invalidation discovery. A prerender job's URL set arrives fully computed in its job args, so its counts render real from the first event.
  • Pending / Recent Completed: the pending-jobs query now includes the prerender_html job type, so queued prerender jobs appear in the Pending table, and finished ones land in the history table under the queue's job-type spelling. The _indexing-status JSON endpoint picks up the same rows.

With no prerender jobs in play, the dashboard renders exactly as before.

Stacked on #5442, which makes prerender jobs emit this progress stream.

Preview

Index pass finished, prerender pass running — the ticket's "index ✓, prerender 40/93" treatment:

index done, prerender running

Both passes in flight for one realm, a second realm still calculating, and a queued prerender job in Pending:

concurrent passes

Tests

New dashboard-rendering tests cover: the prerender label and real totals (no calculating state, even at a zero total), the calculating state still showing for zero-total index passes, per-realm grouping with the index section ordered first, the ✓ line for a finished pass (and it not leaking in from another realm's history), separate cards for separate realms, and prerender rows in the Pending and Recent Completed tables.

🤖 Generated with Claude Code

habdelra and others added 3 commits July 9, 2026 09:28
The dashboard now renders prerender_html jobs everywhere index jobs
appear: the pending-jobs query includes the prerender_html job type, and
the active view groups a realm's jobs into one card — a section per
running pass (index first, prerender after, with its own progress bar)
and a compact ✓ line for a pass that already finished, so a realm reads
as one story: index ✓, prerender 40/93. Prerender sections carry their
own label and bar color, and skip the calculating state since their URL
set arrives fully computed in the job args.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the realm-server’s local _indexing-dashboard so it surfaces prerender_html jobs alongside indexing jobs, using the existing indexing event sink snapshot for active/history display and expanding the pending-jobs query to include queued prerender work.

Changes:

  • Include prerender_html in the pending jobs query so it shows up in Pending / Recent Completed (and _indexing-status).
  • Update dashboard rendering to group active jobs per realm into a single card with separate sections (index first, prerender second), plus an optional ✓ “finished pass” line sourced from history.
  • Add QUnit rendering tests covering prerender labeling/styling, calculating-state rules, grouping/ordering, and pending/history rows.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/realm-server/worker-manager.ts Expands pending jobs SQL filter to include prerender_html so queued prerender jobs appear on the dashboard and status endpoint.
packages/realm-server/handlers/handle-indexing-dashboard.ts Refactors active rendering to support prerender sections, grouping per-realm cards, finished-pass ✓ lines, and prerender styling.
packages/realm-server/tests/indexing-dashboard-test.ts Adds new unit tests for dashboard HTML rendering behavior across index/prerender scenarios.
packages/realm-server/tests/index.ts Registers the new dashboard test file in the realm-server test suite.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/realm-server/handlers/handle-indexing-dashboard.ts
Comment thread packages/realm-server/handlers/handle-indexing-dashboard.ts
A finished prerender under a running index pass belongs to the previous
run, and a checkmark there would read as if this run's HTML were already
done, so the history fallback applies only to the index category.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Host Test Results

    1 files      1 suites   2h 26m 14s ⏱️
3 415 tests 3 400 ✅ 15 💤 0 ❌
3 434 runs  3 419 ✅ 15 💤 0 ❌

Results for commit 7c88fe7.

Realm Server Test Results

    1 files      1 suites   9m 58s ⏱️
1 775 tests 1 775 ✅ 0 💤 0 ❌
1 854 runs  1 854 ✅ 0 💤 0 ❌

Results for commit 7c88fe7.

@habdelra
habdelra requested a review from a team July 9, 2026 14:43
@habdelra
habdelra changed the base branch from cs-11811-prerender-split-per-file-progress-reporting-for to main July 9, 2026 14:49
@habdelra
habdelra merged commit ba53d41 into main Jul 9, 2026
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants