Skip to content

feat: nudgec trace-view — local web UI for traces (v1.2) - #21

Merged
NekomyaDev merged 5 commits into
mainfrom
feature/trace-viewer
Jul 29, 2026
Merged

NekomyaDev merged 5 commits into
mainfrom
feature/trace-viewer

Conversation

@NekomyaDev

Copy link
Copy Markdown
Owner

Trace viewer — v1.2 flagship (Door 1 close-out)

nudgec trace-view <trace.jsonl> [--port N] [--no-open] serves a local, self-contained web UI over any frozen-v1 trace: Chrome DevTools for agent runs.

What it does

  • Timeline of every llm.call / tool.call / fn.return record, with seq numbers and kind badges
  • Stats header: record counts, token totals (in/out), total cost, repair count
  • Repair highlighting: repair_round > 0 calls surface in amber; "repairs only" filter isolates them — this is where the debugging value lives
  • Filters by record kind + free-text search; detail pane per record (input/output, cost, tokens, raw JSON)
  • j/k or arrow-key navigation through the timeline

Constraints respected

  • Zero dependencies — server is a stdlib TcpListener, UI is one embedded HTML file (include_str!), no external assets (test-enforced)
  • Trace is validated against the frozen v1 schema before serving; invalid traces refuse to start with the same diagnostics as trace-check
  • Binds 127.0.0.1 only; default port 8321; auto-opens the browser unless --no-open

Tests

  • http_response_has_status_type_and_length — response framing
  • viewer_html_is_embedded_and_self_contained — UI embedded, fully offline (no https://, no external script/link tags)

Next in v1.2 (separate PRs): par branch visualization once branch ids land in NTF v1.1, trace-diff UI mode on top of this server.

@NekomyaDev
NekomyaDev merged commit 9e47fce into main Jul 29, 2026
2 checks passed
@NekomyaDev
NekomyaDev deleted the feature/trace-viewer branch July 29, 2026 12:02
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.

1 participant