Skip to content

Conversation

@phatblat
Copy link

@phatblat phatblat commented Jan 20, 2026

Base Branch

  • This PR targets the develop branch (required for all feature/fix PRs)
  • This PR targets main (hotfix only - maintainers)

Description

Adds common nix paths to COMMON_BIN_PATHS for darwin and linux.

Related Issue

Closes #

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 📚 Documentation
  • ♻️ Refactor
  • 🧪 Test

Area

  • Frontend
  • Backend
  • Fullstack

Commit Message Format

Follow conventional commits: <type>: <subject>

Types: feat, fix, docs, style, refactor, test, chore

Example: feat: add user authentication system

Checklist

  • I've synced with develop branch
  • I've tested my changes locally
  • I've followed the code principles (SOLID, DRY, KISS)
  • My PR is small and focused (< 400 lines ideally)
  • (Python only) All file operations specify encoding="utf-8" for text files

Platform Testing Checklist

CRITICAL: This project supports Windows, macOS, and Linux. Platform-specific bugs are a common source of breakage.

  • Windows tested (either on Windows or via CI)
  • macOS tested (either on macOS or via CI)
  • Linux tested (CI covers this)
  • Used centralized platform/ module instead of direct process.platform checks
  • No hardcoded paths (used findExecutable() or platform abstractions)

If you only have access to one OS: CI now tests on all platforms. Ensure all checks pass before submitting.

CI/Testing Requirements

  • All CI checks pass on all platforms (Windows, macOS, Linux)
  • All existing tests pass
  • New features include test coverage
  • Bug fixes include regression tests

Screenshots

Before After

Feature Toggle

  • Behind localStorage flag: use_feature_name
  • Behind settings toggle
  • Behind environment variable/config
  • N/A - Feature is complete and ready for all users

Breaking Changes

Breaking: Yes / No

Details:

Summary by CodeRabbit

  • New Features
    • Enhanced system compatibility by expanding binary path detection for Nix package manager on macOS and Linux systems. The application now searches additional Nix-specific locations when looking for installed binaries, improving reliability and functionality for users with Nix package manager environments. This ensures better detection and access to Nix-installed tools.

✏️ Tip: You can customize this high-level summary in your review settings.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @phatblat, 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 application's ability to locate common binaries by integrating standard Nix package manager paths into the environment variable detection logic. This change specifically targets macOS and Linux systems, ensuring that tools installed via Nix or NixOS are more readily discoverable by the frontend application.

Highlights

  • Nix Path Integration (macOS): Added ~/.nix-profile/bin (Nix/home-manager user profile) and /nix/var/nix/profiles/default/bin (Determinate Nix default profile) to the COMMON_BIN_PATHS for macOS (darwin).
  • Nix Path Integration (Linux): Extended COMMON_BIN_PATHS for Linux to include ~/.nix-profile/bin, /nix/var/nix/profiles/default/bin, and /run/current-system/sw/bin (NixOS system profile).
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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

This PR extends the COMMON_BIN_PATHS constant in the frontend's environment utilities with Nix-related binary paths for Darwin and Linux platforms, enabling the application to locate executables installed via the Nix package manager.

Changes

Cohort / File(s) Summary
COMMON_BIN_PATHS Enhancement
apps/frontend/src/main/env-utils.ts
Added Nix-related binary paths to COMMON_BIN_PATHS: ~/.nix-profile/bin, /nix/var/nix/profiles/default/bin (both platforms), and /run/current-system/sw/bin (Linux only)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • AndyMik90
  • marcefalcondev

Poem

🐰 Nix paths now carved in stone,
From ~/.nix-profile 'cross the land they're known,
Darwin and Linux, both shall see,
Where binaries dwell in the searching spree!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Nix paths to the COMMON_BIN_PATHS constant for the frontend.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🎉 Thanks for your first PR!

A maintainer will review it soon. Please make sure:

  • Your branch is synced with develop
  • CI checks pass
  • You've followed our contribution guide

Welcome to the Auto Claude community!

Copy link
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 adds common Nix binary paths to the COMMON_BIN_PATHS constant for both macOS and Linux, which will help in locating executables installed via Nix. The changes are correct and improve support for Nix environments. I've added one suggestion to improve maintainability by avoiding code duplication.

Comment on lines +125 to +126
'~/.nix-profile/bin', // Nix/home-manager user profile
'/nix/var/nix/profiles/default/bin', // Determinate Nix default profile
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These Nix paths are also added for Linux below. To improve maintainability and adhere to the DRY (Don't Repeat Yourself) principle, consider defining these common paths in a shared constant and spreading it into both the darwin and linux arrays. This would prevent them from getting out of sync in the future.

For example:

const NIX_COMMON_PATHS = [
  '~/.nix-profile/bin',     // Nix/home-manager user profile
  '/nix/var/nix/profiles/default/bin', // Determinate Nix default profile
];

export const COMMON_BIN_PATHS: Record<string, string[]> = {
  darwin: [
    // ... other paths
    ...NIX_COMMON_PATHS,
  ],
  linux: [
    // ... other paths
    ...NIX_COMMON_PATHS,
    '/run/current-system/sw/bin', // NixOS system profile
  ],
  // ...
};

@sentry
Copy link

sentry bot commented Jan 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/frontend/src/main/env-utils.ts (1)

125-137: Avoid hardcoded Nix paths here; route through platform abstraction/config instead.

These newly added absolute paths are platform-specific and violate the repo guidance for this area. Please move Nix path resolution into the platform abstraction (or a dedicated config/provider) and surface them via a function (e.g., getCommonBinPaths()), rather than hardcoding in this module. As per coding guidelines, avoid platform-specific path literals in **/*.{ts,tsx,js,py}.

@AndyMik90 AndyMik90 self-assigned this Jan 20, 2026
Copy link
Owner

@AndyMik90 AndyMik90 left a comment

Choose a reason for hiding this comment

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

🤖 Auto Claude PR Review

Merge Verdict: 🟠 NEEDS REVISION

🟠 Needs revision - 1 structural/other issue(s) require attention.

Branch is out of date with base branch. Update branch first - if no conflicts arise, you can merge. If merge conflicts arise, resolve them and run follow-up review again. 1 non-blocking suggestion(s) to consider.

Risk Assessment

Factor Level Notes
Complexity Low Based on lines changed
Security Impact None Based on security findings
Scope Coherence Good Based on structural review

🚨 Blocking Issues (Must Fix)

  • Branch Out of Date: PR branch is behind the base branch and needs to be updated

Findings Summary

  • Low: 1 issue(s)

Generated by Auto Claude PR Review

Findings (1 selected of 1 total)

🔵 [1053dc69eac9] [LOW] [Potential] Gemini DRY suggestion is a nitpick - existing pattern is intentional

📁 apps/frontend/src/main/env-utils.ts:125

Gemini Code Assist suggested extracting shared Nix paths to avoid duplication between darwin and linux. However, this contradicts the established codebase pattern: three other paths (usr/local/bin, ~/.local/bin, ~/.dotnet/tools) are already intentionally duplicated between platforms. Self-contained arrays improve readability - you can see all paths for a platform at a glance. The refactoring cost (added indirection, spread operators) outweighs the benefit of saving 2 lines.

Suggested fix:

No change needed. The current pattern of self-contained platform arrays is intentional and matches existing codebase conventions.

This review was generated by Auto Claude.

@AndyMik90 AndyMik90 force-pushed the develop branch 2 times, most recently from 67a743f to e83e445 Compare January 21, 2026 14:26
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.

3 participants