Skip to content

Feature/update ux new 2#195

Closed
shenxianpeng wants to merge 8 commits intomainfrom
feature/update-ux-new-2
Closed

Feature/update ux new 2#195
shenxianpeng wants to merge 8 commits intomainfrom
feature/update-ux-new-2

Conversation

@shenxianpeng
Copy link
Copy Markdown
Owner

@shenxianpeng shenxianpeng commented Mar 24, 2026


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

@shenxianpeng shenxianpeng requested a review from Copilot March 24, 2026 22:05
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 24, 2026

Deploy Preview for shenxianpeng-gitstats ready!

Name Link
🔨 Latest commit 5710f25
🔍 Latest deploy log https://app.netlify.com/projects/shenxianpeng-gitstats/deploys/69c30ab92a4f1a00082f9fa6
😎 Deploy Preview https://deploy-preview-195--shenxianpeng-gitstats.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/.

Comment on lines +89 to +91
f.write(
f"""<div class="cmd-block"><span class="cmd-prompt">$</span> gitstats {data.dir} {path}<span class="cmd-cursor">▊</span></div>"""
)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +984 to +986
<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">
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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">

Copilot uses AI. Check for mistakes.
@shenxianpeng shenxianpeng deleted the feature/update-ux-new-2 branch April 16, 2026 06:50
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