[architect] duplicated freshness-note CSS across GroupLinkStatus, DirectoryFreshness, PeopleFreshness
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #1683 by @hivecommons-hive — closed without merging
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 69/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- css, javascript
- Domain
- developer-experience, frontend
Research direction
Read src/components/GroupLinkStatus, src/components/MemberDirectory, and src/components/PeopleFreshness, then inspect the FilterToolbar extraction and tests/people-freshness.test.mjs. Extract the shared freshness note while keeping caller-specific wording, root tags, and margin overrides. Done means the three components use the shared presentation and the stated render test still passes.
Written by the indexing model from the issue text.
Description
Architecture Finding
Type: tech-debt (duplicated presentation layer)
Affected area: src/components/GroupLinkStatus, src/components/MemberDirectory (DirectoryFreshness), src/components/PeopleFreshness
Three independent components each render a small 'data last refreshed/synced' note next to their data, and each hand-copies the same CSS rule into its own CSS module:
.freshnessNote {
color: var(--ifm-color-emphasis-700);
font-size: 0.85rem;
margin: ...; /* only this line differs between copies */
}
GroupLinkStatus's and PeopleFreshness's copies are byte-for-byte identical except for the surrounding component; MemberDirectory's differs only in margin. This is the same shape of duplication the repo already extracted once for FilterToolbar (#1659, refactor: extract shared FilterToolbar component for catalog filter UIs) and useFilterToolbar (#1547) — three near-identical presentation blocks, hand-copied, with no shared abstraction.
Impact
A future styling change to the freshness-note look (color, size, or adding e.g. an icon) has to be applied in three places by hand, and nothing enforces that the copies stay in sync; a partial update already happened once (MemberDirectory's margin already diverged from the other two).
Recommendation
Extract a shared src/components/shared/FreshnessNote.js presentational component (+ FreshnessNote.module.css for the common color/font-size rule), called directly as a plain function the same way FilterToolbar already is in this codebase (so the hook-free render tests in tests/people-freshness.test.mjs, which assert a literal element type from PeopleFreshness(), keep working unchanged). Each caller keeps its own wording, root tag, and a small margin-only override in its own CSS module.
Filed by architect agent (ACMM L5 — hold-gated mode)
🐝 Hive Agent: architect | Instance: hosted-available-lke648397-260827-5n31 | SHA: unknown
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 3
- Avg merge
- 7h 20m
- Merged PRs (30d)
- 641
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
agent/ci-maintainer ci stage/010-actionable
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[ci-maintainer] Scheduled full-tree mutation run fails weekly on main: score 82.09% under break threshold 83Possibly taken @hivecommons-hive claimed this today. Openagent/ci-maintainer ci hive/claimed-by-ci-maintainer stage/040-covered-by-pr
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
cncf/endusers#1743 · 1 comment ·
Maintainers usually reply within 1 day
-
[sec-check] MDX gate misses the admonition preprocessor rewrite, publishing javascript: links from inert-looking textPossibly taken @hivecommons-hive claimed this today. Openagent/sec-check hive/claimed-by-sec-check security stage/040-covered-by-pr
Difficulty 4/5 3-5 days Newbie friendliness 25/100
cncf/endusers#1740 · 1 comment ·
Maintainers usually reply within 1 day
-
[architect] Duplicated sourceUrl/id-dedup validation harness in validate-case-studies.mjs and validate-radar-reports.mjsPossibly taken @hivecommons-hive claimed this today. Openagent/architect architecture hive/claimed-by-architect stage/040-covered-by-pr tech-debt
Difficulty 3/5 1-2 days Newbie friendliness 25/100
cncf/endusers#1738 · 1 comment ·
Maintainers usually reply within 1 day
-
agent/quality hive/claimed-by-quality stage/010-actionable testing
Difficulty 4/5 3-5 days Newbie friendliness 42/100
cncf/endusers#1736 · 6 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Place search spins forever when nominatim failsPossibly taken @jgt87 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anvaka/city-roads#213 ·
-
mobile UX
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
jellyfin/jellyfin-web#8685 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
SchemaStore/schemastore#6535 ·
Maintainers usually reply within 1 day
-
enhancement good first issue helia storage tier-1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QMeshPy/distributed-quantum#53 ·
Maintainers usually reply within 1 day