Skip to content

feat: improve project display names — group worktrees, use meaningful names from context #131

@pitimon

Description

@pitimon

Problem

PROJECT ACTIVITY chart shows project names that don't reflect the actual work being done.

1. Worktrees shown as separate projects

6 worktrees of mgmt-pve are listed independently:

pve            370 sessions  ← parent
elion            1 session   ← worktree of pve  
sanderson        1 session   ← worktree of pve
rubin            1 session   ← worktree of pve
solomon          1 session   ← worktree of pve
jemison          1 session   ← worktree of pve
lamport          1 session   ← worktree of pve

Should be grouped: pve: 376 sessions (1 project, not 7).

Detection: Slug pattern *--claude-worktrees-* indicates a worktree of the parent before --claude-worktrees.

2. Display names don't convey what the work IS

Current projectDisplayName() strips path prefixes to produce short names, but loses the context that makes them meaningful:

Slug Current Name Actual Work Suggested Approach
-Users-itarun--claude-mem-observer-sessions sessions Claude memory observer Derive from repo name or CLAUDE.md title
-Users-itarun-mgmt-pve pve Proxmox VE management Use last meaningful path segment(s)
-Users-itarun-cc-lens lens cc-lens dashboard Use repo/folder name as-is
-Users-itarun-est-resource resource Resource estimation Keep more context
-Users-itarun-va-pentest va+pentest VA & penetration testing OK — already descriptive
-Users-itarun-CLAUDE-CERT-Bedrock Bedrock Claude certification Include "CERT" prefix

3. Suggested display name strategy

Consider deriving names from multiple sources, in priority order:

  1. CLAUDE.md title — If the project has a CLAUDE.md with a # Title, use that (most intentional)
  2. Git remote namegit remote get-url origin gives the actual repo name (e.g., pitimon/cc-lens)
  3. Last 2 path segments — e.g., mgmt-pve instead of just pve, CLAUDE-CERT-Bedrock instead of just Bedrock
  4. Current logic — Fallback to existing projectDisplayName() stripping

This way the chart reflects what the developer is actually working on, not just a truncated directory name.

4. Missing projects

17 directories in ~/.claude/projects/ but API returns 15. Missing:

  • -Users-itarun (root — possibly filtered intentionally)
  • -Users-itarun-claudeman-cases-testcase (has no JSONL files?)

Not necessarily a bug — but worth documenting the filter logic.

Impact

  • Chart becomes self-documenting — new users understand what projects represent
  • Worktree grouping reduces noise (15 → 9 real projects)
  • Professional dashboard should show meaningful labels, not filesystem artifacts

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions