Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature/launch first match #425

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

Open
sebastinto wants to merge 8 commits into coderGtm:main
base: main
Choose a base branch
Loading
from sebastinto:feature/launch-first-match

Conversation

@sebastinto
Copy link
Contributor

@sebastinto sebastinto commented Sep 14, 2025

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.

Copy link
Contributor

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
Copy link
Contributor Author

Are there any additional changes you'd like me to implement here @coderGtm?

Copy link
Owner

Sorry @sebastinto but I haven't been able to take a proper look at it yet. Once I have a good look at it, I'll ping you here.

sebastinto reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot Copilot left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /