Skip to content

worker: Add indexing dashboard in development#4189

Open
backspace wants to merge 10 commits intomainfrom
server/indexing-dashboard-cs-10443
Open

worker: Add indexing dashboard in development#4189
backspace wants to merge 10 commits intomainfrom
server/indexing-dashboard-cs-10443

Conversation

@backspace
Copy link
Contributor

@backspace backspace commented Mar 13, 2026

I’m often wondering when developing how much is left to index:

image

This adds an event sink for index runners to report on their progress and a worker manager dashboard to report that.

@github-actions
Copy link

github-actions bot commented Mar 13, 2026

Host Test Results

    1 files  ±0      1 suites  ±0   2h 31m 26s ⏱️ -25s
2 022 tests ±0  2 007 ✅ +1  15 💤 ±0  0 ❌ ±0 
2 037 runs  ±0  2 022 ✅ +2  15 💤 ±0  0 ❌  - 1 

Results for commit fc9fd37. ± Comparison against base commit 8eda6c3.

♻️ This comment has been updated with latest results.

@backspace backspace marked this pull request as ready for review March 13, 2026 23:33
@backspace backspace requested a review from a team March 13, 2026 23:33
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fc9fd377b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +549 to +553
typeof message === 'string' &&
message.startsWith('progress|')
) {
let payload = message.substring('progress|'.length);
let progressEvent = JSON.parse(payload) as IndexingProgressEvent;

Choose a reason for hiding this comment

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

P1 Badge Gate progress ingestion when dashboard endpoints are disabled

In ECS deployments the dashboard routes are intentionally not exposed (if (!ECS_CONTAINER_METADATA_URI) above), but this branch still parses and stores every progress|... IPC payload for all workers. Because each indexing run now sends one event with the full file list plus one event per visited file, production workers incur avoidable JSON/IPC and memory overhead with no consumer, which can noticeably slow or bloat large indexing runs.

Useful? React with 👍 / 👎.

Comment on lines +202 to +206
current.#onProgress?.({
type: 'indexing-finished',
realmURL: current.realmURL.href,
jobId: current.#jobInfo.jobId,
stats: current.stats,

Choose a reason for hiding this comment

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

P2 Badge Emit terminal progress on indexing errors

The new progress flow emits indexing-started before work begins, but indexing-finished is only emitted on the success path here. If indexing throws (for example any non-404 visit error rethrown by tryToVisit), the sink never gets a terminal event, so the dashboard can show that realm as permanently active until another job overwrites it.

Useful? React with 👍 / 👎.

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.

1 participant