Skip to content

claude/fix-tmux-process-name-qIIsu#211

Merged
AnnatarHe merged 1 commit intomainfrom
claude/fix-tmux-process-name-qIIsu
Jan 13, 2026
Merged

claude/fix-tmux-process-name-qIIsu#211
AnnatarHe merged 1 commit intomainfrom
claude/fix-tmux-process-name-qIIsu

Conversation

@AnnatarHe
Copy link
Copy Markdown
Contributor

Use case-insensitive substring matching instead of exact map lookups to handle process names like "tmux: server" that weren't being matched before. This makes the terminal resolver more robust across different systems and process naming conventions.

Use case-insensitive substring matching instead of exact map lookups
to handle process names like "tmux: server" that weren't being matched
before. This makes the terminal resolver more robust across different
systems and process naming conventions.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @AnnatarHe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the robustness of the terminal resolver by transitioning from exact, case-sensitive process name lookups to a more flexible case-insensitive substring matching approach. This change ensures that the system can accurately identify terminal emulators, multiplexers, and remote connections even when process names include additional descriptors or vary in casing, thereby improving compatibility across diverse operating environments.

Highlights

  • Improved Process Name Matching: The terminal resolver now uses case-insensitive substring matching instead of exact map lookups for identifying terminal emulators, multiplexers, and remote processes.
  • Enhanced Robustness: This change addresses issues where process names like "tmux: server" were not being correctly identified, making the resolver more resilient to variations in process naming conventions across different systems.
  • Refactored Data Structures: The lists of known terminal, multiplexer, and remote process names have been converted from map[string]bool to []string and are now stored in lowercase for consistent matching.
  • New Utility Function: A matchKnownName helper function has been introduced to encapsulate the logic for case-insensitive substring matching.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 13, 2026

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
daemon/terminal_resolver.go 0.00% 15 Missing ⚠️
Flag Coverage Δ
unittests 37.64% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
daemon/terminal_resolver.go 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request improves the terminal resolver by switching from exact, case-sensitive process name matching to a more robust case-insensitive substring matching. This is a good change that should handle more variations in process names across different systems.

My review includes a few points:

  • I've identified a potential regression where the st terminal emulator was removed from the list of known terminals. I've suggested adding it back.
  • I've also suggested a minor refactoring to simplify the conditional logic in ResolveTerminal, making it more concise and readable.

Overall, the approach is solid, and with these small adjustments, it will be even better.

"urxvt",
"rxvt",
"terminator",
"tilix",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The st terminal emulator, which was present in the previous version, appears to have been removed from the knownTerminals list. This seems like an unintentional omission that would prevent st from being detected. I recommend adding it back.

Suggested change
"tilix",
"tilix",
"st",

Comment on lines +87 to 91
if multiplexer == "" {
if matched := matchKnownName(processName, knownMultiplexers); matched != "" {
multiplexer = matched
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This conditional assignment can be made more concise. Since matchKnownName returns an empty string when there's no match, you can directly assign its return value inside the if block. This avoids the nested if and the temporary matched variable.

		if multiplexer == "" {
			multiplexer = matchKnownName(processName, knownMultiplexers)
		}

Comment on lines +94 to 98
if terminal == "" {
if matched := matchKnownName(processName, knownTerminals); matched != "" {
terminal = matched
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Similar to the multiplexer check above, this block can be simplified by directly assigning the result of matchKnownName.

		if terminal == "" {
			terminal = matchKnownName(processName, knownTerminals)
		}

Comment on lines +101 to 105
if terminal == "" {
if matched := matchKnownName(processName, knownRemote); matched != "" {
terminal = matched
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

This block can also be simplified using the same pattern as the multiplexer and terminal checks.

		if terminal == "" {
			terminal = matchKnownName(processName, knownRemote)
		}

@AnnatarHe AnnatarHe merged commit 1f69085 into main Jan 13, 2026
7 of 8 checks passed
@AnnatarHe AnnatarHe deleted the claude/fix-tmux-process-name-qIIsu branch January 13, 2026 03:27
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