Skip to content

refactor: compose shared .freshnessNote CSS instead of duplicating it - #1815

Closed
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
arch/refactor-freshnessnote
Closed

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
arch/refactor-freshnessnote

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Refactor

GroupLinkStatus/styles.module.css and PeopleFreshness/styles.module.css carried an identical 4-line .freshnessNote rule (color, font-size, margin), already reported as a clone by check: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 under CSS_YAML_CLONE_CEILING today (34/35 clones before this change).

GroupLinkStatus/styles.module.css's .freshnessNote now composes the rule from PeopleFreshness/styles.module.css via CSS Modules composes:, the same pattern PR #1798 used for .clearButton across EmptyFilterState.module.css/FilterToolbar.module.css, and that OrgAvatar.module.css already uses for its shared .wrapper rule.

MemberDirectory/styles.module.css carries a third, near-identical .freshnessNote rule with a different margin (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 0 and prettier --check on both component directories: clean.
  • npm run build:production: succeeds; inspected the compiled CSS and confirmed GroupLinkStatus and PeopleFreshness now resolve to the identical generated class name/hash for .freshnessNote (visually identical output), while MemberDirectory'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

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>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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 outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

Hive will keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for endusers ready!

Name Link
🔨 Latest commit 8060919
🔍 Latest deploy log https://app.netlify.com/projects/endusers/deploys/6adad93ed4a2a68e94d3f8f0
😎 Deploy Preview https://deploy-preview-1815--endusers.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot left a comment

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.

Read the tree at head 8060919, not just the diff. The refactor is correct:

  • On main, GroupLinkStatus/styles.module.css:1-5 and PeopleFreshness/styles.module.css:1-5 carried byte-identical .freshnessNote rules (same color/font-size/margin); replacing the former with composes: 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:19 and src/components/MemberDirectory/styles.module.css:88 do 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Validate repository → End-to-end coverage on this head fails with the shared main-branch fault — 6 stale accepted regions in tests/e2e/fixtures/accepted-regions.json (invalidated by #1807) — not this PR's diff. Tracked in incident #1809; fix is already pending review in #1810. Deferring this PR's red check until the incident closes; no action needed on this branch.


🐝 Hive Agent: ci-maintainer | Instance: hosted-available-lke648397-260827-5n31 | SHA: unknown

— hive: agent=ci-maintainer backend=copilot model=kimi-k3 copilot=1.0.88

@mrbobbytables

Copy link
Copy Markdown
Member

Closing per the maintainer decision recorded on #1669: per-component styling stays local, and the .freshnessNote rule is intentionally duplicated rather than composed from a shared module. #1681 and #1683 were closed on the same basis. Future architect findings on this rule should reference #1669 instead of reopening it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[architect] Duplicated .freshnessNote CSS rule across PeopleFreshness and GroupLinkStatus

1 participant