Skip to content

Commit 8af9671

Browse files
committed
Merge branch 'fix/classpicker' into 'develop'
Fix/classpicker See merge request genaiic-reusable-assets/engagement-artifacts/genaiic-idp-accelerator!427
2 parents cde2e20 + b989828 commit 8af9671

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SPDX-License-Identifier: MIT-0
1616
- Evaluation Configuration Robustness
1717
- Improved JSON Schema error messages with actionable diagnostics when configuration issues occur
1818
- Added automatic type coercion for numeric constraints (e.g., `maxItems: "7"``maxItems: 7`) to handle common YAML parsing quirks gracefully
19+
- Fix #134 - Doc class dropdown shows no options when editing sections
1920
- Fix #133 - Cast topK to int to defend against transient ValidationException exceptions
2021
- Fix #132 - TRACKING_TABLE environment variable needed in EvaluationFunction
2122
- Fix #131 - HITL functions broken post docker migration

src/ui/src/components/sections-panel/SectionsPanel.jsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,19 @@ const SectionsPanel = ({ sections, pages, documentItem, mergedConfig, onSaveChan
275275
// Get available classes from configuration
276276
const getAvailableClasses = () => {
277277
if (!configuration?.classes) return [];
278-
return configuration.classes.map((cls) => ({
279-
label: cls.name,
280-
value: cls.name,
281-
}));
278+
return configuration.classes
279+
.map((cls) => {
280+
// Support both JSON Schema and legacy formats
281+
// JSON Schema: $id or x-aws-idp-document-type
282+
// Legacy: name
283+
const className = cls.$id || cls['x-aws-idp-document-type'] || cls.name;
284+
285+
return {
286+
label: className,
287+
value: className,
288+
};
289+
})
290+
.filter((option) => option.value); // Remove any undefined entries
282291
};
283292

284293
// Generate next sequential section ID

0 commit comments

Comments
 (0)