Skip to content

Add JSON configuration support and refactor key bindings with mame framework#10

Merged
sile merged 35 commits intomainfrom
config
Sep 5, 2025
Merged

Add JSON configuration support and refactor key bindings with mame framework#10
sile merged 35 commits intomainfrom
config

Conversation

@sile
Copy link
Copy Markdown
Owner

@sile sile commented Sep 5, 2025

No description provided.

sile added 30 commits August 31, 2025 15:15
@sile sile requested a review from Copilot September 5, 2025 10:39
Copy link
Copy Markdown

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 refactors the application from direct key handling to an action-based event system with JSON configuration support. It integrates the mame framework's action binding system to provide configurable keybindings and improves code modularity.

Key changes:

  • Add JSON configuration support with default config and CLI option for custom config files
  • Replace direct key input handling with an action-based system using the mame framework
  • Refactor widgets to handle actions instead of raw key inputs and remove dirty state tracking

Reviewed Changes

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

Show a summary per file
File Description
src/action.rs New action enum with JSON deserialization and state-dependent filtering
src/app.rs Core refactor to use binding system, remove dirty tracking, add config support
src/main.rs Add config file CLI option and load default/custom configurations
src/widget_*.rs Convert widgets from key input to action handling
src/canvas.rs Remove unused col_offset functionality
src/git.rs Increase max context lines from 9 to 20
configs/default.jsonc New default configuration with comprehensive keybindings
Cargo.toml Update mame dependency and add nojson for JSON parsing

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

@sile sile merged commit d6dac81 into main Sep 5, 2025
9 checks passed
@sile sile deleted the config branch September 5, 2025 10:41
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