Tweaks (#23292)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled

* add review padding to explore debug replay api calls

* add semantic search model size widget

disables model_size select with n/a text when an embeddings genai provider is selected

* regenerate zone contours and per-zone filter masks on detect resolution change

* treat null as a clear sentinel in buildOverrides so nullable field edits don't snap back

* extract replay config sheet to new component

* add validation and messages for detect settings
This commit is contained in:
Josh Hawkins
2026-05-22 14:41:07 -05:00
committed by GitHub
parent 3a09d01bbe
commit d556ff8df2
18 changed files with 382 additions and 182 deletions
@@ -11,6 +11,50 @@ const detect: SectionConfigOverrides = {
condition: (ctx) =>
ctx.level === "camera" && ctx.formData?.enabled === false,
},
{
key: "detect-resolution-not-multiple-of-four",
messageKey: "configMessages.detect.resolutionShouldBeMultipleOfFour",
severity: "warning",
condition: (ctx) => {
const width = ctx.formData?.width as number | null | undefined;
const height = ctx.formData?.height as number | null | undefined;
const isEvenButNotFour = (v: unknown) =>
typeof v === "number" && v % 2 === 0 && v % 4 !== 0;
return isEvenButNotFour(width) || isEvenButNotFour(height);
},
},
{
key: "detect-aspect-ratio-mismatch",
messageKey: "configMessages.detect.aspectRatioMismatch",
severity: "warning",
condition: (ctx) => {
const newWidth = ctx.formData?.width as number | null | undefined;
const newHeight = ctx.formData?.height as number | null | undefined;
if (typeof newWidth !== "number" || typeof newHeight !== "number") {
return false;
}
const saved =
ctx.level === "camera"
? ctx.fullCameraConfig?.detect
: ctx.fullConfig?.detect;
const savedWidth = saved?.width;
const savedHeight = saved?.height;
if (
typeof savedWidth !== "number" ||
typeof savedHeight !== "number" ||
savedWidth <= 0 ||
savedHeight <= 0
) {
return false;
}
if (newWidth === savedWidth && newHeight === savedHeight) {
return false;
}
const newRatio = newWidth / newHeight;
const savedRatio = savedWidth / savedHeight;
return Math.abs(newRatio - savedRatio) > 0.01;
},
},
],
fieldMessages: [
{
@@ -29,28 +29,13 @@ const semanticSearch: SectionConfigOverrides = {
ctx.formData?.model === "jinav2" &&
ctx.formData?.model_size === "small",
},
{
key: "model-size-ignored-for-provider",
field: "model_size",
messageKey: "configMessages.semanticSearch.modelSizeIgnoredForProvider",
severity: "info",
position: "after",
condition: (ctx) => {
const model = ctx.formData?.model;
return (
typeof model === "string" &&
model !== "" &&
model !== "jinav1" &&
model !== "jinav2"
);
},
},
],
uiSchema: {
model: {
"ui:widget": "semanticSearchModel",
},
model_size: {
"ui:widget": "semanticSearchModelSize",
"ui:options": { size: "xs", enumI18nPrefix: "modelSize" },
},
},