Skip to content

Conversation

@prosdev
Copy link
Collaborator

@prosdev prosdev commented Dec 14, 2025

Summary

Massive improvements to indexing performance and CLI user experience, delivering a 184% speedup and eliminating all silent processing gaps.

Performance Improvements (184% faster)

  • 63x faster metadata collection: Eliminated 863 individual git calls by using single batched git command
  • Removed storage size calculation: Deferred to on-demand in dev stats (saves 1-3s)
  • Simplified ownership tracking: Author contributions now calculated on-demand in dev owners (1s)
  • Total speedup: Indexing now completes in ~33s vs ~95s (61s improvement!)

UX Improvements (No More Silent Gaps)

Section-Based Progress Display

  • Clean, informative output inspired by Homebrew/Cargo
  • Applied to 4 commands: dev index, dev update, dev git index, dev github index
  • Live progress updates with current phase status
  • Helpful next steps after completion
  • Graceful degradation in verbose mode and non-TTY environments

Context-Aware dev owners Command

Three intelligent modes:

  1. Changed files mode: Shows ownership of uncommitted changes (perfect for PR reviews)
  2. Root directory mode: High-level overview (e.g., packages/cli/, packages/core/)
  3. Subdirectory mode: Detailed expertise for specific areas

Smart ownership display:

  • Asymmetric icons: Only flag exceptions (⚠️ others' files, 🆕 new files)
  • Last touched timestamps: Catches stale code and active development
  • Recent activity detection: Warns when others recently modified your files
  • Suggested reviewers: Auto-identifies who to loop in for code reviews

Examples:

Your file (clean, minimal):

└─ src/auth.ts
     @you • 50 commits • Last: 6 months ago

Your file + recent activity by others:

└─ src/auth.ts
     @you • 50 commits • Last: 6 months ago
     ⚠️  Recent activity by @alice (yesterday)

💡 Suggested reviewers: @alice

Someone else's stale file:

└─ ⚠️  src/legacy.ts
     @alice • 12 commits • Last: 2 years ago

Architecture Simplifications

  • Removed file_authors SQLite table (on-demand is fast enough)
  • Removed appendFileAuthors() and getFileAuthors() from MetricsStore
  • Removed authorContributions from IndexUpdatedEvent
  • Git root detection for subdirectory support
  • Cleaner separation: metrics for analytics, ownership for developer insights

Technical Details

  • Added log-update dependency for smooth progress updates
  • New ProgressRenderer class for section-based progress display
  • Optimized buildCodeMetadata() to derive change frequency from author contributions
  • Scanner tracks time since last log (ensures updates every 10s)
  • Storage size calculation moved from index-time to query-time
  • Real-time ownership via git log for uncommitted changes

Testing

All 1100+ tests passing ✅

Breaking Changes

None for end users. Internal APIs changed:

  • IndexUpdatedEvent no longer includes authorContributions
  • MetricsStore methods removed (use on-demand calculation instead)

Before: 95s with 3-minute silent gaps
After: 33s with continuous feedback every 1 second

@prosdev prosdev changed the title feat: massive indexing performance and UX improvements (184% faster) feat: massive indexing performance and UX improvements Dec 14, 2025
- Changed files mode: Analyzes uncommitted changes and suggests reviewers
- Root directory mode: Shows top-level areas with owners
- Subdirectory mode: Shows expertise for current directory
- Tree branch UI (├─, └─) with emojis for visual hierarchy
- Smart defaults: detects context and shows relevant info
- Legacy --all flag for table view
- Always includes helpful tips for next actions
Simplified to context-aware modes only (changed files, root, subdirectory)
Show 2 levels for monorepo directories (packages/cli/, packages/core/)
Major improvements to dev owners command:

**Context-Aware Modes:**
- Changed files mode: Shows ownership of uncommitted changes
- Root directory mode: High-level overview (packages/cli/, packages/core/)
- Subdirectory mode: Detailed expertise for specific area

**Smart Ownership Display:**
- Asymmetric icons: No icon for your files (minimal noise)
- ⚠️ flags files owned by others (actionable)
- 🆕 flags truly new files with no history
- Shows last touched timestamp for all files
- Detects recent activity by others on your files

**Technical Improvements:**
- Real-time ownership via git log for uncommitted changes
- Git root detection for subdirectory support
- Tracks both primary owner and recent contributors
- Suggests reviewers when modifying others' code

**Examples:**

Your file:
  └─ src/auth.ts
       @you • 50 commits • Last: 6 months ago

Your file + recent activity by others:
  └─ src/auth.ts
       @you • 50 commits • Last: 6 months ago
       ⚠️  Recent activity by @alice (yesterday)

Someone else's file:
  └─ ⚠️  src/session.ts
       @alice • 12 commits • Last: 2 years ago

New file:
  └─ 🆕 src/feature.ts
       New file

Removed legacy --all option and table format.
@prosdev prosdev force-pushed the feat/indexing-ux-improvements branch from 3a94ab6 to c8c7d02 Compare December 14, 2025 02:21
@prosdev prosdev merged commit 753dfe5 into main Dec 14, 2025
1 check passed
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.

1 participant