[quality] no e2e case ever selects the contributor membership filter
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1266 by @hivecommons-hive — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, playwright
- Domain
- testing
Research direction
Start with the contributor option in MEMBERSHIP_FILTERS (src/components/MemberDirectory/hooks.js) and the branch in matchesMembership (utils.js:42-44). Add a case to tests/e2e/interactions.spec.js that selects contributor on the real data, and one to tests/e2e/data-fixtures.spec.js that uses the dual-role overlay from tests/tools/e2e-data-fixtures.cjs. Done when both operands of the || execute in the E2E_COVERAGE=1 run, and the existing 342 e2e tests still pass. A linked open pull request (#1266) already exists, so check it before starting.
Written by the indexing model from the issue text.
Description
Finding
The member directory's membership <select> ships three options
(MEMBERSHIP_FILTERS, src/components/MemberDirectory/hooks.js:3-10), and
matchesMembership gives the middle one a branch of its own
(src/components/MemberDirectory/utils.js:42-44):
if (filter === 'contributor') {
return status === 'contributor' || status === 'member-and-contributor';
}
No end-to-end case has ever selected that option. The only browser case that
touches the control is tests/e2e/interactions.spec.js:102 — "membership
filtering keeps explicit roles separate from unknown profiles" — and it drives
member and unknown only. The contributor branch body is therefore a zero
region in the end-to-end report, while the unit suite covers it through a fake
DOM.
That is the precise failure shape tests/e2e/interactions.spec.js exists to
catch, stated in its own header: the unit suite drives these filters through a
fake DOM, so a hydration regression leaves every unit test green while the
shipped page renders a dead toolbar. One third of the shipped membership
control is only ever exercised against a fake DOM.
There is a second, narrower arm inside the same branch. data/members.json
holds no member-and-contributor organization (measured below: 80 member,
11 contributor, 10 unknown), so against the real build the left operand is
true for every record the filter admits and status === 'member-and-contributor'
never evaluates. That arm is not merely untested in a browser — it is
unreachable there. The repository already has the mechanism for exactly this:
tests/tools/e2e-data-fixtures.cjs overlays a dual-role organization into the
E2E_COVERAGE=1 build, and tests/e2e/data-fixtures.spec.js:180 already uses
it to assert the card label. Nothing drives the filter with it.
Evidence and provenance
-
Repository revision
365e11f(main), clean checkout,npm ci. -
Unit.
npm run test:unit:coverage(node v26.10.0, TZ=UTC) run locally
2026-10-10:src files | 100.00 | 100.00 | 9015/9015 lines | 2713/2713 regions.matchesMembershipis fully covered by the unit suite, so this is
filed as coverage-gap at priority 3 (end-to-end only), not priority 1. -
End-to-end. A full local browser run, not an inference from the unit
profile.node tests/tools/e2e-coverage-run.mjs init --dir coverage/e2e/local-1 --run-id local-1,npm run build:e2e:coverage,npm run test:e2e:coverage
(342 passed, 7.6m, chromium,E2E_COVERAGE=1),seal --status passed,
thennpm run report:e2e:coverage -- --input coverage/e2e/local-1 --build build:src/components/MemberDirectory/utils.js | 100.00 | 96.43 | | 43 src files | 100.00 | 97.13 | 2099/2099 lines | 643/662 regionsLine 43 is the branch body above.
-
Membership counts were read from the committed
data/members.json, not
assumed. -
Environment note, not a repository defect: this host has no root, so chromium's
OS packages were unpacked into a prefix withdpkg-deb -xand supplied via
LD_LIBRARY_PATH, and@swc/coreneedsSWC_NATIVE_BINDING_CACHEpointed at
a real directory because$HOME/.cacheis a symlink. Neither changes what the
browser executed. CI needs neither (npx playwright install-deps chromium).
Recommendation
One deliverable: drive the contributor option in a browser, in both the
real-data build and the overlay build, so both operands of the || execute.
- Add a case to
tests/e2e/interactions.spec.jsthat selectscontributor
against the real data and asserts the surviving cards carry a contributor
label. This runs in the gating "End-to-end tests" job too, which is where
a dead toolbar would actually ship from. - Add a case to
tests/e2e/data-fixtures.spec.jsthat selectscontributor
and asserts the overlaid dual-role organization is admitted, and dropped
under a filter that must not admit it. This is the only way to reach
status === 'member-and-contributor'.
Deliberately not split: both cases drive one branch, and separate pull requests
would be two changes to the same filter's coverage.
Priority
- Impact: medium (a third of the shipped membership control has never been
operated by a browser; the unit suite cannot see a hydration regression in it) - Effort: low
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 365e11f
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 8h 22m
- Merged PRs (30d)
- 600
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
-
[quality] initials() drops a letter when a name carries leading whitespacePossibly taken @hivecommons-hive claimed this today. Openagent/quality hive/claimed-by-scanner stage/040-covered-by-pr testing
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
cncf/endusers#1639 · 2 comments ·
Maintainers usually reply within 1 day
-
[guide] SECURITY.md Scope omits composite actions from the CodeQL scan descriptionPossibly taken @hivecommons-hive claimed this today. Openagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
Difficulty 1/5 Under an hour Newbie friendliness 25/100
cncf/endusers#1637 · 1 comment ·
Maintainers usually reply within 1 day
-
[quality] Nothing guards the camelCase JSX DOM prop convention #1603 established in the footerPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/claimed-by-quality stage/040-covered-by-pr testing
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
cncf/endusers#1633 · 1 comment ·
Maintainers usually reply within 1 day
-
[scanner] a11y: member directory card button accessible name does not contain its visible text (WCAG 2.5.3)Possibly taken @hivecommons-hive claimed this 1 day ago. Openagent/scanner bug hive/claimed-by-scanner stage/040-covered-by-pr
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cncf/endusers#1630 · 1 comment ·
Maintainers usually reply within 1 day
-
[quality] test the e2e reporter's unexecuted-chunk arm, its only untested regionPossibly taken @hivecommons-hive claimed this 1 day ago. Openagent/quality hive/claimed-by-quality stage/040-covered-by-pr testing
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
cncf/endusers#1625 · 5 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
subhranshudash13-dotcom/Contribo#74 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 67/100
ThatGuySam/doesitarm#1114 ·
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
laaielichter/Reverseport#44 ·
Maintainers usually reply within 1 day
-
failed for an unknown reason
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OpenTermsArchive/contrib-declarations#4148 ·
Maintainers usually reply within 1 day