fix(desktop): garantir que servidores HTTP usem seletor remoto de diretório - #66
Open
BFLabsAI wants to merge 1 commit into
Open
fix(desktop): garantir que servidores HTTP usem seletor remoto de diretório#66BFLabsAI wants to merge 1 commit into
BFLabsAI wants to merge 1 commit into
Conversation
…etório Ao conectar em servidores HTTP remotos via túnel SSH (ex: 127.0.0.1:4096), o seletor de pastas abria o Finder/Explorer local do SO em vez do diálogo de navegação remota (DialogSelectDirectoryV2), enviando caminhos locais inexistentes no servidor e quebrando a abertura de projetos.
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes#68
Type of change
What does this PR do?
Ao conectar a um servidor HTTP remoto (incluindo túneis SSH em
http://127.0.0.1:4096), a funçãodirectoryPickerKind()invocava o diálogo nativo do sistema operacional do cliente (Finder no macOS / Explorer no Windows) em vez do seletor de diretórios remoto (DialogSelectDirectoryV2).Isso ocorria porque
ServerConnection.local(conn)considerava qualquer host127.0.0.1oulocalhostcomo "local". Como resultado, o caminho local do cliente (/Users/...) era enviado para a máquina remota Linux (/root/...), falhando a abertura do projeto.Este PR altera
packages/app/src/components/directory-picker-policy.tspara verificarServerConnection.builtin(server)em vez deServerConnection.local(server), garantindo que apenas o sidecar local embutido do desktop use o seletor nativo, enquanto conexões HTTP usem o seletor remotoDialogSelectDirectoryV2.How did you verify your code works?
Adicionados testes unitários em
packages/app/src/components/directory-picker.test.tscobrindo servidores HTTP locais (127.0.0.1:4096elocalhost:4096), sidecars e conexões remotas, executados e aprovados combun test src/components/directory-picker.test.ts(6 asserts passando com 100% de sucesso).Screenshots / recordings
N/A - Correção lógica na resolução do tipo de seletor de diretórios.
Checklist