Skip to content

Examples

The live demos are static HTML pages hosted at uh.uhvesta.com. Each is a self-contained export from uh review --dump-html. Open them without installing anything. Three come from the polyglot demo project in examples/demo/. The other three are real pull requests on open-source projects.

Each demo has two views:

View URL form What it shows
Execution Order <demo>.html The diff in call-graph order, with the structure lens, AST diff, and dependency graph
Classic + Peek <demo>.html?view=classic The flat file-order PR diff, with symbols underlined so you can peek their definitions inline (same as uh review --classic)

Reading the UI covers lenses, peeks, and move headers.

Live demos

Polyglot showcase PRs

Real squash-merged pull requests on uhvesta/uh that change files in examples/demo/. Size is lines changed (insertions plus deletions).

Demo Source Size What to look at
pr1.html · classic PR #1 · 437cec2 390 lines (+329 -61), 12 files Adversarial refactor in C++, Go, Java, Rust, Swift, and Zig. It has cross-file moves, reorders with edits, and bridge hops.
pr2.html · classic PR #2 · 1237ec6 412 lines (+343 -69), 9 files Schema changes and scoped AST diff in Proto, Python, TS, C, and Starlark. It was generated with --ast-diff.
pr3.html · classic PR #3 · b8a237c 286 lines (+268 -18), 6 files Straightforward bugfix with tests in Rust, Go, Java, and TypeScript. It fixes currency rounding and adds unit tests.

PR #1: adversarial refactor

  • Cross-file pure moves. PacketParser::parse moves from cpp/parser.cpp to cpp/parser_impl.cpp. CheckoutSession.canRetry moves from swift/SessionExtensions.swift to swift/Session.swift. Each move shows BASE/HEAD provenance headers. The moved code does not appear as added lines.
  • Same-file reorder with edits. PaymentProcessor.charge in java/PaymentProcessor.java, and RingBuffer.pop/push in zig/ring_buffer.zig.
  • Deep call chains and bridge hops. Edits land in rust/pipeline.rs and rust/pricing.rs, but orchestrate_settlement is unchanged. Edits also land in go/service.go and go/ledger.go, but AuditMiddleware is unchanged.

PR #2: schema changes and scoped AST diff

  • Protobuf and Python schemas. proto/ledger.proto gains the Transfer, BatchTransfer, and GetSettlementStatus RPCs, loses LegacyPing, and has its messages reordered. RiskPolicy in python/risk.py gets more fields.
  • Scoped AST diff. ts/checkout.ts and ts/format.ts are reformatted. Two small logic changes are mixed in: Math.floor becomes Math.round, and a discount_exceeds_subtotal guard is added.
  • C and Starlark. c/checksum.c adds frame header verification. In starlark/BUILD.bazel, targets are reordered and deps are updated.

PR #3: bugfix with tests

  • A fix to round currency half-up, plus SurchargeBreakdown, with unit tests in Rust, Go, Java, and TypeScript.

Real-world open-source PRs

Demo Source Size What to look at
tokio-8819.html · classic tokio-rs/tokio#8819 5 files (+144 / -85) Rust (MIT). Keeps the Waker::clone() vtable intact across block_on and JoinSet.
caddy-8400.html · classic caddyserver/caddy#8400 4 files (+81 / -2) Go (Apache-2.0). Fixes how the handler read deadline interacts with read_body.
bazel-32604.html · classic bazelbuild/bazel#32604 31 files (+708 / -235) Java (Apache-2.0). Splits ensureInputsPresent inputs into chunks in a large monorepo.

The index page links to all of these: https://uh.uhvesta.com/.

The demo project

examples/demo/ holds acmecore, a made-up ledger and payment gateway. It uses all 11 languages uh supports. PRs #1 to #3 change it.

Language Files
Rust rust/pipeline.rs, rust/pricing.rs, rust/pricing_test.rs
Go go/service.go, go/ledger.go, go/service_test.go
Java java/PaymentProcessor.java, java/Gateway.java, java/PaymentProcessorTest.java
Python python/router.py, python/risk.py, python/test_router.py
TypeScript ts/checkout.ts, ts/format.ts, ts/checkout.test.ts
C c/checksum.h, c/checksum.c
C++ cpp/parser.h, cpp/parser.cpp, cpp/parser_impl.cpp
Swift swift/Session.swift, swift/SessionExtensions.swift
Zig zig/ring_buffer.zig
Protocol Buffers proto/ledger.proto
Starlark starlark/BUILD.bazel

All paths are relative to examples/demo/.

Reproduce the demos locally

Open a demo from its GitHub URL (needs a logged-in gh CLI), or from a commit range in a local clone of uhvesta/uh. --open starts the local review server and opens it in the browser. --dump-html <path> writes the same self-contained HTML file that is hosted, then exits. For every input form and output option, see Reviewing changes.

uh review https://github.com/uhvesta/uh/pull/1 --open
uh review https://github.com/uhvesta/uh/pull/2 --ast-diff --open
uh review https://github.com/uhvesta/uh/pull/3 --open
uh review https://github.com/tokio-rs/tokio/pull/8819 --open
uh review https://github.com/caddyserver/caddy/pull/8400 --open
uh review https://github.com/bazelbuild/bazel/pull/32604 --open
uh review https://github.com/uhvesta/uh/commit/437cec24e6847506db7b9cd25e5b5b58b8b16d0b --open
uh review https://github.com/uhvesta/uh/commit/1237ec6345329d873032edffd68f9993750bf88a --ast-diff --open
uh review https://github.com/uhvesta/uh/commit/b8a237ca11b0a5f8e4207e147c781a235ecab1e5 --open

These commands build the hosted pages. .github/workflows/docs.yml runs them. Run them from the root of a clone of uhvesta/uh with full history.

uh review . 437cec2^..437cec2 --dump-html _site/pr1.html
uh review . 1237ec6^..1237ec6 --ast-diff --dump-html _site/pr2.html
uh review . b8a237c^..b8a237c --dump-html _site/pr3.html
uh review https://github.com/bazelbuild/bazel/pull/32604 --dump-html _site/bazel-32604.html
uh review https://github.com/tokio-rs/tokio/pull/8819 --dump-html _site/tokio-8819.html
uh review https://github.com/caddyserver/caddy/pull/8400 --dump-html _site/caddy-8400.html

For a live server instead, replace --dump-html <path> with --open, e.g. uh review . 437cec2^..437cec2 --open.

Note

PR #2 is the only demo built with --ast-diff, which turns on scoped AST diff highlighting. Keep the flag to match the hosted page.

Queue all three showcase PRs

uh queue add https://github.com/uhvesta/uh/pull/1
uh queue add https://github.com/uhvesta/uh/pull/2
uh queue add https://github.com/uhvesta/uh/pull/3
uh queue --open

This adds the three PRs to the review queue and opens the queue home page. See Review queue for other queue commands.