Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/added-16475-code-activity-reader.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add an opt-in code activity reader at `?kiosk=1&view=reader`. It shows pushed changes from `/api/matrix/lines` as readable, wrapping paragraph cards with the repository, PR link, file, stage and observed time. It supports pause with P, Space or the button, pauses while you scroll, uses a static layout for reduced motion and stops in hidden tabs. The Matrix view is unchanged (#16475).
1 change: 1 addition & 0 deletions changelog.d/added-16476-published-checkpoints.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Feed the Code activity reader whole pushed PR diff regions, including removals, through the existing authorized sentinel observer, with whole-region secret filtering, bounded memory-only history, policy reset, visible freshness, buffered-snapshot labels and explicit replay; stop restoring or writing the legacy Matrix code-history file.
1 change: 1 addition & 0 deletions changelog.d/changed-16477-code-activity-cutover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Code activity supersedes the Matrix code view with one topbar entry opening the published-checkpoint reader in a new tab; decorative renderers and settings are retired, display links are updated, and deprecated internal Matrix API/config names remain supported with capture and broadcasting still off by default.
4 changes: 0 additions & 4 deletions src/cmd/hive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2464,10 +2464,6 @@ func (b *boot) bootDashboard() { b.bootDashboardWith(defaultBootDashboardDeps())
// persistence enables injected; see bootDashboardDeps.
func (b *boot) bootDashboardWith(deps bootDashboardDeps) {
b.dashSrv = deps.newServer(b.cfg.Dashboard.Port, b.cfg.Dashboard.AuthToken, b.logger)
// The Matrix backlog survives a restart so the kiosk never blanks
// (#16276); the paired sentinel head map is set in
// applyGitHubClientConfigHooks.
b.dashSrv.SetMatrixPersistPath(matrixLinesStatePath)
b.dashSrv.SetIntegrationExecutionEvaluators(b.integrationPreparationEligibility, b.integrationEligibility)
worksource.SetRunStageAccessor(b.dashSrv.RunStageAccessor())
b.dashSrv.SetWritebackGate(b.writebackGate())
Expand Down
12 changes: 3 additions & 9 deletions src/cmd/hive/matrix_ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,9 @@ import (
// run every couple of minutes on its own goroutine.
const matrixIngestInterval = 2 * time.Minute

// matrixLinesStatePath and sentinelHeadsStatePath are where the Matrix
// backlog and the sentinel's evaluated-head map persist on the PVC, each its
// own file like the other /data histories so a parse failure in one never
// takes the other down. Together they let a restarted hive refill the kiosk
// at once and diff only heads that moved while it was down.
const (
matrixLinesStatePath = "/data/matrix-lines.json"
sentinelHeadsStatePath = "/data/sentinel-heads.json"
)
// sentinelHeadsStatePath keeps the evaluated-head map across restarts. Code
// buffers remain memory-only; restarting never restores captured code.
const sentinelHeadsStatePath = "/data/sentinel-heads.json"

// matrixIngestState serializes incremental passes so concurrent callers must
// not read the same new head twice.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ patches:
value: http://hive.hive-hosted-hosted-available-oke-11-placeholder-r05x.svc.cluster.local:3002
- op: replace
path: /data/DASHBOARD_PATH
value: /?kiosk=1&view=matrix&sound=off
value: /?kiosk=1&view=reader&sound=off
- op: replace
path: /data/STREAM_AUDIO
value: silent
Expand Down
6 changes: 3 additions & 3 deletions src/docs/api-reference/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ Part of the [Dashboard REST API reference](../api-reference.md); see that page f
| `GET` | `/api/openrouter/models` | Dashboard auth/session | Open Router Models | `pkg/dashboard/openrouter.go:47` |
| `GET` | `/api/openrouter/credit` | Dashboard auth/session | Open Router Credit | `pkg/dashboard/openrouter.go:48` |
| `GET` | `/openrouter/callback` | Public | Open Router Callback | `pkg/dashboard/openrouter.go:49` |
| `POST` | `/api/github-app/recheck` | Dashboard auth/session | GitHub App Recheck | `pkg/dashboard/server.go:1663` |
| `POST` | `/api/github-app/install-clicked` | Dashboard auth/session | GitHub App Install Clicked | `pkg/dashboard/server.go:1664` |
| `GET` | `/gh-setup` | Public | GitHub App Setup Callback | `pkg/dashboard/server.go:1665` |
| `POST` | `/api/github-app/recheck` | Dashboard auth/session | GitHub App Recheck | `pkg/dashboard/server.go:1662` |
| `POST` | `/api/github-app/install-clicked` | Dashboard auth/session | GitHub App Install Clicked | `pkg/dashboard/server.go:1663` |
| `GET` | `/gh-setup` | Public | GitHub App Setup Callback | `pkg/dashboard/server.go:1664` |
28 changes: 27 additions & 1 deletion src/docs/api-reference/dashboard-misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The monitor renders CI and Review concurrently on one shared PR row; see
| `POST` | `/api/hives/{id}/heartbeat` | Dashboard auth/session | Hives Heartbeat | `pkg/dashboard/api_contribute.go:377` |
| `DELETE` | `/api/hives/{id}` | Owner only | Hives Delete | `pkg/dashboard/api_contribute.go:378` |
| `POST` | `/api/hives/onboard` | Dashboard auth/session | Hives Onboard | `pkg/dashboard/api_contribute.go:379` |
| `GET` | `/sso` | Public | SSO | `pkg/dashboard/server.go:1670` |
| `GET` | `/sso` | Public | SSO | `pkg/dashboard/server.go:1669` |
### Activity observation provenance

The CI snapshot retains real check/node IDs, head, App ID and transition times.
Expand Down Expand Up @@ -119,3 +119,29 @@ PR writes. Push and same-head retry observations do not inherit an old fixer,
owner or worker observation timestamp. Review completion uses the dispatch
ledger's own agent/review-head/decision receipt and aggregate participation;
another agent's same-perspective bundle verdict cannot settle that assignment.

### Published-checkpoint regions

`GET /api/matrix/lines?format=regions&since=<seq>&max=<lines>` selects whole
changed regions from the existing authorized sentinel observer. Authentication
and dashboard read permission are required, including in kiosk mode; responses
use `Cache-Control: no-store`. Disabled capture returns 404. An active cold
source returns 200 with an empty `regions` array and null `last_ingest_at`.

The response contains continuation `seq`, source high-water mark `latest`, policy
`epoch`, source label `Pushed PR`, stage `pushed-checkpoint`, `last_ingest_at`,
`next_ingest_in_s`, and `regions`. Each region has its own sequence, repo, actual
PR number and `pr_url`, head, path, stage, observed `at`, and ordered `lines`
(`op` is `+` or `-`, `line` is untrimmed text). Follow response `seq`, not
`latest`, until caught up. `max` is a line budget (1–500, default 200); the first
eligible region is always returned whole, even if larger than the budget.
Code buffers are bounded and memory-only, so this is not an audit history.
Clear retained browser code on epoch changes and failed/disabled/unauthorized
pulls. An empty response says nothing about work outside the admitted source.

The internal `/api/matrix/lines` and `dashboard.matrix.*` names are deprecated
but remain supported for compatibility. The sole code display is now **Code activity**
at `?kiosk=1&view=reader`; the Matrix renderers and their `mx.*`
settings are retired. Activation remains explicitly opt-in and default-off;
only pushed, published PR checkpoints are admitted, never workspace or pre-push
content. The cutover grants no anonymous access or broadcast authorization.
Loading
Loading