You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 53ea17e
Browse filesBrowse the repository at this point in the historyBrowse files
`StrictHtmlComplianceTest` (no scripts/handlers/iframes/javascript: URIs on the simple
247
+
report — permanent gate), `contrast.test.cjs` (contrast math from the palette),
248
+
`keyboard-parity.test.cjs`, and the `wcag-axe.spec.js` E2E (zero violations, both
249
+
reports, light + dark, before/after interaction).
250
+
-**E2E** (`report/e2e/`, Playwright chromium): fixture reports are generated into
251
+
`report/target/e2e/` by `SampleReportGenerationTest` (interactive unminified/minified,
252
+
Kotlin-disharmony legs, junit4-fixture leg, simple leg) and opened via `file://`.
253
+
254
+
## Graphs: client-side synthesis + hover model (two implementations)
255
+
256
+
The interactive report's Class/Package/Cycle maps and popups render from the rf-data
257
+
payload's inline **hierarchy** trees. DOT synthesis has exactly two implementations that
258
+
must stay byte-identical (cross-pinned):
259
+
260
+
- Java **`NestedDotBuilder`** (the golden; pinned by `NestedDotBuilderTest`), and
261
+
- JS **`rf-hierarchy-dot.js`** (pinned by `hierarchy-dot.test.cjs` against
262
+
`src/test/resources/golden/hierarchy-dot/*.dot` generated from the parity fixture).
263
+
264
+
The standalone viewer (`viewer/index.html`) still carries its own inline copy, pinned by
265
+
`ViewerScriptTest`; it migrates to `rf-hierarchy-dot.js` post-release (§12.3 follow-up).
266
+
Both palettes synthesize from the same bytes — dark mode adds only
267
+
`fontcolor = "#9fb0c0"` edge labels (vizdom bakes label color into fill-only glyph
268
+
paths); break-up cluster colors are re-driven by CSS (`rf-graphs.css`), never baked.
269
+
270
+
Hover highlights: `rf-graphs-vizdom.js` derives the neighborhood from the vizdom
271
+
`<title>` texts and toggles `rf-hover-*` classes (amber edge/focus, green in, blue out,
272
+
mutual partners amber; `focusin`/`focusout` keyboard parity), styled by `rf-graphs.css`
273
+
from the palette; Sigma 2D mirrors the model via node/edge reducers
274
+
(`rf-graphs-sigma.js`, dark hover renderer `#1a2330` label box); the 3D popup
275
+
(`rf-graphs-3d.js`) always uses the dark accent set (its WebGL canvas paints its own
276
+
background) with O(changed) sprite recolors and the `<4000` threshold guard. Failed CDN
277
+
widgets surface a visible aria-live notice (`announceWidgetFailure`) instead of silent
278
+
breakage.
279
+
213
280
## Testing Notes
214
281
-**TDD is required when implementing code.** Write tests before production code using the red-green-refactor cycle. Use the Given-When-Then format for test structure.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ coverage (JaCoCo aggregation)
62
62
63
63
**cost-benefit-calculator** — Orchestrates the full pipeline: runs effort-ranker and change-proneness-ranker, combines scores into `RankedDisharmony` objects. Main orchestration class: `CostBenefitCalculator`.
64
64
65
-
**report** — Generates HTML (with embedded bubble charts), CSV, and JSON output. Reports with >4000 classes switch to a simplified 3D viewer.
65
+
**report** — Generates the interactive HTML report, the strictly-HTML simple report, CSV, and JSON output. Both HTML reports render from Mustache templates (`templates/`) with all assets inlined from classpath files (`assets/`) by `AssetInliner`; the interactive report embeds the report DTO as the `rf-data` JSON payload and synthesizes its graphs client-side (Chart.js bubble charts, vizdom class/package/cycle maps, Sigma 2D and 3D force-graph popups with a colored hover model, light/dark/system theming, table filtering/sorting/pagination/CSV/copy). Reports with >4000 classes switch to a simplified 3D viewer. See AGENTS.md for the template/asset architecture and test map.
Copy file name to clipboardExpand all lines: README.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,16 @@ It scans your Git repository and generates a single page application by running:
11
11
Code map viewers are powered by [3D Force Graph](https://vasturiano.github.io/3d-force-graph), [sigma.js](https://www.sigmajs.org/), and [GraphViz DOT](https://graphviz.org/docs/layouts/dot/) using [Vizdom](https://github.com/vizdom-dev/vizdom) to render the DOT graph.
12
12
<br>If there are more than 4000 classes + relationships, a simplified 3D viewer will be available to avoid page load slowdowns. Features will be toggleable in the 3D UI in a future release.
13
13
14
+
### Report features
15
+
The generated `refactor-first-report.html` is a **single self-contained file** — open it directly from disk (`file://`), no server needed. It includes:
16
+
-**Light / dark / system theme** (system is the default) with pure-CSS switching and persistence
17
+
-**Chart.js bubble charts** (priority vs. effort per disharmony; click a bubble to open the source file)
18
+
-**Table toolkit**: sticky headers, filtering with a live match count, three-state column sorting, pagination for long tables, CSV export (RFC 4180 + formula-injection neutralization), and click-to-copy cells with keyboard support
19
+
-**Colored graph hover model**: hovering an edge/node highlights its neighborhood (amber/green/blue by direction) in the SVG maps, the Sigma 2D popup and the 3D popup; keyboard focus reproduces the pointer hover
20
+
-**WCAG 2.2 AA conformance** — see the accessibility statement below
21
+
22
+
**Accessibility statement (WCAG 2.2 AA):** the generated reports target WCAG 2.2 Level AA and are continuously tested for it (structure, contrast, keyboard operation, and axe-core scans on every fixture — see `report/e2e/specs/wcag-axe.spec.js`). Known limitations: the 3D graph canvas has a text alternative via the tables and the 2D map rather than within the canvas, and third-party CDN widgets (Chart.js, sigma.js, 3d-force-graph, vizdom) are outside this report's control; the report degrades gracefully to readable tables when they are unavailable.
23
+
14
24
## How to Use RefactorFirst Quickly
15
25
Run the command below in your Java project's top-level directory. You'll need Git, Java 17 (or newer) and Maven 3 installed. This command will analyze Maven and non-Maven projects:
16
26
```bash
@@ -112,7 +122,7 @@ Specify with -D if running on the command line. e.g. ```-DbackEdgeAnalysisCount
112
122
|showDetails|Shows God Class metrics| false |
113
123
|backEdgeAnalysisCount|Number of back edges in a cycle to analyze. <br>If total number of back edges is greater than the value specified, it analyzes the number of minimum weight edges specified.<br>**If 0 is specified, all back edges will be analyzed**| 50 |
114
124
|analyzeCycles|Analyzes the 10 largest cycles (will be configurable in the future)| true |
115
-
|minifyHtml|Minifies the generated HTML report. Only available on ```htmlReport``` and ```simpleHtmlReport``` goals. May cause issues with large reports.| false |
125
+
|minifyHtml|Minifies the generated HTML report with [minify-html](https://github.com/wilsonzlin/minify-html). Only available on ```htmlReport``` and ```simpleHtmlReport``` goals. Both reports are verified to stay fully functional after minification (round-trip tested in CI and E2E). May cause issues with very large reports.| false |
116
126
|excludeTests|Exclude test classes from analysis| true |
117
127
|testSrcDirectory|Excludes classes containing this pattern from analysis|```src/test```|
118
128
|projectName|The name of your project to be displayed on the report| Your Maven project name |
0 commit comments