Skip to content

feat: add HTML inventory report generator with Perplexity editorial design#28

Closed
shrwnsan wants to merge 7 commits into
perplexityai:mainfrom
shrwnsan:feat/html-report-script
Closed

feat: add HTML inventory report generator with Perplexity editorial design#28
shrwnsan wants to merge 7 commits into
perplexityai:mainfrom
shrwnsan:feat/html-report-script

Conversation

@shrwnsan
Copy link
Copy Markdown

@shrwnsan shrwnsan commented May 27, 2026

Summary

Adds scripts/generate-report.py — a zero-dependency Python 3.10+ script that reads bumblebee's inventory.ndjson output and produces a single self-contained HTML report with dark/light theming, scroll-spy navigation, and inline data visualization.

Motivation

bumblebee scan generates structured NDJSON, but there is no built-in reporting. Users need to either write custom tooling or parse JSON manually. This script provides an immediate, visually rich overview of scan results — ecosystem distribution, version sprawl, top projects by package count, confidence scores, and detection sources — with zero setup beyond Python 3.

Changes

  • New: scripts/generate-report.py (~1400 lines) — the sole deliverable
  • Updated: .gitignore — added report.html to exclude generated output

Design decisions

Decision Rationale
Standalone script, not a Go subcommand Zero build impact on bumblebee core; Python is universally available
Self-contained HTML (inline CSS/JS) No web server, no build step — just open in a browser
Perplexity editorial design system Visual alignment with the parent brand; dark+light modes
7 fixed sections (not configurable) Opinionated information architecture: Overview → Risks → Landscape → Reference
table-layout: auto (not fixed) Avoids Chrome/Brave column misalignment with border-radius wrappers
Single-span truncation for project paths Eliminates hover flash that the dual-span approach caused

Screenshots

Light theme (focus view)

Light theme report

Dark theme (focus view)

Dark theme report

Light theme — section tabs

Ecosystems

Light Ecosystems

Lifecycle

Light Lifecycle

Versions

Light Versions

Projects

Light Projects

Confidence

Light Confidence

Sources

Light Sources

Roots

Light Roots

Testing

  • Tested with real inventory.ndjson (7,895 packages, 7 ecosystems)
  • Dark/light theme toggle with localStorage persistence
  • Story/Focus view toggle with localStorage persistence
  • Focus tabs switch sections and update URL hash
  • Scroll-spy page outline shows active section in Story view
  • Table column alignment verified in Chrome and Brave (macOS arm64)
  • Project path hover truncation — no flash or layout shift
  • Early-exit guards for empty/missing input files

Checklist

  • Code follows project conventions (see CONTRIBUTING.md)
  • No new dependencies introduced
  • Generated output (report.html) is gitignored
  • Ready for upstream submission to perplexityai/bumblebee

shrwnsan added 4 commits May 25, 2026 18:51
Generates a self-contained HTML report from bumblebee scan output.

Features:
- 7 ordered sections: Ecosystems, Lifecycle Scripts, Version Sprawl,
  Top Projects, Confidence Levels, Detection Sources, Scan Roots
- Dark/light theme toggle with localStorage persistence
- Scroll-spy page outline (Notion-style mini-TOC)
- Scroll progress indicator
- Responsive layout (mobile through desktop)
- Animated section reveals and hover interactions
- Zero external dependencies (Python 3.10+ stdlib only)

Usage:
    python3 scripts/generate-report.py inventory.ndjson
    python3 scripts/generate-report.py -o report.html
Dark mode: Midnight Parchment
- Deep forest-teal base (#091717) with ivory ink text
- Teal accent (#20808d) for numbering and decoration
- Subtle teal hex-grid background texture

Light mode: Perplexity Editorial
- Warm parchment cream (#fbfaf4) from Perplexity blog
- Deep teal-black text (#13343b)
- Electric blue link gradient in header

Typography:
- Newsreader (serif) for display headings — editorial authority
- Outfit (geometric sans) for body text
- JetBrains Mono for code and data

Visual refinements:
- Sharper border-radius (4px/8px, down from 8px/14px)
- Lighter hex-grid strokes (0.5px weight)
- Badge and header adapt to both themes
- Section numbering: teal in dark, dark-teal in light
Replaces the proj-short/proj-full dual-span swap with a single span using
text-overflow: ellipsis by default and white-space: normal on hover. This
eliminates the visible flash in the 13 cases where short==full, and removes
the unnecessary short-name truncation that made names like 'npm' unhelpful.
@shrwnsan shrwnsan force-pushed the feat/html-report-script branch from fe217a6 to d4d4810 Compare May 27, 2026 11:08
@shrwnsan
Copy link
Copy Markdown
Author

Superseded by #29, which is opened from a clean branch with sanitized screenshots and updated report refactors.

@shrwnsan shrwnsan closed this May 27, 2026
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