Skip to content

Fix floating-window duplicate-key crash; add mouse/keyboard action editors; fix InTimePeriod rule UI#86

Merged
Programmer-MrWang merged 4 commits into
mainfrom
codex-n5za8w
Jun 19, 2026
Merged

Fix floating-window duplicate-key crash; add mouse/keyboard action editors; fix InTimePeriod rule UI#86
Programmer-MrWang merged 4 commits into
mainfrom
codex-n5za8w

Conversation

@Programmer-MrWang

Copy link
Copy Markdown
Owner

Motivation

  • Prevent crashes when copying automations that include the floating-window trigger by handling duplicate ButtonId entries when building the lookup for layout ordering.
  • Provide a way to manually edit recorded steps for simulated mouse and keyboard automations (delay, coordinates, action type) and support adding/removing single steps.
  • Make the "是否在某时间段" rule settings UI behave consistently with ClassIsland/ExtraIsland patterns so the TimePicker controls show and update correctly.

Description

  • Fixed duplicate-key exceptions in FloatingWindowService.GetOrderedRows() by grouping _entries.Values by ButtonId and using the first entry per id when creating the dictionary. (Services/FloatingWindowService.cs).
  • Extended KeyboardInputSettings with a structured Actions list and KeyboardAction type to store per-step Type, KeyCode, KeyName, and Interval, while keeping the legacy Keys list for compatibility. (Settings/KeyboardInputSettings.cs).
  • Updated SimulateKeyboardAction to play back per-step Actions (supporting Press, KeyDown, KeyUp) and to convert legacy Keys into the new Actions format as a fallback. (Actions/SimulateKeyboardAction.cs).
  • Implemented a manual editor UI for keyboard steps with recording, list, select/apply/add/delete controls and persistence to both Actions and Keys. (Controls/SimulateKeyboardSettingsControl.cs).
  • Implemented a manual editor UI for mouse steps with operation type, X/Y, scroll delta, delay and drag-end flag plus select/apply/add/delete and persistence to Settings.Actions. (Controls/SimulateMouseSettingsControl.cs).
  • Reworked the time-period rule settings control to use RuleSettingsControlBase AXAML and event-driven TimePicker Loaded / SelectedTimeChanged handlers (pattern taken from ExtraIsland) so the control displays and syncs StartTime/EndTime correctly. (Controls/InTimePeriodRuleSettingsControl.axaml and .cs).

Testing

  • Ran code checks with git diff --check which reported no whitespace/merge problems and passed.
  • Attempted to run dotnet build SystemTools.csproj -p:Platform=x64 but the container environment lacked the dotnet SDK so a build could not be executed here (manual or CI build recommended).
  • Verified via static inspection that the new Actions lists are populated from recordings and that the keyboard playback code handles both the new Actions and legacy Keys fallback in code paths.

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Programmer-MrWang

Copy link
Copy Markdown
Owner Author

@codex review

@Programmer-MrWang Programmer-MrWang merged commit 7759888 into main Jun 19, 2026
1 check passed
@Programmer-MrWang Programmer-MrWang deleted the codex-n5za8w branch June 19, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant