fix(envvar): fix envvar dropdown positioning, remove dead code#2196
Merged
waleedlatif1 merged 1 commit intostagingfrom Dec 4, 2025
Merged
fix(envvar): fix envvar dropdown positioning, remove dead code#2196waleedlatif1 merged 1 commit intostagingfrom
waleedlatif1 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryFixed environment variable dropdown positioning behavior in API key fields and removed unused code.
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant ShortInput
participant SubBlockInputController
participant EnvVarDropdown
alt User pastes API key
User->>ShortInput: onPaste event
ShortInput->>ShortInput: Set justPastedRef.current = true
ShortInput->>ShortInput: Schedule reset (100ms timeout)
User->>ShortInput: onChange triggered
ShortInput->>ShortInput: shouldForceEnvDropdown({ event: 'change' })
ShortInput->>ShortInput: Check justPastedRef.current === true
ShortInput->>SubBlockInputController: Return { show: false }
Note over EnvVarDropdown: Dropdown NOT shown (fixed behavior)
ShortInput->>ShortInput: Reset justPastedRef.current = false
end
alt User focuses on field with long API key
User->>ShortInput: onFocus event
ShortInput->>ShortInput: shouldForceEnvDropdown({ event: 'focus' })
ShortInput->>ShortInput: Check value.length > 20 && !value.includes('{{')
ShortInput->>SubBlockInputController: Return { show: false }
Note over EnvVarDropdown: Dropdown NOT shown (fixed behavior)
end
alt User types in API key field
User->>ShortInput: onChange event
ShortInput->>ShortInput: shouldForceEnvDropdown({ event: 'change' })
ShortInput->>ShortInput: Check if looksLikeRawApiKey
alt Looks like raw API key (length > 30, no '{{', no env var pattern)
ShortInput->>SubBlockInputController: Return { show: false }
Note over EnvVarDropdown: Dropdown NOT shown
else Looks like env var reference
ShortInput->>SubBlockInputController: Return { show: true, searchTerm: value }
SubBlockInputController->>EnvVarDropdown: Show dropdown with search
EnvVarDropdown-->>User: Display filtered env vars
end
end
|
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.
Summary
Type of Change
Testing
Tested manually
Checklist