Releases: KebanFiru/CodeCount
v3.0.2
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/mastercontinues 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).
- Language statistics can now be branch-specific: on feature branches we count only files changed since the branch's merge-base with
-
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
- Install or update the extension to
v3.0.2via VS Code Marketplace or your distribution method. - Reload VS Code (Developer: Reload Window) to initialize the updated webview assets.
- Open the CodeCount sidebar and run the
Refresh CodeCount Statscommand. - Switch branches to validate branch-aware behavior (feature branch vs main/master).
How to Verify (Quick QA)
- Open a workspace with multiple branches (e.g.,
mainand a feature branch). - On
main, open CodeCount and verify contributors and language totals reflect repository-wide history. - 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).
- In the Contributors card, click "Show all contributors" and confirm the list expands and the button toggles to "Show less contributors".
- 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-baseand falls back safely when the repository layout or remotes are unusual. Reviewsrc/services/StatsService.tswhen 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
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
.gitignoresupport for automatic exclusion- Respects project exclude patterns
- Blank line detection
- Performance optimized for large projects
-
Commands
CodeCount: Count Lines of Code- Analyze current fileCodeCount: Count Lines of Code in All Files- Analyze entire workspaceCodeCount: Count Lines of Code by Extension- Get breakdown by file typeCodeCount: Refresh CodeCount Stats- Update sidebar statisticsCodeCount: 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