Skip to content

Conversation

@zimathon
Copy link

Summary

  • Always display the repository name in the session list view, regardless of whether multiple repositories are in use
  • Add RepoNameFromPath() method to Instance for retrieving repository name even when the instance hasn't started yet
  • Repository name is now shown in parentheses after the branch name for better session identification

Problem

When working with multiple repositories, it was difficult to identify which repository each session belonged to because repository names were only displayed when hasMultipleRepos was true. Users had to attach to a session and run pwd or git remote -v to identify the repository.

Solution

  • Remove the hasMultipleRepos condition from InstanceRenderer.Render()
  • Add a new method RepoNameFromPath() that extracts the repository name from the instance's Path field
  • This allows displaying the repository name even for sessions that haven't been started yet

Changes

  • session/instance.go: Added RepoNameFromPath() method
  • ui/list.go: Modified Render() to always show repository name

Before/After

Before: Repository name only shown when multiple repos detected

● fix-auth       y.sasajima/fix-auth

After: Repository name always shown

● fix-auth       y.sasajima/fix-auth (ernie-call-api)

Closes #238

- Remove the hasMultipleRepos condition that previously limited
  repository name display to only when multiple repos were in use
- Add RepoNameFromPath() method to Instance for retrieving repo name
  from Path even when instance hasn't started yet
- Repository name is now always shown in parentheses after branch name
  for better session identification across different repositories

Closes smtg-ai#238
@github-actions
Copy link

Thank you for your contribution! Please sign the CLA before we can merge your pull request. You can sign the CLA by just posting a comment following the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@mufeez-amjad
Copy link
Member

mufeez-amjad commented Dec 29, 2025

I think we should only show repo name if there are multiple repos, were you seeing that hasMultipleRepos wasn't true when it should've been?

Many users only use claude squad with one repo, doesn't feel good to always show the repo since it's redundant/unnecessary.

@zimathon
Copy link
Author

Thank you for the feedback! I understand that always showing the repo name would be redundant for single-repo users.

The issue I encountered is that when launching cs from different directories, each shows a separate session list filtered by that repository. So even when working with multiple repositories, hasMultipleRepos is never true because each cs instance only sees sessions from its own repo.

Would you be open to adding a config option like always_show_repo_name: true (default: false)?

This way:

  • Default behavior remains unchanged for single-repo users
  • Users who work across multiple repos can opt-in to always see the repo name

I'm happy to update the PR with this approach if you agree!

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.

Feature Request: Display repository name in session list view

2 participants