Skip to content

Replace multi-file HTML issue report with single-page interactive report#7472

Draft
JohanEntur wants to merge 1 commit intoopentripplanner:dev-2.xfrom
JohanEntur:improve-html-issue-report
Draft

Replace multi-file HTML issue report with single-page interactive report#7472
JohanEntur wants to merge 1 commit intoopentripplanner:dev-2.xfrom
JohanEntur:improve-html-issue-report

Conversation

@JohanEntur
Copy link
Copy Markdown

Summary

Replaces the previous multi-file HTML issue report with a single self-contained index.html.

The previous reporter split large issue types across many separate HTML files requiring operators to click between pages using a very obnoxious navigation system. The new report embeds all issue data as JSON in a single file with inline CSS and JavaScript and allows the user to view all errors in one view, open and collapse per issue, and SEARCH among the issues.

Disclosure — AI usage

This whole PR was created using Claude Code. It has not only written the code but also guided me through the PR process. I have no personal knowledge of code or development. I did have some guiding by @t2gran while doing this, so it shouldnt be a complete mes. Please review with this in mind.

New features:

Full-text search across type names and message content, with matching groups auto-expanding
Sort by name (A→Z) or by issue count
Collapsible groups with client-side pagination (configurable, default 50 per page)
Download issues per type as .txt or .geojson
Optional white-label config via ReportConfig (app name, logo, accent colour)

Other changes:

Fix GeoJsonWriter: was passing the unfiltered issue list to makeContourFeatures instead of the geometry-filtered subset
Remove maxDataImportIssuesPerFile from BuildConfig — this field controlled splitting issues across multiple files, which is no longer done. Deployments with this field set in build-config.json will need to remove it.
Future work: A natural next step would be to add a label/tag concept to DataImportIssue (supporting multiple labels per issue type, e.g. transit, osm, realtime) so operators can filter by domain. This is intentionally left out of this PR to keep the scope small.

Unit tests

No new unit tests are added in this PR. A follow-up could add a SinglePageReportWriterTest that writes a report from a small set of synthetic issues and asserts structural properties of the output.

@JohanEntur JohanEntur requested a review from a team as a code owner March 26, 2026 19:30
@JohanEntur
Copy link
Copy Markdown
Author

CURRENT:
image

NEW:
image

@optionsome optionsome added the !Improvement A functional improvement or micro feature label Mar 31, 2026
@optionsome optionsome marked this pull request as draft April 7, 2026 08:42
@JohanEntur JohanEntur force-pushed the improve-html-issue-report branch from 0c5715f to ff02285 Compare April 7, 2026 10:52
@JohanEntur
Copy link
Copy Markdown
Author

DataImportIssueReporterTest has been removed. It tested partitionIssues(), a method that split issues into multiple HTML files server-side. That logic no longer exists — pagination is now handled client-side in the generated HTML.

The previous reporter split large issue types across 80+ separate HTML
files, requiring operators to navigate between pages. This replaces it
with a single self-contained index.html containing all issues as
embedded JSON, with inline CSS/JS for filtering, search, and pagination.

Changes:
- Add SinglePageReportWriter: generates one HTML file with interactive
  search, category tabs, collapsible groups, and client-side pagination
- Add IssueCategory: groups issue types by audience (transit data, OSM,
  real-time, other) shown as filter tabs in the report
- Add ReportConfig: optional white-label config (app name, logo, colors)
- Add issue-help.json: plain-language help text for all known issue types
- Remove HTMLWriter and IssueColors: no longer needed
- Fix GeoJsonWriter: was passing unfiltered issues to makeContourFeatures
- Update GraphBuilderModules: drop maxDataImportIssuesPerFile argument
  (pagination is now handled client-side; the BuildConfig field is kept
  for backwards compatibility but has no effect)
@JohanEntur JohanEntur force-pushed the improve-html-issue-report branch from ff02285 to 2633855 Compare April 7, 2026 15:12
@leonardehrenfried
Copy link
Copy Markdown
Member

What's the status of this PR? Why is it a draft?

@testower
Copy link
Copy Markdown
Contributor

Because it needs to be fixed and vetted properly by a developer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants