Skip to content

feat(dashboard): decision, receipt and chain pages with an offline demo - #207

Merged
shreyanshjain7174 merged 5 commits into
mainfrom
feat/demo-dashboard
Oct 2, 2026
Merged

shreyanshjain7174 merged 5 commits into
mainfrom
feat/demo-dashboard

Conversation

@shreyanshjain7174

Copy link
Copy Markdown
Collaborator

What does this PR do?

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.

Signed-off-by: Shreyansh Sancheti <007ssancheti@gmail.com>
Signed-off-by: Shreyansh Sancheti <007ssancheti@gmail.com>
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>
Copilot AI balanced review requested due to automatic review settings October 2, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Verification failures discard cached data, and chart namespace wiring can prevent web UI pods from starting.

Review effort: Balanced
Findings: 1 High severity · 3 Medium severity · 4 Low severity

Open (8)
What changed in this PR

Adds receipt-backed decision views to agentctl-web, exposing the existing decision architecture through web and offline modes.

Changes:

  • Adds decision, receipt, and chain views with verification.
  • Adds offline demo generation and documentation.
  • Connects Helm web UI deployments to the receipt writer.
File Description
tools/​demo-export/​main.go Generates a signed sample export.
pkg/​decisionview/​decisionview.go Builds and caches verified views.
pkg/​decisionview/​decisionview_test.go Tests verification and caching.
Makefile Adds the offline demo target.
docs/​dashboard.md Documents dashboard usage.
docs/​architecture/​demo-dashboard.md Records dashboard architecture.
cmd/​agentctl-web/​templates/​layout.html Adds navigation links.
cmd/​agentctl-web/​templates/​decisions/​receipts.html Renders chain details.
cmd/​agentctl-web/​templates/​decisions/​panel.html Renders timeline and status.
cmd/​agentctl-web/​templates/​decisions/​layout.html Defines decision page layout.
cmd/​agentctl-web/​templates/​decisions/​home.html Defines the timeline page.
cmd/​agentctl-web/​templates/​decisions/​detail.html Renders decision details.
cmd/​agentctl-web/​static/​style.css Styles decision pages.
cmd/​agentctl-web/​main.go Wires online and offline routes.
cmd/​agentctl-web/​handlers.go Controls navigation visibility.
cmd/​agentctl-web/​decisions.go Implements configuration and handlers.
cmd/​agentctl-web/​decisions_test.go Tests routes, security, and rendering.
charts/​tests/​webui_decisions_test.yaml Tests Helm dashboard wiring.
charts/​templates/​webui.yaml Configures writer access and mounts.
charts/​templates/​receipt-writer.yaml Admits web UI traffic.
CHANGELOG.md Records the new feature.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread charts/templates/webui.yaml
Comment thread cmd/agentctl-web/decisions.go Outdated
Comment thread pkg/decisionview/decisionview.go Outdated
Comment thread pkg/decisionview/decisionview.go Outdated
Comment thread cmd/agentctl-web/templates/decisions/panel.html Outdated
Comment thread docs/architecture/demo-dashboard.md Outdated
Comment thread docs/dashboard.md Outdated
Comment thread docs/dashboard.md Outdated
…amespace

Signed-off-by: Shreyansh Sancheti <007ssancheti@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Empty-chain reporting, misleading trust placement, and inconsistent demo evidence need correction.

Review effort: Balanced
Findings: None

Resolved since last review (8)
Previously missed (4)

In code that hasn't changed since last review

Medium severity Render trust status before decision details

cmd/​agentctl-web/​templates/​decisions/​detail.html:110

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.

Medium severity 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.

Medium severity 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.

Low severity Use neutral introduction for unpinned trust mode

cmd/​agentctl-web/​templates/​decisions/​receipts.html:4

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.

@shreyanshjain7174
shreyanshjain7174 merged commit 08d2ed6 into main Oct 2, 2026
7 checks passed
@shreyanshjain7174
shreyanshjain7174 deleted the feat/demo-dashboard branch October 2, 2026 06:41
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.

2 participants