Skip to content

Conversation

sebastinto
Copy link
Contributor

Summary

This PR adds a new optional feature that allows users to automatically launch the first matching app in the suggestions result when using the LAUNCH command, eliminating the need to manually select from suggestions.

Changes

Primary

  • Added toggle for the feature in Settings (defaults to off)
  • Extracted suggestions logic into a getLaunchSuggestions() function that returns a LaunchSuggestionsResult data class for consistency
  • Refactored the LAUNCH command to support the new feature

Secondary

  • Fixed a typo in an Italian translation that prevented app successful builds.

Testing

  • Toggle setting on -> type LAUNCH c -> press the keyboard return key -> first match is launched (in this case the "Contacts" app)
  • Toggle setting off -> type LAUNCH c -> press the keyboard return key -> error message displayed 'c' app not found. Try using 'list apps' to get list of all app names.

@coderGtm coderGtm requested a review from Copilot September 14, 2025 14:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new optional feature that automatically launches the first matching app when using the LAUNCH command, eliminating the need to manually select from suggestions. The feature is disabled by default and can be toggled in the Settings.

  • Added a new Settings toggle for auto-launching the first matching app with the LAUNCH command
  • Refactored launch suggestion logic into a reusable function that returns structured data
  • Fixed a typo in the Italian translation file that was causing build issues

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/src/main/res/values/strings.xml Added new string resource for the feature toggle
app/src/main/res/values-*/strings.xml Added translations for the new feature in multiple languages
app/src/main/res/layout/activity_settings.xml Added UI switch for the new feature in Settings
app/src/main/java/com/coderGtm/yantra/terminal/Helper.kt Extracted launch suggestions logic into reusable function
app/src/main/java/com/coderGtm/yantra/commands/launch/Helper.kt Added helper function to find first matching app
app/src/main/java/com/coderGtm/yantra/commands/launch/Command.kt Implemented auto-launch functionality in LAUNCH command
app/src/main/java/com/coderGtm/yantra/activities/SettingsActivity.kt Added settings management for the new feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

…into feature/launch-first-match

# Conflicts:
#	app/src/main/res/values-es/strings.xml
#	app/src/main/res/values-it/strings.xml
#	app/src/main/res/values-ru/strings.xml
#	app/src/main/res/values-sr/strings.xml
#	app/src/main/res/values-uk/strings.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant