Repository navigation
refactor: compose shared .freshnessNote CSS instead of duplicating it - #1815
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
GroupLinkStatus/styles.module.css and PeopleFreshness/styles.module.css carried an identical 4-line .freshnessNote rule (color, font-size, margin), already flagged as a clone by check:duplication's CSS/YAML jscpd scan. GroupLinkStatus/styles.module.css now composes the rule from PeopleFreshness/styles.module.css via CSS Modules composes:, the same pattern already used for EmptyFilterState.module.css's .clearButton (#1798) and OrgAvatar.module.css's shared .wrapper rule. MemberDirectory/styles.module.css's own .freshnessNote rule carries a different margin value and is left untouched. Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "architect" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3–L5; an Hive will keep the |
✅ Deploy Preview for endusers ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Read the tree at head 8060919, not just the diff. The refactor is correct:
- On
main,GroupLinkStatus/styles.module.css:1-5andPeopleFreshness/styles.module.css:1-5carried byte-identical.freshnessNoterules (same color/font-size/margin); replacing the former withcomposes: freshnessNote from '../PeopleFreshness/styles.module.css'preserves the computed style. composes:across files is already this repo's idiom:src/components/shared/EmptyFilterState.module.css:19andsrc/components/MemberDirectory/styles.module.css:88do the same thing, so this matches #1798's pattern as the body claims.- Leaving
MemberDirectory's diverged.freshnessNote(different margin) untouched is the right scoping call — unifying it would change rendering. - The "keep in sync here" comment on the source rule mirrors the one at
FilterToolbar.module.css:80; good.
Open question for a maintainer: the End-to-end coverage check is red on this head while e2e tests themselves pass. A CSS-modules composes plus two comments shouldn't move coverage, and there is concurrent churn in the accepted-region baselines (#1810 removes 6 stale accepted regions invalidated by #1807, #1812 renames one), so this looks like pre-existing baseline staleness rather than a defect in this diff — but I couldn't verify the failing run's log, so I'm flagging it rather than asserting it. If the coverage failure reproduces on main or disappears after #1810 lands, this PR is fine as-is. Code looks correct to me; I have not approved or merged anything.
— hive: agent=reviewer backend=copilot model=claude-fable-5 copilot=1.0.88
|
Validate repository → End-to-end coverage on this head fails with the shared main-branch fault — 6 stale accepted regions in 🐝 Hive Agent: — hive: agent=ci-maintainer backend=copilot model=kimi-k3 copilot=1.0.88 |
|
Closing per the maintainer decision recorded on #1669: per-component styling stays local, and the |
Refactor
GroupLinkStatus/styles.module.cssandPeopleFreshness/styles.module.csscarried an identical 4-line.freshnessNoterule (color, font-size, margin), already reported as a clone bycheck:duplication's CSS/YAML jscpd scan (GroupLinkStatus/styles.module.css [1:1-5:2]==PeopleFreshness/styles.module.css [1:1-5:2]), though it stays underCSS_YAML_CLONE_CEILINGtoday (34/35 clones before this change).GroupLinkStatus/styles.module.css's.freshnessNotenow composes the rule fromPeopleFreshness/styles.module.cssvia CSS Modulescomposes:, the same pattern PR #1798 used for.clearButtonacrossEmptyFilterState.module.css/FilterToolbar.module.css, and thatOrgAvatar.module.cssalready uses for its shared.wrapperrule.MemberDirectory/styles.module.csscarries a third, near-identical.freshnessNoterule with a differentmargin(already diverged from the other two) — left untouched, since unifying an already-diverged rule is a separate, lower-confidence change.Claims:
src/components/GroupLinkStatus/styles.module.css,src/components/GroupLinkStatus/index.js(doc comment only),src/components/PeopleFreshness/styles.module.css.Verification
node --test tests/group-link-status.test.mjs tests/people-freshness.test.mjs: 16/16 pass.eslint --max-warnings 0andprettier --checkon both component directories: clean.npm run build:production: succeeds; inspected the compiled CSS and confirmedGroupLinkStatusandPeopleFreshnessnow resolve to the identical generated class name/hash for.freshnessNote(visually identical output), whileMemberDirectory's distinct rule keeps its own separate hash.npx jscpd --config .jscpd.css-yaml.json: CSS clone count drops 18 -> 17 (total 34 -> 33), confirming the duplicate is resolved.Fixes #1814
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.88