feat(input): add read-only Enhanced Input asset inspection - #130
feat(input): add read-only Enhanced Input asset inspection#130kunkunGames wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83bbabdc97
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Result->SetBoolField(TEXT("page_complete"), bPageComplete); | ||
| Result->SetBoolField(TEXT("all_contexts_covered"), bAllContextsCovered); | ||
| Result->SetNumberField(TEXT("errors"), ErrorCount); | ||
| Result->SetNumberField(TEXT("warnings"), WarningCount); |
There was a problem hiding this comment.
Preserve the numeric validation warning count
When the dispatcher generates any framework warning—for example, a normalized backslash in path, an unknown parameter, or conflicting response-shaping fields—FMonolithToolRegistry::ExecuteAction treats the top-level warnings field as its array-valued warning channel. Because this action stores a numeric count under the same key, the dispatcher fails to read it as an array and then replaces it with warning strings, so clients lose the validation count and see its type change. Use a distinct count field such as warning_count, leaving warnings available for the framework channel.
Useful? React with 👍 / 👎.
| TEXT("List Enhanced Input action assets with stable bounded pagination"), | ||
| FMonolithActionHandler::CreateStatic(&HandleListInputActions), | ||
| FParamSchemaBuilder() | ||
| .OptionalAssetPath(TEXT("path"), TEXT("Canonical package root; defaults to /Game")) |
There was a problem hiding this comment.
Disable path normalization for canonical-only parameters
For scalar path and asset_path inputs, registering these fields with OptionalAssetPath/RequiredAssetPath causes FMonolithToolRegistry::ExecuteAction to rewrite backslashes to slashes before these handlers run. Consequently inputs such as \Game\Input are accepted rather than rejected by ParsePackageFilter/ParseAssetPath, despite this feature's canonical-path contract; the same spelling in context_paths is rejected because that array is not normalized. Register the strict fields without the AssetPath kind, or otherwise validate the original value before normalization.
Useful? React with 👍 / 👎.
| return nullptr; | ||
| } | ||
|
|
||
| UObject* Object = FSoftObjectPath(ObjectPath).TryLoad(); |
There was a problem hiding this comment.
Reject redirectors before reporting an exact asset
When asset_path or an explicit context path names an existing UObjectRedirector, FSoftObjectPath::TryLoad follows it and returns the destination object. The request therefore succeeds—even though the advertised contract requires an exact path with no alternate asset—and may return an asset_path different from the one supplied; validation can likewise mark a stale redirected context path as valid. Verify that the loaded object's path still equals ObjectPath, or resolve the registry entry without following redirectors and reject redirector assets.
Useful? React with 👍 / 👎.
| { | ||
| return false; | ||
| } | ||
| if (Seen.Contains(ObjectPath)) |
There was a problem hiding this comment.
Deduplicate context paths using Unreal name semantics
When context_paths contains package-only spellings that differ only by case, this TSet<FString> check treats them as distinct even though Unreal object/package identity uses case-insensitive FName semantics. After the canonically cased entry loads the context, a differently cased entry can resolve to the same in-memory asset, so validation processes it twice and doubles its errors and warnings instead of rejecting the documented duplicate list. Compare normalized paths case-insensitively or store an FName deduplication key.
Useful? React with 👍 / 👎.
83bbabd to
3d6f6d7
Compare
Summary
Add a cohesive, read-only Enhanced Input asset inspection surface for discovering, paging, inspecting, and validating Input Actions and Input Mapping Contexts without mutating or dirtying packages.
Problem
Monolith exposes runtime and GAS-oriented input actions, but automation has no bounded asset-level preflight contract for Enhanced Input content. Callers currently have to reconstruct inventories and mapping checks themselves, and a truncated scan can be mistaken for a valid project-wide result.
Solution
Add five actions under a dedicated read-only and idempotent
inputdispatcher:list_input_actionsget_input_actionlist_input_mapping_contextsget_input_mapping_contextvalidate_input_mappingsAll inputs require canonical mounted package paths or matching top-level object paths. Asset pages, mapping pages, instanced-object arrays, explicit context lists, and per-context validation scans have documented hard bounds. Validation distinguishes mapping-scan
page_completefrom pagination-levelall_contexts_covered; globalcompleterequires both, andvalid=trueadditionally requires zero errors.The dispatcher registers before the optional GAS authoring gate because Input Actions and Mapping Contexts are Enhanced Input assets, so these inspection actions remain available when GAS authoring is disabled.
Verification
RunUAT BuildPlugin -NoTargetPlatforms -Rocket: 436/436 actions passed; UAT exit code 0RunUAT BuildPlugin -NoTargetPlatforms -Rocket: 436/436 actions passed; UAT exit code 0Automation RunTests Monolith.Input.Assets: 3/3 passed, zero failures/skips, exit code 0Automation RunTests Monolith.Input.Assets: 3/3 passed, zero failures/skips, exit code 0using namespacedirectives, or individualusingdeclarations; every namespaced symbol is fully qualified at its use sitegit diff --checkpassedDocs/testing/2026-08-04-enhanced-input-asset-inspection.mdCompatibility and risk
This PR adds direct
AssetRegistryandInputCoredependencies to the existing editor-onlyMonolithGASmodule;EnhancedInputwas already a direct dependency. It does not add a runtime dependency or change the existinggasnamespace.The five actions never transact, compile, save, mutate, or dirty an asset package. Duplicate-key assignments are warnings rather than errors because Enhanced Input can intentionally map one key to multiple actions. Missing actions, invalid keys, load failures, and incomplete mapping scans fail validation explicitly; no fallback asset or substitute result is synthesized.
Visual evidence
Not applicable: this PR adds headless action handlers, schemas, automation tests, documentation, and routing guidance with no visual or editor-facing UI change.