Skip to content

Commit

Permalink
add todo for not passing whole analysis down to CommandText
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed May 2, 2024
1 parent eae688e commit f3a5d2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/src/organisms/RunPreview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export const RunPreviewComponent = (
? nullCheckedCommandsFromQuery
: robotSideAnalysis.commands) ?? []
// pass relevant data from run rather than analysis so that CommandText utilities can properly hash the entities' IDs
const analysis =
// TODO (nd:05/02/2024): update name and types for CommandText (and children/utilities) use of analysis. These children
// and utilities need only a subset of data provided by analysis, and there should be an overlap of these required data
// between a completed analysis and a run record, so we shouldn't pass down a franken-analysis, but rather a new interface
// with just the required data coming from the analysis OR the run.
const protocolDataFromAnalysisOrRun =
isRunTerminal && runRecord?.data != null
? {
...robotSideAnalysis,
Expand Down Expand Up @@ -171,7 +175,7 @@ export const RunPreviewComponent = (
<CommandIcon command={command} color={iconColor} />
<CommandText
command={command}
robotSideAnalysis={analysis}
robotSideAnalysis={protocolDataFromAnalysisOrRun}
robotType={robotType}
color={COLORS.black90}
/>
Expand Down

0 comments on commit f3a5d2e

Please sign in to comment.