You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A PR adiciona um warning em modo dev quando VITE_MAGO_BACKEND_URL não está configurado. O código é simples e funcional, mas a mensagem de warning pode ser enganosa pois sugere um fallback que na verdade não é aplicado.
Pontos de Review
⚠️ mensagem de warning pode ser enganosa
O console.warn diz 'usando http://localhost:3002' mas o código NÃO define esse valor como fallback. O aviso apenas informa que a variável não está definida, sem de fato aplicar um valor padrão em lugar algum.
💡 considerar usar console.group para agrupar warnings de dev
Em apps maiores com múltiplos warnings de dev, usar console.group('[mago-office]') pode melhorar a legibilidade no console do navegador.
✅ uso correto de import.meta.env dev
O uso de import.meta.env.DEV é a forma correta para detectar modo development em Vite. O código também segue a convenção VITE_ para variáveis de ambiente.
✅ escopo correto do warning
O warning aparece apenas em modo DEV, evitando poluição desnecessária em produção. Isso é uma boa prática.
✅ testes e typecheck passando
A PR informa que 160 testes passam e typecheck está limpo, indicando que a mudança não quebrou funcionalidades existentes.
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
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.
Summary
VITE_MAGO_BACKEND_URLnão está definido.env.examplejá existia com a variável documentadaTest plan
Closes #83