Skip to content

Landing page and dashboard v2, with light/dark switch and Space Mono - #4

Merged
royalpriest merged 2 commits into
mainfrom
claude/project-thread-q90zvi
Nov 7, 2026
Merged

royalpriest merged 2 commits into
mainfrom
claude/project-thread-q90zvi

Conversation

@royalpriest

@royalpriest royalpriest commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Two parts, one commit each: the landing page, then the dashboard. Both share the same theme files (_theme.html and _theme_button.html), which provide Space Mono and a light/dark switch. The switch is saved in the browser and follows the system setting until you choose.

1. Landing page

  • The page (report_tool/templates/landing.html) replaces the bare upload form. It has:
    • a headline;
    • a live preview built from the sample file;
    • how it works;
    • what's in the report;
    • the columns the file needs.
  • Better file input:
    • drag and drop, or browse;
    • type, size and emptiness are checked before upload;
    • the chosen file shows its name and size, with Replace and Remove;
    • "Building report…" shows while it works.
  • Clearer errors. Each one says what went wrong and how to fix it:
    • wrong file type;
    • not a real workbook;
    • missing columns, linking to the template;
    • no usable rows;
    • too large.
  • /template.xlsx: a starter workbook with the right headers.
  • Loader: two new error types, NotAWorkbookError and MissingColumnsError. Both are subclasses of WorkbookError, so the CLI is unchanged.

2. Dashboard v2

  • Filters:

    • period: all weeks, or the last 4 or 6 when there's enough data;
    • route;
    • class.

    The page re-computes everything in the browser from the bookings embedded as JSON. Names are masked before they're embedded, and money is kept in whole cents. In a no-JavaScript check, the browser's headline numbers matched the server's exactly on three test files.

  • Headline numbers show the change against the previous period with an arrow, sign and words, for example "▼ down 9.1% last 6 wk vs previous 6". Net revenue also has a sparkline.

  • Charts:

    • a new "Cancellation rate by route" chart, with an average line; above-average routes are shown in darker orange;
    • the weekly revenue chart shades the compared weeks, labels the high and low weeks, and shows a tooltip on hover;
    • the route and class charts highlight the chosen route or class rather than dropping the others.
  • Data quality: a green line says "All N rows used". The amber warning stays for skipped rows.

  • Table:

    • new Discount column;
    • sortable headers with aria-sort;
    • search and status filter;
    • paging, with rows per page.

    Print shows all rows, and Export CSV exports the filtered rows.

  • Header: shows the file name, row count and generation time. "Upload another file" appears only in the web app (render_html(upload_url=...)).

  • Removed the Python chart geometry (line_chart, nice_axis and related code), which the page now draws itself.

  • Version bumped to 1.2.0.

Checks

  • pytest: 51 passed. ruff check and ruff format --check are clean.
  • Checked in Chromium in light, dark and at phone width, with no console errors. Also checked: filters, sorting, paging, the theme toggle, and upload errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_016gtNTGbmvq2DdoGC4air5K

- New landing page (report_tool/templates/landing.html) replaces the bare
  upload form: hero, live preview from the sample file, how it works,
  what the report contains and the required columns.
- File input checks type, size and emptiness before upload, supports
  drag and drop, shows the chosen file and a progress state.
- Light/dark theme switch saved in localStorage, following the system
  setting until chosen; Space Mono throughout.
- /template.xlsx download; upload errors say what's wrong and how to fix
  it (NotAWorkbookError, MissingColumnsError in the loader).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gtNTGbmvq2DdoGC4air5K
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
railstat Ready Ready Preview Nov 7, 2026 2:53am UTC

Request Review

…table table

- Period (all weeks / last N), route and class filters; the page
  re-computes figures, charts and table from the embedded bookings
  (names masked before embedding, money in whole cents).
- Headline numbers show the change against the previous period with an
  arrow, sign and words; revenue has a sparkline.
- New cancellation-rate-by-route chart with an average reference line.
- Weekly revenue trend shades the compared weeks, labels high and low,
  and has a hover crosshair and tooltip.
- Data-quality line says when every row was used.
- Table gains a Discount column, sortable headers (aria-sort) and paging.
- App header with file chip, Upload another file (web app only), and the
  shared Space Mono / light-dark theme from the landing page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gtNTGbmvq2DdoGC4air5K
@royalpriest royalpriest changed the title Landing page with drag-and-drop upload, light/dark switch and Space Mono Landing page and dashboard v2, with light/dark switch and Space Mono Nov 7, 2026
@royalpriest
royalpriest merged commit c5b00e7 into main Nov 7, 2026
5 checks passed
royalpriest added a commit that referenced this pull request Nov 19, 2026
Landing page and dashboard v2, with light/dark switch and Space Mono
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.

2 participants