Skip to content

fix(dashboard): report a finished consolidation on the status island (#2006) - #2043

Merged
doobidoo merged 2 commits into
doobidoo:mainfrom
dodoshell:fix/2006-consolidation-status-island
Nov 16, 2026
Merged

doobidoo merged 2 commits into
doobidoo:mainfrom
dodoshell:fix/2006-consolidation-status-island

Conversation

@dodoshell

@dodoshell dodoshell commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

A scheduled consolidation now reports its end on the status island as its own source, "Consolidation": a finished run is confirmed for five seconds with its time horizon ("Finished (daily)"), and a failed run ("Failed (weekly)") stays until the reader closes it or the next run reports.

Why

Fixes #2006

The scheduler sends consolidation_completed with {"time_horizon": ..., "success": true|false} when a run ends (consolidation/scheduler.py), but the listener in _connectSSE() ignored the payload and only refreshed the dashboard numbers, so a failed run was shown nowhere.

What I did, following the issue:

  • The listener parses the event the same way as sync_completed and calls a new handleConsolidationCompleted(data).
  • success: true reports source consolidation as success without settle, with { horizon: data.time_horizon } as vars.
  • success: false reports error with dismissible: true.
  • Both carry the label island.source.consolidation, and the dashboard refresh stays.
  • Every call goes through this.statusIsland?., so the dashboard keeps working without the island.

How it was verified

New cases at the end of tests/web/test_status_island.cjs. The event goes through the real consolidation_completed listener in _connectSSE() (with a stub EventSource) and lands in the real island model (StatusIsland.createModel()):

  • a finished run: success, island.consolidation.completed, vars.horizon, no settle, gone after it expires, dashboard refreshed;
  • a failed run: error, leads, does not expire by itself, can be dismissed;
  • the next run replaces a failure that was not closed;
  • it works without the island;
  • the keys exist in all eleven catalogs, and both texts carry {horizon}.
# with the src/ change stashed: fails
$ .venv/bin/pytest tests/web/test_status_island.py -q
1 failed, 6 passed
$ node --test tests/web/test_status_island.cjs
# pass 33
# fail 5

# on this branch
$ node --test tests/web/test_status_island.cjs
# pass 38
# fail 0

$ .venv/bin/pytest tests/web/test_status_island.py tests/web/test_i18n_catalog_parity.py \
    tests/web/test_dashboard_no_unwired_text.py tests/web/test_i18n_sync_panel.py \
    tests/web/test_dashboard_no_emoji.py tests/web/test_dashboard_style_guard.py \
    tests/web/test_dashboard_csp.py -q
73 passed

bash scripts/pr/pre_pr_check.sh (Windows): every check passes except [3/9] Test suite, and [2/9] was skipped (no LLM backend). The failing tests in the full run (for example tests/ci/test_auto_assign_claim.py, which compares /-separated paths with Windows ones) are the same set on main when I run those files there, so they are not from this change.

Screenshots

Dashboard running locally on sqlite_vec, panel open in every shot.

  • A real scheduled run: I set MCP_SCHEDULE_DAILY to the next minute, and the scheduler sent {"time_horizon": "daily", "success": true}. The row showed up and was gone five seconds later.
  • The other shots: the same payload dispatched on the page's own EventSource, so the real listener handles it. The failure shots were taken six seconds after the event, past the time a confirmation lasts.
Light Dark
Finished, 1440px finished-light-1440 finished-dark-1440
Finished, 360px finished-light-360 finished-dark-360
Failed, 1440px failed-light-1440 failed-dark-1440
Failed, 360px failed-light-360 failed-dark-360
Real scheduled run, 1440px scheduled-run-light-1440

Changelog fragment

changelog.d/2006.fixed.md

Notes for the reviewer

  • POST /api/consolidation/trigger does not send consolidation_completed. It calls _consolidate_async() directly instead of going through the scheduler, so a manual run is still not shown on the island (I checked with the SSE stream open: only connection_established came through). I left the backend alone to keep this PR in the dashboard. Happy to send the event from the endpoint too, here or separately.
  • New catalog keys: island.source.consolidation names the row, like island.source.sync. island.consolidation.completed and island.consolidation.failed hold the text. The texts are short ("Finished ({horizon})") because the capsule shows the text alone, and a longer one pushed the row label to a mid-word break in the panel. All eleven catalogs have translations.
  • The horizon is the server's own value (daily, weekly, ...), so it stays English in the other catalogs, as the issue asks (vars). Translating it would take five more keys in every catalog; I can add them if you want.

Agent Disclosure

I used Claude Code to help with this change, and I went through the diff, the tests and the description myself before opening this.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Scheduled consolidation results now appear on the status island.

  • Scheduled consolidation results appear on the dashboard status island.

dodoshell explicitly left manual runs outside this change because POST /api/consolidation/trigger does not send consolidation_completed.

Reviews (6) · Last reviewed commit: "Merge branch 'main' into fix/2006-consol..." · Reviewed by Greptile

greptile-apps[bot]
greptile-apps Bot previously approved these changes Nov 16, 2026
@doobidoo

Copy link
Copy Markdown
Owner

@dodoshell please resolve the merge conflicts

@greptile-apps

greptile-apps Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@dodoshell

Copy link
Copy Markdown
Contributor Author

Merged main in. The conflicts were the import keys and tests from #2042 landing next to the consolidation ones, so I kept both; the web tests pass (88/88).

@doobidoo
doobidoo merged commit ca50053 into doobidoo:main Nov 16, 2026
25 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.

dashboard: report a finished consolidation on the status island

2 participants