From a3f1e6872f4f768d14899a1e70bbdc14f32e478d Mon Sep 17 00:00:00 2001
From: Kristóf Marussy <kristof@marussy.com>
Date: Sun, 20 Aug 2023 19:41:32 +0200
Subject: feat: improve semantics error reporting

Also makes model seeds cancellable to reduce server load during semantic
analysis.
---
 subprojects/frontend/src/editor/EditorButtons.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'subprojects/frontend/src/editor/EditorButtons.tsx')

diff --git a/subprojects/frontend/src/editor/EditorButtons.tsx b/subprojects/frontend/src/editor/EditorButtons.tsx
index 9b187e5c..ca51f975 100644
--- a/subprojects/frontend/src/editor/EditorButtons.tsx
+++ b/subprojects/frontend/src/editor/EditorButtons.tsx
@@ -5,8 +5,8 @@
  */
 
 import type { Diagnostic } from '@codemirror/lint';
+import CancelIcon from '@mui/icons-material/Cancel';
 import CheckIcon from '@mui/icons-material/Check';
-import ErrorIcon from '@mui/icons-material/Error';
 import FormatListNumberedIcon from '@mui/icons-material/FormatListNumbered';
 import FormatPaint from '@mui/icons-material/FormatPaint';
 import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
@@ -28,7 +28,7 @@ import type EditorStore from './EditorStore';
 function getLintIcon(severity: Diagnostic['severity'] | undefined) {
   switch (severity) {
     case 'error':
-      return <ErrorIcon fontSize="small" />;
+      return <CancelIcon fontSize="small" />;
     case 'warning':
       return <WarningIcon fontSize="small" />;
     case 'info':
@@ -95,7 +95,7 @@ export default observer(function EditorButtons({
             })}
           value="show-lint-panel"
         >
-          {getLintIcon(editorStore?.highestDiagnosticLevel)}
+          {getLintIcon(editorStore?.delayedErrors?.highestDiagnosticLevel)}
         </ToggleButton>
       </ToggleButtonGroup>
       <IconButton
-- 
cgit v1.2.3-54-g00ecf

