Skip to content

Apply progressive disclosure to firewall blocked domains alert#28332

Merged
pelikhan merged 3 commits intomainfrom
copilot/apply-progressive-disclosure-firewall-alert
Apr 24, 2026
Merged

Apply progressive disclosure to firewall blocked domains alert#28332
pelikhan merged 3 commits intomainfrom
copilot/apply-progressive-disclosure-firewall-alert

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

The firewall blocked domains [!WARNING] alert dumped all content (domain list, YAML config snippet, docs link) inline, making it noisy in comments. Wrapping the body in <details>/<summary> collapses it by default, matching the pattern already used by the integrity filter alert.

Changes

  • firewall_blocked_domains.cjsgenerateBlockedDomainsSection now emits <details>/<summary> inside the [!WARNING] block; the summary shows only the count, full details expand on click
  • firewall_blocked_domains.test.cjs — updated assertions to match new structure (<details>, <summary>Firewall blocked N …</summary>, </details>)

Before:

> [!WARNING]
> **⚠️ Firewall blocked 2 domains**
>
> The following domains were blocked ...
> - `ab.chatgpt.com`
> ...

After:

> [!WARNING]
> <details>
> <summary>Firewall blocked 2 domains</summary>
>
> The following domains were blocked ...
> - `ab.chatgpt.com`
> ...
>
> </details>

const domainList = blockedDomains.map(domain => `> - \`${domain}\`\n`).join("");
let section = "\n\n> [!WARNING]\n";
section += `> <details>\n`;
section += `> <summary>⚠️ Firewall blocked ${domainCount} ${domainWord}</summary>\n`;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove ⚠️, the warning already has an emoji

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6d342ee — the summary is now Firewall blocked N domains without the emoji.

Copilot AI requested a review from pelikhan April 24, 2026 20:10
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

…sive-disclosure-firewall-alert

# Conflicts:
#	actions/setup/js/firewall_blocked_domains.cjs

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 24, 2026

@copilot resolve the merge conflicts in this pull request

Merge conflicts resolved in 1f84c74. Main branch had refactored generateBlockedDomainsSection to use a template file — I accepted that implementation, updated the markdown template to use <details>/<summary> (without ⚠️), and updated the new tests added by main to assert the new format.

@pelikhan pelikhan marked this pull request as ready for review April 24, 2026 20:29
Copilot AI review requested due to automatic review settings April 24, 2026 20:29
@pelikhan pelikhan merged commit 194ffd4 into main Apr 24, 2026
27 checks passed
@pelikhan pelikhan deleted the copilot/apply-progressive-disclosure-firewall-alert branch April 24, 2026 20:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Applies progressive disclosure to the “firewall blocked domains” warning so the alert content is collapsed by default (via <details>/<summary>), reducing comment noise while preserving full troubleshooting guidance.

Changes:

  • Updated the firewall blocked domains markdown template to wrap the alert body in <details>/<summary>, with the summary showing only the blocked count.
  • Updated unit tests to assert the new <details> structure in the generated warning section.
Show a summary per file
File Description
actions/setup/md/firewall_blocked_domains.md Wrapes the warning body in <details>/<summary> so the domain list/config snippet/docs link are collapsed by default.
actions/setup/js/firewall_blocked_domains.test.cjs Updates assertions to match the new <details>/<summary> output structure.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants