Skip to content

Add post-install tmux nudges#41

Merged
axeldelafosse merged 2 commits intomainfrom
codex/tmux-install-nudge
Mar 26, 2026
Merged

Add post-install tmux nudges#41
axeldelafosse merged 2 commits intomainfrom
codex/tmux-install-nudge

Conversation

@axeldelafosse
Copy link
Copy Markdown
Owner

Summary

  • add a non-blocking tmux nudge to the release install script when tmux is missing
  • add the same nudge to bun run install:global
  • add focused tests for the source installer nudge text

Verification

  • bun run check
  • bun test tests/install.test.ts
  • bash -n install.sh
  • bun run build

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 enhances the installation experience by providing helpful, non-blocking nudges to users regarding the tmux dependency. It detects if tmux is missing after installation and informs the user that the loop command, which relies on tmux for its default paired workspace, might fail without it. The nudge includes platform-specific installation instructions, improving user guidance and reducing potential friction.

Highlights

  • Post-install tmux nudge: Added a non-blocking nudge to the release install script that suggests installing tmux if it's missing.
  • Global install integration: Integrated the same tmux nudge into the bun run install:global process.
  • Test coverage: Included focused tests to verify the correctness of the tmux nudge text and platform-specific hints.
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.

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.

Copy link
Copy Markdown

@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 introduces functionality to detect if tmux is installed and, if not, provides installation hints to the user. This functionality is implemented in both install.sh and src/install.ts. The review comments highlight that the platform detection logic in install.sh is incomplete, potentially causing the installer to fail on some Unix-like systems. Additionally, the tmuxInstallHint function in src/install.ts could be improved to offer more specific installation advice for a wider range of Unix-like platforms and should include corresponding test cases.

Comment on lines +58 to +65
tmux_install_hint() {
if [ "$os" = "macos" ]; then
echo "brew install tmux"
return
fi

echo "your package manager (for example: apt install tmux)"
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

This new function relies on the $os variable. It's worth noting that the case statement that sets $os on lines 52-56 only handles Darwin and Linux. For other Unix-like systems (e.g., FreeBSD), it will fall back to the default case and exit the script with a 'Windows is not supported' error. This prevents the installer from running at all on those platforms.

While the fix is outside of this diff, it's a significant correctness issue affecting this new functionality. The script should be updated to correctly identify other Unix-like systems to ensure the installer works on all supported platforms.

Comment on lines +28 to +38
const tmuxInstallHint = (
platform: NodeJS.Platform = process.platform
): string => {
if (platform === "darwin") {
return TMUX_MACOS_HINT;
}
if (platform === "linux") {
return TMUX_LINUX_HINT;
}
return "install tmux";
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This function provides helpful installation hints. To improve support for other Unix-like systems, you could provide the generic Linux hint for platforms like FreeBSD and OpenBSD, instead of the less helpful default. A switch statement could make this cleaner.

Also, consider adding test cases for these new platforms in tests/install.test.ts.

const tmuxInstallHint = (
  platform: NodeJS.Platform = process.platform
): string => {
  switch (platform) {
    case "darwin":
      return TMUX_MACOS_HINT;
    case "linux":
    case "freebsd":
    case "openbsd":
    case "sunos":
      return TMUX_LINUX_HINT;
    default:
      return "install tmux";
  }
};

@axeldelafosse axeldelafosse marked this pull request as ready for review March 26, 2026 05:34
@axeldelafosse axeldelafosse merged commit 0813afe into main Mar 26, 2026
2 checks passed
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.

1 participant