Conversation
…t horizontal scroll
…dark mode support
…rsor blink animation
…ategy, chart system, interactive states, and motion tokens
✅ Deploy Preview for shenxianpeng-gitstats ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
There was a problem hiding this comment.
Pull request overview
Updates GitStats’ report UI to align with a new “terminal-native” design system, affecting both HTML generation and the shared stylesheet, and adds documentation to codify the visual rules.
Changes:
- Add a “generation command” block below the General page
<h1>and load IBM Plex Mono in the HTML header. - Refresh the global CSS theme (amber accent, full monospace body, focus-visible styling, and scrollable tables).
- Add/extend design documentation (
DESIGN.md,CLAUDE.md) and ignore.gstack/.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
gitstats/report_creator.py |
Injects a command block into index.html and adds Google Fonts links in the HTML header. |
gitstats/gitstats.css |
Introduces new theme tokens (amber), sets monospace body typography, and improves focus + table overflow behavior. |
DESIGN.md |
Adds a design system spec documenting typography, color roles, layout rules, and component guidance. |
CLAUDE.md |
Adds contributor guidance to follow DESIGN.md for any UI/visual changes. |
.gitignore |
Ignores .gstack/. |
| f.write( | ||
| f"""<div class="cmd-block"><span class="cmd-prompt">$</span> gitstats {data.dir} {path}<span class="cmd-cursor">▊</span></div>""" | ||
| ) |
There was a problem hiding this comment.
The generated command block interpolates data.dir and path directly into HTML. This should be HTML-escaped to avoid markup/script injection if either contains characters like </& (paths can contain these on some platforms). Also consider redacting/normalizing to avoid leaking absolute local filesystem paths (usernames, home directories) when reports are shared/published.
| <link rel="preconnect" href="https://fonts.googleapis.com"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap"> |
There was a problem hiding this comment.
Loading IBM Plex Mono via Google Fonts introduces an external network dependency and potential privacy leak when opening reports, which conflicts with the project’s claim that reports are “fully self-contained HTML files” (README.rst:89). Consider bundling the font as a local static asset (and copying it to the output like other assets), or making the external font loading configurable/opt-in with a clear fallback.
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
| <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap"> |



📚 Documentation preview 📚: https://gitstats--195.org.readthedocs.build/