Settings tweaks (#22750)

* add ability to order subfields with dot notation

* put review genai enabled at the top of the genai subsection

* fix genai summary title truncation issue in detail stream
This commit is contained in:
Josh Hawkins
2026-04-03 17:46:43 -05:00
committed by GitHub
parent 68dfb157ea
commit bb77a01779
4 changed files with 16 additions and 5 deletions
+13 -2
View File
@@ -483,9 +483,20 @@ function generateUiSchema(
const schemaObj = schema as Record<string, unknown>;
// Set field ordering
// Set field ordering — supports dot notation (e.g. "genai.enabled")
if (fieldOrder && fieldOrder.length > 0) {
uiSchema["ui:order"] = [...fieldOrder, "*"];
const depth = currentPath.length;
const localOrder = fieldOrder
.map((f) => f.split("."))
.filter((segments) => {
if (segments.length !== depth + 1) return false;
return currentPath.every((p, i) => segments[i] === p);
})
.map((segments) => segments[depth]);
if (localOrder.length > 0) {
uiSchema["ui:order"] = [...localOrder, "*"];
}
}
if (!isSchemaObject(schemaObj.properties)) {