[eslint-rules:applier] Adopt js-no-unguarded-async-write-after-effect-state-extraction in githubnext/gh-cao
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- eslint, github-actions, javascript, node.js
Hướng nghiên cứu
Start with dashboard/site/eslint.config.mjs and the named component files, especially account-menu.js and configuration-view.js; compare their async writes with guarded examples in cli-actions.js and the other listed components. The issue specifies the new rule, script, CI job and validation commands, but adding a custom ESLint rule requires understanding its AST and scope checks. Done means the new script reports warnings only, the separate CI job runs it, and the existing lint, typecheck and tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Adopt the js-no-unguarded-async-write-after-effect-state-extraction ESLint rule in githubnext/gh-cao at warn severity only. The refiner measured 6 true positives and 0 false positives on this repository (commit 6c350917). Post-await state.set(...) writes in dashboard components skip the createFactoryScope().signal.aborted guard that sibling components already use.
Action: A maintainer should assign this issue to Copilot. Acceptance: npm run lint:eslint-factory in dashboard/site runs and reports only warnings, the new CI job runs only that script, and the existing lint, typecheck and tests still pass.
Critical findings
- Adoption mode:
extend. ESLint 9 flat config already exists indashboard/site/eslint.config.mjs. The root config ignoresdashboard/site/**, so the rule belongs in the dashboard config. - The rule detects an async handler that writes reactive state after an
awaitwithout checking the component scope's abort signal. If the component unmounts first, the write lands on detached DOM. - Known unguarded sites (about 6):
account-menu.js(switchAccount/logoutfinally blocks and.then()continuations) andconfiguration-view.js(diagnostics handler). Guarded counterparts exist inui-primitives.js,table-region.js,data-view.jsandcli-actions.js. - False-positive risk: page-scoped singletons that never unmount do not need the guard. The rule should only fire where a
createFactoryScope()signal is in scope but unused after anawait. Suppress with a justified// eslint-disable-next-line. - The rule source is not yet in this repository, so the agent must add it (see prompt).
Evidence and permalinks
Upstream merged PRs in githubnext/gh-aw-cao (plain text, not linked): 15419 ui-primitives.js (guarded); 15463 table-region.js (guarded, with tests); 15483 data-view.js (guarded, with test); 15434 account-menu.js (unguarded); 15475 configuration-view.js (unguarded).
Findings in this repository: dashboard/site/src/components/account-menu.js around lines 99, 130, 241, 255 and 270; dashboard/site/src/components/configuration-view.js around lines 308-315. Guard pattern: dashboard/site/src/components/cli-actions.js around lines 299, 342 and 348.
Affected paths: dashboard/site/src/components/{ui-primitives,table-region,data-view,account-menu,configuration-view}.js.
The rule is not autofixable. The manual fix is if (scope.signal.aborted) return; after each await, before the .set().
<b>Agent prompt</b>
In githubnext/gh-cao, adopt ESLint rule js-no-unguarded-async-write-after-effect-state-extraction at warning severity only. Change only these files:
- Add
dashboard/site/eslint-rules/js-no-unguarded-async-write-after-effect-state-extraction.mjs. The rule flags<state>.set(...)calls that follow anawaitin an async function when acreateFactoryScope()scope is in lexical scope andscope.signal.abortedwas not checked between them. It must not be autofixable. - Edit
dashboard/site/eslint.config.mjsto register the rule as a local plugin with severitywarnonly. Do not change existing rule severities or enable unrelated rules. - Edit
dashboard/site/package.jsonto add the scriptlint:eslint-factory, which runs ESLint oversrc/componentswith only this rule enabled and no other behaviour changes. Do not change the existinglintscript. - Edit
.github/workflows/cid.ymlto add one NEW job namedESLint Factory (warn-only)that checks out, sets up Node 24, runsnpm ci, then runsnpm run lint:eslint-factoryindashboard/site. Do not add it to an existing job, and do not make it merge-gating.
Do not do unrelated refactoring or dependency upgrades. Do not suppress or fix existing findings. If a finding cannot be fixed or understood, stop and report it rather than silencing it. Report the resulting warning count per path.
Validate with, from dashboard/site: npm ci && npm run lint:eslint-factory && npm run lint && npm run typecheck && npm test.
Control Plane
- Correlation ID:
39671466559-562 - Central repository:
githubnext/gh-cao - Run: https://github.com/githubnext/gh-cao/actions/runs/39671466559
cao: githubnext/gh-cao, correlation: 39671466559-562
Generated by 🎯 ESLint Factory / Applier · copilot · auto · 32.7 AIC · ⌖ 0.826 AIC · ⊞ 16.7K · ◷
- expires on Nov 20, 2026, 8:43 PM UTC
- Ngôn ngữ chính
- JavaScript
- Star
- 14
- Fork
- 5
- Merge trung bình
- 3 giờ 29 phút
- Pull request đã merge (30 ngày)
- 761
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của githubnext/gh-cao
-
[aw] Upgrade availableĐang mởagentic-workflows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
githubnext/gh-cao#20168 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
repo-assist repo-assist:issue-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
githubnext/gh-cao#20041 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows self-care self-care:pages-health
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
githubnext/gh-cao#20028 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
githubnext/gh-cao#19959 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agentic-workflows self-care self-care:reactive-ui-expert
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 85/100
githubnext/gh-cao#19923 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của githubnext/gh-cao
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Fei-Away/Codex-Dream-Skin#449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
outline/outline#14489 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Claude Code plugin does not wire the edit-time Floor hookCó thể đã có người làm @dgr8akki đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Administration: required plugin configuration field stays invalid after restoring its saved valueĐang mởneeds-triage Platform(Default)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày