-
Notifications
You must be signed in to change notification settings - Fork 2
Bug: Status line bleeds across projects — shows work items from wrong project #31
Description
Bug Report
Description: The Oh My Posh HtmlGraph segment displays active work items from one project when the user is in a completely different project directory. In this case, trk-b468698b [0/1] → Rewrite do... (from the htmlgraph project) was rendered in the status line while the user was working in ingu-solutions-data-analytics/documents.
Environment
- HtmlGraph version: 0.45.1 (go)
- Go version: go1.25.5 darwin/arm64
- OS: Darwin 25.4.0
- Claude Code version: 2.1.91
Steps to Reproduce
- Open a Claude Code session in the
htmlgraphproject - Start a work item (e.g.,
htmlgraph feature start feat-4e06da23) - Open a separate Claude Code session in a different project (e.g.,
ingu-solutions-data-analytics/documents) - Observe the status line in the second session — it shows the HtmlGraph work item from step 2
Expected Behavior
The HtmlGraph status line segment should only render when the current working directory is inside a project that contains a .htmlgraph/ directory. In a different project, the segment should be empty/hidden.
Actual Behavior
The segment shows work item info from a different project's .htmlgraph/ directory.
Probable Root Cause
The wrapper script (~/.claude/omp-claude-wrapper.sh) uses a cache fallback file (~/.htmlgraph-statusline-cache). When htmlgraph statusline returns empty (because the current project has no .htmlgraph/), the wrapper falls back to the stale cache from the previous/other session. The cache is global (not project-scoped), so it bleeds across projects.
Relevant files:
~/.claude/omp-claude-wrapper.sh— wrapper with cache fallback logiccmd/htmlgraph/statusline.go— Go command (correctly checks for.htmlgraph/)internal/paths/resolve.go— project directory resolver (9-step priority resolution)
Suggested Fix
When htmlgraph statusline returns empty/error, the wrapper should clear the cache rather than falling back to stale data. Alternatively, make the cache project-scoped (e.g., keyed by project directory hash).
Internal Tracking
- HtmlGraph bug:
bug-95dc78ba
Reported via HtmlGraph issue reporter