fix(vars): highlight undefined variables + send empty string#40
Merged
Conversation
) Undefined {{var}} tokens were both visually indistinguishable from resolved ones and sent literally on the wire, making typos silently corrupt requests. - resolveString returns '' for unknown variables instead of leaving the literal token; built-ins and the unresolved-name aggregation stay intact so the UI still knows which names were missing - HighlightedInput renderHighlighted now receives the set of known variable names and paints unknown tokens with bg-method-delete/10 + text-method-delete plus a title='undefined variable' tooltip - Regression + coverage tests: unknown var in URL or header value resolves to empty string, defined vars still resolve, unresolved array still lists missing names
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 free
to 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.
Özet
Kapatır #36. Tanımsız
{{var}}token'ları iki yerde sessizce bozuluyordu:{{var}}string'i gidiyordu — endpoint'e geçersiz değer düşüyordu.Değişiklikler
resolveString: tanımsız token →''. Built-in'ler vefindUnresolvedraporu korundu, UI yine eksik isimleri biliyor.HighlightedInput.renderHighlighted: tanıdık variable set'ini parametre alıyor; bilinmeyen token'larbg-method-delete/10 text-method-delete+title="undefined variable"tooltip'iyle kırmızı render ediliyor. Bilinen token'lar eskibg-accent-soft text-accentstilinde kalıyor.unresolveddizisi hâlâ eksik isimleri listeliyor.Doğrulama
pnpm -r typecheck✅pnpm -r test→ 196 passed + 7 skipped (+1 net new)pnpm --filter=@scrapeman/desktop build✅