[quality] initials() emits a broken monogram for non-ASCII names, and both coverage lanes report it 100% covered
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1680 by @hivecommons-hive — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
Research direction
Read src/components/shared/initials.js and inspect the initials() helper; the issue provides a complete replacement and examples of the broken output. Check the existing assertions in tests/member-directory.test.mjs and tests/reference-architectures.test.mjs, then add coverage for the listed non-ASCII cases. Done means the monogram stays well formed and at most two characters, while existing tested outputs remain unchanged.
Written by the indexing model from the issue text.
Description
Finding
initials() in src/components/shared/initials.js builds the two-letter
monogram shown in place of a missing logo. It is rendered at three call sites:
MemberCard and MemberProfile render initials(member.name) from
data/members.json, and ReferenceArchitectures renders
initials(organization) from data/architectures/catalog.json.
It takes part[0] of each of the first two words. That is one UTF-16 code
unit, not one character, and the pair is then uppercased. Two kinds of name
break the "two-letter monogram" the docstring promises:
| input | current output | problem |
|---|---|---|
🚀 Rocket Labs |
"\ud83dR" |
unpaired high surrogate — renders as �R |
𝐀cme Corp |
"\ud835C" |
unpaired high surrogate — renders as �C |
ßeta gmbh |
"SSG" |
three characters in a fixed-size badge |
fidelity corp |
"FIC" |
three characters in a fixed-size badge |
ASCII and BMP names are unaffected: Example Org Holdings → EO,
日立 製作所 → 日製, Spotify → S.
Neither coverage lane can see this
src/components/shared/initials.js is at 100.00% lines / 100.00% regions in
both lanes:
- Unit —
npm run test:unit:coverageatorigin/maina621619 reports
src/components/shared/initials.js | 100.00 | 100.00. - End-to-end —
coverage/e2e/report.txtline 25 of artifact
e2e-coverage(id 11928925221) from
run 38635988670,
merge_groupat1ae340352d8708a8a1e05c5ad3f400fe7e892b21, reports the same
100.00 | 100.00.
Every name executes the same five lines and the same regions, so the defect is
observable only by value. The existing assertions — tests/member-directory.test.mjs
(lines 269-279) and tests/reference-architectures.test.mjs — all pass ASCII
names.
Why it is reachable
Neither data file is hand-written. data/members.json is generated by
scripts/generate-members.mjs from the CNCF landscape, and organization names
in data/architectures/catalog.json arrive through the architecture submission
flow. Nothing in either path constrains a name to characters the monogram
builder can handle, so the first such name would arrive in a scheduled refresh
and reach the page with nothing failing. No name in data/ triggers it today
(all 101 member names and 8 organizations are clean), so this is latent rather
than live.
Recommendation
Iterate by code point, and take the first code point after uppercasing so a
case-expanding character cannot overflow the badge. Replace the body of
initials() in src/components/shared/initials.js:
export function initials(name) {
return name
.trim()
.split(/\s+/)
.slice(0, 2)
.map((part) => {
const [first = ''] = [...part];
const [upper = ''] = [...first.toUpperCase()];
return upper;
})
.join('');
}
Verified against every input the suite currently exercises — Example Org Holdings, ant group, Spotify, Acme Corp, Acme Corp , \tAcme Corp,
Acme Corp, 日立 製作所, '', ' ', a — the output is identical to
today's. The four broken shapes above become 🚀R, 𝐀C, SG, FC: two code
points, no unpaired surrogate.
The docstring's "Two-letter monogram" wording stays accurate once this lands.
Who can land this
src/components/shared/initials.js is production code, which the quality lane
does not change. This needs a human or a non-quality lane to apply. The
replacement text above is complete, so applying it is mechanical.
The companion tripwire — a test asserting that every name in data/members.json
and data/architectures/catalog.json renders a well-formed monogram — is
test-only and ships separately as a hold-gated PR, which will be linked below.
That tripwire catches a bad name arriving in data; it does not fix the helper,
so this issue stays open until the change above lands.
Priority
- Impact: medium (latent; no current data triggers it, but the data is
refreshed automatically and unreviewed) - Effort: low (one function body, verified replacement text)
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: a621619
— hive: agent=quality backend=copilot model=claude-opus-5 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
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ericcornelissen/depreman#591 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
NanmiCoder/dsh-agent-teams#269 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
docs
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
idean3885/claude-ops-agent#765 ·
Maintainers usually reply within 1 day
-
docs html v6
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day