diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index d48b67760..b44b6ad21 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -36,6 +36,7 @@ RequireMainMenuSettingsShellUsesEveSurface(root); RequireSectorMapZoneDetailsUseEveSurface(root); RequireRuntimeMenuTabsUseEveSurface(root); RequireInventoryShipSettingsUseEveSurface(root); +RequireInventoryCargoItemDetailsUseEveSurface(root); RequireTradeCargoSelectorUseEveSurface(root); RequireTradeFilterAndRowActionsUseEveSurface(root); RequireTradeItemDetailsUseEveSurface(root); @@ -508,6 +509,7 @@ Console.WriteLine("Main-menu settings shell: settings/input/audio subpages lower Console.WriteLine("Sector-map zone details shell: zone inspection lowers through an Eve UI Toolkit surface instead of PropertiesPanel rows"); Console.WriteLine("Runtime menu tab shell: tab navigation lowers through an Eve UI Toolkit surface instead of MenuTabButton click wiring"); Console.WriteLine("Inventory ship-settings shell: background ship tuning lowers through an Eve UI Toolkit surface instead of PropertiesPanel.AddField"); +Console.WriteLine("Inventory cargo-item shell: cargo item inspection lowers through an Eve UI Toolkit surface instead of PropertiesPanel.Inspect"); Console.WriteLine("Trade cargo-selector shell: target cargo selection lowers through an Eve UI Toolkit surface instead of ContextMenu.AddOption"); Console.WriteLine("Trade filter and row-action shells: filter selection and buy-quantity entry lower through Eve UI Toolkit surfaces instead of ContextMenu dropdowns"); Console.WriteLine("Trade item-details shell: typed item inspection lowers through an Eve UI Toolkit surface instead of PropertiesPanel.Inspect"); @@ -2651,6 +2653,59 @@ static void RequireInventoryShipSettingsUseEveSurface(string root) } } +static void RequireInventoryCargoItemDetailsUseEveSurface(string root) +{ + var inventoryMenuPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "InventoryMenu.cs"); + if (!File.Exists(inventoryMenuPath)) + { + throw new InvalidOperationException("Cannot verify inventory cargo-item shell; InventoryMenu.cs is missing."); + } + + var source = File.ReadAllText(inventoryMenuPath); + var requiredSymbols = new[] + { + "CargoItemDetailsSurfaceId", + "RenderCargoItemDetailsSurface(", + "HandleCargoItemDetailsSurfaceCommand(", + "ResolveCargoItemDetailsSurfaceDocument(", + "BuildCargoItemDetailsSurfaceDefinition(", + "BuildCargoItemBehaviorCards(", + "BuildCargoItemBehaviorMetric(", + "CloseCargoItemDetailsCommand", + "new EveUiToolkitSurfaceLowerer()" + }; + + var missingSymbols = requiredSymbols + .Where(symbol => !source.Contains(symbol, StringComparison.Ordinal)) + .ToArray(); + + if (missingSymbols.Length > 0) + { + throw new InvalidOperationException( + "InventoryMenu no longer lowers cargo-item inspection through an Eve surface shell: " + + string.Join(", ", missingSymbols)); + } + + if (!source.Contains("RenderCargoItemDetailsSurface(item);", StringComparison.Ordinal)) + { + throw new InvalidOperationException("InventoryMenu cargo click path no longer routes item inspection through the Eve surface."); + } + + var propertiesInspectCount = CountOccurrences(source, "PropertiesPanel.Inspect(item);"); + if (propertiesInspectCount != 1) + { + throw new InvalidOperationException( + $"InventoryMenu should keep exactly one equipped-item PropertiesPanel inspect path for now; found {propertiesInspectCount}."); + } + + var propertiesSetActiveCount = CountOccurrences(source, "PropertiesPanel.gameObject.SetActive(true);"); + if (propertiesSetActiveCount != 1) + { + throw new InvalidOperationException( + $"InventoryMenu should keep exactly one equipped-item PropertiesPanel activation path for now; found {propertiesSetActiveCount}."); + } +} + static void RequireTradeCargoSelectorUseEveSurface(string root) { var tradeMenuPath = Path.Combine(root, "Assets", "Scripts", "UI", "Menu", "TradeMenu.cs"); @@ -3954,6 +4009,24 @@ static bool ContainsBehaviorValueKind(AetheriaBehaviorValue value, string kind) value.MapEntries.Any(entry => ContainsBehaviorValueKind(entry.Value, kind)); } +static int CountOccurrences(string source, string pattern) +{ + if (string.IsNullOrEmpty(source) || string.IsNullOrEmpty(pattern)) + { + return 0; + } + + var count = 0; + var index = 0; + while ((index = source.IndexOf(pattern, index, StringComparison.Ordinal)) >= 0) + { + count++; + index += pattern.Length; + } + + return count; +} + static int CountRequiredBehaviorItemRefsMissingItemKeys(AetheriaBehaviorPayload payload) { return payload.Fields.Count(field => diff --git a/Assets/Scripts/UI/Menu/InventoryMenu.cs b/Assets/Scripts/UI/Menu/InventoryMenu.cs index 62c2c6414..46e000913 100644 --- a/Assets/Scripts/UI/Menu/InventoryMenu.cs +++ b/Assets/Scripts/UI/Menu/InventoryMenu.cs @@ -28,6 +28,8 @@ public class InventoryMenu : MonoBehaviour private const string IncrementShutdownThresholdCommand = "aetheria.inventory.current_ship_settings.shutdown.increment"; private const string ResetShutdownThresholdCommand = "aetheria.inventory.current_ship_settings.shutdown.reset"; private const string CloseShipSettingsCommand = "aetheria.inventory.current_ship_settings.close"; + private const string CargoItemDetailsSurfaceId = "aetheria.inventory.cargo_item_details"; + private const string CloseCargoItemDetailsCommand = "aetheria.inventory.cargo_item_details.close"; private const float ShutdownThresholdStep = 0.05f; public InventoryPanel[] InventoryPanels; @@ -44,6 +46,7 @@ public class InventoryMenu : MonoBehaviour private ItemInstance _selectedItem; private int2[] _selectedCells; private UIDocument _shipSettingsSurfaceDocument; + private UIDocument _cargoItemDetailsSurfaceDocument; // private List _backgroundSubscriptions; // private ItemInstance _dragItem; @@ -86,6 +89,7 @@ public class InventoryMenu : MonoBehaviour private void OnDisable() { HideCurrentShipSettingsSurface(); + HideCargoItemDetailsSurface(); // Background.gameObject.SetActive(false); } @@ -103,6 +107,8 @@ public class InventoryMenu : MonoBehaviour { if (e.clickCount == 2) { + HideCargoItemDetailsSurface(); + ClearSelectedItemSelection(); var otherPanel = panel == InventoryPanels[0] ? InventoryPanels[1] : InventoryPanels[0]; if (CommitCargoItemTransfer(cargoEvent.CargoBay, otherPanel, item)) { @@ -116,16 +122,15 @@ public class InventoryMenu : MonoBehaviour else { HideCurrentShipSettingsSurface(); - PropertiesPanel.gameObject.SetActive(true); - ClearSelectedCellHighlight(); - _selectedPanel = panel; - _selectedPosition = cargoEvent.Position; - PropertiesPanel.Inspect(item); + HideCargoItemDetailsSurface(); + PropertiesPanel.gameObject.SetActive(false); + ClearSelectedItemSelection(); _selectedPanel = panel; _selectedPosition = cargoEvent.CargoBay.Cargo[item]; _selectedItem = item; _selectedCells = GetSelectedCells(item, _selectedPosition); ApplySelectedCellHighlight(); + RenderCargoItemDetailsSurface(item); // TODO: SFX: Success } } @@ -137,6 +142,8 @@ public class InventoryMenu : MonoBehaviour { if (e.clickCount == 2) { + HideCargoItemDetailsSurface(); + ClearSelectedItemSelection(); var otherPanel = panel == InventoryPanels[0] ? InventoryPanels[1] : InventoryPanels[0]; if (CommitEquippedItemTransfer(entityEvent.Entity, item, otherPanel)) { @@ -150,8 +157,9 @@ public class InventoryMenu : MonoBehaviour else { HideCurrentShipSettingsSurface(); + HideCargoItemDetailsSurface(); PropertiesPanel.gameObject.SetActive(true); - ClearSelectedCellHighlight(); + ClearSelectedItemSelection(); PropertiesPanel.Inspect(item); _selectedPanel = panel; @@ -179,8 +187,9 @@ public class InventoryMenu : MonoBehaviour if (entity == null) return; + HideCargoItemDetailsSurface(); PropertiesPanel.gameObject.SetActive(false); - ClearSelectedCellHighlight(); + ClearSelectedItemSelection(); var document = ResolveShipSettingsSurfaceDocument(); document.gameObject.SetActive(true); @@ -271,6 +280,259 @@ public class InventoryMenu : MonoBehaviour _shipSettingsSurfaceDocument.gameObject.SetActive(false); } + private void RenderCargoItemDetailsSurface(ItemInstance item) + { + var typedItem = FindTypedInventoryItem(item); + if (item == null || typedItem == null) + return; + + var document = ResolveCargoItemDetailsSurfaceDocument(); + document.gameObject.SetActive(true); + + var root = document.rootVisualElement; + root.Clear(); + root.style.flexGrow = 1; + root.style.position = Position.Absolute; + root.style.left = 0; + root.style.top = 0; + root.style.right = 0; + root.style.bottom = 0; + root.style.alignItems = Align.FlexStart; + root.style.justifyContent = Justify.FlexStart; + root.pickingMode = PickingMode.Ignore; + + var shell = new VisualElement(); + shell.style.width = 420; + shell.style.maxWidth = 520; + shell.style.backgroundColor = new Color(0.08f, 0.1f, 0.14f, 0.94f); + shell.style.borderTopLeftRadius = 8; + shell.style.borderTopRightRadius = 8; + shell.style.borderBottomLeftRadius = 8; + shell.style.borderBottomRightRadius = 8; + shell.style.paddingLeft = 18; + shell.style.paddingRight = 18; + shell.style.paddingTop = 18; + shell.style.paddingBottom = 18; + shell.style.borderLeftWidth = 1; + shell.style.borderRightWidth = 1; + shell.style.borderTopWidth = 1; + shell.style.borderBottomWidth = 1; + shell.style.borderLeftColor = new Color(0.3f, 0.47f, 0.71f, 0.8f); + shell.style.borderRightColor = new Color(0.3f, 0.47f, 0.71f, 0.8f); + shell.style.borderTopColor = new Color(0.3f, 0.47f, 0.71f, 0.8f); + shell.style.borderBottomColor = new Color(0.3f, 0.47f, 0.71f, 0.8f); + shell.pickingMode = PickingMode.Position; + root.Add(shell); + + var lowerer = new EveUiToolkitSurfaceLowerer(); + shell.Add(lowerer.Lower(BuildCargoItemDetailsSurfaceDefinition(item, typedItem), HandleCargoItemDetailsSurfaceCommand)); + } + + private void HandleCargoItemDetailsSurfaceCommand(EveSurfaceCommandRequest request) + { + if (string.Equals(request.Command, CloseCargoItemDetailsCommand, StringComparison.Ordinal)) + { + HideCargoItemDetailsSurface(); + ClearSelectedItemSelection(); + return; + } + + Debug.LogWarning($"Unknown inventory cargo item details command: {request.Command}"); + } + + private void HideCargoItemDetailsSurface() + { + if (_cargoItemDetailsSurfaceDocument == null) + return; + + _cargoItemDetailsSurfaceDocument.rootVisualElement.Clear(); + _cargoItemDetailsSurfaceDocument.gameObject.SetActive(false); + } + + private UIDocument ResolveCargoItemDetailsSurfaceDocument() + { + if (_cargoItemDetailsSurfaceDocument != null) + return _cargoItemDetailsSurfaceDocument; + + var host = new GameObject("Aetheria Inventory Cargo Item Details Surface"); + host.transform.SetParent(transform, false); + var document = host.AddComponent(); + document.sortingOrder = 1001; + host.SetActive(false); + _cargoItemDetailsSurfaceDocument = document; + return document; + } + + private EveSurfaceDocument BuildCargoItemDetailsSurfaceDefinition(ItemInstance item, AetheriaRuntimeCatalogItem typedItem) + { + var children = new List + { + Card( + $"{CargoItemDetailsSurfaceId}.summary", + typedItem.Name, + Text( + $"{CargoItemDetailsSurfaceId}.description", + typedItem.Description ?? "No typed item description is available."), + Text( + $"{CargoItemDetailsSurfaceId}.note", + "InventoryMenu still owns cell selection. This surface replaces the old cargo-item PropertiesPanel shell."), + Metric( + $"{CargoItemDetailsSurfaceId}.manufacturer", + "Manufacturer", + ActionGameManager.RuntimeCatalog?.GetManufacturer(typedItem)?.Name ?? "GameCult"), + Metric( + $"{CargoItemDetailsSurfaceId}.mass", + "Mass", + ActionGameManager.RuntimePlayerSettings.Format(GetCargoItemMass(item, typedItem)))) + }; + + if (typedItem.Price > 0) + { + children.Add(Card( + $"{CargoItemDetailsSurfaceId}.market.card", + "Market", + Metric( + $"{CargoItemDetailsSurfaceId}.price", + "Price", + typedItem.Price.ToString("N0")))); + } + + if (item is SimpleCommodity simpleCommodity) + { + children.Add(Card( + $"{CargoItemDetailsSurfaceId}.quantity.card", + "Quantity", + Metric( + $"{CargoItemDetailsSurfaceId}.quantity", + "Units", + simpleCommodity.Quantity.ToString()))); + } + + if (item is EquippableItem equippableItem) + { + var (tier, upgrades) = GameManager.ItemManager.GetTier(equippableItem); + children.Add(Card( + $"{CargoItemDetailsSurfaceId}.status.card", + "Status", + Metric( + $"{CargoItemDetailsSurfaceId}.tier", + "Tier", + $"{tier.Name}{new string('+', upgrades)}"), + Metric( + $"{CargoItemDetailsSurfaceId}.durability", + "Durability", + $"{(int)(equippableItem.Durability / GetMaxDurability(typedItem, equippableItem) * 100)}%"), + Metric( + $"{CargoItemDetailsSurfaceId}.temperature_range", + "Thermal Range", + FormatTemperatureRange(typedItem)))); + + foreach (var behaviorCard in BuildCargoItemBehaviorCards(typedItem, equippableItem)) + { + children.Add(behaviorCard); + } + } + + children.Add(ButtonRow( + $"{CargoItemDetailsSurfaceId}.actions", + Button($"{CargoItemDetailsSurfaceId}.close", "Close", CloseCargoItemDetailsCommand))); + + return new EveSurfaceDocument( + ShipSettingsSurfaceType, + ShipSettingsSurfaceSchema, + ShipSettingsSurfaceProviderId, + ShipSettingsSurfaceProviderKind, + "Inventory Cargo Item Details", + version: 1, + DateTime.UtcNow.ToString("O"), + new EveSurfaceTree( + CargoItemDetailsSurfaceId, + Node( + $"{CargoItemDetailsSurfaceId}.root", + "surface", + Array.Empty<(string Key, string Value)>(), + children.ToArray()), + Array.Empty()), + new[] + { + new EveCommandTemplate(CloseCargoItemDetailsCommand, "Close", "unity-uitoolkit") + }); + } + + private IEnumerable BuildCargoItemBehaviorCards( + AetheriaRuntimeCatalogItem typedItem, + EquippableItem equippableItem) + { + foreach (var behavior in typedItem.BehaviorPayloads ?? Array.Empty()) + { + if (string.Equals(behavior.Kind, AetheriaRuntimeBehaviorKinds.StatModifier, StringComparison.Ordinal)) + { + var statReference = ReadTypedStatReference(FindTypedBehaviorField(behavior, 1)?.Value); + var modifier = ReadTypedPerformanceStat(FindTypedBehaviorField(behavior, 2)?.Value); + var modifierType = ReadTypedEnum(FindTypedBehaviorField(behavior, 3)?.Value, StatModifierType.Constant); + yield return Card( + $"{CargoItemDetailsSurfaceId}.behavior.{behavior.Kind}.stat_modifier", + "Stat Modifier", + Metric( + $"{CargoItemDetailsSurfaceId}.behavior.{behavior.Kind}.target", + $"{statReference.target.SplitCamelCase()}:{statReference.stat.SplitCamelCase()}", + $"{(modifierType == StatModifierType.Constant ? "+" : "x")}{ActionGameManager.RuntimePlayerSettings.Format(GameManager.ItemManager.Evaluate(modifier, equippableItem))}")); + continue; + } + + var metadata = AetheriaRuntimeBehaviorMetadataCatalog.Get(behavior.Kind); + if (metadata == null) + continue; + + var fields = metadata.DisplayFields + .Select(field => BuildCargoItemBehaviorMetric(behavior, field, equippableItem)) + .Where(metric => metric != null) + .ToArray(); + + if (fields.Length == 0) + continue; + + yield return Card( + $"{CargoItemDetailsSurfaceId}.behavior.{behavior.Kind}", + behavior.Kind.FormatTypeName(), + fields); + } + } + + private EveSurfaceComponent BuildCargoItemBehaviorMetric( + AetheriaRuntimeBehaviorPayload behavior, + AetheriaRuntimeBehaviorFieldMetadata field, + EquippableItem equippableItem) + { + var payloadField = FindTypedBehaviorField(behavior, field.Key); + if (payloadField == null) + return null; + + string value; + switch (field.ValueKind) + { + case AetheriaRuntimeBehaviorFieldValueKind.Number: + value = ActionGameManager.RuntimePlayerSettings.Format((float)payloadField.Value.NumberValue); + break; + case AetheriaRuntimeBehaviorFieldValueKind.Temperature: + value = ActionGameManager.RuntimePlayerSettings.FormatTemperature((float)payloadField.Value.NumberValue); + break; + case AetheriaRuntimeBehaviorFieldValueKind.Integer: + value = ((int)payloadField.Value.NumberValue).ToString(); + break; + case AetheriaRuntimeBehaviorFieldValueKind.PerformanceStat: + value = ActionGameManager.RuntimePlayerSettings.Format(GameManager.ItemManager.Evaluate(ReadTypedPerformanceStat(payloadField.Value), equippableItem)); + break; + default: + return null; + } + + return Metric( + $"{CargoItemDetailsSurfaceId}.behavior.{behavior.Kind}.{field.Key}", + field.Name.SplitCamelCase(), + value); + } + private UIDocument ResolveShipSettingsSurfaceDocument() { if (_shipSettingsSurfaceDocument != null) @@ -381,6 +643,15 @@ public class InventoryMenu : MonoBehaviour return false; } + private void ClearSelectedItemSelection() + { + ClearSelectedCellHighlight(); + _selectedPanel = null; + _selectedItem = null; + _selectedCells = null; + _selectedPosition = default; + } + private bool CommitEquippedItemTransfer(Entity origin, EquippedItem item, InventoryPanel destination) { if (destination.DisplayedCargo != null) @@ -441,6 +712,88 @@ public class InventoryMenu : MonoBehaviour return ActionGameManager.RuntimeCatalog?.FindItem(item?.ItemKey ?? ""); } + private static float GetCargoItemMass(ItemInstance item, AetheriaRuntimeCatalogItem typedItem) + { + if (typedItem == null) + return 0f; + + return item is SimpleCommodity simpleCommodity + ? (float)typedItem.Mass * simpleCommodity.Quantity + : (float)typedItem.Mass; + } + + private static float GetMaxDurability(AetheriaRuntimeCatalogItem typedItem, EquippableItem item) + { + if (typedItem != null && typedItem.Durability > 0) + return (float)typedItem.Durability; + + return Math.Max(item?.Durability ?? 1f, 1f); + } + + private static string FormatTemperatureRange(AetheriaRuntimeCatalogItem item) + { + if (item.MaximumTemperature > item.MinimumTemperature) + { + return + $"{ActionGameManager.RuntimePlayerSettings.FormatTemperature((float)item.MinimumTemperature)} to " + + $"{ActionGameManager.RuntimePlayerSettings.FormatTemperature((float)item.MaximumTemperature)}"; + } + + return "No typed thermal range"; + } + + private static AetheriaRuntimeBehaviorField FindTypedBehaviorField(AetheriaRuntimeBehaviorPayload behavior, int? key) + { + return key == null + ? null + : behavior.Fields.FirstOrDefault(field => field.Key == key.Value); + } + + private static PerformanceStat ReadTypedPerformanceStat(AetheriaRuntimeBehaviorValue value) + { + return new PerformanceStat + { + Min = ReadTypedChildNumber(value, 0), + Max = ReadTypedChildNumber(value, 1), + HeatExponentMultiplier = ReadTypedChildNumber(value, 2), + DurabilityExponentMultiplier = ReadTypedChildNumber(value, 3), + QualityExponent = ReadTypedChildNumber(value, 4) + }; + } + + private static (string target, string stat) ReadTypedStatReference(AetheriaRuntimeBehaviorValue value) + { + return ( + ReadTypedChildString(value, 1), + ReadTypedChildString(value, 2)); + } + + private static float ReadTypedChildNumber(AetheriaRuntimeBehaviorValue value, int index) + { + return value != null && value.Children.Count > index + ? (float)value.Children[index].NumberValue + : 0f; + } + + private static string ReadTypedChildString(AetheriaRuntimeBehaviorValue value, int index) + { + return value != null && value.Children.Count > index + ? value.Children[index].StringValue ?? "" + : ""; + } + + private static T ReadTypedEnum(AetheriaRuntimeBehaviorValue value, T fallback) where T : struct + { + if (!string.IsNullOrWhiteSpace(value?.StringValue) && Enum.TryParse(value.StringValue, true, out T parsed)) + { + return parsed; + } + + return value != null && Enum.IsDefined(typeof(T), (int)value.NumberValue) + ? (T)Enum.ToObject(typeof(T), (int)value.NumberValue) + : fallback; + } + private static int2 RotateTypedShapeCell( AetheriaRuntimeShapeCell cell, AetheriaRuntimeCatalogItem item, @@ -462,5 +815,11 @@ public class InventoryMenu : MonoBehaviour Destroy(_shipSettingsSurfaceDocument.gameObject); _shipSettingsSurfaceDocument = null; } + + if (_cargoItemDetailsSurfaceDocument != null) + { + Destroy(_cargoItemDetailsSurfaceDocument.gameObject); + _cargoItemDetailsSurfaceDocument = null; + } } } diff --git a/docs/aetheria-perfect-machine-map.md b/docs/aetheria-perfect-machine-map.md index b3f722d14..da90a81e9 100644 --- a/docs/aetheria-perfect-machine-map.md +++ b/docs/aetheria-perfect-machine-map.md @@ -131,6 +131,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted. dropdowns/options in `TradeMenu`. Trade typed-item inspection now lowers through a local Eve/UI Toolkit surface instead of routing spreadsheet row clicks into `PropertiesPanel.Inspect`. + Inventory cargo-item inspection now lowers through a local Eve/UI Toolkit + surface instead of routing cargo clicks into `PropertiesPanel.Inspect`, + while equipped-item inspection still owns the old live-control shell. - The combat schematic HUD uses typed runtime catalog weapon facets for its static weapon icon strip; missing typed weapon facets no longer fall back to legacy `WeaponItemData`. Schematic weapon-row selection now uses typed @@ -1591,6 +1594,11 @@ First Aetheria surfaces to publish: Toolkit surface. The surface still projects typed catalog facts from local trade rows, but spreadsheet row clicks no longer route through the old `PropertiesPanel` shell. + - Done: replace `InventoryMenu` cargo-item inspection with an Eve-owned UI + Toolkit surface. Inventory still owns selected-cell highlighting, and the + equipped-item path still owns the old live-control `PropertiesPanel` + shell for weapon groups and behavior controls, but cargo clicks no longer + route through `PropertiesPanel.Inspect`. - Done: move the shared `org.gamecult.eve.surface` and `org.gamecult.eve.unity-uitoolkit` packages into the Eve repo and retarget Aetheria to import them from there instead of carrying local staged @@ -1972,6 +1980,11 @@ First Aetheria surfaces to publish: - Trade typed-item inspection now lowers through a shared UI Toolkit `UIDocument` host and a local Eve surface document instead of routing spreadsheet row clicks into `PropertiesPanel.Inspect(...)`. +- Inventory cargo-item inspection now lowers through a shared UI Toolkit + `UIDocument` host and a local Eve surface document instead of routing cargo + clicks into `PropertiesPanel.Inspect(...)`; the equipped-item path still + retains the old live-control shell until weapon-group and behavior controls + are moved cleanly. - Keyboard display layout parsing is no longer JSON-backed: `InputDisplayLayout` builds its static ANSI-104 display projection from typed `InputLayout` rows/columns. The dead commented Ink `ToJson` write path and