-
Notifications
You must be signed in to change notification settings - Fork 7
Feat: Implement fuzzy search and caching for App Live devices #9
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
Merged
pulkitsharma07
merged 8 commits into
browserstack:main
from
ruturaj-browserstack:app-live-device-name-validation
May 2, 2025
Merged
Feat: Implement fuzzy search and caching for App Live devices #9
pulkitsharma07
merged 8 commits into
browserstack:main
from
ruturaj-browserstack:app-live-device-name-validation
May 2, 2025
Conversation
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
const command = | ||
process.platform === "darwin" | ||
? ["open", launchUrl] | ||
: process.platform === "win32" | ||
? ["cmd", "/c", "start", launchUrl] | ||
: ["xdg-open", launchUrl]; | ||
|
||
// nosemgrep:javascript.lang.security.detect-child-process.detect-child-process |
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.
dont remove this
pulkitsharma07
approved these changes
May 2, 2025
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.
This pull request introduces a new fuzzy search utility, enhances the
startSession
logic for App Live sessions, and removes redundant code related to app uploads. The most important changes include the implementation of a custom fuzzy search algorithm, caching for App Live devices, and significant refactoring of session initialization logic.New Features
customFuzzySearch
function insrc/lib/fuzzy.ts
to perform Levenshtein-based fuzzy matching on lists of items. This function is used to rank items based on their similarity to a query.src/tools/applive-utils/device-cache.ts
to store App Live device data with a 1-day TTL, reducing redundant API calls.Refactoring and Enhancements
startSession
function insrc/tools/applive-utils/start-session.ts
to include:uploadApp
dependency fromstartAppLiveSession
insrc/tools/applive.ts
, delegating app upload logic entirely tostartSession
. [1] [2]Testing Updates
uploadApp
logic and updated existing tests to reflect the refactoredstartSession
behavior. [1] [2]