-
Notifications
You must be signed in to change notification settings - Fork 731
Show Git authentication section on Windows with only executable option #11589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
795326a to
ea050c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR makes the Git authentication settings section visible on Windows, addressing the issue where it was completely hidden. Windows users can now see which authentication method GitButler uses, even though only the Git executable option is supported on that platform.
Key Changes
- Made the Git authentication section visible on Windows by removing the platform check in GitForm.svelte
- Added platform detection in KeysForm.svelte to conditionally hide SSH key and Git credentials helper options on Windows
- Changed the default credential type to
systemExecutableon Windows (previously defaulted tolocal)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/desktop/src/components/GitForm.svelte | Removed platform check that previously hid the entire KeysForm component on Windows |
| apps/desktop/src/components/KeysForm.svelte | Added platform detection, conditional rendering of auth options, Windows-specific messaging, and platform-appropriate default credential type |
| function getDefaultCredentialType(): KeyType { | ||
| // Use systemExecutable on Windows since other options are not available | ||
| return isWindows ? 'systemExecutable' : 'local'; | ||
| } | ||
| let selectedType: KeyType = $derived( | ||
| typeof project?.preferred_key === 'string' ? project?.preferred_key : 'local' | ||
| typeof project?.preferred_key === 'string' ? project?.preferred_key : getDefaultCredentialType() | ||
| ); |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getDefaultCredentialType() function is being called inside a $derived block (line 51), but it references another $derived value (isWindows). This creates a reactivity issue where the function doesn't properly track the dependency on isWindows.
The selectedType derivation should inline the logic instead of calling a function, or the function should be converted to a $derived itself. Here's the recommended fix:
Replace the function call with inline logic:
let selectedType: KeyType = $derived(
typeof project?.preferred_key === 'string'
? project?.preferred_key
: (isWindows ? 'systemExecutable' : 'local')
);
Then remove the getDefaultCredentialType() function as it's no longer needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be no problem as isWindows is static.
|
It generally seems to work, but the radio box with only one item doesn't seem to display that it's selected until one clicks, even though by all means (i.e. the data) it should already be selected. The motivation for this PR is #11584 , and it could be followed up by a documentation update which at least mentions that on Windows there is only one choice. But in a way, this now is obvious with the changes in this PR. @PavelLaptev can probably make this mergeable - the code is easy to try and easy to review with the "hide whitespace" option. Thanks for your help 🙏. On WindowsThe video shows how the initial selection is missing, but everything seems to work. Screen.Recording.2025-12-20.at.09.58.50.movNot on WindowsThe video shows how everything works as before. The glitch around selecting the SSH key is also in Nightly Screen.Recording.2025-12-20.at.09.59.23.movNightlyHere is nightly for reference, so I don't think anything broke. Screen.Recording.2025-12-20.at.10.02.38.mov |
On Windows, the Git authentication settings section was completely hidden. Windows users need visibility into which authentication method GitButler uses, even though only one option is supported.
Changes
KeysForm.svelte
backend.platformNamesystemExecutablecredential type on Windows (previously defaulted tolocal)GitForm.svelte
Result
{#if isWindows} <br /><br /> <strong>Note:</strong> On Windows, only the Git executable option is available for compatibility reasons. {/if} {#if !isWindows} <!-- SSH key option --> <!-- Git credentials helper option --> {/if}Windows users now see the Git authentication section with:
macOS/Linux behavior unchanged.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.