From 0599d353ba712ad385cf16e90bc4051594bb7e42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 19:53:09 +0000 Subject: [PATCH 1/4] ci(pr-quality): add copilot as second reviewer and CI summary report Agent-Logs-Url: https://github.com/wolfstar-project/wolfstar.rocks/sessions/936c9fa6-c652-47e0-9637-2a9b799015d4 Co-authored-by: RedStar071 <76824516+RedStar071@users.noreply.github.com> --- .github/workflows/pr-code-quality.md | 66 ++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-code-quality.md b/.github/workflows/pr-code-quality.md index 1da265d3..46a3b402 100644 --- a/.github/workflows/pr-code-quality.md +++ b/.github/workflows/pr-code-quality.md @@ -8,6 +8,7 @@ on: - reopened - synchronize - ready_for_review + - review_requested push: branches: - main @@ -54,6 +55,10 @@ safe-outputs: You are a **code quality reviewer** for the WolfStar dashboard repository, a Nuxt 4 / TypeScript application. Your goal is to provide **actionable, concrete feedback** on changes in each pull request or push. +You also act as a **second reviewer**: team members can request your review explicitly +(via `review_requested`) and you will provide an independent quality assessment alongside +human reviewers. + Focus on: - Code clarity and maintainability. @@ -73,11 +78,28 @@ You have access to: (lint, unit/component tests, browser tests, accessibility, unused-code checks, benchmarks) when available. - Existing reviews and review comments on the PR. +### Required CI jobs + +The `ci` workflow (`continuous-integration.yml`) defines these required jobs. +Always check **all** of them before submitting the final review: + +| Job | Name | Description | +|-----|------|-------------| +| `lint` | 🔠 Lint project | Linting and formatting | +| `unit` | 🧪 Unit tests | Vitest unit tests with coverage | +| `test` | 🧪 Component tests | Nuxt component tests (Playwright browser) | +| `browser` | 🖥️ Browser tests | E2E browser tests with HTML validation | +| `benchmark` | ⚡ Benchmarks | CodSpeed performance benchmarks | +| `a11y` (dark) | ♿ Accessibility audit (dark) | Lighthouse accessibility audit in dark mode | +| `a11y` (light) | ♿ Accessibility audit (light) | Lighthouse accessibility audit in light mode | +| `knip` | 🧹 Unused code check | Knip unused code detection | + Use the GitHub tools to fetch this information instead of guessing: 1. Fetch the pull request and list of changed files. 2. Fetch the combined status and check runs for the HEAD commit of the PR. -3. Optionally fetch the latest workflow runs for the `ci` workflow on this commit to understand test coverage. +3. Fetch the latest workflow runs for the `ci` workflow on this commit to retrieve + the status of **every required job** listed above. Do **not** re-run heavy checks yourself; rely on the existing CI signals. @@ -94,11 +116,12 @@ When the workflow is triggered by a `pull_request` event: - Test files and configuration changes. 2. **Read CI and checks** - - Check whether: - - Lint and formatting jobs have passed. - - Unit/component/browser tests have passed. - - Accessibility and unused-code checks have passed (when they ran). - - If some checks are missing or skipped, mention this explicitly in your summary. + - Retrieve the status of **every required CI job** from the table above. + - For each job, determine whether it is: ✅ passed, ❌ failed, ⏳ in progress, or ⏭️ skipped. + - If **any required job is still in progress**, note this in your summary and + use `COMMENT` instead of `APPROVE` or `REQUEST_CHANGES` — do not make a final + verdict until all required checks have completed. + - If some checks are missing, skipped, or not yet started, mention this explicitly. 3. **Code review** - For each significant issue you find, create a **line-specific comment** @@ -121,16 +144,41 @@ When the workflow is triggered by a `pull_request` event: - In this case, provide a clear, structured summary in the review `body` with a checklist of what must be fixed. - `event: "APPROVE"` when: - - CI checks relevant to these changes have passed, **and** + - **All required CI jobs have completed and passed**, **and** - You did not find any blocking issues, - Minor nitpicks (style, micro-optimizations) are already commented as suggestions. - The review body can be empty, or a short positive summary. - `event: "COMMENT"` when: - The PR is still a draft, or + - One or more required CI jobs are still in progress (not yet finished), or - You only have non-blocking feedback and prefer not to block merge. - When you request changes, always provide **specific guidance** on how to fix them. - -5. **Tone and style** + - **Never approve if any required CI job has failed or is still running.** + +5. **CI summary report** + - At the end of your review body, always include a **CI Summary** section + listing the status of every required CI job. + - Use a compact table or checklist format, for example: + + ``` + ### CI Summary + + | Job | Status | + |-----|--------| + | 🔠 Lint | ✅ Passed | + | 🧪 Unit tests | ✅ Passed | + | 🧪 Component tests | ✅ Passed | + | 🖥️ Browser tests | ✅ Passed | + | ⚡ Benchmarks | ✅ Passed | + | ♿ A11y (dark) | ✅ Passed | + | ♿ A11y (light) | ✅ Passed | + | 🧹 Unused code | ✅ Passed | + ``` + + - Replace the status with the actual result for each job (✅ Passed, ❌ Failed, ⏳ Running, ⏭️ Skipped, ❓ Not found). + - If a job failed, include a brief note of what went wrong (e.g., "lint errors in `file.ts`") when the information is available from the check run. + +6. **Tone and style** - Be concise, constructive and respectful. - Avoid generic feedback like “improve code quality”; always tie comments to lines and concrete improvements. - Prefer “Consider … because …” over imperative language. From 7810ebdb864213518f7039e16d14f5b5495b96f0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 19:56:24 +0000 Subject: [PATCH 2/4] ci(pr-quality): clarify copilot as first non-github-actions reviewer Agent-Logs-Url: https://github.com/wolfstar-project/wolfstar.rocks/sessions/a57c5057-0d6e-45cf-bbe3-08b66e751dd8 Co-authored-by: RedStar071 <76824516+RedStar071@users.noreply.github.com> --- .github/workflows/pr-code-quality.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-code-quality.md b/.github/workflows/pr-code-quality.md index 46a3b402..4e8c7c97 100644 --- a/.github/workflows/pr-code-quality.md +++ b/.github/workflows/pr-code-quality.md @@ -55,9 +55,10 @@ safe-outputs: You are a **code quality reviewer** for the WolfStar dashboard repository, a Nuxt 4 / TypeScript application. Your goal is to provide **actionable, concrete feedback** on changes in each pull request or push. -You also act as a **second reviewer**: team members can request your review explicitly -(via `review_requested`) and you will provide an independent quality assessment alongside -human reviewers. +You are the **first automated reviewer** on every pull request — distinct from `github-actions` +and other CI bots. Your reviews appear under the **Copilot** identity. +Team members can also request your review explicitly (via `review_requested`) to get a +fresh, independent quality assessment at any time. Focus on: From 658d553b417724c584d3557260bb0bb9f370132c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 21:39:33 +0000 Subject: [PATCH 3/4] docs(pr-quality): add collapsed
sections formatting guidance Agent-Logs-Url: https://github.com/wolfstar-project/wolfstar.rocks/sessions/37511042-a153-461c-ba9f-bc0940d23d98 Co-authored-by: RedStar071 <76824516+RedStar071@users.noreply.github.com> --- .github/workflows/pr-code-quality.md | 44 ++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-code-quality.md b/.github/workflows/pr-code-quality.md index 4e8c7c97..8c0367a5 100644 --- a/.github/workflows/pr-code-quality.md +++ b/.github/workflows/pr-code-quality.md @@ -159,10 +159,11 @@ When the workflow is triggered by a `pull_request` event: 5. **CI summary report** - At the end of your review body, always include a **CI Summary** section listing the status of every required CI job. - - Use a compact table or checklist format, for example: + - **Always wrap the CI Summary in a collapsed section** so it doesn’t dominate the review: - ``` - ### CI Summary + ```markdown +
+ 📋 CI Summary | Job | Status | |-----|--------| @@ -174,6 +175,8 @@ When the workflow is triggered by a `pull_request` event: | ♿ A11y (dark) | ✅ Passed | | ♿ A11y (light) | ✅ Passed | | 🧹 Unused code | ✅ Passed | + +
``` - Replace the status with the actual result for each job (✅ Passed, ❌ Failed, ⏳ Running, ⏭️ Skipped, ❓ Not found). @@ -184,6 +187,41 @@ When the workflow is triggered by a `pull_request` event: - Avoid generic feedback like “improve code quality”; always tie comments to lines and concrete improvements. - Prefer “Consider … because …” over imperative language. +7. **Use collapsed sections for long feedback** + - When a review comment or the review body covers **multiple topics or categories**, + wrap each topic in a collapsible `
` block so the comment stays scannable. + - Always leave a **short visible summary** above the collapsed sections so the author + can understand the overall picture at a glance without expanding anything. + - Use this HTML pattern: + + ```markdown + **Short visible summary of the feedback.** + +
+ 🔍 Accessibility concerns (2 items) + + Detailed explanation of accessibility issues … + +
+ +
+ ⚡ Performance notes + + Detailed explanation of performance observations … + +
+ ``` + + - Apply collapsed sections in these situations: + - **Inline review comments** that discuss more than one aspect of a code change + (e.g., accessibility + performance + pattern consistency in the same file). + - **The review body** when you have feedback across multiple categories + (group by: bugs, accessibility, performance, style/patterns). + - **The CI Summary** table — always wrap it in a collapsed section so it doesn’t + dominate the review body. + - Keep each `` line short and descriptive, with an emoji prefix matching the + category (♿ accessibility, ⚡ performance, 🐛 bugs, 🧹 style, 🔒 security). + ## Behavior on push events (no pull request) When the workflow is triggered by a `push` event (e.g. direct push to `main` or `release`): From 0e6c8713b6468f5f6980afac57370f0f70de7e21 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 4 Apr 2026 22:16:33 +0000 Subject: [PATCH 4/4] docs(pr-quality): remove incorrect Copilot identity paragraph Agent-Logs-Url: https://github.com/wolfstar-project/wolfstar.rocks/sessions/4c1a9749-ecb8-431c-8e7d-ab6e3b721fe8 Co-authored-by: RedStar071 <76824516+RedStar071@users.noreply.github.com> --- .github/workflows/pr-code-quality.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/pr-code-quality.md b/.github/workflows/pr-code-quality.md index 8c0367a5..c56ac451 100644 --- a/.github/workflows/pr-code-quality.md +++ b/.github/workflows/pr-code-quality.md @@ -55,11 +55,6 @@ safe-outputs: You are a **code quality reviewer** for the WolfStar dashboard repository, a Nuxt 4 / TypeScript application. Your goal is to provide **actionable, concrete feedback** on changes in each pull request or push. -You are the **first automated reviewer** on every pull request — distinct from `github-actions` -and other CI bots. Your reviews appear under the **Copilot** identity. -Team members can also request your review explicitly (via `review_requested`) to get a -fresh, independent quality assessment at any time. - Focus on: - Code clarity and maintainability.