Copilot commented on code in PR #42491:
URL: https://github.com/apache/superset/pull/42491#discussion_r3661823528


##########
superset-frontend/src/components/ErrorMessage/ErrorMessageWithStackTrace.tsx:
##########
@@ -92,13 +92,22 @@ export function ErrorMessageWithStackTrace({
         <br />
         {stackTrace && <pre>{stackTrace}</pre>}
       </>
-    ) : undefined);
+    ) : (
+      subtitle
+    ));
+
+  // When the subtitle is the only detail available (no stack trace, link, or
+  // explicit details), surface it exclusively in the collapsible "See more"
+  // section rather than inline. This guarantees an expand affordance instead
+  // of a flat, unexpandable error card.
+  const message =
+    computedDescriptionDetails === subtitle ? undefined : subtitle;

Review Comment:
   In compact mode, hiding `message` when `subtitle` is the only available 
detail causes the tooltip/modal summary to lose the subtitle (and can render 
"…: undefined"), even though a subtitle was provided. It’s better to keep the 
subtitle as `message` for compact alerts while still tucking it into 
`descriptionDetails` for the non-compact case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to