From 4d5b6a6d101e551e706c3f519b7f5a2db89dc063 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 15 Apr 2026 07:54:57 +0200 Subject: [PATCH] Improve status message for brush selections in App.tsx --- src/app/App.tsx | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 3b36c409..33210dd8 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -6115,17 +6115,41 @@ export function App({ store, initialStatusMessage }: AppProps) { break; case "brushFace": setStatusMessage( - `Selected ${BOX_FACE_LABELS[selection.faceId]} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.` + `Selected ${ + brushList.find((brush) => brush.id === selection.brushId) === + undefined + ? selection.faceId + : getBrushFaceLabel( + brushList.find((brush) => brush.id === selection.brushId)!, + selection.faceId + ) + } on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.` ); break; case "brushEdge": setStatusMessage( - `Selected ${BOX_EDGE_LABELS[selection.edgeId]} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.` + `Selected ${ + brushList.find((brush) => brush.id === selection.brushId) === + undefined + ? selection.edgeId + : getBrushEdgeLabel( + brushList.find((brush) => brush.id === selection.brushId)!, + selection.edgeId + ) + } on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.` ); break; case "brushVertex": setStatusMessage( - `Selected ${BOX_VERTEX_LABELS[selection.vertexId]} on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.` + `Selected ${ + brushList.find((brush) => brush.id === selection.brushId) === + undefined + ? selection.vertexId + : getBrushVertexLabel( + brushList.find((brush) => brush.id === selection.brushId)!, + selection.vertexId + ) + } on ${getBrushLabelById(selection.brushId, brushList)} from the ${source}${suffix}.` ); break; case "paths":