Skip to content

feat: add swarm dashboard tooling and package manifest#26

Merged
OgeonX-Ai merged 2 commits into
masterfrom
feat/swarm-dashboard
Jul 6, 2026
Merged

feat: add swarm dashboard tooling and package manifest#26
OgeonX-Ai merged 2 commits into
masterfrom
feat/swarm-dashboard

Conversation

@OgeonX-Ai

Copy link
Copy Markdown
Contributor

Summary

  • Tracks the previously untracked swarm dashboard tooling: dashboard/ (View-SwarmDashboard.ps1, index.html, server.js), package.json, run-dashboard.ps1
  • Part of the 2026-07-06 workspace-integrity hardening batch (quick task 260706-h8b): these files existed only on disk and were one disk failure away from loss

Notes

  • Secret scan clean; two files reference a local absolute path (C:\PersonalRepo\.planning\traces.jsonl) — core functionality for the local dashboard, flagged for a future portability pass
  • Direct push to master is blocked by branch protection (GH006), hence this PR

🤖 Generated with Claude Code

- dashboard/View-SwarmDashboard.ps1: console-based live tail of trace log
  (C:\PersonalRepo\.planning\traces.jsonl), refreshed every 2s
- dashboard/server.js: minimal Node HTTP server serving dashboard/index.html
  and a /data endpoint that streams the last 20 trace log entries as JSON
- dashboard/index.html: browser table view polling /data every 2s to render
  swarm run traces (time, span, persona, action, tokens, reasoning)
- package.json: manifest exposing `dashboard` (PowerShell) and
  `dashboard-web` (Node server) npm scripts
- run-dashboard.ps1: entry point that launches View-SwarmDashboard.ps1

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e85554ac1d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dashboard/server.js Outdated
}
});

server.listen(PORT, () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bind the dashboard server to loopback

When npm run dashboard-web is run on a workstation where port 3000 is reachable, omitting the host makes Node bind the HTTP server to the unspecified address, so the unauthenticated /data endpoint can expose local trace contents to other machines even though the console message advertises localhost. Since this dashboard is for local traces, pass 127.0.0.1 or localhost to listen.

Useful? React with 👍 / 👎.

Comment thread dashboard/server.js
Comment on lines +50 to +51
res.writeHead(500);
res.end('Error reading trace file');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return JSON when the trace file is absent

When the dashboard is opened before C:\PersonalRepo\.planning\traces.jsonl exists, such as on a fresh checkout or any machine without that local path, /data reaches this catch and sends a plain-text 500 while dashboard/index.html always calls await resp.json(). That makes every poll throw and leaves the web dashboard blank instead of showing an empty/waiting state; return JSON like [] or handle non-OK responses in the client.

Useful? React with 👍 / 👎.

Comment thread dashboard/index.html Outdated
const tr = document.createElement('tr');
const fmtTime = new Date(log.timestamp).toLocaleTimeString();
const reason = log.reasoning_path && log.reasoning_path.length > 60 ? log.reasoning_path.slice(0,57) + '...' : log.reasoning_path;
tr.innerHTML = `

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Render trace fields as text

When a trace entry contains HTML in fields such as reasoning_path, persona, or action_type, assigning the interpolated row to innerHTML lets that markup execute in the dashboard, so model- or prompt-derived trace text can become script in the operator's browser. Build the cells with textContent or escape each value before interpolation.

Useful? React with 👍 / 👎.

@OgeonX-Ai OgeonX-Ai merged commit 101f63d into master Jul 6, 2026
11 checks passed
@OgeonX-Ai OgeonX-Ai deleted the feat/swarm-dashboard branch July 6, 2026 15:36
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