You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(dashboard): decision, receipt and chain pages with an offline demo - #207
Adds a decision dashboard to agentctl-web so a buyer can see what the operator decided and whether the evidence can be trusted. Plan: docs/architecture/demo-dashboard.md. Guide: docs/dashboard.md.
New pages: /decisions (timeline with outcome filter), /decisions/{seq} (layers, findings, observed facts, declared intent, agent claims, model block, human decision, receipt hashes), /receipts (chain head, completeness, trust root).
A new pkg/decisionview package loads a receipt export from a directory or the receipt-writer, verifies it in process, and builds the views. A failed refresh keeps the last good data with a visible notice.
Trust: the badge reads Verified only under a pinned --trust-root and a signed manifest. Without a pinned root it reads Consistent only. A bad signature or record reads Failed.
Offline mode: --export-dir serves the pages with no cluster and no login, bound to localhost. make demo-dashboard serves a sample export from tools/demo-export.
Chart: with webUI.enabled and global.receipts.enabled, the web UI gets the writer URL, token and trust root, and the writer NetworkPolicy admits the web pods.
The decision pages set a strict CSP and load nothing external.
Type of change
New feature
Documentation update
Checklist
go build ./... passes
go vet ./... passes
go test ./... passes except TestControllers in internal/controller. It needs envtest assets that are not on this machine and fails the same way on main.
make lint passes
helm unittest charts: 43 pass. helm lint clean.
OSS/private boundary, issue-first and secret scan guards pass locally
No private-repo content leaked into OSS core
Commits are signed off, human-authored
Documentation updated
How to test
make demo-dashboard # then open http://127.0.0.1:8090
go test ./pkg/decisionview ./cmd/agentctl-web
helm unittest charts
Change one byte of a record in bin/demo-dashboard/export/records.jsonl and reload. The badge turns to Failed.
Known gaps
Pages show every decision to any signed-in user. There is no per-namespace filter.
The page reads a full export. The timeline shows 100 rows. A paged export from the writer is not built.
A decision still held for a human is not in the chain yet, so it shows only after someone decides it. Approve and reject stay on the workload pages.
The existing dashboard page and the demo page both define the layout blocks title and content. The later parse wins, so dashboard.html renders demo content. This predates this PR and is not changed here. The new pages use their own template sets, so they are not affected.
Related issues
Relates to the decision architecture work in #206.
Add /decisions, /decisions/{seq} and /receipts. Pages read a receipt export from
a directory (offline, no cluster) or the receipt-writer, verify it in process
against a pinned trust root, and say when the root is not pinned. Add
tools/demo-export for a sample export.
Signed-off-by: Shreyansh Sancheti <007ssancheti@gmail.com>
The chart points the web UI at the receipt-writer and admits it through the
writer NetworkPolicy. The navigation links to the decision pages when a source
is set. Add make demo-dashboard, docs/dashboard.md and a CHANGELOG entry.
Signed-off-by: Shreyansh Sancheti <007ssancheti@gmail.com>
The trust status appears after every decision field. A direct visit to a detail from a failed export shows untrusted content before its warning, and the failure note incorrectly says not to trust rows “below.” Render chainstatus near the top, before the decision details.
Avoid displaying zero hash as empty export chain head
pkg/decisionview/decisionview.go:169
An empty writer export has no chain head, but encoding the zero-value hash produces 64 zeroes. The receipts page then reports that value as a real head hash. Leave HeadHash empty when TotalReceipts is 0 so the template renders none.
Align held demo confidence with displayed evidence
tools/demo-export/main.go:95
The held demo records claim confidence 0.97, but this reason says 0.71 against a 0.95 threshold. The sample therefore presents a human hold that contradicts its displayed evidence. Pass 0.71 into the held fixtures, or use a non-confidence reason that matches their input.
This text always says the trust root was pinned, but unpinned mode verifies with trust data from the export and reports Consistent only. Make the introduction neutral so it does not claim authentication before the status block.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a decision dashboard to
agentctl-webso a buyer can see what the operator decided and whether the evidence can be trusted. Plan:docs/architecture/demo-dashboard.md. Guide:docs/dashboard.md./decisions(timeline with outcome filter),/decisions/{seq}(layers, findings, observed facts, declared intent, agent claims, model block, human decision, receipt hashes),/receipts(chain head, completeness, trust root).pkg/decisionviewpackage loads a receipt export from a directory or the receipt-writer, verifies it in process, and builds the views. A failed refresh keeps the last good data with a visible notice.--trust-rootand a signed manifest. Without a pinned root it reads Consistent only. A bad signature or record reads Failed.--export-dirserves the pages with no cluster and no login, bound to localhost.make demo-dashboardserves a sample export fromtools/demo-export.webUI.enabledandglobal.receipts.enabled, the web UI gets the writer URL, token and trust root, and the writer NetworkPolicy admits the web pods.Type of change
Checklist
go build ./...passesgo vet ./...passesgo test ./...passes exceptTestControllersininternal/controller. It needs envtest assets that are not on this machine and fails the same way onmain.make lintpasseshelm unittest charts: 43 pass.helm lintclean.How to test
Change one byte of a record in
bin/demo-dashboard/export/records.jsonland reload. The badge turns to Failed.Known gaps
titleandcontent. The later parse wins, sodashboard.htmlrenders demo content. This predates this PR and is not changed here. The new pages use their own template sets, so they are not affected.Related issues
Relates to the decision architecture work in #206.