From 167ffc8ab37a95ab2ef36d82cd628010308115b5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Mar 2026 18:03:10 +0000
Subject: [PATCH 1/3] Initial plan


From ef44e99dc035f00f70864da453ccb18ec2b496a2 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Mar 2026 18:13:41 +0000
Subject: [PATCH 2/3] feat: apply delight aesthetic and progressive discovery
 to protected file message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Use HTML <details> blocks to hide the long shell instructions in
manifest protection fallback templates and the YAML remediation
snippet in the agent failure issue context builder.

Visible at a glance: the WARNING callout with files + explanation.
Progressively discoverable: instructions collapsed under a 📋 / ⚙️ summary."

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c4789912-cc8a-42c5-9c7a-ed2027914c2b
---
 actions/setup/js/handle_agent_failure.cjs                  | 3 ++-
 .../setup/md/manifest_protection_push_failed_fallback.md   | 5 ++++-
 .../setup/md/manifest_protection_push_to_pr_fallback.md    | 7 +++++--
 3 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/actions/setup/js/handle_agent_failure.cjs b/actions/setup/js/handle_agent_failure.cjs
index c050f709d04..557516c8165 100644
--- a/actions/setup/js/handle_agent_failure.cjs
+++ b/actions/setup/js/handle_agent_failure.cjs
@@ -369,8 +369,9 @@ function buildCodePushFailureContext(codePushFailureErrors, pullRequest = null,
       yamlSnippet += `  ${yamlKey}:\n    protected-files: fallback-to-issue\n`;
     }
     yamlSnippet += "```\n";
-    context += "\nTo review and apply these changes manually, configure `protected-files: fallback-to-issue` — the agent will create a review issue with instructions instead of blocking:\n";
+    context += "\n<details>\n<summary>⚙️ Configure <code>protected-files: fallback-to-issue</code></summary>\n\n";
     context += yamlSnippet;
+    context += "</details>\n";
   }
 
   // Patch size exceeded section
diff --git a/actions/setup/md/manifest_protection_push_failed_fallback.md b/actions/setup/md/manifest_protection_push_failed_fallback.md
index c58ec133890..9ffdd289d9b 100644
--- a/actions/setup/md/manifest_protection_push_failed_fallback.md
+++ b/actions/setup/md/manifest_protection_push_failed_fallback.md
@@ -9,7 +9,8 @@
 >
 > The push was rejected because GitHub Actions does not have `workflows` permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission. A human must create the pull request manually.
 
-To create a pull request with the changes:
+<details>
+<summary>📋 Create the pull request manually</summary>
 
 ```sh
 # Download the patch from the workflow run
@@ -26,4 +27,6 @@ git push origin {branch_name}
 gh pr create --title '{title}' --base {base_branch} --head {branch_name} --repo {repo}
 ```
 
+</details>
+
 {footer}
diff --git a/actions/setup/md/manifest_protection_push_to_pr_fallback.md b/actions/setup/md/manifest_protection_push_to_pr_fallback.md
index 7c1292b19be..18c028c9103 100644
--- a/actions/setup/md/manifest_protection_push_to_pr_fallback.md
+++ b/actions/setup/md/manifest_protection_push_to_pr_fallback.md
@@ -9,12 +9,13 @@
 
 ---
 
+<details>
+<summary>📋 Apply the patch after review</summary>
+
 The patch is available in the workflow run artifacts:
 
 **Workflow Run:** [View run details and download patch artifact]({run_url})
 
-To apply the patch after review:
-
 ```sh
 # Download the artifact from the workflow run
 gh run download {run_id} -n agent -D /tmp/agent-{run_id}
@@ -26,4 +27,6 @@ git am --3way /tmp/agent-{run_id}/{patch_file_name}
 git push origin {branch_name}
 ```
 
+</details>
+
 To route changes like this to a review issue instead of blocking, configure `protected-files: fallback-to-issue` in your workflow configuration.

From 32889ce892fdf845ab281d169d8fd564b80279bb Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Sun, 22 Mar 2026 18:29:13 +0000
Subject: [PATCH 3/3] fix: wrap details summary text in bold b element

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/78239d70-3ab0-41c8-b7c0-fece6101cb8c
---
 actions/setup/js/handle_agent_failure.cjs                    | 2 +-
 actions/setup/md/manifest_protection_push_failed_fallback.md | 2 +-
 actions/setup/md/manifest_protection_push_to_pr_fallback.md  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/actions/setup/js/handle_agent_failure.cjs b/actions/setup/js/handle_agent_failure.cjs
index 557516c8165..08a7173cb1a 100644
--- a/actions/setup/js/handle_agent_failure.cjs
+++ b/actions/setup/js/handle_agent_failure.cjs
@@ -369,7 +369,7 @@ function buildCodePushFailureContext(codePushFailureErrors, pullRequest = null,
       yamlSnippet += `  ${yamlKey}:\n    protected-files: fallback-to-issue\n`;
     }
     yamlSnippet += "```\n";
-    context += "\n<details>\n<summary>⚙️ Configure <code>protected-files: fallback-to-issue</code></summary>\n\n";
+    context += "\n<details>\n<summary><b>⚙️ Configure <code>protected-files: fallback-to-issue</code></b></summary>\n\n";
     context += yamlSnippet;
     context += "</details>\n";
   }
diff --git a/actions/setup/md/manifest_protection_push_failed_fallback.md b/actions/setup/md/manifest_protection_push_failed_fallback.md
index 9ffdd289d9b..b38890d13f7 100644
--- a/actions/setup/md/manifest_protection_push_failed_fallback.md
+++ b/actions/setup/md/manifest_protection_push_failed_fallback.md
@@ -10,7 +10,7 @@
 > The push was rejected because GitHub Actions does not have `workflows` permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission. A human must create the pull request manually.
 
 <details>
-<summary>📋 Create the pull request manually</summary>
+<summary><b>📋 Create the pull request manually</b></summary>
 
 ```sh
 # Download the patch from the workflow run
diff --git a/actions/setup/md/manifest_protection_push_to_pr_fallback.md b/actions/setup/md/manifest_protection_push_to_pr_fallback.md
index 18c028c9103..567ad7ef57e 100644
--- a/actions/setup/md/manifest_protection_push_to_pr_fallback.md
+++ b/actions/setup/md/manifest_protection_push_to_pr_fallback.md
@@ -10,7 +10,7 @@
 ---
 
 <details>
-<summary>📋 Apply the patch after review</summary>
+<summary><b>📋 Apply the patch after review</b></summary>
 
 The patch is available in the workflow run artifacts:
 
