@@ -44,7 +49,7 @@ export const HumanFeedbackSidebar = ({
Human scores
- {feedbackCount}
+ {feedbackCellCount}
@@ -57,12 +62,13 @@ export const HumanFeedbackSidebar = ({
{field.display_name}
-
diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/feedback/HumanFeedback/tsHumanFeedback.ts b/weave-js/src/components/PagePanelComponents/Home/Browse3/feedback/HumanFeedback/tsHumanFeedback.ts
index 522096f8c8c..81c96c176c1 100644
--- a/weave-js/src/components/PagePanelComponents/Home/Browse3/feedback/HumanFeedback/tsHumanFeedback.ts
+++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/feedback/HumanFeedback/tsHumanFeedback.ts
@@ -5,6 +5,23 @@ import {objectVersionKeyToRefUri} from '../../pages/wfReactInterface/utilities';
import {ObjectVersionSchema} from '../../pages/wfReactInterface/wfDataModelHooksInterface';
import {tsHumanFeedbackSpec} from './humanFeedbackTypes';
+
+const useResolveTypeObjects = (typeRefs: string[]) => {
+ const {useRefsData} = useWFHooks();
+ const refsData = useRefsData(typeRefs);
+ return useMemo(() => {
+ if (refsData.loading || refsData.result == null) {
+ return null;
+ }
+ const refDataWithRefs = refsData.result.map((x, i) => ({
+ ...x,
+ ref: typeRefs[i],
+ }));
+ return refDataWithRefs;
+ }, [refsData.loading, refsData.result]);
+};
+
+
export const useHumanFeedbackOptions = (
entity: string,
project: string
@@ -24,13 +41,12 @@ export const useHumanFeedbackOptions = (
undefined, // limit
false // metadataOnly
);
-
// TODO: this is not actually tsHumanFeedbackSpec, it's HumanFeedbackSpec
// we need to add the refs for each of the feedback fields
- const val: tsHumanFeedbackSpec | null = latestSpec?.val;
- const feedbackFields = val?.feedback_fields;
+ const feedbackFieldRefs = latestSpec?.val?.feedback_fields ?? []
+ const feedbackFields = useResolveTypeObjects(feedbackFieldRefs);
- // TODO: how do we get the refs for the sub-objects here?
+ console.log('feedbackFields', feedbackFields);
useEffect(() => {
if (humanFeedbackObjects.loading || humanFeedbackObjects.result == null) {
diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx
index e7842af2b10..59e11018c9b 100644
--- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx
+++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CallPage/CallPage.tsx
@@ -223,23 +223,23 @@ const CallPageInnerVertical: FC<{
-
{feedbackOptions && (
)}
+
}
isSidebarOpen={showTraceTree}