From e1226fc90eba4409c81ded4ca6b0e503389a528b Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Wed, 11 Nov 2026 15:16:40 +0100 Subject: [PATCH] frontend: compact triage list in the Rugnux live tab RugnuxTriage (self-contained, takes the status' triage array): conditions that fired one per line (red, then orange) with the report's words, the fine ones in packed green columns, the unmeasured ones named in one grey line; the report's warnings and codes on hover. Mounted under the probe alert in RugnuxPage; client regenerated from the API. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK --- frontend/src/client/index.ts | 2 +- frontend/src/client/types.gen.ts | 33 ++++++++++++++ frontend/src/client/zod.gen.ts | 23 +++++++++- frontend/src/components/RugnuxPage.tsx | 2 + frontend/src/components/RugnuxTriage.tsx | 57 ++++++++++++++++++++++++ 5 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 frontend/src/components/RugnuxTriage.tsx diff --git a/frontend/src/client/index.ts b/frontend/src/client/index.ts index 64fb61322..c4ea93fd8 100644 --- a/frontend/src/client/index.ts +++ b/frontend/src/client/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts export { deleteConfigRugnuxModel, getConfigAzimInt, getConfigBraggIntegration, getConfigDarkMask, getConfigDetector, getConfigFileWriter, getConfigImageFormat, getConfigIndexing, getConfigInstrument, getConfigMask, getConfigMaskTiff, getConfigRoi, getConfigRugnux, getConfigSelectDetector, getConfigSpotFinding, getConfigUserMask, getConfigUserMaskTiff, getConfigZeromqMetadata, getConfigZeromqPreview, getDetectorStatus, getFpgaStatus, getImageBufferImageCbor, getImageBufferImageJpeg, getImageBufferImageTiff, getImageBufferStartCbor, getImageBufferStatus, getImagePusherStatus, getLiveEvents, getPreviewPedestalTiff, getPreviewPlot, getPreviewPlotBin, getResultScan, getRugnuxMapCcp4, getRugnuxModelCif, getRugnuxStatus, getStatistics, getStatisticsCalibration, getStatisticsDataCollection, getStatus, getVersion, getXfelEventCode, getXfelPulseId, type Options, postCancel, postConfigImageFormatConversion, postConfigImageFormatRaw, postDeactivate, postImageBufferClear, postInitialize, postPedestal, postStart, postTrigger, postWaitTillDone, postWaitUntilRunning, putConfigAzimInt, putConfigBraggIntegration, putConfigDarkMask, putConfigDetector, putConfigFileWriter, putConfigImageFormat, putConfigIndexing, putConfigInstrument, putConfigInternalGeneratorImage, putConfigInternalGeneratorImageTiff, putConfigRoi, putConfigRugnux, putConfigRugnuxModel, putConfigSelectDetector, putConfigSpotFinding, putConfigUserMask, putConfigUserMaskTiff, putConfigZeromqMetadata, putConfigZeromqPreview } from './sdk.gen'; -export { type azim_int_settings, azint_unit, type background, type binning, type bragg_integration_settings, type broker_status, type calibration_statistics, type ClientOptions, color_scale, type crystal_lattice, type dark_mask_settings, type dataset_settings, type dataset_settingsWritable, type deleteConfigRugnuxModelData, type deleteConfigRugnuxModelError, type deleteConfigRugnuxModelErrors, type deleteConfigRugnuxModelResponses, type detector, type detector_list, type detector_list_element, type detector_module, detector_module_direction, type detector_module_placement, detector_power_state, type detector_selection, type detector_settings, detector_state, type detector_status, detector_timing, detector_type, type error_message, type experimental_coord, file_writer_format, type file_writer_settings, type fill_value, type fpga_status, geom_refinement_algorithm, type getConfigAzimIntData, type getConfigAzimIntResponse, type getConfigAzimIntResponses, type getConfigBraggIntegrationData, type getConfigBraggIntegrationResponse, type getConfigBraggIntegrationResponses, type getConfigDarkMaskData, type getConfigDarkMaskResponse, type getConfigDarkMaskResponses, type getConfigDetectorData, type getConfigDetectorResponse, type getConfigDetectorResponses, type getConfigFileWriterData, type getConfigFileWriterResponse, type getConfigFileWriterResponses, type getConfigImageFormatData, type getConfigImageFormatResponse, type getConfigImageFormatResponses, type getConfigIndexingData, type getConfigIndexingResponse, type getConfigIndexingResponses, type getConfigInstrumentData, type getConfigInstrumentResponse, type getConfigInstrumentResponses, type getConfigMaskData, type getConfigMaskResponse, type getConfigMaskResponses, type getConfigMaskTiffData, type getConfigMaskTiffResponse, type getConfigMaskTiffResponses, type getConfigRoiData, type getConfigRoiResponse, type getConfigRoiResponses, type getConfigRugnuxData, type getConfigRugnuxResponse, type getConfigRugnuxResponses, type getConfigSelectDetectorData, type getConfigSelectDetectorResponse, type getConfigSelectDetectorResponses, type getConfigSpotFindingData, type getConfigSpotFindingResponse, type getConfigSpotFindingResponses, type getConfigUserMaskData, type getConfigUserMaskResponse, type getConfigUserMaskResponses, type getConfigUserMaskTiffData, type getConfigUserMaskTiffResponse, type getConfigUserMaskTiffResponses, type getConfigZeromqMetadataData, type getConfigZeromqMetadataResponse, type getConfigZeromqMetadataResponses, type getConfigZeromqPreviewData, type getConfigZeromqPreviewResponse, type getConfigZeromqPreviewResponses, type getDetectorStatusData, type getDetectorStatusError, type getDetectorStatusErrors, type getDetectorStatusResponse, type getDetectorStatusResponses, type getFpgaStatusData, type getFpgaStatusResponse, type getFpgaStatusResponses, type getImageBufferImageCborData, type getImageBufferImageCborError, type getImageBufferImageCborErrors, type getImageBufferImageCborResponse, type getImageBufferImageCborResponses, type getImageBufferImageJpegData, type getImageBufferImageJpegError, type getImageBufferImageJpegErrors, type getImageBufferImageJpegResponse, type getImageBufferImageJpegResponses, type getImageBufferImageTiffData, type getImageBufferImageTiffError, type getImageBufferImageTiffErrors, type getImageBufferImageTiffResponse, type getImageBufferImageTiffResponses, type getImageBufferStartCborData, type getImageBufferStartCborError, type getImageBufferStartCborErrors, type getImageBufferStartCborResponse, type getImageBufferStartCborResponses, type getImageBufferStatusData, type getImageBufferStatusError, type getImageBufferStatusErrors, type getImageBufferStatusResponse, type getImageBufferStatusResponses, type getImagePusherStatusData, type getImagePusherStatusError, type getImagePusherStatusErrors, type getImagePusherStatusResponse, type getImagePusherStatusResponses, type getLiveEventsData, type getLiveEventsError, type getLiveEventsErrors, type getLiveEventsResponse, type getLiveEventsResponses, type getPreviewPedestalTiffData, type getPreviewPedestalTiffErrors, type getPreviewPedestalTiffResponse, type getPreviewPedestalTiffResponses, type getPreviewPlotBinData, type getPreviewPlotBinError, type getPreviewPlotBinErrors, type getPreviewPlotBinResponse, type getPreviewPlotBinResponses, type getPreviewPlotData, type getPreviewPlotError, type getPreviewPlotErrors, type getPreviewPlotResponse, type getPreviewPlotResponses, type getResultScanData, type getResultScanError, type getResultScanErrors, type getResultScanResponse, type getResultScanResponses, type getRugnuxMapCcp4Data, type getRugnuxMapCcp4Error, type getRugnuxMapCcp4Errors, type getRugnuxMapCcp4Response, type getRugnuxMapCcp4Responses, type getRugnuxModelCifData, type getRugnuxModelCifError, type getRugnuxModelCifErrors, type getRugnuxModelCifResponse, type getRugnuxModelCifResponses, type getRugnuxStatusData, type getRugnuxStatusError, type getRugnuxStatusErrors, type getRugnuxStatusResponse, type getRugnuxStatusResponses, type getStatisticsCalibrationData, type getStatisticsCalibrationResponse, type getStatisticsCalibrationResponses, type getStatisticsData, type getStatisticsDataCollectionData, type getStatisticsDataCollectionError, type getStatisticsDataCollectionErrors, type getStatisticsDataCollectionResponse, type getStatisticsDataCollectionResponses, type getStatisticsResponse, type getStatisticsResponses, type getStatusData, type getStatusResponse, type getStatusResponses, type getVersionData, type getVersionResponse, type getVersionResponses, type getXfelEventCodeData, type getXfelEventCodeErrors, type getXfelEventCodeResponse, type getXfelEventCodeResponses, type getXfelPulseIdData, type getXfelPulseIdErrors, type getXfelPulseIdResponse, type getXfelPulseIdResponses, type grid_scan, type image_buffer_status, type image_format_settings, type image_id, type image_pusher_status, image_pusher_type, indexing_algorithm, type indexing_settings, type instrument_metadata, integration_model, type jfjoch_settings, type jfjoch_statistics, type jpeg_quality, type measurement_statistics, type pcie_devices, type pixel_mask_statistics, type plot, plot_type, plot_unit_x, type plots, type postCancelData, type postCancelResponses, type postConfigImageFormatConversionData, type postConfigImageFormatConversionError, type postConfigImageFormatConversionErrors, type postConfigImageFormatConversionResponses, type postConfigImageFormatRawData, type postConfigImageFormatRawError, type postConfigImageFormatRawErrors, type postConfigImageFormatRawResponses, type postDeactivateData, type postDeactivateError, type postDeactivateErrors, type postDeactivateResponses, type postImageBufferClearData, type postImageBufferClearError, type postImageBufferClearErrors, type postImageBufferClearResponses, type postInitializeData, type postInitializeError, type postInitializeErrors, type postInitializeResponses, type postPedestalData, type postPedestalError, type postPedestalErrors, type postPedestalResponses, type postStartData, type postStartError, type postStartErrors, type postStartResponses, type postTriggerData, type postTriggerResponses, type postWaitTillDoneData, type postWaitTillDoneError, type postWaitTillDoneErrors, type postWaitTillDoneResponses, type postWaitUntilRunningData, type postWaitUntilRunningError, type postWaitUntilRunningErrors, type postWaitUntilRunningResponses, type powder_calibration_fit_sigma, type powder_calibration_output, type powder_calibration_outputWritable, type powder_calibration_quality, type powder_calibration_spot_check, type putConfigAzimIntData, type putConfigAzimIntError, type putConfigAzimIntErrors, type putConfigAzimIntResponses, type putConfigBraggIntegrationData, type putConfigBraggIntegrationError, type putConfigBraggIntegrationErrors, type putConfigBraggIntegrationResponses, type putConfigDarkMaskData, type putConfigDarkMaskError, type putConfigDarkMaskErrors, type putConfigDarkMaskResponses, type putConfigDetectorData, type putConfigDetectorError, type putConfigDetectorErrors, type putConfigDetectorResponses, type putConfigFileWriterData, type putConfigFileWriterError, type putConfigFileWriterErrors, type putConfigFileWriterResponses, type putConfigImageFormatData, type putConfigImageFormatError, type putConfigImageFormatErrors, type putConfigImageFormatResponses, type putConfigIndexingData, type putConfigIndexingError, type putConfigIndexingErrors, type putConfigIndexingResponses, type putConfigInstrumentData, type putConfigInstrumentError, type putConfigInstrumentErrors, type putConfigInstrumentResponses, type putConfigInternalGeneratorImageData, type putConfigInternalGeneratorImageError, type putConfigInternalGeneratorImageErrors, type putConfigInternalGeneratorImageResponses, type putConfigInternalGeneratorImageTiffData, type putConfigInternalGeneratorImageTiffError, type putConfigInternalGeneratorImageTiffErrors, type putConfigInternalGeneratorImageTiffResponses, type putConfigRoiData, type putConfigRoiError, type putConfigRoiErrors, type putConfigRoiResponses, type putConfigRugnuxData, type putConfigRugnuxError, type putConfigRugnuxErrors, type putConfigRugnuxModelData, type putConfigRugnuxModelError, type putConfigRugnuxModelErrors, type putConfigRugnuxModelResponses, type putConfigRugnuxResponses, type putConfigSelectDetectorData, type putConfigSelectDetectorError, type putConfigSelectDetectorErrors, type putConfigSelectDetectorResponses, type putConfigSpotFindingData, type putConfigSpotFindingError, type putConfigSpotFindingErrors, type putConfigSpotFindingResponses, type putConfigUserMaskData, type putConfigUserMaskError, type putConfigUserMaskErrors, type putConfigUserMaskResponses, type putConfigUserMaskTiffData, type putConfigUserMaskTiffError, type putConfigUserMaskTiffErrors, type putConfigUserMaskTiffResponses, type putConfigZeromqMetadataData, type putConfigZeromqMetadataError, type putConfigZeromqMetadataErrors, type putConfigZeromqMetadataResponses, type putConfigZeromqPreviewData, type putConfigZeromqPreviewError, type putConfigZeromqPreviewErrors, type putConfigZeromqPreviewResponses, q_binning, type resolution_estimate, type resolution_ring, type roi, type roi_azim_list, type roi_azimuthal, type roi_box, type roi_box_list, type roi_circle, type roi_circle_list, type roi_definitions, type rotation_axis, type rugnux_live_blob, type rugnux_live_model, type rugnux_live_refinement, type rugnux_live_status, type rugnux_live_step, type rugnux_live_stills, type rugnux_settings, type rugnux_status, type rugnux_summary_row, type saturation, type scan_result, type show_beam_center, type show_predictions, type show_roi, type show_spots, type show_user_mask, type spot_finding_settings, type standard_detector_geometry, type tcp_settings, type unit_cell, type zeromq_metadata_settings, type zeromq_preview_settings, type zeromq_settings } from './types.gen'; +export { type azim_int_settings, azint_unit, type background, type binning, type bragg_integration_settings, type broker_status, type calibration_statistics, type ClientOptions, color_scale, type crystal_lattice, type dark_mask_settings, type dataset_settings, type dataset_settingsWritable, type deleteConfigRugnuxModelData, type deleteConfigRugnuxModelError, type deleteConfigRugnuxModelErrors, type deleteConfigRugnuxModelResponses, type detector, type detector_list, type detector_list_element, type detector_module, detector_module_direction, type detector_module_placement, detector_power_state, type detector_selection, type detector_settings, detector_state, type detector_status, detector_timing, detector_type, type error_message, type experimental_coord, file_writer_format, type file_writer_settings, type fill_value, type fpga_status, geom_refinement_algorithm, type getConfigAzimIntData, type getConfigAzimIntResponse, type getConfigAzimIntResponses, type getConfigBraggIntegrationData, type getConfigBraggIntegrationResponse, type getConfigBraggIntegrationResponses, type getConfigDarkMaskData, type getConfigDarkMaskResponse, type getConfigDarkMaskResponses, type getConfigDetectorData, type getConfigDetectorResponse, type getConfigDetectorResponses, type getConfigFileWriterData, type getConfigFileWriterResponse, type getConfigFileWriterResponses, type getConfigImageFormatData, type getConfigImageFormatResponse, type getConfigImageFormatResponses, type getConfigIndexingData, type getConfigIndexingResponse, type getConfigIndexingResponses, type getConfigInstrumentData, type getConfigInstrumentResponse, type getConfigInstrumentResponses, type getConfigMaskData, type getConfigMaskResponse, type getConfigMaskResponses, type getConfigMaskTiffData, type getConfigMaskTiffResponse, type getConfigMaskTiffResponses, type getConfigRoiData, type getConfigRoiResponse, type getConfigRoiResponses, type getConfigRugnuxData, type getConfigRugnuxResponse, type getConfigRugnuxResponses, type getConfigSelectDetectorData, type getConfigSelectDetectorResponse, type getConfigSelectDetectorResponses, type getConfigSpotFindingData, type getConfigSpotFindingResponse, type getConfigSpotFindingResponses, type getConfigUserMaskData, type getConfigUserMaskResponse, type getConfigUserMaskResponses, type getConfigUserMaskTiffData, type getConfigUserMaskTiffResponse, type getConfigUserMaskTiffResponses, type getConfigZeromqMetadataData, type getConfigZeromqMetadataResponse, type getConfigZeromqMetadataResponses, type getConfigZeromqPreviewData, type getConfigZeromqPreviewResponse, type getConfigZeromqPreviewResponses, type getDetectorStatusData, type getDetectorStatusError, type getDetectorStatusErrors, type getDetectorStatusResponse, type getDetectorStatusResponses, type getFpgaStatusData, type getFpgaStatusResponse, type getFpgaStatusResponses, type getImageBufferImageCborData, type getImageBufferImageCborError, type getImageBufferImageCborErrors, type getImageBufferImageCborResponse, type getImageBufferImageCborResponses, type getImageBufferImageJpegData, type getImageBufferImageJpegError, type getImageBufferImageJpegErrors, type getImageBufferImageJpegResponse, type getImageBufferImageJpegResponses, type getImageBufferImageTiffData, type getImageBufferImageTiffError, type getImageBufferImageTiffErrors, type getImageBufferImageTiffResponse, type getImageBufferImageTiffResponses, type getImageBufferStartCborData, type getImageBufferStartCborError, type getImageBufferStartCborErrors, type getImageBufferStartCborResponse, type getImageBufferStartCborResponses, type getImageBufferStatusData, type getImageBufferStatusError, type getImageBufferStatusErrors, type getImageBufferStatusResponse, type getImageBufferStatusResponses, type getImagePusherStatusData, type getImagePusherStatusError, type getImagePusherStatusErrors, type getImagePusherStatusResponse, type getImagePusherStatusResponses, type getLiveEventsData, type getLiveEventsError, type getLiveEventsErrors, type getLiveEventsResponse, type getLiveEventsResponses, type getPreviewPedestalTiffData, type getPreviewPedestalTiffErrors, type getPreviewPedestalTiffResponse, type getPreviewPedestalTiffResponses, type getPreviewPlotBinData, type getPreviewPlotBinError, type getPreviewPlotBinErrors, type getPreviewPlotBinResponse, type getPreviewPlotBinResponses, type getPreviewPlotData, type getPreviewPlotError, type getPreviewPlotErrors, type getPreviewPlotResponse, type getPreviewPlotResponses, type getResultScanData, type getResultScanError, type getResultScanErrors, type getResultScanResponse, type getResultScanResponses, type getRugnuxMapCcp4Data, type getRugnuxMapCcp4Error, type getRugnuxMapCcp4Errors, type getRugnuxMapCcp4Response, type getRugnuxMapCcp4Responses, type getRugnuxModelCifData, type getRugnuxModelCifError, type getRugnuxModelCifErrors, type getRugnuxModelCifResponse, type getRugnuxModelCifResponses, type getRugnuxStatusData, type getRugnuxStatusError, type getRugnuxStatusErrors, type getRugnuxStatusResponse, type getRugnuxStatusResponses, type getStatisticsCalibrationData, type getStatisticsCalibrationResponse, type getStatisticsCalibrationResponses, type getStatisticsData, type getStatisticsDataCollectionData, type getStatisticsDataCollectionError, type getStatisticsDataCollectionErrors, type getStatisticsDataCollectionResponse, type getStatisticsDataCollectionResponses, type getStatisticsResponse, type getStatisticsResponses, type getStatusData, type getStatusResponse, type getStatusResponses, type getVersionData, type getVersionResponse, type getVersionResponses, type getXfelEventCodeData, type getXfelEventCodeErrors, type getXfelEventCodeResponse, type getXfelEventCodeResponses, type getXfelPulseIdData, type getXfelPulseIdErrors, type getXfelPulseIdResponse, type getXfelPulseIdResponses, type grid_scan, type image_buffer_status, type image_format_settings, type image_id, type image_pusher_status, image_pusher_type, indexing_algorithm, type indexing_settings, type instrument_metadata, integration_model, type jfjoch_settings, type jfjoch_statistics, type jpeg_quality, type measurement_statistics, type pcie_devices, type pixel_mask_statistics, type plot, plot_type, plot_unit_x, type plots, type postCancelData, type postCancelResponses, type postConfigImageFormatConversionData, type postConfigImageFormatConversionError, type postConfigImageFormatConversionErrors, type postConfigImageFormatConversionResponses, type postConfigImageFormatRawData, type postConfigImageFormatRawError, type postConfigImageFormatRawErrors, type postConfigImageFormatRawResponses, type postDeactivateData, type postDeactivateError, type postDeactivateErrors, type postDeactivateResponses, type postImageBufferClearData, type postImageBufferClearError, type postImageBufferClearErrors, type postImageBufferClearResponses, type postInitializeData, type postInitializeError, type postInitializeErrors, type postInitializeResponses, type postPedestalData, type postPedestalError, type postPedestalErrors, type postPedestalResponses, type postStartData, type postStartError, type postStartErrors, type postStartResponses, type postTriggerData, type postTriggerResponses, type postWaitTillDoneData, type postWaitTillDoneError, type postWaitTillDoneErrors, type postWaitTillDoneResponses, type postWaitUntilRunningData, type postWaitUntilRunningError, type postWaitUntilRunningErrors, type postWaitUntilRunningResponses, type powder_calibration_fit_sigma, type powder_calibration_output, type powder_calibration_outputWritable, type powder_calibration_quality, type powder_calibration_spot_check, type putConfigAzimIntData, type putConfigAzimIntError, type putConfigAzimIntErrors, type putConfigAzimIntResponses, type putConfigBraggIntegrationData, type putConfigBraggIntegrationError, type putConfigBraggIntegrationErrors, type putConfigBraggIntegrationResponses, type putConfigDarkMaskData, type putConfigDarkMaskError, type putConfigDarkMaskErrors, type putConfigDarkMaskResponses, type putConfigDetectorData, type putConfigDetectorError, type putConfigDetectorErrors, type putConfigDetectorResponses, type putConfigFileWriterData, type putConfigFileWriterError, type putConfigFileWriterErrors, type putConfigFileWriterResponses, type putConfigImageFormatData, type putConfigImageFormatError, type putConfigImageFormatErrors, type putConfigImageFormatResponses, type putConfigIndexingData, type putConfigIndexingError, type putConfigIndexingErrors, type putConfigIndexingResponses, type putConfigInstrumentData, type putConfigInstrumentError, type putConfigInstrumentErrors, type putConfigInstrumentResponses, type putConfigInternalGeneratorImageData, type putConfigInternalGeneratorImageError, type putConfigInternalGeneratorImageErrors, type putConfigInternalGeneratorImageResponses, type putConfigInternalGeneratorImageTiffData, type putConfigInternalGeneratorImageTiffError, type putConfigInternalGeneratorImageTiffErrors, type putConfigInternalGeneratorImageTiffResponses, type putConfigRoiData, type putConfigRoiError, type putConfigRoiErrors, type putConfigRoiResponses, type putConfigRugnuxData, type putConfigRugnuxError, type putConfigRugnuxErrors, type putConfigRugnuxModelData, type putConfigRugnuxModelError, type putConfigRugnuxModelErrors, type putConfigRugnuxModelResponses, type putConfigRugnuxResponses, type putConfigSelectDetectorData, type putConfigSelectDetectorError, type putConfigSelectDetectorErrors, type putConfigSelectDetectorResponses, type putConfigSpotFindingData, type putConfigSpotFindingError, type putConfigSpotFindingErrors, type putConfigSpotFindingResponses, type putConfigUserMaskData, type putConfigUserMaskError, type putConfigUserMaskErrors, type putConfigUserMaskResponses, type putConfigUserMaskTiffData, type putConfigUserMaskTiffError, type putConfigUserMaskTiffErrors, type putConfigUserMaskTiffResponses, type putConfigZeromqMetadataData, type putConfigZeromqMetadataError, type putConfigZeromqMetadataErrors, type putConfigZeromqMetadataResponses, type putConfigZeromqPreviewData, type putConfigZeromqPreviewError, type putConfigZeromqPreviewErrors, type putConfigZeromqPreviewResponses, q_binning, type resolution_estimate, type resolution_ring, type roi, type roi_azim_list, type roi_azimuthal, type roi_box, type roi_box_list, type roi_circle, type roi_circle_list, type roi_definitions, type rotation_axis, type rugnux_live_blob, type rugnux_live_model, type rugnux_live_refinement, type rugnux_live_status, type rugnux_live_step, type rugnux_live_stills, type rugnux_settings, type rugnux_status, type rugnux_summary_row, type rugnux_triage_item, type saturation, type scan_result, type show_beam_center, type show_predictions, type show_roi, type show_spots, type show_user_mask, type spot_finding_settings, type standard_detector_geometry, type tcp_settings, type unit_cell, type zeromq_metadata_settings, type zeromq_preview_settings, type zeromq_settings } from './types.gen'; diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index bd678725c..ec3e305d7 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -2073,6 +2073,33 @@ export type rugnux_summary_row = { value: string; }; +/** + * A line of the pathology checklist of `_report.txt` (its SUMMARY), in the report's words. + * `ok`: looked for and not found; `attention`: its warning fired (its codes are in the report's + * PATHOLOGY_FLAGS); `serious`: a pathology that leaves no result to use - no lattice, or a merge without + * signal (the report's verdict FAILED or UNUSABLE); `not_measured`: it could not be looked for on this run. + * + */ +export type rugnux_triage_item = { + /** + * Name of the condition, e.g. "Twinning" - the summary row's label + */ + label: string; + /** + * The PATHOLOGY_FLAGS codes the line stands for, e.g. TWINNING + */ + codes: Array; + severity: 'ok' | 'attention' | 'serious' | 'not_measured'; + /** + * The summary row's own words; empty where it has none + */ + text: string; + /** + * The report's warnings that fired for it, one per line; absent where none fired + */ + detail?: string; +}; + /** * What the run made of the model it was given, as the report's MODEL VALIDATION section states it. The * R-factors here are those of the placed model with its own coordinates and B factors; what refinement made @@ -2380,6 +2407,12 @@ export type rugnux_live_status = { verdict_text: string; summary: Array; warnings: Array; + /** + * The pathology checklist of the report, in its order. Rotation: once the run is over; serial: at each + * provisional merge and at the end. Absent until there is one. + * + */ + triage?: Array; }; export type zeromq_metadata_settings = { diff --git a/frontend/src/client/zod.gen.ts b/frontend/src/client/zod.gen.ts index 4b8d10c45..fdc45b744 100644 --- a/frontend/src/client/zod.gen.ts +++ b/frontend/src/client/zod.gen.ts @@ -877,6 +877,26 @@ export const zRugnuxSummaryRow = z.object({ value: z.string() }); +/** + * A line of the pathology checklist of `_report.txt` (its SUMMARY), in the report's words. + * `ok`: looked for and not found; `attention`: its warning fired (its codes are in the report's + * PATHOLOGY_FLAGS); `serious`: a pathology that leaves no result to use - no lattice, or a merge without + * signal (the report's verdict FAILED or UNUSABLE); `not_measured`: it could not be looked for on this run. + * + */ +export const zRugnuxTriageItem = z.object({ + label: z.string(), + codes: z.array(z.string()), + severity: z.enum([ + 'ok', + 'attention', + 'serious', + 'not_measured' + ]), + text: z.string(), + detail: z.string().optional() +}); + /** * A blob of positive mFo-DFc density the refined model leaves unexplained, with its likely reading: a rule on * what is measured, to point a person at the density - not an identification. @@ -1020,7 +1040,8 @@ export const zRugnuxLiveStatus = z.object({ verdict: z.string(), verdict_text: z.string(), summary: z.array(zRugnuxSummaryRow), - warnings: z.array(z.string()) + warnings: z.array(z.string()), + triage: z.array(zRugnuxTriageItem).optional() }); export const zZeromqMetadataSettings = z.object({ diff --git a/frontend/src/components/RugnuxPage.tsx b/frontend/src/components/RugnuxPage.tsx index 2322c28af..31ee2516a 100644 --- a/frontend/src/components/RugnuxPage.tsx +++ b/frontend/src/components/RugnuxPage.tsx @@ -5,6 +5,7 @@ import {getConfigRugnuxOptions, getRugnuxStatusOptions} from "../client/@tanstac import {rugnux_live_status} from "../client"; import {useTokenRequired} from "../auth"; import EmptyState from "./EmptyState"; +import RugnuxTriage from "./RugnuxTriage"; import RugnuxTimeline from "./RugnuxTimeline"; import RugnuxSettings from "./RugnuxSettings"; import RugnuxHero from "./RugnuxHero"; @@ -168,6 +169,7 @@ function RugnuxPage({measuring}: { measuring: boolean }) { : } + {s.triage && s.triage.length > 0 &&
}
diff --git a/frontend/src/components/RugnuxTriage.tsx b/frontend/src/components/RugnuxTriage.tsx new file mode 100644 index 000000000..0fea3f0e8 --- /dev/null +++ b/frontend/src/components/RugnuxTriage.tsx @@ -0,0 +1,57 @@ +import {Box, Tooltip, Typography} from "@mui/material"; +import CheckCircleIcon from "@mui/icons-material/CheckCircle"; +import WarningIcon from "@mui/icons-material/Warning"; +import ErrorIcon from "@mui/icons-material/Error"; +import {rugnux_triage_item} from "../client"; + +// The pathology checklist of the rugnux report (the SUMMARY of _report.txt), one line per condition: +// green - looked for and not found, orange - its warning fired, red - nothing usable came out. +// What this run could not look for is named in one grey line at the end. + +const ORDER: Record = {serious: 0, attention: 1}; + +const ICON: Record = { + serious: , + attention: , + ok: , +}; + +function TriageLine({item}: { item: rugnux_triage_item }) { + const tip = ( + + {item.label}{item.text && `: ${item.text}`} + {item.detail && {item.detail}} + {item.codes.join(" ")} + + ); + return ( + + + {ICON[item.severity]} + {item.label} + {item.text} + + + ); +} + +// Problems one to a line, so their words have the width; the fine ones packed in columns. +export default function RugnuxTriage({items}: { items: rugnux_triage_item[] }) { + const problems = items.filter(i => i.severity === "serious" || i.severity === "attention") + .sort((a, b) => ORDER[a.severity] - ORDER[b.severity]); + const fine = items.filter(i => i.severity === "ok"); + const notMeasured = items.filter(i => i.severity === "not_measured"); + return ( + + {problems.map(item => )} + 0 ? 0.5 : 0}}> + {fine.map(item => )} + + {notMeasured.length > 0 && + + Not measured: {notMeasured.map(i => i.label).join(", ")} + } + + ); +}