Skip to content

Conversation

@Darren-Kelly-Unity
Copy link
Collaborator

@Darren-Kelly-Unity Darren-Kelly-Unity commented Oct 28, 2025

Description

Fix an issue where the control scheme UI would close when pressing the + for adding a device type when there was a pending change to be auto saved.

Ticket:
https://jira.unity3d.com/browse/ISXB-1713

Testing status & QA

I have tested this manually in the editor on Unity version 6.000.1.5f1

Overall Product Risks

Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches if any.

  • Complexity: 2
  • Halo Effect: 1

Comments to reviewers

Please describe any additional information such as what to focus on, or historical info for the reviewers.

Checklist

Before review:

  • Changelog entry added.
    • Explains the change in Changed, Fixed, Added sections.
    • For API change contains an example snippet and/or migration example.
    • JIRA ticket linked, example (case %%). If it is a private issue, just add the case ID without a link.
    • Jira port for the next release set as "Resolved".
  • Tests added/changed, if applicable.
    • Functional tests Area_CanDoX, Area_CanDoX_EvenIfYIsTheCase, Area_WhenIDoX_AndYHappens_ThisIsTheResult.
    • Performance tests.
    • Integration tests.
  • Docs for new/changed API's.
    • Xmldoc cross references are set correctly.
    • Added explanation how the API works.
    • Usage code examples added.
    • The manual is updated, if needed.

During merge:

  • Commit message for squash-merge is prefixed with one of the list:
    • NEW: ___.
    • FIX: ___.
    • DOCS: ___.
    • CHANGE: ___.
    • RELEASE: 1.1.0-preview.3.

After merge:

  • Create forward/backward port if needed. If you are blocked from creating a forward port now please add a task to ISX-1444.

I still need to look into other solutions / look into if this fix is correct.
@u-pr-agent
Copy link
Contributor

u-pr-agent bot commented Oct 28, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪

The PR is small with a clear goal, but it contains leftover debugging code and a concerning TODO comment that need to be addressed.
🏅 Score: 70

The PR addresses the bug with a reasonable approach, but it includes several leftover debug logs and a concerning TODO comment that must be removed or clarified before merging.
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Debugging Remnants

The code contains several Debug.LogError statements that appear to be for debugging purposes (e.g., in Save, and in ControlSchemesView.cs). These should be removed before merging. Using LogError for informational logging can also be misleading.

if (isAutoSave)
{
    Debug.LogError("Auto-saving input action asset.");
}
Unresolved TODO

A TODO comment indicates a known issue with the following line of code. This should be investigated and resolved, or the comment should be clarified or removed if it's no longer relevant.

//TODO THIS CAUSES THE ERROR

🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr-agent

@codecov-github-com
Copy link

codecov-github-com bot commented Oct 28, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...Editor/UITKAssetEditor/Views/ControlSchemesView.cs 0.00% 4 Missing ⚠️
...Editor/UITKAssetEditor/InputActionsEditorWindow.cs 50.00% 2 Missing ⚠️
@@             Coverage Diff             @@
##           develop    #2268      +/-   ##
===========================================
+ Coverage    76.70%   76.80%   +0.09%     
===========================================
  Files          465      476      +11     
  Lines        87919    88651     +732     
===========================================
+ Hits         67442    68089     +647     
- Misses       20477    20562      +85     
Flag Coverage Δ
inputsystem_MacOS_2022.3 5.39% <0.00%> (+0.02%) ⬆️
inputsystem_MacOS_2022.3_project 74.73% <0.00%> (+0.15%) ⬆️
inputsystem_MacOS_6000.0 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.0_project 76.60% <25.00%> (+0.09%) ⬆️
inputsystem_MacOS_6000.2 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.2_project 76.59% <25.00%> (+0.09%) ⬆️
inputsystem_MacOS_6000.3 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_MacOS_6000.3_project 76.59% <25.00%> (+0.09%) ⬆️
inputsystem_MacOS_6000.4 5.19% <0.00%> (+<0.01%) ⬆️
inputsystem_MacOS_6000.4_project 76.61% <25.00%> (+0.10%) ⬆️
inputsystem_MacOS_6000.5 5.19% <0.00%> (?)
inputsystem_MacOS_6000.5_project 76.61% <25.00%> (?)
inputsystem_Ubuntu_2022.3 5.40% <0.00%> (+0.02%) ⬆️
inputsystem_Ubuntu_2022.3_project 74.53% <0.00%> (+0.14%) ⬆️
inputsystem_Ubuntu_6000.0 5.19% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.0_project 76.40% <25.00%> (+0.08%) ⬆️
inputsystem_Ubuntu_6000.2 5.19% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.2_project 76.40% <25.00%> (+0.08%) ⬆️
inputsystem_Ubuntu_6000.3 5.19% <0.00%> (-0.01%) ⬇️
inputsystem_Ubuntu_6000.3_project 76.40% <25.00%> (+0.08%) ⬆️
inputsystem_Ubuntu_6000.4 5.19% <0.00%> (+<0.01%) ⬆️
inputsystem_Ubuntu_6000.4_project 76.41% <25.00%> (+0.08%) ⬆️
inputsystem_Ubuntu_6000.5 5.19% <0.00%> (?)
inputsystem_Ubuntu_6000.5_project 76.41% <25.00%> (?)
inputsystem_Windows_2022.3 5.39% <0.00%> (+0.02%) ⬆️
inputsystem_Windows_2022.3_project 74.86% <0.00%> (+0.13%) ⬆️
inputsystem_Windows_6000.0 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.0_project 76.72% <25.00%> (+0.07%) ⬆️
inputsystem_Windows_6000.2 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.2_project 76.72% <25.00%> (+0.07%) ⬆️
inputsystem_Windows_6000.3 5.18% <0.00%> (-0.01%) ⬇️
inputsystem_Windows_6000.3_project 76.72% <25.00%> (+0.07%) ⬆️
inputsystem_Windows_6000.4 5.19% <0.00%> (+<0.01%) ⬆️
inputsystem_Windows_6000.4_project 76.72% <25.00%> (+0.08%) ⬆️
inputsystem_Windows_6000.5 5.19% <0.00%> (?)
inputsystem_Windows_6000.5_project 76.73% <25.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...Editor/UITKAssetEditor/InputActionsEditorWindow.cs 49.66% <50.00%> (+0.34%) ⬆️
...Editor/UITKAssetEditor/Views/ControlSchemesView.cs 0.00% <0.00%> (ø)

... and 25 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@K-Tone K-Tone left a comment

Choose a reason for hiding this comment

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

Looks okay to me! Thanks for working on it.

CC @ekcoh for viz, this fix seems to build up on my other idea of not saving during the sensitive moments in time. Not cool to be extending it, but what else could be done before our auto-save code is redesigned to be less crazy than it is now? :)

@Pauliusd01
Copy link
Collaborator

Pauliusd01 commented Oct 31, 2025

It still reproduces with project wide actions view but if it is complicated to fix I'd be fine with merging as is.

Steps to repro: Open project settings -> input system view -> make sure you have a PWA asset if not make one -> make some changes (this window always uses auto save) -> start editing the control scheme as bug repro describes -> focus is lost

31.10.2025.-.Unity.322.mp4

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.

4 participants