Skip to content

Overview Activity list reads /api/events; remove build_mining_activity and its browser fallback #4511

Backlog

Description

@pithead-architect

What's the problem

Overview's Activity list is built by build_mining_activity (dashboard/mining_dashboard/web/views/overview_views.py:72, called at web/views/views.py:305), with a browser fallback in web/static/sovereign/overview-model.mjs:200. Once /api/events exists, that leaves two sources for the same list, and they can disagree.

What it impacts

Owners reading Overview: the Activity list and the Event log view (#4435) must show the same entries with the same text. #3735's donation entries are meant to reach Activity through the Event log.

How I found it

Split from #4432, which names /api/events as the single source that replaces build_mining_activity and its fallback. The file positions are from its read of develop-v2.1.0 at bfd061f and may have moved.

How important is it

Medium; it finishes #4432 and removes a duplicate code path. Size S.

Acceptance criteria

  • The Overview Activity list is filled from GET /api/events.
  • build_mining_activity, its call site and the browser fallback in overview-model.mjs are removed, with their now-unused tests and helpers.
  • Every kind of entry Activity shows today (payouts, shares, blocks, raffle wins) still appears, once each; a test compares a fixture before and after.
  • A failed or slow /api/events call leaves the rest of Overview working and shows the list's existing empty or error state.
  • A browser user-journey test loads Overview against a fixture with a payout, a share and an open error, and asserts all three in the Activity list.
  • make test, make test-patch-coverage and make lint-file-budget pass, and the dashboard browser suite passes.

Possible solutions

  • Fetch /api/events for the day range from the Overview model and map entries to the existing list rows.
  • Keep the list's markup unchanged so the theme and contrast tests are unaffected.

Parent requirement: #4432

Worker brief: Parent pithead#4432. Starts after the GET /api/events child merges; the PR targets develop-v2.1.0.

This is a switch and a deletion, not a redesign: keep the Activity list's markup and row format, and change only where the data comes from.

Grep for every caller of build_mining_activity before deleting; the positions in the issue are from bfd061f and may have moved.

Remove the server-side activity block from the state payload only if nothing else reads it, and say which in the PR.

The browser journey is required; put it with the existing Overview journeys.

No bench job: the browser suite is the proving tier for a page-data change.

Activity

  1. added this to the v2.1.0 milestone on Nov 24, 2026
  2. added
    needs-triage
    on Nov 24, 2026
  3. added
    bug
    size:S
    on Nov 24, 2026
  4. pithead-developer commented on Nov 26, 2026

    @pithead-developer
    Contributor

    Blocked on #4510. Blocked on pithead#4510 (Event log: GET /api/events read path). The worker brief for #4511 says it starts after that child merges, and the endpoint does not exist yet: a tree search of dashboard/ finds no api/events route on develop-v2.1.0, #4510 is open with no PR, and it is itself blocked on #4508 (event_log store; PR #4541 open and mergeable), with #4509 (error episodes; PR #4524 open) another upstream child. This issue is an atomic switch-and-delete: removing build_mining_activity and its browser fallback before the endpoint exists leaves the Activity list with no data source, and implementing the endpoint here would duplicate #4510, so no independent preparation can land. Finished so far (the brief's caller audit, recorded on this issue for the resume): build_mining_activity is at dashboard/mining_dashboard/web/views/overview_views.py:72 with its only callers in views.py (import :58, state payload key overview_activity :305) and tests at dashboard/tests/web/views/test_overview_views.py:7,80,84,105-106; the browser fallback is activityEntries at web/static/sovereign/overview-model.mjs:200 reading state.overview_activity.entries at :207-208, with further consumers at overview.mjs:75 (the truncated/1,000-entry line), dashboard/tests/frontend/sovereign/overview.test.mjs:172 and dashboard/tests/frontend/fixtures/state.json:449; the overview_activity payload key is read nowhere else, so it can be removed with the fallback. Unblocks when #4510 merges to develop-v2.1.0 — then: fetch GET /api/events in the Overview model, map entries to the existing rows, delete the call sites above, add the before/after fixture test and the Overview browser journey test, run make test, make test-patch-coverage, make lint-file-budget and the browser suite (no bench job; the browser suite is the proving tier). Nothing edited or pushed; the branch is fresh at origin/develop-v2.1.0 and no PR exists for this issue yet.

    The runner resumes this issue when that one closes.

  5. added
    blocked
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedbugneeds-triagesize:S

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions