diff --git a/apps/rowboat/app/lib/types/testing_types.ts b/apps/rowboat/app/lib/types/testing_types.ts index cf5d20ad..289c2447 100644 --- a/apps/rowboat/app/lib/types/testing_types.ts +++ b/apps/rowboat/app/lib/types/testing_types.ts @@ -3,6 +3,7 @@ export const Scenario = z.object({ projectId: z.string(), name: z.string().min(1, "Name cannot be empty"), description: z.string().min(1, "Description cannot be empty"), + criteria: z.string().default(''), context: z.string().default(''), createdAt: z.string().datetime(), lastUpdatedAt: z.string().datetime(), diff --git a/apps/rowboat/app/projects/[projectId]/simulation/app.tsx b/apps/rowboat/app/projects/[projectId]/simulation/app.tsx index 96b8ea28..ed409c2d 100644 --- a/apps/rowboat/app/projects/[projectId]/simulation/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/simulation/app.tsx @@ -224,6 +224,12 @@ const SimulationResultCard = ({ run, results, scenarios }: SimulationResultCardP {scenario.description} +
+
Criteria
+
+ {scenario.criteria || 'No criteria specified'} +
+
Context
@@ -282,9 +288,13 @@ const ScenarioResultCard = ({ scenario, result }: ScenarioResultCardProps) => {
Description
{scenario.description}
+
+
Criteria
+
{scenario.criteria}
+
Context
-
{scenario.context || 'No context provided'}
+
{scenario.context}
{result && (
@@ -408,6 +418,7 @@ export default function SimulationApp() { { name: updatedScenario.name, description: updatedScenario.description, + criteria: updatedScenario.criteria, context: updatedScenario.context, } ); @@ -674,6 +685,13 @@ function ScenarioViewer({
+
+
CRITERIA
+
{scenario.criteria}
+
+ +
+
CONTEXT
{scenario.context}
@@ -694,6 +712,7 @@ function ScenarioEditor({ }) { const [name, setName] = useState(scenario.name); const [description, setDescription] = useState(scenario.description); + const [criteria, setCriteria] = useState(scenario.criteria || ''); const [context, setContext] = useState(scenario.context || ''); const handleSubmit = (e: React.FormEvent) => { @@ -702,6 +721,7 @@ function ScenarioEditor({ ...scenario, name, description, + criteria, context, }); }; @@ -735,6 +755,7 @@ function ScenarioEditor({ value={name} onChange={(e) => setName(e.target.value)} className="mt-1 block w-full rounded-md border-2 border-gray-300 shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 px-3 py-2" + placeholder="An identifiable scenario name" />
@@ -747,6 +768,20 @@ function ScenarioEditor({ onChange={(e) => setDescription(e.target.value)} rows={4} className="mt-1 block w-full rounded-md border-2 border-gray-300 shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500 px-3 py-2" + placeholder="Specify the user scenario that the simulator should simulate" + /> +
+ +
+ +
+
CRITERIA
+