Skip to content

Code Visualizer: review a branch with charts, highlights, approvals and an assistant - #6358

Merged
shai-almog merged 13 commits into
masterfrom
code-visualizer
Nov 30, 2026
Merged

shai-almog merged 13 commits into
masterfrom
code-visualizer

Conversation

@shai-almog

Copy link
Copy Markdown
Collaborator

Summary

Adds the Code Visualizer, a desktop tool for reviewing a branch (for example a large change written with an AI assistant). It opens with mvn cn1:visualize -Dcodevisualizer.base=master (Gradle: ./gradlew visualize -Pcodevisualizer.base=master).

  • Analyzer (maven/code-model): indexes the project and works out the branch's changes from git: per-method diffs, renames, before/after flowcharts, call impact, commits and approvals.
  • App (scripts/code-visualizer): a Codename One desktop app with these views:
    • Summary: counts, a treemap, change per commit and the methods to look at first.
    • Highlights: the methods most worth studying, one at a time.
    • Graph, Calls and Flow.
    • Approvals, with Unapproved Only and "Changed Since Approval".
    • Find, a tour, and dark/light themes with font scaling.
  • Assistant integration: MCP tools (visualizer_show, visualizer_model, visualizer_listen/visualizer_explain, visualizer_coach, ...) let an assistant drive the window and answer questions asked in it.
  • Build and release:
    • The visualize goal is in the Maven and Gradle plugins.
    • code-visualizer.yml builds and tests the analyzer and the app.
    • release.yml publishes the app.
    • update-version.sh bumps its poms.
    • code-model is part of the SpotBugs/PMD gates in pr.yml.
  • Core additions:
    • CodeLineHighlight and line highlights in CodeEditor/CodeView.
    • NodeGraph/GraphNode/GraphEdge tooltips.
    • CoachMarks areas inside a target.
    • ScrollSurface zooms where the pointer is.
    • ContextMenu no longer dims the window behind it.
  • JavaSE port (affects every text field on Retina):
    • With no skin, the native editor's bounds and font are now in AWT points and it is painted scaled into the canvas. Before, it covered the wrong area: in a dialog it sat over the buttons, so they could not be clicked. With a skin, painting is unchanged.
    • Tab still moves between fields and opens a Picker.
    • Cmd/Ctrl+Enter submits the form's default command when it has one.
  • Docs: a developer guide section with hand-picked screenshots, and the code-visualizer skill.

Testing

  • code-model unit tests: 10/10.
  • App MCP suite VisualizerToolsTest: 10/10.
  • JavaSE port: the new JavaSEPortEditorBoundsTest (3/3) passes. 604 of 607 tests pass in total; the 3 CodenameOneExtensionTest failures also happen on a clean master on the machine this was tested on.
  • SpotBugs and PMD report zero findings for core-unittests, code-model and the plugins. The cast-semantics, control-character and author-tag checks pass.
  • Reviewed with six rounds of adversarial review over the whole branch until clean.
  • Checked by hand: text editing in the simulator on a Retina display.

🤖 Generated with Claude Code

shai-almog and others added 8 commits November 30, 2026 08:11
…nd an assistant

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…approval fingerprint, kill git on interrupt

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, Tab opens a Picker again

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…avigation, pure renames, root module, tab errors, launch script

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… approval fingerprint, goal doc

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…files, method fingerprint keeps line breaks, trimmed model guard, title kept, test git isolated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rce imports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Cloudflare Preview

@github-actions

Copy link
Copy Markdown
Contributor

Developer Guide build artifacts are available for download from this workflow run:

Developer Guide quality checks:

  • AsciiDoc linter: No issues found (report)
  • Vale: 12 alert(s) (11 errors, 1 warnings, 0 suggestions) (exit code 1) (report)
  • Paragraph capitalization: No paragraph capitalization issues (report)
  • LanguageTool: 5 advisory match(es) — top: MORFOLOGIK_RULE_EN_US (2), HAVE_TWITTER (1), PREPOSITION_VERB (1) (report)
  • Image references: No unused images detected (report)

@shai-almog

shai-almog commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Compared 12 screenshots: 12 matched.
✅ JavaSE simulator integration screenshots matched stored baselines.

shai-almog and others added 5 commits November 30, 2026 13:13
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s its tools, CI runs on its own files

The skill moves from the repository into the project skill (references/code-visualizer.md),
so the Initializr and the Maven and Gradle templates ship it. The window always serves
MCP (8766, or a free port) and writes target/cn1-visualizer.port; Sim.java --visualizer
reads it. The workflow runs on the visualizer's own files and nightly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ors, bad port falls back

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn form

The snippet master added in #6360 used the form of the snippet before it, so
the doc-snippets gate could not compile it on its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shai-almog
shai-almog merged commit ea528dd into master Nov 30, 2026
29 of 41 checks passed
@shai-almog
shai-almog deleted the code-visualizer branch November 30, 2026 18:33
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