Skip to content

Releases: KebanFiru/CodeCount

v3.0.2

06 May 07:33
a4fd41f

Choose a tag to compare

Version v3.0.2 focuses on improving branch-aware analytics, fixing webview chart bugs, and polishing the contributors and languages panels for more accurate, user-friendly reporting. This release includes bug fixes, UX improvements, and performance hardening.

Highlights

  • Branch-aware statistics

    • Contributors and language counts now adapt to the current Git branch context.
    • Feature branches show contributors and files that belong to that branch (using a robust merge-base detection), while main/master continues to show repository-wide history.
  • Contributors UI and chart improvements

    • Restored reliable "Show all / Show less" toggle for contributors list.
    • Reworked contributors chart as a horizontal bar chart for better label readability.
    • Fixed chart initialization errors and ensured the toggle works even when chart rendering fails.
    • Axis labels and tooltips now render in white for clear contrast in dark themes.
  • Languages panel branch-sensitivity

    • Language statistics can now be branch-specific: on feature branches we count only files changed since the branch's merge-base with main (fallbacks applied when needed).
  • Analytics & charts

    • Hover/cursor behavior and tooltips improved across all analytics charts (Commit Trend, Monthly Activity, Work Pattern).
    • Tooltip fonts and cursor feedback standardized for consistent interactions.
  • UI tweaks

    • Removed standalone "Ignored Files" card from the main dashboard to declutter the layout.
    • Improved packing/layout logic to avoid clipped cards and overlapping charts.
  • Bug fixes & stability

    • Fixed cases where an undefined variable caused chart scripts to throw and prevented interactivity.
    • Resolved race conditions where delegated document-level click handling could miss toggle clicks.
    • Several performance improvements when scanning large workspaces.

Notable Changes (Technical)

  • src/services/StatsService.ts

    • Contributors and language detection logic updated to support branch-awareness and merge-base detection.
  • src/views/webview/components/contributors.ts

    • Replaced stacked vertical bars with a horizontal bar layout, improved tooltip and hover behavior, and hardened script initialization with try/catch to preserve toggle functionality.
  • src/views/webview/components/repoAnalytics.ts

    • Chart options updated to enable tooltips and cursor hover callbacks; axis colors fixed for dark theme readability.
  • src/views/StatsWebviewPanel.ts

    • Removed the Ignored Files card from the main layout and adjusted packing logic.

Breaking Changes / Migration Notes

  • Branch-aware metrics: Because contributors and language counts are now branch-aware, you may observe different numbers when switching branches compared to prior versions. This is intentional and reflects branch-local activity.

  • If you relied on the old "Ignored Files" card for metric summaries, note that the same information is still available via the Language & Files panels.

Upgrade Instructions

  1. Install or update the extension to v3.0.2 via VS Code Marketplace or your distribution method.
  2. Reload VS Code (Developer: Reload Window) to initialize the updated webview assets.
  3. Open the CodeCount sidebar and run the Refresh CodeCount Stats command.
  4. Switch branches to validate branch-aware behavior (feature branch vs main/master).

How to Verify (Quick QA)

  1. Open a workspace with multiple branches (e.g., main and a feature branch).
  2. On main, open CodeCount and verify contributors and language totals reflect repository-wide history.
  3. Checkout a feature branch and refresh CodeCount:
    • Contributors list should include contributors who made commits on that branch.
    • Languages view should reflect files changed on the branch (or fall back to full workspace if detection fails).
  4. In the Contributors card, click "Show all contributors" and confirm the list expands and the button toggles to "Show less contributors".
  5. Hover over charts (Commit Trend, Monthly Activity, Work Pattern) and confirm tooltips appear and the mouse cursor changes when hovering data points.

Notes for Maintainers

  • The branch-detection logic uses git merge-base and falls back safely when the repository layout or remotes are unusual. Review src/services/StatsService.ts when changing base branch heuristics.
  • Chart initialization is guarded with try/catch blocks to ensure UI interactivity survives Chart.js failures. Keep that pattern when editing webview scripts.

Contact & Reporting

If you find regressions or visual issues after upgrading, please open a bug on GitHub: https://github.com/KebanFiru/CodeCount/issues

v0.1.0

14 Apr 10:05
dd8a5d4

Choose a tag to compare

Added

  • Core Functionality

    • Count total lines of code in workspace
    • Count lines for individual files
    • Analyze code distribution by file extension
    • Comment line detection and counting
    • Support for multiple programming languages
  • User Interface

    • Dedicated CodeCount panel in Activity Bar
    • Beautiful sidebar view for statistics
    • Refresh button for real-time updates
    • Tree view display of project structure
  • Smart Features

    • .gitignore support for automatic exclusion
    • Respects project exclude patterns
    • Blank line detection
    • Performance optimized for large projects
  • Commands

    • CodeCount: Count Lines of Code - Analyze current file
    • CodeCount: Count Lines of Code in All Files - Analyze entire workspace
    • CodeCount: Count Lines of Code by Extension - Get breakdown by file type
    • CodeCount: Refresh CodeCount Stats - Update sidebar statistics
    • CodeCount: Git Repo Missing - Handle missing repository
  • Developer Experience

    • Deploy automation scripts
    • ESLint configuration
    • TypeScript strict mode
    • Comprehensive error handling
    • User-friendly notifications

Technical Details

  • Minimum VS Code version: 1.108.2
  • Pure TypeScript implementation
  • Zero external dependencies (except VS Code API)
  • Full type safety with strict mode

Documentation

  • Comprehensive README with examples
  • Contribution guidelines
  • Development setup instructions
  • Deploy guide