Skip to content

[scanner] Add the hub Fleet activity page /activity with ETag polling, Hive chips and group-by-hive headers #16063

Closed

Description

@hivecommons-hive

Part of #15965 (fourth child of RFC #15861 by @hanthor). Second of three ordered pieces; blocked by #16062, which provides the shared row asset this page embeds.

What

Add the read-only hub Fleet activity page at /activity, linked next to the existing 🔬 Evidence drill-down (src/pkg/hub/server.go route table near evidencePath; page pattern in src/pkg/hub/saas_pages.go / assets/dashboard.html).

  • Serve the page behind requireAuth (not admin-only): GET /api/hub/activity (src/pkg/hub/activity.go) already applies server-side per-hive scoping from ✨ Bounded activity heartbeat contract and authorized hub aggregation API #15951, and the page must show exactly what that endpoint returns for the viewer.
  • Poll GET /api/hub/activity with If-None-Match every 15 s and re-render only on a new ETag; render rows with the extracted asset from [scanner] Extract the tracker row-presentation asset into a shared embeddable module with a compatibility test #16062.
  • Add a Hive column with colour chips. Group-by-hive renders one header row per hive with item counts, freshness (stale after two missed heartbeats, from the heartbeat timestamps the ring already stores) and an "upgrade to report activity" note for reporting: false spokes.
  • Truncation (truncated / events_dropped) and stale or missing sources are always visible on the board, never hidden behind a tooltip.
  • Rows link to the item on GitHub; the hive chip links to that hive's own tracker via the hub's existing hive routes. No action menus.
  • Titles render as text (never innerHTML) and are length-capped server-side in ActivityView.
  • src/docs/ page for the hub Fleet activity view (link it from src/docs/hosted-hub.md), and a changelog.d/added-*.md fragment.

Acceptance

  • Test with two spokes heartbeating to one hub: a user scoped to one hive sees only that hive's rows; an admin sees both, verified through the page handler (extend the pattern in src/pkg/hub/activity_test.go / *_ui_test.go).
  • The page serves with the hub's CSP (src/pkg/dashboard/webstatic/csp_script_src.go conventions) and the static-asset cache headers already used by src/pkg/hub/static.

Display-mode integration (?kiosk=1, am.*, ?display=1, hub-activity playlist view) is deliberately left to the third child.

Decision taken by hive: ship the plain polled page first; display mode follows separately so the page can be reviewed on its own.

Attribution requirement inherited from #15861: mention @hanthor in the PR description and link #15861 and #15965; state what shipped separately from activation status.

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 31, 2026
  2. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by @Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  3. hivecommons-hive commented on Oct 31, 2026

    @hivecommons-hive
    ContributorAuthor

    🔓 Claim by @Karibhou released (lease revoked).

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

    agent/scannerCreated or modified by the scanner agenthelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions