Skip to content

Backup 3.5.5#105

Merged
yasuking0304 merged 297 commits intomainfrom
backup-3.5.5
Feb 21, 2026
Merged

Backup 3.5.5#105
yasuking0304 merged 297 commits intomainfrom
backup-3.5.5

Conversation

@yasuking0304
Copy link
Copy Markdown
Owner

Closes #[issue number]

Description

Screenshots

Release notes

Notes:

niik and others added 30 commits November 7, 2025 14:04
Replaces execFile with spawn in get-shell-env for improved control over process execution and output handling. Refactors get-shell to support async shell detection and custom quoting for Windows and Unix shells, moving shell quoting logic to a new shell-escape module. This improves cross-platform compatibility and quoting reliability for shell commands.
Uncommented and applied the MSYS2 argument quoting function to ensure proper command quoting for Git Bash on Windows. This change improves compatibility with MSYS2's command line parsing.
Adds logic to automatically approve garbage collection when the 'pre-auto-gc' hook is not found in the repository, providing a debug message and exiting with a success code. This prevents unnecessary errors when the hook is absent.
Adds conditional styling for the commit progress component when the 'Show commit progress' button is present. Updates SCSS to adjust border and layout for better visual integration of the button.
Moved git binary resolution from with-hooks-env.ts to hooks-proxy.ts, simplifying the function signatures and centralizing the logic. This change improves maintainability and reduces redundant code.
Replaces direct shell environment loading with a memoized async function in hooks-proxy and with-hooks-env. This optimizes repeated environment retrievals and improves performance when running multiple hooks.
Removes manual check for pre-auto-gc hook existence and always runs the hook with --ignore-missing. This simplifies logic and ensures Git handles missing pre-auto-gc hooks gracefully, improving user messaging during garbage collection.
Adds a componentWillUnmount lifecycle method to dispose of the XTermTerminal instance when the Terminal component is unmounted, ensuring proper cleanup of resources.
Moves the excluded environment variables to a top-level constant for reuse and clarity. Simplifies the hook progress callback by extracting the abort function.
Eliminates the debug log statement in the error handler for spawned hook processes, streamlining error handling by directly rejecting the promise.
Replaces abortController.abort() with direct abort function call when the connection closes, ensuring proper process termination.
Updated hook failure handling to accept terminal output as string, Buffer, or array of Buffers across core, commit, hooks-proxy, popup model, and UI components. Added bufferTrimEnd utility and adjusted terminal rendering logic to properly display Buffer-based output.
Eliminated the repoHooks parameter from the createHooksProxy call in withHooksEnv, as it is no longer needed.
Updated the onHookFailure callback signature in commit, core, and hooks-proxy modules to accept terminalOutput as string, Buffer, or ReadonlyArray<Buffer> instead of only ReadonlyArray<Buffer>. This change increases flexibility for handling hook output in different formats.
Unified the TerminalOutput type to replace various string/Buffer/Buffer[] usages in hook, commit, and terminal-related interfaces and components. This improves type consistency and simplifies handling of terminal output data throughout the application.
Removed custom bufferTrimEnd function and simplified terminal output handling by delegating to the write method. This improves code clarity and maintainability.
Changed IGitExecutionOptions.interceptHooks to accept only string arrays. Updated getRepoHooks to yield hook names instead of paths and improved filtering logic. Refactored withHooksEnv to use the new hook name interface and simplified environment handling for intercepted hooks.
Renamed ProcessProxyConnection to Connection for brevity, simplified function signatures, and streamlined hook name extraction. Enhanced debug logging to include elapsed time and signal information, and passed terminalOutput directly to onHookFailure for consistency.
Co-authored-by: niik <634063+niik@users.noreply.github.com>
Revised runtime, package manager, and Node.js version requirements. Clarified TypeScript style, import restrictions, and testing practices. Removed outdated instructions and added context for code style and conventions.
Added a guideline to prefer union types of string literals over enums in the TypeScript style section for more idiomatic code.
Refines the type of the onShowCommitProgress prop to explicitly allow undefined, improving type clarity in IFilterChangesListProps.
Introduces configuration utilities for Git hooks environment in a new config module, adds shell selection and caching options, and wires these settings into the preferences UI. Refactors related hooks logic to use the new config, and updates state management for preferences. Also adds a memoized setState utility for React components.
Adds stricter validation for shell selection in getGitHookEnvShell, updates powershell command escaping, and ensures getShellEnv uses the selected shell. These changes improve reliability and correctness when executing git hooks in different shell environments.
Updates the findGitBashShell function to use findGitBashInRegistry as a fallback if findGitBash does not return a path. This improves reliability of Git Bash detection on Windows systems.
niik and others added 28 commits February 13, 2026 13:49
Add "cwd": "${workspaceFolder}" and change the test globals and env file to relative paths (./app/test/globals.mts and .test.env). This makes the VSCode test launch configuration more portable and ensures paths resolve correctly when running tests from the integrated terminal while keeping ${relativeFile} for targeting the current test file.
So turns out the Git resolved via PATH might point to the ming64 version which is fine but we need to deal with it. Dealt with that.

Second, that unearthed a bug that findGitBashInRegistry returns the path to the git-bash.exe, not bash.exe which we need. Deal with that too
Prevent Node from messing up our perfectly quoted args
This was introduced in desktop#8150 but it's causing our get-shell-env tests to fail because powershell v1 requires USERPROFILE to be set. I don't know what local gitconfig values were being overridden that caused this to be a problem in the first place but I think we should remove these and find out and fix it some other way if it's still a problem
Include hook exit code in terminal output
Add an explicit TypeScript type for bashPath in app/src/lib/hooks/get-shell.ts (string | null) to improve type safety and satisfy strict typing rules. This is a non-functional change — no runtime behavior is altered.
…-test

Add test and fix failures around loading shell environment on Windows
Remove legacy local workflows (close-invalid.yml, pr-is-external.yml) and add a single triage-prs.yml that orchestrates PR triage by delegating jobs to the desktop/gh-cli-and-desktop-shared-workflows repository. Also update triage-scheduled-tasks.yml to include the pr-requirements scheduled job. This consolidates triage logic into shared workflow definitions for easier maintenance and consistency.
…lows

Centralize PR triage using shared workflows
…mentarray-fix

Update keyboard-shortcut.tsx
@yasuking0304 yasuking0304 merged commit 4a55bdb into main Feb 21, 2026
@yasuking0304 yasuking0304 deleted the backup-3.5.5 branch February 22, 2026 21:43
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.

10 participants