chore(frontend-admin/truth-validation): 🔧 Add LegalReviewModal for legal team approval and enhance ManualValidationSection with user-controlled validation options

This commit is contained in:
Lilith 2026-01-23 20:27:06 -08:00
parent ead380f2cb
commit 282c8b3991
3 changed files with 11 additions and 10 deletions

View file

@ -6,7 +6,7 @@
* and displays results with subject-based filtering.
*/
import { useState, useCallback } from 'react';
import { useCallback, useState } from 'react';
import {
configureTruthService,
@ -373,7 +373,7 @@ export const FeatureValidationPage = () => {
</FilterLabel>
<Select
value={selectedSubject}
onChange={(e: React.ChangeEvent<HTMLSelectElement>) => setSelectedSubject(e.target.value as Subject | 'all')}
onChange={(e: ChangeEvent<HTMLSelectElement>) => setSelectedSubject(e.target.value as Subject | 'all')}
options={[
{ value: 'all', label: 'All Subjects' },
...SUBJECTS.map(s => ({ value: s, label: s.charAt(0).toUpperCase() + s.slice(1) })),
@ -384,7 +384,7 @@ export const FeatureValidationPage = () => {
<input
type="checkbox"
checked={showOnlyInvalid}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setShowOnlyInvalid(e.target.checked)}
onChange={(e: ChangeEvent<HTMLInputElement>) => setShowOnlyInvalid(e.target.checked)}
/>
Show only invalid
</label>

View file

@ -159,7 +159,7 @@ export const LegalReviewModal = ({
</ComparisonLabel>
<EditableContent
value={editedContent}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => onEditedContentChange(e.target.value)}
onChange={(e: ChangeEvent<HTMLTextAreaElement>) => onEditedContentChange(e.target.value)}
placeholder="Edit content for approval..."
/>
</ComparisonPane>
@ -181,7 +181,7 @@ export const LegalReviewModal = ({
</ComparisonLabel>
<ReviewNotesTextarea
value={reviewNotes}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => onReviewNotesChange(e.target.value)}
onChange={(e: ChangeEvent<HTMLTextAreaElement>) => onReviewNotesChange(e.target.value)}
placeholder="Add notes about this review..."
/>
</ReviewNotesSection>
@ -192,14 +192,14 @@ export const LegalReviewModal = ({
<CheckboxLabel>
<Checkbox
checked={updateLocale}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onUpdateLocaleChange(e.target.checked)}
onChange={(e: ChangeEvent<HTMLInputElement>) => onUpdateLocaleChange(e.target.checked)}
/>
Update locale file
</CheckboxLabel>
<CheckboxLabel>
<Checkbox
checked={queueTranslation}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => onQueueTranslationChange(e.target.checked)}
onChange={(e: ChangeEvent<HTMLInputElement>) => onQueueTranslationChange(e.target.checked)}
/>
Queue i18n translation
</CheckboxLabel>

View file

@ -4,7 +4,8 @@
* Manual content validation interface for testing truth validation.
*/
import { useState } from 'react';
import { useState } from 'react'
import type { ChangeEvent } from 'react';
import { Button, Badge, Checkbox } from '@lilith/ui-primitives';
import { useMutation } from '@tanstack/react-query';
@ -90,7 +91,7 @@ export const ManualValidationSection = () => {
<ValidationForm>
<ValidationTextarea
value={testContent}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => setTestContent(e.target.value)}
onChange={(e: ChangeEvent<HTMLTextAreaElement>) => setTestContent(e.target.value)}
placeholder="Enter content to validate against platform facts..."
/>
@ -98,7 +99,7 @@ export const ManualValidationSection = () => {
<CheckboxLabel>
<Checkbox
checked={autoCorrect}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => setAutoCorrect(e.target.checked)}
onChange={(e: ChangeEvent<HTMLInputElement>) => setAutoCorrect(e.target.checked)}
/>
Auto-correct issues
</CheckboxLabel>