fix: improve CLI visual formatting and fix GitHub stats#167
Merged
Conversation
Fixed 'No ownership data found' error when running dev owners from subdirectories like packages/. Root cause: File paths in topFiles are absolute (from database), but subdirectory mode was comparing them against relative paths. Solution: Normalize absolute paths by stripping repository prefix before comparison, matching the approach used in root directory mode.
- Add update plan display to 'dev update' (shows what will change before starting) - Add detailed progress with rates to all indexing phases (files/sec, docs/sec, commits/sec) - Extract progress formatting to reusable updateSectionWithRate() method - Fix NaN display when totalFiles is 0 (now shows 'Discovering...') - Improve 'dev map' hot paths display with tree branches and file icons - Add getUpdatePlan() public method to RepositoryIndexer All indexing commands now show consistent detailed progress: 1,234/4,567 files (27%, 45 files/sec) Instead of just: 27% complete
Visual Improvements: - Add tree branches and file icons to 'dev map' hot paths - Add tree branches and file icons to 'dev activity' output - Extract getFileIcon() to shared utility in @lytics/dev-agent-core GitHub Stats Fix: - Track issue and PR states separately (issuesByState, prsByState) - Fix confusing display showing '14 open PRs' when there were 0 - Add proper per-type state counts to GitHubIndexStats interface - Update display to show accurate counts for issues and PRs Progress Display Enhancements: - Add detailed scanning progress with rates (e.g., '1,234/4,567 files (27%, 45 files/sec)') - Extend detailed progress to 'dev update', 'dev git index', and 'dev github index' - Add update plan display to 'dev update' (shows changed/added/deleted before starting) - Refactor progress formatting into reusable updateSectionWithRate() method - Fix NaN display when totalFiles is 0 (now shows 'Discovering files...') Test Updates: - Update map test to match new hot paths format with tree branches All visual outputs now use consistent tree-based formatting with file icons.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR includes three main improvements:
dev ownersshowing "No ownership data" when run from subdirectoriesdev mapanddev activityoutputsChanges
Bug Fixes 🐛
dev owners: Fixed path matching to correctly display ownership data when run from subdirectoriesdev update: Removed duplicate checkmark in success messageVisual Enhancements ✨
├─,└─) and file icons (📘, 📝, 🐹, etc.) todev maphot pathsdev activityoutputgetFileIcon()to shared utility in@lytics/dev-agent-coreGitHub Stats Fix 🐛
issuesByState,prsByStateProgress Display Improvements 📊
1,234/4,567 files (27%, 45 files/sec)dev updatenow shows an update plan before startingProgressRenderer.updateSectionWithRate()dev index,dev update,dev git index,dev github indexTesting
dev ownersfrom root and subdirectoriesdev statswith updated GitHub state trackingdev activity,dev mapwith new visual formattingBreaking Changes
None - all changes are backward compatible. Old GitHub state files fall back to aggregate counts gracefully.