Skip to content

Fix TUI project matching#11

Merged
daaain merged 2 commits intodaaain:mainfrom
kym6464:fix-tui-project
Jul 30, 2025
Merged

Fix TUI project matching#11
daaain merged 2 commits intodaaain:mainfrom
kym6464:fix-tui-project

Conversation

@kym6464
Copy link
Copy Markdown
Contributor

@kym6464 kym6464 commented Jul 28, 2025

Fixes the bug outlined in #10 in this comment

Testing

_before.mov
_after.mov

Notes

Adds GitPython as a dependency in order to find the root git repository

- Tier 1: Exact path-based matching using convert_project_path_to_claude_dir()
- Tier 2: Git repository root matching using GitPython
- Tier 3: Fallback to relative path matching (preserves existing behavior)

This fixes the issue where home directory projects would incorrectly match
all subdirectories due to overly broad relative path matching. Now exact
matches and git repo matches take priority over relative matches.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kym6464
Copy link
Copy Markdown
Contributor Author

kym6464 commented Jul 30, 2025

@daaain for review

Copy link
Copy Markdown
Owner

@daaain daaain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kym6464, sorry for the late reply, I'm on holiday 🌴

Reviewed the changes and they look good, the only thing you could do is to remove the references like "existing behavior" and "original behavior" from comments as they only make sense in the context of the current commit, but it's not a huge deal.

I'm on my phone now so can't do a release, but will do later today or tomorrow.

@daaain daaain merged commit 42a908a into daaain:main Jul 30, 2025
@daaain
Copy link
Copy Markdown
Owner

daaain commented Jul 30, 2025

Thanks Kamal, really appreciated!

@kym6464
Copy link
Copy Markdown
Contributor Author

kym6464 commented Jul 30, 2025

No problem, enjoy your holiday!

@kym6464 kym6464 deleted the fix-tui-project branch July 30, 2025 22:02
cboos added a commit that referenced this pull request Mar 5, 2026
CodeRabbit items considered and intentionally not changed:

#8 (dag.md fenced blocks): No language identifiers on non-code blocks
    — project convention, not using markdownlint.

#10 (dag.py:204 recursive → iterative): Max recursion depth is bounded
    by session message count. Python's default limit (1000) is more than
    sufficient for any real conversation.

#11 (converter.py:463 queue ops at tail): Queue operations are metadata
    entries, not user-visible conversation content. Appending at tail is
    the intended behavior.

#12 (renderer.py:2012 current_render_session leak): By design — branch
    context applies to all subsequent messages until the next line start.
    The variable is reset when a new DAG-line starts.

#13 (session_nav.html:28 fork rows in expandable mode): Non-issue.
    Fork/branch nav items only appear in ToC mode (combined transcript
    and individual session pages). Expandable mode is only used in the
    project index page where fork items wouldn't be generated. Verified
    that individual session pages DO correctly include fork/branch nav.

#14 (message_styles.css:901 font quoting): Cosmetic stylelint preference,
    no stylelint configured in this project.

#15 (test_dag.py:44 error handling): Test helper — should fail loudly on
    bad test data, not silently skip.
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.

2 participants