Skip to content

Simplify GABP mode handling - remove remote/connect support#24

Merged
pardeike merged 3 commits intomainfrom
copilot/fix-4b6d2528-7763-4555-9dbc-3d774b484268
Sep 14, 2025
Merged

Simplify GABP mode handling - remove remote/connect support#24
pardeike merged 3 commits intomainfrom
copilot/fix-4b6d2528-7763-4555-9dbc-3d774b484268

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 14, 2025

GABS always communicates with games locally since it's responsible for launching them. This change removes all remote/connect mode handling code to simplify the codebase while maintaining the same functionality.

Problem

The codebase contained conditional logic for handling "remote" and "connect" GABP modes that will never be used, since GABS always communicates locally with games it launches. Users were also presented with unnecessary prompts:

GABP Mode (local|remote|connect) [local]: 
GABP Host (for remote access) [127.0.0.1]:

This created confusion and added complexity without serving any purpose in the current architecture.

Solution

  • Removed interactive GABP Mode and Host prompts from game creation
  • Eliminated GabpMode and GabpHost fields from GameConfig struct
  • Simplified BridgeConfig to always use local communication (127.0.0.1, "local" mode)
  • Removed conditional logic for remote/connect modes throughout the codebase
  • Updated all tests to reflect local-only behavior
  • Maintained full backward compatibility - existing configs with old GABP fields load successfully (fields are ignored)

After the changes

Game creation is now streamlined with no GABP-related prompts:

$ gabs games add minecraft
Game Name [minecraft]: Minecraft
Launch Mode (DirectPath|SteamAppId|EpicAppId|CustomCommand) [DirectPath]: SteamAppId
Target (path/id): 123456
Stop Process Name (optional): minecraft.exe
Description (optional): A sandbox game
Game 'minecraft' added successfully.

The codebase is significantly simpler (~46 lines of conditional logic removed) while maintaining identical functionality. GABS automatically uses local communication without any configuration needed.

All tests pass and the bridge configuration system works exactly as before, just with less complexity.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>
Copilot AI changed the title [WIP] When creating a game with dabs games add it still asks for the mode - since dabs always communicates with the game locally (due to it being the one starting the game), I am not sure if this is needed anymore. Remove redundant GABP Mode prompt from game creation Sep 14, 2025
Copilot AI requested a review from pardeike September 14, 2025 11:23
@pardeike
Copy link
Copy Markdown
Owner

@copilot If we only use local, do we have a lot of code that still handles the cases? If so, there will never be a use case where a dabs controls a game remotely. This will be implemented with an inter-dabs protocol in the future so one dabs can communicate with another (no need to introduce this yet) - as a result dabs ALWAYS interacts with a game locally. Refactor the code so it becomes simpler if possible.

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 14, 2025

@copilot If we only use local, do we have a lot of code that still handles the cases? If so, there will never be a use case where a dabs controls a game remotely. This will be implemented with an int...

Refactored the codebase to remove all remote/connect mode handling. Simplified the implementation by removing GabpMode and GabpHost fields from GameConfig, and BridgeConfig now always uses local communication (127.0.0.1, "local" mode). This removes about 46 lines of conditional logic while maintaining full backward compatibility with existing configurations. Commit d5b1d59.

Copilot AI changed the title Remove redundant GABP Mode prompt from game creation Simplify GABP mode handling - remove remote/connect support Sep 14, 2025
@pardeike pardeike marked this pull request as ready for review September 14, 2025 11:33
@pardeike pardeike merged commit bc16ed8 into main Sep 14, 2025
3 checks passed
@pardeike pardeike deleted the copilot/fix-4b6d2528-7763-4555-9dbc-3d774b484268 branch September 14, 2025 11:34
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.

2 participants