Copilot commented on code in PR #77414:
URL: https://github.com/apache/airflow/pull/77414#discussion_r4744381589


##########
airflow-core/src/airflow/ui/src/pages/XCom/XComEntry.tsx:
##########
@@ -107,6 +114,51 @@ const XComError = ({ error }: { readonly error: unknown }) 
=> {
   );
 };
 
+const XComFullValue = ({ value }: { readonly value: string }) => {
+  const { t: translate } = useTranslation(["browse", "common"]);
+  const { onClose, onOpen, open } = useDisclosure();
+
+  return (
+    <>
+      <IconButton
+        aria-haspopup="dialog"
+        aria-label={translate("common:expand.expand")}
+        data-testid="xcom-view-full"
+        label={translate("common:expand.expand")}

Review Comment:
   Please add a screenshot of the XCom view before this change, or a short 
before-and-after recording, to the PR description; the current images show the 
new table button and dialog but not the prior UI.



##########
airflow-core/src/airflow/ui/src/pages/XCom/XComEntry.test.tsx:
##########
@@ -51,6 +51,27 @@ const renderValue = (value: string) => {
 };
 
 describe("XComEntry", () => {
+  it("opens long values in a dialog from the View full button", async () => {
+    const longValue = Array.from({ length: 20 }, (_, index) => `Line 
${String(index + 1)}`).join("\n");

Review Comment:
   The long-value fixture is only 150 characters, so it exercises the 
line-count condition but never the new `> 200` character condition. Both new 
tests still pass if that character check is removed, leaving long single-line 
values unprotected against regression. Please parameterize the dialog test with 
a 201-character single-line string as well.



-- 
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]

Reply via email to